/* Personal appearance, stored in this browser. Keep the existing light palette. */
:root { color-scheme: light; }
.theme-settings-body { padding: 0 25px 25px; }
.theme-choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.theme-choices legend { color: var(--ink); font-weight: 600; font-size: 13px; margin-bottom: 12px; padding: 0; }
.theme-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.theme-option { display: block; position: relative; min-width: 0; cursor: pointer; }
.theme-option input[type=radio] { position: absolute; top: 16px; right: 15px; z-index: 1; width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: #15796f; cursor: pointer; }
.theme-option-body { display: block; border: 2px solid var(--border); border-radius: 10px; padding: 13px; height: 100%; }
.theme-option-title { display: block; padding-right: 26px; font-size: 14px; font-weight: 600; color: var(--ink); }
.theme-option input:checked + .theme-option-body { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.theme-option input:focus-visible + .theme-option-body { outline: 2px solid var(--teal); outline-offset: 5px; }
.theme-mini-preview { display: grid; grid-template-columns: 22% 1fr; grid-template-rows: 17px 1fr; height: 84px; overflow: hidden; border-radius: 5px; margin-top: 14px; border: 1px solid #dce5e5; background: #f5f7f8; }
.theme-mini-preview::before { content: ''; grid-row: 1 / 3; background: #fff; border-right: 1px solid #dce5e5; }
.theme-mini-preview::after { content: ''; grid-column: 2; grid-row: 1; background: #fff; border-bottom: 1px solid #dce5e5; }
.theme-mini-preview i { grid-column: 2; grid-row: 2; display: block; border-radius: 3px; margin: 10px; background: #fff; border: 1px solid #dce5e5; box-shadow: inset 0 8px #e2eee9; }
.theme-mini-dark { background: #101a20; border-color: #35464e; }
.theme-mini-dark::before,.theme-mini-dark::after { background: #1a2931; border-color: #35464e; }
.theme-mini-dark i { background: #1a2931; border-color: #35464e; box-shadow: inset 0 8px #285047; }
.theme-mini-system { background: linear-gradient(90deg,#f5f7f8 50%,#101a20 50%); }
.theme-mini-system::after,.theme-mini-system i { background: linear-gradient(90deg,#fff 36%,#1a2931 36%); }
.theme-mini-system i { box-shadow: none; border-color: #7a8b90; }
.theme-help,.theme-save-status { font-size: 12px; line-height: 1.8; margin-top: 18px; color: #60766f; }
.theme-save-status { color: #15796f; margin-top: 8px; }
.theme-save-status:empty { display: none; }
.theme-noscript { margin-top: 16px; }
@media(max-width:650px) { .theme-options { grid-template-columns: 1fr; gap: 12px; } .theme-mini-preview { height: 68px; } .theme-settings-body { padding: 0 16px 20px; } }

/* Use dark styles only on screen; printing retains the original light appearance. */
@media screen {
  :root[data-theme=dark] {
    color-scheme: dark;
    --teal: #73d9c5;
    --ink: #e6eef1;
    --muted: #a3b4bd;
    --border: #35464e;
    --bg: #101a20;
    --surface: #19272f;
    --surface-raised: #22353e;
    --surface-soft: #152229;
    --accent-soft: #203f39;
    --secondary-text: #b3c3ca;
  }
  [data-theme=dark] :is(.sidebar,.topbar,.panel,.stat,.workspace-sidebar,.workspace-header,.registration-card,.file-count,.billing-cycles>span,.graphic-sheet,.graphic-bubble) { background: var(--surface); border-color: var(--border); color: var(--ink); }
  [data-theme=dark] :is(.button,.workspace-logout,.settings-link,.language-switcher,.subtle-tag,.department-card,.registration-summary,.settings-section-link) { background: var(--surface-raised); border-color: var(--border); color: var(--secondary-text); }
  [data-theme=dark] .button.primary,[data-theme=dark] .brand-icon { background: #15796f; border-color: #268c80; color: #fff; }
  [data-theme=dark] .button.primary:hover { background: #1b897c; filter: none; }
  [data-theme=dark] .button:not(.primary):hover { background: #2c444e; filter: none; }
  [data-theme=dark] :is(.registration-page,.graphic-sheet.back) { background: var(--bg); }
  [data-theme=dark] :is(.workspace-icon,.workspace-empty-icon,.file-icon,.avatar,.registration-steps li>span,.registration-success-icon,.registration-scope) { background: var(--accent-soft); border-color: #38584e; color: #91dfc5; }
  [data-theme=dark] :is(.nav-item,.workspace-menu-link,.settings-link,.language-switcher a,.icon-button,.workspace-logout,.workspace-settings-link,.settings-section-link) { color: var(--secondary-text); }
  [data-theme=dark] :is(.workspace-menu-link:hover,.workspace-menu-link[aria-current=page],.nav-item:hover,.nav-item.active,.settings-link:hover,.settings-link[aria-current=page],.workspace-logout:hover,.language-switcher a.selected,.workspace-menu-link[aria-current=location],.workspace-settings-link:hover,.workspace-settings-link[aria-current=page],.settings-section-link:hover,.settings-section-link[aria-current=page]) { background: var(--accent-soft); color: var(--teal); border-color: #38584e; }
  [data-theme=dark] :is(.workspace-user small,.user-info small,.breadcrumbs,.breadcrumbs strong,.nav-label,.workspace-nav-label,.eyebrow,.panel-heading p,.empty,.workspace-empty p,.registration-footer,.registration-signin,.registration-card>p,.registration-hint,.registration-intro>p,.registration-steps p,.registration-summary dt,.business-profile-summary dt,.department-card small,.date-label,.sidebar-bottom,.sidebar-bottom small,.workspace small,.workspace>span:last-child) { color: var(--secondary-text); }
  [data-theme=dark] :is(.table-footer,footer,.stat-top,.stat>small,.stat-number span,.legend a,.donut-label small,.pending-row small,.pending-row>span:last-child:not(:first-child),.details-grid small,.billing-invoice-meta dt,.billing-account dt,.billing-cycles small) { color: var(--muted); }
  [data-theme=dark] :is(label,.registration-form label,.theme-help) { color: var(--secondary-text); }
  [data-theme=dark] :is(input:not([type=hidden]),select,textarea,.registration-form input) { background: var(--surface-soft); color: var(--ink); border-color: #49606b; }
  [data-theme=dark] :is(input:disabled,input:read-only) { background: var(--surface-raised); color: var(--secondary-text); }
  [data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder { color: #a3b4bd; opacity: 1; }
  [data-theme=dark] :is(input:focus,select:focus,textarea:focus,.registration-form input:focus) { outline-color: #73d9c5; border-color: #73d9c5; }
  [data-theme=dark] input::file-selector-button { background: var(--surface-raised); color: var(--ink); border: 1px solid #49606b; border-radius: 4px; padding: 6px 10px; margin-right: 10px; font: inherit; }
  [data-theme=dark] :is(th,.workflow) { background: var(--surface-soft); color: var(--secondary-text); border-color: var(--border); }
  [data-theme=dark] :is(td,.pending-row,.billing-slip,.registration-existing,.revision,.billing-plan) { border-color: var(--border); }
  [data-theme=dark] td { color: var(--secondary-text); }
  [data-theme=dark] :is(td strong,.doc-link strong,.legend strong,.registration-intro h1,.billing-stat-value) { color: var(--ink); }
  [data-theme=dark] :is(td small,.revision,.arrow-link,.workflow span) { color: var(--muted); }
  [data-theme=dark] :is(tbody tr:hover,.pending-row:hover) { background: var(--surface-raised); }
  [data-theme=dark] :is(.billing-banner,.welcome-banner,.login-art) { background: #18352f; border-color: #355b4b; }
  [data-theme=dark] :is(.billing-totals,.upload,.uploaded-file) { background: #172f2a; border-color: #416154; }
  [data-theme=dark] :is(.welcome-banner h2,.login-art h1,.billing-totals strong,.plan-price) { color: #b7ead4; }
  [data-theme=dark] :is(.welcome-banner p,.welcome-banner a,.banner-label,.login-art p,.login-flow,.billing-banner p,.upload small,.billing-details summary,details.billing-panel>summary,.copy-link-status,.theme-save-status) { color: #a2cbbb; }
  [data-theme=dark] .login-flow { border-color: #355b4b; }
  [data-theme=dark] :is(.registration-intro>.eyebrow,.registration-card>.eyebrow) { color: #a2cbbb; }
  [data-theme=dark] .workflow .current { color: var(--teal); }
  [data-theme=dark] .alert { background: #1c382c; border-color: #456a53; color: #b3e3c5; }
  [data-theme=dark] .alert.error { background: #402727; border-color: #794b47; color: #ffd0c8; }
  [data-theme=dark] :is(.badge,.bill-void,.bill-paused,.bill-cancelled) { background: #2b3944; color: #ccd8e1; }
  [data-theme=dark] :is(.badge.approved,.bill-paid,.bill-approved,.bill-posted,.bill-active,.green,.teal) { background: #1e4034; color: #a5e4c7; }
  [data-theme=dark] :is(.badge.checking,.bill-pending,.bill-partially-paid,.bill-unpaid,.count-pill,.nav-item b) { background: #483b22; color: #f4d68c; }
  [data-theme=dark] .amber { background: #483b22!important; color: #f4d68c!important; }
  [data-theme=dark] :is(.badge.issued,.blue) { background: #203d54; color: #b7d9ff; }
  [data-theme=dark] .badge.closed { background: #39314c; color: #d8c6f3; }
  [data-theme=dark] :is(.badge.cancelled,.bill-overdue,.bill-rejected,.bill-reversed) { background: #482d32; color: #ffc1c4; }
  [data-theme=dark] .graphic-sheet i { background: #385248; }
  [data-theme=dark] :is(.graphic-logo,.graphic-sheet b,.graphic-sheet b span) { color: #b3d9c7; }
  [data-theme=dark] .graphic-check { background: #1e4034; color: #a5e4c7; border-color: #38584e; }
  [data-theme=dark] .theme-option input[type=radio] { accent-color: #73d9c5; }
}
@media print { :root { color-scheme: light; } .theme-settings-panel { display: none; } }
