/* V9.9.1 – light (white) theme. Everything is scoped to html[data-theme="light"], so the original dark theme is untouched.
   Switch back in one step: set MACARI_THEME=dark in .env (server default) – or per browser via the account menu "Theme" button. */
html[data-theme="light"]{
  color-scheme:light;
  --bg:#f6f4ef;--surface-1:#ffffff;--surface-2:#faf8f4;--surface-3:#f1ece3;
  --line:#e3dccd;--line-2:#d3c8b3;--line-gold:#c3a56d;
  --text:#1b1915;--text-2:#3a352d;--muted:#625b4f;
  --gold:#8a6a2c;--gold-hi:#6b5120;--gold-ink:#ffffff;
  --gold-fill:#c9a35b;--gold-fill-hi:#d8b674;--gold-fill-ink:#1b1406;
  --danger:#b3261e;--ok:#1d7346;--warn:#8f6200;
  --focus:0 0 0 2px #fff,0 0 0 4px #8a6a2c;
}
html[data-theme="light"] body{background:var(--bg);color:var(--text)}
/* chrome */
html[data-theme="light"] .app-header{background:rgba(255,255,255,.97);border-bottom-color:var(--line);box-shadow:0 1px 0 rgba(138,106,44,.08)}
html[data-theme="light"] .subnav{background:rgba(250,248,244,.97)}
html[data-theme="light"] .brand small{color:var(--gold)}
html[data-theme="light"] .brand h1{color:var(--text)}
html[data-theme="light"] .brand h1 b{color:var(--gold)}
html[data-theme="light"] .user-menu,html[data-theme="light"] .subnav .more-menu{box-shadow:0 16px 40px rgba(60,45,15,.18)}
html[data-theme="light"] .chat-drawer{box-shadow:-20px 0 50px rgba(60,45,15,.16)}
html[data-theme="light"] .v971-toast{box-shadow:0 12px 40px rgba(60,45,15,.25)}
/* gold accent buttons keep the warm gold fill with dark ink (WCAG AA) */
html[data-theme="light"] .gold,html[data-theme="light"] .btn-primary,html[data-theme="light"] button.gold{background:var(--gold-fill)!important;color:var(--gold-fill-ink)!important;border-color:#b08a43!important}
html[data-theme="light"] .gold:hover,html[data-theme="light"] .btn-primary:hover{background:var(--gold-fill-hi)!important}
html[data-theme="light"] .skip-link{background:var(--gold-fill);color:var(--gold-fill-ink)}
/* overlays / modals */
html[data-theme="light"] .overlay{background:rgba(40,34,24,.55)}
html[data-theme="light"] .mini-overlay,html[data-theme="light"] .v96-modal{background:rgba(40,34,24,.5)}
html[data-theme="light"] .login.login-modal{background:rgba(246,244,239,.75)}
html[data-theme="light"] .v96-modal-card,html[data-theme="light"] .login.login-modal .auth-card{box-shadow:0 30px 80px rgba(60,45,15,.22)}
html[data-theme="light"] .v96-ev:hover,html[data-theme="light"] .v96-ev:focus-visible{box-shadow:0 8px 24px rgba(60,45,15,.2),var(--focus)}
/* showroom gallery: photos keep a soft vignette so captions stay legible */
html[data-theme="light"] .gallery-arrow{background:rgba(255,255,255,.88);color:var(--gold)}
/* fullscreen showcase stays dark – it is a photo viewer */
html[data-theme="light"] .v95-showcase{--text:#f2eee6;--gold:#d5b477;--line-gold:#6b5a3a}
/* insights tiles / cards */
html[data-theme="light"] .v97-tile{background:linear-gradient(160deg,#fffdf8,#f6f0e3);border-color:rgba(138,106,44,.3)}
html[data-theme="light"] .v97-card{background:#fff;border-color:rgba(138,106,44,.25)}
html[data-theme="light"] .v97-why{background:radial-gradient(ellipse at top left,rgba(201,163,91,.14),transparent 60%),#fff}
html[data-theme="light"] [class*="v97"]{--gold:#8a6a2c}
html[data-theme="light"] .v971-st.st-available,html[data-theme="light"] .v981-chips .ok{border-color:#9cc9ad}
/* invoice scan + database editor */
html[data-theme="light"] .v983-drop{background:linear-gradient(180deg,#fffdf9,#f6f1e7);border-color:rgba(138,106,44,.5)}
html[data-theme="light"] .v983-item{background:#fff;border-color:rgba(138,106,44,.3)}
html[data-theme="light"] .v984-tables{background:#fff;border-color:rgba(138,106,44,.3)}
html[data-theme="light"] .v984-tables input,html[data-theme="light"] .v984-filters input{background:#faf8f4}
html[data-theme="light"] .v984-grid thead th{background:#f1ece3}
/* hard-coded light text colours from earlier releases → readable dark equivalents */
html[data-theme="light"] [style*="color:#777"]{color:#625b4f!important}
html[data-theme="light"] [style*="#e08d84"]{color:var(--danger)!important}
/* tables */
html[data-theme="light"] table th{color:var(--gold)}
html[data-theme="light"] tbody tr:hover{background:rgba(201,163,91,.08)}
/* PDF / template previews are white paper: give them an edge on a light page */
html[data-theme="light"] .v986-thumb,html[data-theme="light"] .v981-pages iframe{border-color:var(--line-2);box-shadow:0 1px 3px rgba(60,45,15,.12)}
/* SVG charts */
html[data-theme="light"] .lifecycle-price-chart .milestone-dot,html[data-theme="light"] .pricing-mini-curve circle{stroke:#fff}
html[data-theme="light"] .pricing-mini-curve .mini-fill{fill:rgba(201,163,91,.18)}
html[data-theme="light"] .lifecycle-price-chart .curve-fill{opacity:.28}
/* splash */
html[data-theme="light"] .splash{background:#faf8f3;background-image:radial-gradient(ellipse 70% 55% at 50% 48%,rgba(201,163,91,.14) 0%,rgba(255,255,255,0) 70%)}
html[data-theme="light"] .splash-tag{color:#8a6a2c}
html[data-theme="light"] .splash-word{color:#8a6a2c;background:linear-gradient(100deg,#6b5120 0%,#8a6a2c 30%,#a7843f 40%,#d8b674 50%,#a7843f 60%,#8a6a2c 70%,#6b5120 100%);background-size:300% 100%;-webkit-background-clip:text;background-clip:text}
html[data-theme="light"] .splash-skip{color:rgba(27,25,21,.45)}
html[data-theme="light"] .splash-rule{background:rgba(138,106,44,.2)}
/* theme switch in the account menu */
.theme-switch{width:100%}
/* caption sits on the photo's dark vignette – keep it light on light theme */
html[data-theme="light"] .gallery-feature-meta{--text:#f6f1e6;--gold:#e2c58c;color:#f6f1e6}
html[data-theme="light"] .gallery-feature-meta h2,html[data-theme="light"] .gallery-feature-price{color:#fbf7ee!important;text-shadow:0 1px 6px rgba(0,0,0,.55)}
html[data-theme="light"] .gallery-feature-meta span{color:#e2c58c!important}
/* V9.7 dossier / appreciation blocks used fixed light colours */
html[data-theme="light"] .v97-band .eyebrow,html[data-theme="light"] .v97-card .eyebrow,html[data-theme="light"] .v97-list li:before,html[data-theme="light"] .v97-why .v97-range{color:#8a6a2c}
html[data-theme="light"] .v97-tile small,html[data-theme="light"] .v97-spec th,html[data-theme="light"] .v97-market th{color:#625b4f}
html[data-theme="light"] .v97-tile b,html[data-theme="light"] .v97-card h3,html[data-theme="light"] .v97-why p{color:#2a241a}
html[data-theme="light"] .v97-tile.v97-na b{color:#7a7262}
html[data-theme="light"] .v97-list li,html[data-theme="light"] .v97-spec td,html[data-theme="light"] .v97-market td{color:#2f2a22;border-bottom-color:rgba(138,106,44,.15)}
html[data-theme="light"] .v97-chips li{color:#4d4335;border-color:rgba(138,106,44,.35)}
html[data-theme="light"] .v97-src{color:#7a5c22;opacity:1}
html[data-theme="light"] .v97-src:hover{color:#4f3b14}
html[data-theme="light"] .v97-market .num{color:#6b5120}
html[data-theme="light"] .v97-note,html[data-theme="light"] .v97-muted{color:#625b4f}
html[data-theme="light"] .v97-disclaim{color:#5a4a2a;border-left-color:#c9a35b}
/* invoice scan, email, database editor, company profile */
html[data-theme="light"] .v983-drop-label,html[data-theme="light"] .v984-head h3,html[data-theme="light"] .v984-tables button.on{color:#2a241a}
html[data-theme="light"] .v983-name,html[data-theme="light"] .v984-tables button,html[data-theme="light"] .v982-atts label{color:#2f2a22}
html[data-theme="light"] .v984-tables button{border-bottom-color:rgba(98,80,40,.1)}
html[data-theme="light"] .v982-help code{color:#4d3c18;background:rgba(138,106,44,.08)}
html[data-theme="light"] .v984-grid thead th.sorted div{color:#8a6a2c}
html[data-theme="light"] .v990-miss{color:#9a5b00}
html[data-theme="light"] .v983-drop.drag{border-color:#8a6a2c}
html[data-theme="light"] .v983-drop-icon,html[data-theme="light"] .v983-item>b,html[data-theme="light"] .v983-item button,html[data-theme="light"] .v982-draft,html[data-theme="light"] .v984-tables button b,html[data-theme="light"] .v984-tables i{color:#8a6a2c}
html[data-theme="light"] .v983-err,html[data-theme="light"] .v982-failed,html[data-theme="light"] .v983-item button[data-rm]:hover{color:#b3261e}
html[data-theme="light"] .v984-del{color:#b3261e!important;border-color:#d9a19c!important}
html[data-theme="light"] .v986-cap input{accent-color:#8a6a2c}
