/* Dropset reference palette. App UI only; document and print palettes stay original. */
@media screen {
body{background:#030104;color:#f7f7f8;color-scheme:dark}
#sidebar{background:#09080b;border-color:#343239}header{background:#09080b;border-color:#343239}.brandmark{background:#f7f7f8;color:#141217}.brand-sub{color:#b6b4bd}
.workspace{background:#1d1c21;border-color:#343239}.avatar{background:#2b2a30;color:#f7f7f8}.workspace small,.chev{color:#b6b4bd}
nav a{color:#b6b4bd}nav a:hover{background:#1d1c21;color:#fff}nav a.active{background:#2b2a30;color:#fff}nav .nav-count{background:#434149;color:#fff}.nav-group{color:#a9a6b1}
.sidebar-bottom p,.text-button,.local-label,.crumb{color:#b6b4bd}.crumb b{color:#f7f7f8}.crumb span{color:#77747f}.demo-badge i,.local-label i{background:#d0cdd6}
:is(h1,h2,h3):not(.document *){color:#f7f7f8}:is(.subtitle,.panel-head small,.stat-top,.stat-foot,.chart-note,.chart-labels span,.activity-item small,.table-foot,footer,.section-label,.summary-caption,.layout-picker p,.live-preview-heading small):not(.document *){color:#b6b4bd}
:is(.panel,.stat):not(.document *){background:#1d1c21;border-color:#343239;border-radius:16px}.stat-icon,.activity-dot{background:#2b2a30;color:#e2dfe7}.stat-foot .good{background:#303038;color:#e4e1e9}.chart-total,.stat-value{color:#f7f7f8}
.chart{border-color:#434149;background:repeating-linear-gradient(to top,transparent 0,transparent 37px,#343239 38px,#343239 39px)}.bar{background:#64616c}.bar-col:last-child .bar{background:#f0edf5}.bar:hover{background:#c3bfce}.select-small{background:#2b2a30;border-color:#434149;color:#ddd9e4}
.activity-item{border-color:#343239}.activity-item .activity-amount,.activity-item strong{color:#f0edf5}
:is(.button):not(.document *){background:#2b2a30;border-color:#49464f;color:#f7f7f8}.button:hover:not(.document *){background:#3a3841}.button.primary:not(.document *){background:#f7f7f8;border-color:#f7f7f8;color:#141217;box-shadow:none}.button.primary:hover:not(.document *){background:#dedbe5;border-color:#dedbe5}.button.dark{background:#f7f7f8;color:#141217}.button:disabled{opacity:.55}
:is(button,a):focus-visible{outline:3px solid #d6cde9;outline-offset:3px}.link-button:not(.document *){color:#eeebf3}.icon-button{color:#c5c1cd}.icon-button:hover{background:#343239}
.tabs{background:#121115}.tabs button{color:#b6b4bd}.tabs button.active{background:#3b3842;color:#fff;box-shadow:none}
:is(input,select,textarea):not(.document *){background:#121115;border-color:#49464f;color:#f7f7f8;color-scheme:dark}.search input{background:#121115;border-color:#49464f}.search svg{color:#bbb7c4}input::placeholder,textarea::placeholder{color:#a9a5b2}input:focus,select:focus,textarea:focus{border-color:#d6cde9;box-shadow:0 0 0 3px #d6cde926}label:not(.document *){color:#d3cfdc}
:is(th):not(.document *){background:#17161b;border-color:#343239;color:#bbb7c4}:is(td):not(.document *){border-color:#343239;color:#b6b4bd}.invoice-row:hover{background:#27252d}:is(.amount):not(.document *){color:#f7f7f8}.client-cell strong{color:#f7f7f8}.client-cell small{color:#b6b4bd}.client-icon:not(.document *){background:#343139!important;color:#f3eff8}.status{background:#343139;color:#e1dce9}.status.paid,.status.accepted{background:#293a32;color:#b9e9cd}.status.sent{background:#30313d;color:#d4d4ef}.status.overdue{background:#4a252e;color:#ffadb5}.status.draft{background:#493913;color:#ffdc7a}.table-foot,.client-card-bottom,.form-section{border-color:#343239}
.client-card p{color:#b6b4bd}.notice{background:#27252e;border-color:#49464f;color:#d8d3e1}.empty{color:#b6b4bd}.empty strong{color:#f7f7f8}.add-line{background:#26242c;border-color:#5d5867;color:#e4deed}
.summary-panel .summary-row{color:#b6b4bd}.summary-panel .summary-row strong{color:#e9e5f0}.summary-panel .summary-row.total{border-color:#49464f}.summary-panel .summary-row.total strong{color:#fff}
.layout-option{background:#28262e;border-color:#49464f;color:#ded9e7}.layout-option:hover{background:#36323e}.layout-option.selected{background:#403a49;border-color:#f2edf8;color:#fff;box-shadow:0 0 0 1px #f2edf8}.layout-mini{color-scheme:light}#live-document{background:#100e13;border:1px solid #343239}
dialog{background:#1d1c21;border-color:#49464f;color:#f7f7f8}.modal-head{background:#17151b;border-color:#343239}.modal-actions{background:#17151b;border-color:#343239}.modal-head small{color:#b6b4bd!important}dialog::backdrop{background:#030104b3}#toast{background:#f0edf5;color:#17131c;border:1px solid #fff}
/* Explicit isolation from the dark app canvas, including inherited text and color scheme. */
.document{color:#19212e;color-scheme:light;--bg:#f6f7f9;--paper:#fff;--ink:#19212e;--muted:#7b8493;--line:#e9ecf1;--accent:#315ee8;--soft:#eef2ff;--green:#268267}.document.layout-midnight-ledger{color:#eceef0}.document.layout-aurora{color:#fff}
}

/* Airy Shadow light appearance; the original dark reference remains the default. */
@media screen {
:where(html[data-theme="light"]) body{background:#ffffff;color:#181f2c;color-scheme:light}
:where(html[data-theme="light"]) #sidebar{background:#ffffff;border-color:#e1e7f2}
:where(html[data-theme="light"]) header{background:#ffffff;border-color:#e1e7f2}
:where(html[data-theme="light"]) .brandmark{background:#181f2c;color:#ffffff}
:where(html[data-theme="light"]) .brand-sub{color:#505a6c}
:where(html[data-theme="light"]) .workspace{background:#ffffff;border-color:#e1e7f2}
:where(html[data-theme="light"]) .avatar{background:#f4f7fd;color:#181f2c}
:where(html[data-theme="light"]) .workspace small,:where(html[data-theme="light"]) .chev{color:#505a6c}
:where(html[data-theme="light"]) nav a{color:#505a6c}
:where(html[data-theme="light"]) nav a:hover{background:#ffffff;color:#181f2c}
:where(html[data-theme="light"]) nav a.active{background:#f4f7fd;color:#181f2c}
:where(html[data-theme="light"]) nav .nav-count{background:#d5deee;color:#181f2c}
:where(html[data-theme="light"]) .nav-group{color:#505a6c}
:where(html[data-theme="light"]) .sidebar-bottom p,:where(html[data-theme="light"]) .text-button,:where(html[data-theme="light"]) .local-label,:where(html[data-theme="light"]) .crumb{color:#505a6c}
:where(html[data-theme="light"]) .crumb b{color:#181f2c}
:where(html[data-theme="light"]) .crumb span{color:#505a6c}
:where(html[data-theme="light"]) .demo-badge i,:where(html[data-theme="light"]) .local-label i{background:#344f86}
:where(html[data-theme="light"]) :is(h1,h2,h3):not(.document *){color:#181f2c}
:where(html[data-theme="light"]) :is(.subtitle,.panel-head small,.stat-top,.stat-foot,.chart-note,.chart-labels span,.activity-item small,.table-foot,footer,.section-label,.summary-caption,.layout-picker p,.live-preview-heading small):not(.document *){color:#505a6c}
:where(html[data-theme="light"]) :is(.panel,.stat):not(.document *){background:#ffffff;border-color:#e1e7f2;border-radius:16px}
:where(html[data-theme="light"]) .stat-icon,:where(html[data-theme="light"]) .activity-dot{background:#f4f7fd;color:#344f86}
:where(html[data-theme="light"]) .stat-foot .good{background:#eaf1fc;color:#344f86}
:where(html[data-theme="light"]) .chart-total,:where(html[data-theme="light"]) .stat-value{color:#181f2c}
:where(html[data-theme="light"]) .chart{border-color:#d5deee;background:repeating-linear-gradient(to top,transparent 0,transparent 37px,#e1e7f2 38px,#e1e7f2 39px)}
:where(html[data-theme="light"]) .bar{background:#6680ab}
:where(html[data-theme="light"]) .bar-col:last-child .bar{background:#344f86}
:where(html[data-theme="light"]) .bar:hover{background:#263d6a}
:where(html[data-theme="light"]) .select-small{background:#f4f7fd;border-color:#d5deee;color:#344f86}
:where(html[data-theme="light"]) .activity-item{border-color:#e1e7f2}
:where(html[data-theme="light"]) .activity-item .activity-amount,:where(html[data-theme="light"]) .activity-item strong{color:#344f86}
:where(html[data-theme="light"]) :is(.button):not(.document *){background:#f4f7fd;border-color:#8795a9;color:#181f2c}
:where(html[data-theme="light"]) .button:hover:not(.document *){background:#edf3fc}
:where(html[data-theme="light"]) .button.primary:not(.document *){background:#344f86;border-color:#344f86;color:#ffffff;box-shadow:none}
:where(html[data-theme="light"]) .button.primary:hover:not(.document *){background:#273e70;border-color:#273e70}
:where(html[data-theme="light"]) .button.dark{background:#181f2c;color:#ffffff}
:where(html[data-theme="light"]) .button:disabled{opacity:.55}
:where(html[data-theme="light"]) :is(button,a):focus-visible{outline:3px solid #344f86;outline-offset:3px}
:where(html[data-theme="light"]) .link-button:not(.document *){color:#344f86}
:where(html[data-theme="light"]) .icon-button{color:#505a6c}
:where(html[data-theme="light"]) .icon-button:hover{background:#e1e7f2}
:where(html[data-theme="light"]) .tabs{background:#ffffff}
:where(html[data-theme="light"]) .tabs button{color:#505a6c}
:where(html[data-theme="light"]) .tabs button.active{background:#e8effb;color:#181f2c;box-shadow:none}
:where(html[data-theme="light"]) :is(input,select,textarea):not(.document *){background:#ffffff;border-color:#8795a9;color:#181f2c;color-scheme:light}
:where(html[data-theme="light"]) .search input{background:#ffffff;border-color:#8795a9}
:where(html[data-theme="light"]) .search svg{color:#505a6c}
:where(html[data-theme="light"]) input::placeholder,:where(html[data-theme="light"]) textarea::placeholder{color:#505a6c}
:where(html[data-theme="light"]) input:focus,:where(html[data-theme="light"]) select:focus,:where(html[data-theme="light"]) textarea:focus{border-color:#344f86;box-shadow:0 0 0 3px #344f8626}
:where(html[data-theme="light"]) label:not(.document *){color:#505a6c}
:where(html[data-theme="light"]) :is(th):not(.document *){background:#f8faff;border-color:#e1e7f2;color:#505a6c}
:where(html[data-theme="light"]) :is(td):not(.document *){border-color:#e1e7f2;color:#505a6c}
:where(html[data-theme="light"]) .invoice-row:hover{background:#f4f7fd}
:where(html[data-theme="light"]) :is(.amount):not(.document *){color:#181f2c}
:where(html[data-theme="light"]) .client-cell strong{color:#181f2c}
:where(html[data-theme="light"]) .client-cell small{color:#505a6c}
:where(html[data-theme="light"]) .client-icon:not(.document *){background:#eaf1fc!important;color:#344f86}
:where(html[data-theme="light"]) .status{background:#eae4e2;color:#4b404b}
:where(html[data-theme="light"]) .status.paid,:where(html[data-theme="light"]) .status.accepted{background:#e3f3e9;color:#23533b}
:where(html[data-theme="light"]) .status.sent{background:#eeedf5;color:#4b3f67}
:where(html[data-theme="light"]) .status.overdue{background:#fce7e9;color:#9c2836}
:where(html[data-theme="light"]) .status.draft{background:#fff2c2;color:#6b4e07}
:where(html[data-theme="light"]) .table-foot,:where(html[data-theme="light"]) .client-card-bottom,:where(html[data-theme="light"]) .form-section{border-color:#e1e7f2}
:where(html[data-theme="light"]) .client-card p{color:#505a6c}
:where(html[data-theme="light"]) .notice{background:#f4f7fd;border-color:#8795a9;color:#344f86}
:where(html[data-theme="light"]) .empty{color:#505a6c}
:where(html[data-theme="light"]) .empty strong{color:#181f2c}
:where(html[data-theme="light"]) .add-line{background:#f8faff;border-color:#8795a9;color:#344f86}
:where(html[data-theme="light"]) .summary-panel .summary-row{color:#505a6c}
:where(html[data-theme="light"]) .summary-panel .summary-row strong{color:#344f86}
:where(html[data-theme="light"]) .summary-panel .summary-row.total{border-color:#8795a9}
:where(html[data-theme="light"]) .summary-panel .summary-row.total strong{color:#181f2c}
:where(html[data-theme="light"]) .layout-option{background:#f8faff;border-color:#8795a9;color:#344f86}
:where(html[data-theme="light"]) .layout-option:hover{background:#edf3fc}
:where(html[data-theme="light"]) .layout-option.selected{background:#edf3fc;border-color:#344f86;color:#181f2c;box-shadow:0 0 0 1px #344f86}
:where(html[data-theme="light"]) .layout-mini{color-scheme:light}
:where(html[data-theme="light"]) #live-document{background:#f4f7fd;border:1px solid #e1e7f2}
:where(html[data-theme="light"]) dialog{background:#ffffff;border-color:#8795a9;color:#181f2c}
:where(html[data-theme="light"]) .modal-head{background:#ffffff;border-color:#e1e7f2}
:where(html[data-theme="light"]) .modal-actions{background:#ffffff;border-color:#e1e7f2}
:where(html[data-theme="light"]) .modal-head small{color:#505a6c!important}
:where(html[data-theme="light"]) dialog::backdrop{background:#181f2c66}
:where(html[data-theme="light"]) #toast{background:#344f86;color:#ffffff;border:1px solid #344f86}

:where(html[data-theme="light"]) .eyebrow{color:#505a6c}
:where(html[data-theme="light"]) .layout-option.selected{color:#181f2c}
:where(html[data-theme="light"]) .button.dark{border-color:#181f2c}
/* Semantic colors for features outside the main dashboard. */
html{--fc-mode-surface:#1d1c21;--fc-mode-soft:#2b2a30;--fc-mode-border:#49464f;--fc-mode-text:#f7f7f8;--fc-mode-muted:#b6b4bd}
html[data-theme="light"]{--fc-mode-surface:#ffffff;--fc-mode-soft:#f4f7fd;--fc-mode-border:#8795a9;--fc-mode-text:#181f2c;--fc-mode-muted:#505a6c}
.theme-switch{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 10px;border:1px solid var(--fc-mode-border);border-radius:8px;background:var(--fc-mode-soft);color:var(--fc-mode-text);font-size:11px;font-weight:650;white-space:nowrap}
.theme-switch:hover{background:var(--fc-mode-surface)}
.theme-switch::before{content:"";width:12px;height:12px;flex-shrink:0;border:1.5px solid currentColor;border-radius:50%;background:linear-gradient(90deg,currentColor 50%,transparent 50%)}
.theme-switch[aria-checked="true"]::before{background:linear-gradient(90deg,transparent 50%,currentColor 50%)}
}
@media screen and (max-width:380px){.theme-switch{gap:6px;padding-inline:7px}header{padding-inline:12px;gap:8px}.header-right{gap:7px}}
@media print{.theme-switch{display:none!important}}

/* Smoked glass across the rounded app cards only. */
@media screen {
  :root {
    --fc-glass-fill: linear-gradient(145deg, rgba(255,255,255,.09) 0%, rgba(255,255,255,.035) 38%, rgba(255,255,255,0) 76%);
    --fc-glass-base: rgba(29,28,33,.93);
    --fc-glass-edge: rgba(233,227,244,.15);
    --fc-glass-shine: rgba(255,255,255,.07);
    --fc-glass-shadow: rgba(0,0,0,.23);
  }
  :root[data-theme="light"] {
    --fc-glass-fill: linear-gradient(165deg,#ffffff 10%,#ffffff 41%,#f4f7fd 100%);
    --fc-glass-base: #ffffff;
    --fc-glass-edge: #e1e7f2;
    --fc-glass-shine: #ffffff;
  }
  main :is(.panel,.stat):not(.document, .document *) {
    background-color: var(--fc-glass-base);
    background-image: var(--fc-glass-fill);
    border-color: var(--fc-glass-edge);
    box-shadow: inset 0 1px 0 var(--fc-glass-shine), 0 8px 22px -12px var(--fc-glass-shadow);
  }
  :root[data-theme="light"] main :is(.panel,.stat):not(.document, .document *) {
    box-shadow: inset 0 1px 0 #ffffff,inset 0 2px 5px #ffffffa0,0 23px 45px -20px #536a965e;
  }
}
