/* Shared night palette: applied only to the selected dark theme. */
html[data-theme="dark"]{--p360-night-bg:#091725;--p360-night-card:#10263d;--p360-night-raised:#17334f;--p360-night-line:#34516e;--p360-night-text:#e5effc;--p360-night-muted:#aec1d8;color-scheme:dark}
html[data-theme="dark"] body{background-color:var(--p360-night-bg);color:var(--p360-night-text)}
html[data-theme="dark"] :is(.admin-card,.card,.modal-content,dialog,.customer-address-card,.customer-invoice-card,.order-cargo-card,.logo-inv-stat,.logo-inv-filters,.logo-invoice-modal-dialog,.basitkargo-modal-dialog,.customer-doc-modal-dialog,.customer-doc-modal-item,.logo-mode-card,.recipient-choice,.update-dropzone,.update-live-panel,.update-server-limits,.payment-expiry-summary){background:var(--p360-night-card)!important;color:var(--p360-night-text)!important;border-color:var(--p360-night-line)!important}
html[data-theme="dark"] :is(.admin-card-head,.settings-section-head,.modal-header,.modal-footer,.invoice-send-footer,.logo-invoice-modal-head,.basitkargo-modal-head,.customer-doc-modal-head,.update-confirm-box,.update-current-file,.update-log){background:var(--p360-night-raised)!important;color:var(--p360-night-text)!important;border-color:var(--p360-night-line)!important}
html[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=submit]):not([type=button]),textarea,select,.form-control,.select2-selection,.select2-dropdown,.select2-search__field){background-color:#0b1e31!important;color:#e3efff!important;border-color:#3b5877!important}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#9aafc7!important;opacity:1}
html[data-theme="dark"] :is(input,textarea,select):disabled{color:#a6b9cd!important;opacity:.8}
html[data-theme="dark"] :is(.admin-card,.card,dialog,.modal-content) :is(h1,h2,h3,h4,label,legend){color:#e5effc}
html[data-theme="dark"] :is(.muted,.text-muted,.help-text,.form-text,.section-kicker){color:#aec1d8!important}
html[data-theme="dark"] :is(table.table,.admin-table) :is(th,td){border-color:#304b68!important;color:#dbe9fa}
html[data-theme="dark"] :is(table.table,.admin-table) th{background:#17334f!important}
html[data-theme="dark"] :is(.btn-light,.btn-outline,.btn-secondary,.btn-outline-secondary,.btn-outline-primary){background:#193854!important;color:#deebff!important;border-color:#42658a!important}
html[data-theme="dark"] :is(.alert-info,.alert-primary){background:#173959!important;color:#cde6ff!important;border-color:#386897!important}
html[data-theme="dark"] :is(.alert-success){background:#153f32!important;color:#a3edc6!important;border-color:#357857!important}
html[data-theme="dark"] :is(.alert-danger,.alert-error){background:#492631!important;color:#ffc0c7!important;border-color:#8a4756!important}
html[data-theme="dark"] :is(.alert-warning){background:#45391f!important;color:#ffe1a4!important;border-color:#846935!important}
html[data-theme="dark"] :is(dialog,.modal-content)::backdrop{background:#020b17b3}
html[data-theme="dark"] :focus-visible{outline-color:#80b7ff}
html[data-theme="dark"] *{scrollbar-color:#46627e #102438}
/* E-mail interface and editable preview; styles never enter sent HTML. */
html[data-theme="dark"] #wmApp{--wm-navy:#e5effc;--wm-line:#34516e}
html[data-theme="dark"] #wmApp :is(.wm-btn:not(.primary):not(.danger),.wm-toolbar button,.wm-file){background:#193854!important;color:#dfecff!important;border-color:#42658a!important}
html[data-theme="dark"] #wmApp .wm-nav>button:not(.primary),html[data-theme="dark"] #wmApp .wm-nav>a{color:#c3d5eb}
html[data-theme="dark"] #wmApp .wm-nav>button.active{background:#245183;color:#fff}
html[data-theme="dark"] #wmApp :is(.wm-heading p,.wm-empty p,.wm-meta,.wm-hint,.wm-nav small,.wm-mail-row small,.wm-dialog small){color:#aec1d8!important}
html[data-theme="dark"] #wmApp :is(.wm-mail-row,.wm-list-tools,.wm-pages,.wm-toolbar,.wm-compose-fields,.wm-files,.wm-dialog header,.wm-dialog footer){border-color:#34516e!important}
html[data-theme="dark"] #wmApp :is(.wm-editor,.wm-signature-preview,#wmSignatureEditor){background:#0c2034!important;color:#deebff!important;border-color:#34516e!important}
html[data-theme="dark"] #wmApp :is(.wm-editor,.wm-signature-preview) :is(div,p,span,b,strong,a,td,font){color:#deebff!important;background-color:transparent!important}
html[data-theme="dark"] #wmNotice{background:#173959!important;color:#d6eaff!important}
html[data-theme="dark"] #wmApp .wm-frame{background:#0c2034;border-color:#34516e}
/* SMS composer, directory, history and confirmation. */
html[data-theme="dark"] #smsApp{--sc-ink:#e5effc;--sc-line:#34516e}
html[data-theme="dark"] #smsApp :is(.sc-card,#scConfirm){background:#10263d;color:#e5effc;border-color:#34516e}
html[data-theme="dark"] #smsApp :is(.sc-heading p,small,.sc-meta,.sc-log p,#scConfirmPhones){color:#aec1d8}
html[data-theme="dark"] #smsApp :is(.sc-btn:not(.sc-primary):not(.sc-danger),.sc-chip){background:#1a3a59;color:#d9eaff;border-color:#42658a}
html[data-theme="dark"] #smsApp .sc-preview{background:linear-gradient(120deg,#132e49,#123a3c);border-color:#345a70}
html[data-theme="dark"] #smsApp .sc-contact:has(input:checked){background:#214775;border-color:#6aa7f5}
html[data-theme="dark"] #smsApp .sc-contact em{color:#92c3ff}
html[data-theme="dark"] #smsApp .sc-badge{background:#45391f;color:#ffe1a4}
html[data-theme="dark"] #smsApp .sc-badge.accepted{background:#153f32;color:#a3edc6}
html[data-theme="dark"] #smsApp #scNotice{background:#173959;color:#d6eaff}
html[data-theme="dark"] #scConfirm header button{color:#c6d9ee}
html[data-theme="dark"] .stock-line.in_stock,html[data-theme="dark"] .stock-line.in_stock *{color:#71dbad!important}
html[data-theme="dark"] .stock-line.out_of_stock,html[data-theme="dark"] .stock-line.out_of_stock *{color:#ffa5b0!important}
