/*
 * Hazzuri shared theme: one look for every app (home, clients, CRM, contracts, invoices, reports, settings).
 * - Light (default): white + gold dominate, like the contracts app.
 * - Dark: petrol (deep teal) dominates.
 * The theme is set on <html data-theme="light|dark"> and remembered in localStorage ("hz-theme").
 */

/* English letters, numbers, emails and dates use the brand's English paragraph font (Rajdhani),
   Arabic stays in the Arabic font. unicode-range makes the browser pick per character. */
@font-face{font-family:HZLatin;src:url('/fonts/rajdhani-medium.ttf') format('truetype');font-weight:100 500;font-display:swap;unicode-range:U+0020-007E,U+00A0-00FF,U+2013-2014,U+2018-201D,U+2026,U+20AC,U+2212}
@font-face{font-family:HZLatin;src:url('/fonts/rajdhani-semibold.ttf') format('truetype');font-weight:600 650;font-display:swap;unicode-range:U+0020-007E,U+00A0-00FF,U+2013-2014,U+2018-201D,U+2026,U+20AC,U+2212}
@font-face{font-family:HZLatin;src:url('/fonts/rajdhani-bold.ttf') format('truetype');font-weight:700 900;font-display:swap;unicode-range:U+0020-007E,U+00A0-00FF,U+2013-2014,U+2018-201D,U+2026,U+20AC,U+2212}
/* Digits (and number punctuation) always in Rajdhani, even inside Orbitron, Zawaya or Arabic text.
   Every brand font stack starts with HZDigits, which only covers these characters. */
@font-face{font-family:HZDigits;src:url('/fonts/rajdhani-medium.ttf') format('truetype');font-weight:100 500;font-display:swap;unicode-range:U+0024-0025,U+002B-003A}
@font-face{font-family:HZDigits;src:url('/fonts/rajdhani-semibold.ttf') format('truetype');font-weight:600 650;font-display:swap;unicode-range:U+0024-0025,U+002B-003A}
@font-face{font-family:HZDigits;src:url('/fonts/rajdhani-bold.ttf') format('truetype');font-weight:700 900;font-display:swap;unicode-range:U+0024-0025,U+002B-003A}
/* Arabic-Indic digits (e.g. Chrome shows them inside number/date fields when the browser language is Arabic)
   are drawn with the same Rajdhani shapes, so every number looks the same everywhere. */
@font-face{font-family:HZDigits;src:url('/fonts/hz-ar-digits-medium.ttf') format('truetype');font-weight:100 500;font-display:swap;unicode-range:U+0660-066C,U+06F0-06F9}
@font-face{font-family:HZDigits;src:url('/fonts/hz-ar-digits-semibold.ttf') format('truetype');font-weight:600 650;font-display:swap;unicode-range:U+0660-066C,U+06F0-06F9}
@font-face{font-family:HZDigits;src:url('/fonts/hz-ar-digits-bold.ttf') format('truetype');font-weight:700 900;font-display:swap;unicode-range:U+0660-066C,U+06F0-06F9}
/* Brand fonts, defined once for every page (apps, invoices, printed papers):
   Arabic: Hamah (text) and Zawaya (titles). English: Orbitron (English labels) and Rajdhani (English text and all numbers). */
@font-face{font-family:Hamah;src:url('/fonts/hamah-regular.ttf') format('truetype');font-weight:100 450;font-display:swap}
@font-face{font-family:Hamah;src:url('/fonts/hamah-semibold.ttf') format('truetype');font-weight:500 650;font-display:swap}
@font-face{font-family:Hamah;src:url('/fonts/hamah-bold.ttf') format('truetype');font-weight:700 900;font-display:swap}
@font-face{font-family:Zawaya;src:url('/fonts/zawaya-semibold.ttf') format('truetype');font-weight:100 900;font-display:swap}
@font-face{font-family:Rajdhani;src:url('/fonts/rajdhani-regular.ttf') format('truetype');font-weight:100 450;font-display:swap}
@font-face{font-family:Rajdhani;src:url('/fonts/rajdhani-semibold.ttf') format('truetype');font-weight:500 900;font-display:swap}
@font-face{font-family:Orbitron;src:url('/fonts/orbitron.ttf') format('truetype');font-weight:400 900;font-display:swap}
html body,html button,html input,html select,html textarea{font-family:HZDigits,HZLatin,Hamah,'HG Text',Tahoma,Arial,sans-serif}
/* Latin is a little smaller than Arabic at the same size; nudge numbers and LTR text up. */
html [dir=ltr],html bdi,html .ltr,html input[type=email],html input[type=tel],html input[type=number],html input[type=date],html input[type=time]{font-feature-settings:"tnum" 1}

:root{
  --chart-1:#008c9e;--chart-2:#b07d00;
  --hz-d-bg:#0b2c30;--hz-d-surface:#113b40;--hz-d-surface2:#174950;--hz-d-line:#24585e;--hz-d-ink:#e6f0f0;--hz-d-muted:#9ab8b9;--hz-d-head:#ffffff;--hz-d-teal:#6ccfc6;--hz-d-side:#082427;--hz-gold:#fdb815
}
html[data-theme=dark]{--chart-1:#33a6b2;--chart-2:#bb840a;color-scheme:dark}
html[data-theme=light]{color-scheme:light}

/* ---------- Theme toggle button (used in every app) */
.hz-theme-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid currentColor;border-radius:10px;padding:6px 10px;background:transparent;color:inherit;cursor:pointer;font-size:12.5px;opacity:.85}
.hz-theme-btn:hover{opacity:1}
.hz-theme-btn svg{width:16px;height:16px}

/* =================================================================== DARK: shared */
html[data-theme=dark] body{background:var(--hz-d-bg)!important;color:var(--hz-d-ink)!important}
html[data-theme=dark] ::placeholder{color:#7f9fa0}

/* ---------- Home, Clients, Settings, Reports, Login (hz-*) */
html[data-theme=dark] .hz-top{background:var(--hz-d-surface);border-color:var(--hz-d-line)}
html[data-theme=dark] .hz-brand b,html[data-theme=dark] .hz-hello h1,html[data-theme=dark] .hz-app h2,html[data-theme=dark] .hz-section-head h2,html[data-theme=dark] .hz-stat b,html[data-theme=dark] .hz-app-stats b,html[data-theme=dark] .hz-auth-card h2,html[data-theme=dark] .hz-shared b,html[data-theme=dark] .hz-field,html[data-theme=dark] .hz-currency-grid b,html[data-theme=dark] .hz-count b,html[data-theme=dark] .hz-modal h2{color:var(--hz-d-head)}
html[data-theme=dark] .hz-brand img{content:url('/brand/logo-white.svg')}
html[data-theme=dark] .hz-app,html[data-theme=dark] .hz-section,html[data-theme=dark] .hz-stat,html[data-theme=dark] .hz-modal,html[data-theme=dark] .hz-tabs,html[data-theme=dark] .hz-shared,html[data-theme=dark] .hz-search,html[data-theme=dark] .hz-select,html[data-theme=dark] .hz-gresults,html[data-theme=dark] .hz-template,html[data-theme=dark] .hz-currency-grid label{background:var(--hz-d-surface);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .hz-app:hover{border-color:var(--hz-gold)}
html[data-theme=dark] .hz-app-icon{background:#ffffff12}
html[data-theme=dark] .hz-btn{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .hz-btn.primary{background:var(--hz-gold);border-color:var(--hz-gold);color:#0b2c30}
html[data-theme=dark] .hz-btn.danger{color:#ffaaaa;border-color:#5b3a3a}
html[data-theme=dark] .hz-field input,html[data-theme=dark] .hz-field select,html[data-theme=dark] .hz-field textarea,html[data-theme=dark] .hz-search input{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .hz-search input{background:transparent}
html[data-theme=dark] .hz-muted,html[data-theme=dark] .hz-hello p,html[data-theme=dark] .hz-app p,html[data-theme=dark] .hz-stat span,html[data-theme=dark] .hz-app-stats span,html[data-theme=dark] .hz-brand small,html[data-theme=dark] .hz-currency-grid span,html[data-theme=dark] .hz-gresults small{color:var(--hz-d-muted)}
html[data-theme=dark] .hz-hello small{color:var(--hz-gold)}
html[data-theme=dark] .hz-tabs button{color:var(--hz-d-muted)}
html[data-theme=dark] .hz-tabs button.active{background:var(--hz-gold);color:#0b2c30}
html[data-theme=dark] .hz-tabs button:not(.active):hover,html[data-theme=dark] .hz-gresults a:hover{background:var(--hz-d-surface2);color:var(--hz-d-ink)}
html[data-theme=dark] .hz-table th{color:var(--hz-d-muted);border-color:var(--hz-d-line)}
html[data-theme=dark] .hz-table td{border-color:var(--hz-d-line)}
html[data-theme=dark] .hz-pill,html[data-theme=dark] .hz-count{background:#ffffff12;color:var(--hz-d-teal)}
html[data-theme=dark] .hz-pill.off{background:#4a2b2b;color:#ffb3b3}
html[data-theme=dark] .hz-ok{background:#123f37;color:#a6e6cf;border-color:#1f5a4c}
html[data-theme=dark] .hz-error{background:#3b2020;color:#ffb8b8;border-color:#5a2c2c}
html[data-theme=dark] .hz-guide,html[data-theme=dark] .hz-currency-grid label.on{background:var(--hz-d-surface2);border-color:var(--hz-gold)}
html[data-theme=dark] .hz-auth-form{background:var(--hz-d-bg)}
html[data-theme=dark] .hz-gresults h4{color:var(--hz-gold)}
html[data-theme=dark] .hz-bar-track{background:#ffffff12}
html[data-theme=dark] .rp-grid span{border-color:#ffffff14}
html[data-theme=dark] .rp-grid em{background:var(--hz-d-surface);color:var(--hz-d-muted)}
html[data-theme=dark] .rp-col.on{background:var(--hz-d-surface2)}
html[data-theme=dark] .rp-tip{background:var(--hz-d-surface);border-color:var(--hz-d-line)}
html[data-theme=dark] .rp-col small{color:var(--hz-d-muted)}
html[data-theme=dark] .inv-wrap{color:#1f3b3f}

/* ---------- CRM (c-*) */
html[data-theme=dark] .c-side{background:var(--hz-d-side)}
html[data-theme=dark] .c-top{background:#0f363be6;border-color:var(--hz-d-line)}
html[data-theme=dark] .c-search{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:var(--hz-d-muted)}
html[data-theme=dark] .c-search input{color:var(--hz-d-ink)}
html[data-theme=dark] .c-search-hits,html[data-theme=dark] .c-menu,html[data-theme=dark] .c-box,html[data-theme=dark] .c-deal,html[data-theme=dark] .c-client,html[data-theme=dark] .c-quick button,html[data-theme=dark] .c-tabs,html[data-theme=dark] .c-modal{background:var(--hz-d-surface);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .c-col{background:#0d3337}
html[data-theme=dark] .c-col-add{border-color:var(--hz-d-line);color:var(--hz-d-teal)}
html[data-theme=dark] .c-col-add:hover,html[data-theme=dark] .c-menu button:hover,html[data-theme=dark] .c-search-hits button:hover,html[data-theme=dark] .c-pick button:hover,html[data-theme=dark] .c-row.link:hover{background:var(--hz-d-surface2)}
html[data-theme=dark] .c-head h1,html[data-theme=dark] .c-box-head h2,html[data-theme=dark] .c-client-info h1,html[data-theme=dark] .c-modal h2,html[data-theme=dark] .c-deal h4,html[data-theme=dark] .c-empty h3,html[data-theme=dark] .c-quick b,html[data-theme=dark] .c-settings h3,html[data-theme=dark] .c-renew-preview b,html[data-theme=dark] .c-field>span,html[data-theme=dark] .c-col header b,html[data-theme=dark] .c-menu b,html[data-theme=dark] .c-search-hits b,html[data-theme=dark] .c-row-main>b{color:var(--hz-d-head)}
html[data-theme=dark] .c-box-head h2 svg,html[data-theme=dark] .c-menu button,html[data-theme=dark] .c-quick button{color:var(--hz-d-teal)}
html[data-theme=dark] .c-row{border-color:var(--hz-d-line)}
html[data-theme=dark] .c-row-main small,html[data-theme=dark] .c-muted,html[data-theme=dark] .c-empty p,html[data-theme=dark] .c-head p,html[data-theme=dark] .c-quick small,html[data-theme=dark] .c-menu small,html[data-theme=dark] .c-deal-meta,html[data-theme=dark] .c-sync,html[data-theme=dark] .c-col header span,html[data-theme=dark] .c-col header i{color:var(--hz-d-muted)}
html[data-theme=dark] .c-btn{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:var(--hz-d-teal)}
html[data-theme=dark] .c-btn:hover:not(:disabled){background:#1d5960;border-color:#2e6b72}
html[data-theme=dark] .c-btn.gold{background:var(--hz-gold);border-color:var(--hz-gold);color:#0b2c30}
html[data-theme=dark] .c-btn.ghost{background:transparent;border-color:transparent;color:var(--hz-d-muted)}
html[data-theme=dark] .c-btn.danger{color:#ffaaaa;border-color:#5b3a3a}
html[data-theme=dark] .c-icon{color:var(--hz-d-muted)}
html[data-theme=dark] .c-icon:hover:not(:disabled){background:var(--hz-d-surface2);color:var(--hz-d-teal)}
html[data-theme=dark] .c-link,html[data-theme=dark] .c-back{color:var(--hz-d-teal)}
html[data-theme=dark] .c-deal-meta b{color:var(--hz-gold)}
html[data-theme=dark] .c-field input,html[data-theme=dark] .c-field select,html[data-theme=dark] .c-field textarea,html[data-theme=dark] .c-stage-row input:not([type=color]),html[data-theme=dark] .c-days input{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .c-chips button{border-color:var(--hz-d-line);color:var(--hz-d-muted)}
html[data-theme=dark] .c-chips button.on,html[data-theme=dark] .c-tabs button.on{background:var(--hz-gold);border-color:var(--hz-gold);color:#0b2c30}
html[data-theme=dark] .c-tabs button{color:var(--hz-d-muted)}
html[data-theme=dark] .c-pick,html[data-theme=dark] .c-chosen{border-color:var(--hz-d-line)}
html[data-theme=dark] .c-chosen{background:var(--hz-d-surface2)}
html[data-theme=dark] .c-avatar{background:#ffffff14;color:var(--hz-d-teal)}
html[data-theme=dark] .c-avatar.gold{background:var(--hz-gold);color:#0b2c30}
html[data-theme=dark] .c-pill{background:#ffffff12;color:var(--hz-d-muted)}
html[data-theme=dark] .c-pill.amber{background:#3a3214;color:#f3cf6b}
html[data-theme=dark] .c-pill.red{background:#4a2b2b;color:#ffb3b3}
html[data-theme=dark] .c-pill.green{background:#123f37;color:#a6e6cf}
html[data-theme=dark] .c-next{background:var(--hz-d-surface2);color:var(--hz-d-muted)}
html[data-theme=dark] .c-next.warn,html[data-theme=dark] .c-contract-warn{background:#3a3214;color:#f3cf6b;border-color:#5a4a1a}
html[data-theme=dark] .c-empty span,html[data-theme=dark] .c-sub-ic,html[data-theme=dark] .c-alert-ic{background:#ffffff10;color:var(--hz-d-teal)}
html[data-theme=dark] .c-renew-preview,html[data-theme=dark] .c-contract-note{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .c-error{background:#3b2020;color:#ffb8b8;border-color:#5a2c2c}
html[data-theme=dark] .c-check{border-color:#4b7d82}
html[data-theme=dark] .c-later{border-color:var(--hz-d-line)}
html[data-theme=dark] .c-later summary{color:var(--hz-d-teal)}
html[data-theme=dark] .c-backdrop,html[data-theme=dark] .hz-modal-back{background:#000a}

/* CRM light: white sidebar like the contracts app */
html[data-theme=light] .c-side{background:#fff;color:#4e6a6d;border-left:1px solid #e3eaea}
html[data-theme=light] .c-side:after{opacity:.06}
html[data-theme=light] .c-brand{border-color:#e3eaea}
html[data-theme=light] .c-brand b{color:#123e43}
html[data-theme=light] .c-brand small{color:#b8860b}
html[data-theme=light] .c-brand img{content:url('/brand/logo.svg')}
html[data-theme=light] .c-side nav a{color:#4e6a6d}
html[data-theme=light] .c-side nav small{color:#8a9c9d}
html[data-theme=light] .c-side nav a:hover{background:#f3f8f8;color:#02626a}
html[data-theme=light] .c-side nav a.on{background:#fdf6e1;color:#02626a}
html[data-theme=light] .c-side-bottom a,html[data-theme=light] .c-side-bottom button{color:#5d7779}
html[data-theme=light] .c-side-bottom a:hover,html[data-theme=light] .c-side-bottom button:hover,html[data-theme=light] .c-side-bottom a.on{background:#f3f8f8;color:#02626a}
html[data-theme=light] .c-me{border-color:#e3eaea;color:#123e43}

/* ---------- Contracts (.hz-con) */
html[data-theme=dark] .hz-con{--teal:var(--hz-d-teal);--dark:var(--hz-d-head);--muted:var(--hz-d-muted);--border:var(--hz-d-line)}
html[data-theme=dark] .hz-con .sidebar,html[data-theme=dark] .hz-con .topbar{background:var(--hz-d-side);border-color:var(--hz-d-line)}
html[data-theme=dark] .hz-con .stats>div,html[data-theme=dark] .hz-con .clientcard,html[data-theme=dark] .hz-con .empty,html[data-theme=dark] .hz-con .clientinfo,html[data-theme=dark] .hz-con .contractrow,html[data-theme=dark] .hz-con .settingscard,html[data-theme=dark] .hz-con .dialog,html[data-theme=dark] .hz-con .dialoghead,html[data-theme=dark] .hz-con .search,html[data-theme=dark] .hz-con .secondary,html[data-theme=dark] .hz-con .workspace,html[data-theme=dark] .hz-con .addcard{background:var(--hz-d-surface);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .hz-con .dialogfoot,html[data-theme=dark] .hz-con .service,html[data-theme=dark] .hz-con .packageprice,html[data-theme=dark] .hz-con .total,html[data-theme=dark] .hz-con .profile>span,html[data-theme=dark] .hz-con .sync-guide{background:var(--hz-d-surface2);border-color:var(--hz-d-line)}
html[data-theme=dark] .hz-con input,html[data-theme=dark] .hz-con textarea,html[data-theme=dark] .hz-con select{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .hz-con .search input{background:transparent}
html[data-theme=dark] .hz-con h1,html[data-theme=dark] .hz-con h2,html[data-theme=dark] .hz-con h3,html[data-theme=dark] .hz-con .brand b,html[data-theme=dark] .hz-con label,html[data-theme=dark] .hz-con .amount,html[data-theme=dark] .hz-con .stats b{color:var(--hz-d-head)}
html[data-theme=dark] .hz-con nav button,html[data-theme=dark] .hz-con nav a.navlink{color:var(--hz-d-muted)}
html[data-theme=dark] .hz-con nav button.selected{background:#ffffff14;color:var(--hz-gold)}
html[data-theme=dark] .hz-con nav button:hover,html[data-theme=dark] .hz-con nav a.navlink:hover,html[data-theme=dark] .hz-con .icon:hover,html[data-theme=dark] .hz-con .hz-switch:hover{background:var(--hz-d-surface2)}
html[data-theme=dark] .hz-con .primary{background:var(--hz-gold);color:#0b2c30;border-color:var(--hz-gold)}
html[data-theme=dark] .hz-con .badge{background:#ffffff12;color:var(--hz-d-muted)}
html[data-theme=dark] .hz-con .statIcon{background:#ffffff10}
html[data-theme=dark] .hz-con .brandmark,html[data-theme=dark] .hz-con .brand img{content:url('/brand/logo-white.svg')}
html[data-theme=dark] .hz-con .notice{background:var(--hz-d-surface2);color:var(--hz-d-ink);border-color:var(--hz-d-line)}
html[data-theme=dark] .hz-con footer{color:var(--hz-d-muted)}
/* The A4 contract preview always stays white paper with the brand colors */
html[data-theme=dark] .hz-con .contract-preview-dialog{--teal:#02626a;--dark:#123e43;--muted:#7d8b8b;--border:#e4eaea;color:#243c40}
html[data-theme=dark] .hz-con .contract-preview-dialog h1,html[data-theme=dark] .hz-con .contract-preview-dialog h2,html[data-theme=dark] .hz-con .contract-preview-dialog h3{color:inherit}
html[data-theme=dark] .hz-con .contract-preview-tools{background:var(--hz-d-surface);color:var(--hz-d-ink)}

/* ---------- Invoices (.hz-inv) */
html[data-theme=dark] .hz-inv{--bg:var(--hz-d-bg);--ink:var(--hz-d-ink);--teal:var(--hz-d-teal);--deep:var(--hz-d-side);--muted:var(--hz-d-muted);--line:rgba(255,255,255,.12);--mint:rgba(255,255,255,.06);--red:#ffaaaa}
html[data-theme=dark] .hz-inv input,html[data-theme=dark] .hz-inv select,html[data-theme=dark] .hz-inv textarea,html[data-theme=dark] .hz-inv .selected-service{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .hz-inv label{color:var(--hz-d-head)}
html[data-theme=dark] .hz-inv .btn,html[data-theme=dark] .hz-inv .stat,html[data-theme=dark] .hz-inv .panel,html[data-theme=dark] .hz-inv th,html[data-theme=dark] .hz-inv .modal{background:var(--hz-d-surface);color:var(--hz-d-ink)}
html[data-theme=dark] .hz-inv tbody tr:hover{background:var(--hz-d-surface2)}
html[data-theme=dark] .hz-inv .btn.primary{background:var(--hz-gold);border-color:var(--hz-gold);color:#0b2c30}
html[data-theme=dark] .hz-inv .stat.accent{background:var(--hz-d-surface2);border-color:var(--hz-gold)}
html[data-theme=dark] .hz-inv .badge,html[data-theme=dark] .hz-inv .callout,html[data-theme=dark] .hz-inv .alert{color:var(--hz-d-ink)}
html[data-theme=dark] .hz-inv .badge.unpaid{background:rgba(253,184,21,.16)}
html[data-theme=dark] .hz-inv h1,html[data-theme=dark] .hz-inv h2,html[data-theme=dark] .hz-inv h3{color:var(--hz-d-head)}
/* Invoice paper stays white with brand colors in both themes */
html[data-theme=dark] .hz-inv .paper{--ink:#02626A;--teal:#02626A;--muted:rgba(0,0,0,.62);--line:rgba(2,98,106,.18);color:#02626A}
html[data-theme=dark] .hz-inv .paper h1,html[data-theme=dark] .hz-inv .paper h2,html[data-theme=dark] .hz-inv .paper h3{color:inherit}
/* Invoices light: white sidebar like the contracts app */
html[data-theme=light] .hz-inv .sidebar{background:#fff;color:#02626A;border-left:1px solid rgba(2,98,106,.14)}
html[data-theme=light] .hz-inv .nav button{color:#4e6a6d}
html[data-theme=light] .hz-inv .nav button:hover{background:#f3f8f8;color:#02626A}
html[data-theme=light] .hz-inv .nav button.active{background:#fdf6e1;color:#02626A}
html[data-theme=light] .hz-inv .brand small,html[data-theme=light] .hz-inv .side-label,html[data-theme=light] .hz-inv .sidebar-bottom{color:#6f8486}
html[data-theme=light] .hz-inv .sidebar-bottom{border-color:rgba(2,98,106,.12)}
html[data-theme=light] .hz-inv .brand strong{color:#123e43}

/* Printing is always light */
@media print{html[data-theme=dark] body{background:#fff!important;color:#000!important}}

/* Small leftovers: counters, avatars and round badges */
html[data-theme=dark] .c-box-head i,html[data-theme=dark] .hz-con .count,html[data-theme=dark] .hz-con nav i{background:#ffffff14;color:var(--hz-d-ink)}
html[data-theme=dark] .hz-con .avatar,html[data-theme=dark] .hz-con .addcard>span,html[data-theme=dark] .hz-con .emptyicon,html[data-theme=dark] .hz-con .docicon{background:var(--hz-d-surface2);color:var(--hz-d-teal)}
html[data-theme=dark] .hz-inv .avatar,html[data-theme=dark] .hz-inv .count,html[data-theme=dark] .hz-inv .stat-icon,html[data-theme=dark] .hz-inv .empty-icon{background:#ffffff12;color:var(--hz-d-teal)}
.c-side{overflow-y:auto}

/* Invoice paper: English letters, emails and numbers in Rajdhani (the old Latin glyphs were all-caps) */
html .hz-inv .paper,html .hz-inv .audit-lines .ltr{font-family:HZDigits,HZLatin,Hamah,'HG Text',Tahoma,Arial,sans-serif}

/* Home cards: the dark accents need lighter versions on petrol */
html[data-theme=dark] .hz-app[href='/crm'],html[data-theme=dark] .hz-app[href='/invoices']{--accent:var(--hz-d-teal)!important}
html[data-theme=dark] .hz-app[href='/clients']{--accent:#5fd3a7!important}
html[data-theme=dark] .hz-app[href='/contracts']{--accent:var(--hz-gold)!important}

/* User photos (all apps) */
.hz-avatar{width:36px;height:36px;border-radius:50%;background:#02626a;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex:none;overflow:hidden;line-height:1;vertical-align:middle;border:0;padding:0}
img.hz-avatar{background:#e4ebeb;object-fit:cover}
.hz-avatar-btn{background:none;border:0;padding:0;cursor:pointer;border-radius:50%;display:inline-flex}
.hz-avatar-btn:focus-visible{outline:2px solid #fdb815;outline-offset:2px}
.c-assignee{display:inline-flex;align-items:center;gap:5px;vertical-align:middle}
.hz-name-cell{display:inline-flex;align-items:center;gap:10px}
.hz-photo-edit{display:flex;align-items:center;gap:14px;margin:4px 0 10px}
.hz-photo-edit .hz-row{flex-wrap:wrap}
.hz-me{position:relative;display:inline-flex}
.hz-me-menu{position:absolute;top:calc(100% + 8px);left:0;z-index:60;background:#fff;border:1px solid #dfe7e7;border-radius:14px;box-shadow:0 12px 32px #0f2e3226;padding:14px;display:grid;gap:8px;min-width:230px;color:#123e43}
.hz-me-head{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.hz-me-head b{display:block;font-size:14px}
.hz-me-head small{display:block;color:#5d7779;font-size:12px;text-align:right}
.hz-me-menu .hz-btn{justify-content:center}
.hz-me-error{color:#b42318}
html[data-theme=dark] .hz-me-menu{background:var(--hz-d-surface);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
html[data-theme=dark] .hz-me-head small{color:var(--hz-d-muted)}
html[data-theme=dark] .hz-me-error{color:#ff9b8f}
html[data-theme=dark] img.hz-avatar{background:var(--hz-d-surface2)}

/* Day/night switch: fixed top-left on every page */
.hz-theme-fixed{position:fixed;top:14px;left:16px;z-index:1000;width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;border:1px solid #dfe7e7;background:#fff;color:#02626a;box-shadow:0 4px 14px #0f2e321f;cursor:pointer;padding:0;transition:transform .15s,background .15s}
.hz-theme-fixed:hover{transform:scale(1.06);background:#fdf3d9}
.hz-theme-fixed:focus-visible{outline:2px solid #fdb815;outline-offset:2px}
.hz-theme-fixed svg{width:18px;height:18px}
html[data-theme=dark] .hz-theme-fixed{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:#fdb815;box-shadow:0 4px 14px #0006}
html[data-theme=dark] .hz-theme-fixed:hover{background:var(--hz-d-surface)}
@media print{.hz-theme-fixed{display:none!important}}
/* Keep page headers clear of the fixed day/night button (top-left) */
.hz-top,.c-top{padding-left:72px!important}
@media(max-width:960px){.hz-top{padding-left:66px!important}}
.hz-inv .topbar,.hz-con .topbar{padding-left:64px!important}
@media(max-width:860px){.c-side{padding-left:64px!important}}
/* Logos: coloured logo in the day theme, white logo in the night theme (printed papers always coloured). */
html[data-theme=light] .c-brand img,html[data-theme=light] .hz-inv .sidebar .brand img,html[data-theme=light] .hz-inv .settings-brand img{content:url('/brand/logo.svg')}
html[data-theme=dark] .c-brand img,html[data-theme=dark] .hz-inv .sidebar .brand img,html[data-theme=dark] .hz-inv .settings-brand img{content:url('/brand/logo-white.svg')}
/* Each app shows its logo (links home) with the app name only. */
.hz-app-brand{text-decoration:none;color:inherit}
.hz-app-brand b,.hz-con .sidebar .brand b,.hz-inv .sidebar .brand strong,.c-brand b{font-family:HZDigits,HZLatin,Zawaya,Hamah,sans-serif!important;letter-spacing:0!important;font-size:21px!important;line-height:1.2;color:var(--dark,#123e43);margin:0}
html[data-theme=dark] .hz-app-brand b,html[data-theme=dark] .hz-con .sidebar .brand b,html[data-theme=dark] .hz-inv .sidebar .brand strong,html[data-theme=dark] .c-brand b{color:#fff}
/* The invoices sidebar logo had a white tile behind it (made for the old JPEG logo). */
.hz-inv .sidebar .brand img,.hz-inv .settings-brand img{background:transparent!important;padding:0!important;border-radius:0!important;box-shadow:none!important;object-fit:contain}

/* ===== One clean sidebar for every app (same look as the CRM) ===== */
.hz-con .sidebar,.hz-inv .sidebar{display:flex!important;flex-direction:column!important;padding:26px 16px 16px!important;gap:0!important}
.hz-con .sidebar .brand,.hz-inv .sidebar .brand{display:flex!important;align-items:center!important;gap:12px!important;padding:0 6px 22px!important;margin:0 0 18px!important;border-bottom:1px solid #e3eaea!important;text-decoration:none!important;color:inherit!important}
.hz-con .sidebar .brand img,.hz-con .sidebar .brandmark,.hz-inv .sidebar .brand img{width:44px!important;height:44px!important;flex:none}
.hz-con .sidebar .brand div,.hz-inv .sidebar .brand div{display:block}
.hz-con .sidebar nav,.hz-inv .sidebar nav{flex:1!important;display:flex!important;flex-direction:column!important;gap:6px!important;margin:0!important;padding:0!important}
.hz-con .sidebar nav>button,.hz-con .sidebar nav>a,.hz-inv .sidebar nav>button{position:relative;display:flex!important;align-items:center!important;gap:12px!important;width:100%!important;padding:12px!important;border:0!important;border-radius:12px!important;background:transparent!important;color:#4e6a6d!important;font-size:15px!important;font-weight:700!important;text-align:right!important;text-decoration:none!important;box-shadow:none!important;cursor:pointer;transition:.15s}
.hz-con .sidebar nav>button svg,.hz-con .sidebar nav>a svg,.hz-inv .sidebar nav>button svg{width:20px!important;height:20px!important;flex:none;color:inherit}
.hz-con .sidebar nav>button:hover,.hz-con .sidebar nav>a:hover,.hz-inv .sidebar nav>button:hover{background:#f3f8f8!important;color:#02626a!important}
.hz-con .sidebar nav>button.selected,.hz-inv .sidebar nav>button.active{background:#fdf6e1!important;color:#02626a!important}
.hz-con .sidebar nav>button.selected:before,.hz-inv .sidebar nav>button.active:before{content:''!important;position:absolute;right:-16px;top:10px;bottom:10px;width:4px;border-radius:4px 0 0 4px;background:#fdb815;display:block!important}
/* Counts stay small at the far side */
.hz-con .sidebar nav>button i{margin-inline-start:auto;font-style:normal;font-size:12px;font-weight:600;opacity:.75}
/* Settings sits at the bottom, small, like the CRM */
.hz-con .sidebar nav>a.navlink,.hz-inv .sidebar nav>button[data-nav=settings]{margin-top:auto!important;padding:9px 12px!important;font-size:13px!important;font-weight:600!important;color:#5d7779!important}
.hz-con .sidebar nav>a.navlink svg,.hz-inv .sidebar nav>button[data-nav=settings] svg{width:17px!important;height:17px!important}
.hz-inv .sidebar nav>button[data-nav=settings].active{color:#02626a!important}
/* Night theme */
html[data-theme=dark] .hz-con .sidebar .brand,html[data-theme=dark] .hz-inv .sidebar .brand{border-color:#ffffff14!important}
html[data-theme=dark] .hz-con .sidebar,html[data-theme=dark] .hz-inv .sidebar{background:var(--hz-d-side)!important;border-color:var(--hz-d-line)!important}
html[data-theme=dark] .hz-con .sidebar nav>button,html[data-theme=dark] .hz-con .sidebar nav>a,html[data-theme=dark] .hz-inv .sidebar nav>button{color:#c6dadb!important}
html[data-theme=dark] .hz-con .sidebar nav>button:hover,html[data-theme=dark] .hz-con .sidebar nav>a:hover,html[data-theme=dark] .hz-inv .sidebar nav>button:hover{background:#ffffff0d!important;color:#fff!important}
html[data-theme=dark] .hz-con .sidebar nav>button.selected,html[data-theme=dark] .hz-inv .sidebar nav>button.active{background:#ffffff14!important;color:#fff!important}
html[data-theme=dark] .hz-con .sidebar nav>a.navlink,html[data-theme=dark] .hz-inv .sidebar nav>button[data-nav=settings]{color:#a9c4c5!important}
/* "HAZZURI GROUP" under the logo uses the brand's English font (Orbitron) everywhere, including the invoice paper. */
.hz-inv .brand small,.hz-inv .invoice-brand small{font-family:HZDigits,Orbitron,Hamah,sans-serif!important}

/* ---------- Report period picker (Reports page, Finance): monthly / yearly / date range */
.hz-period{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hz-period-modes{display:inline-flex;gap:3px;background:#fff;border:1px solid #e3eaea;border-radius:11px;padding:3px}
.hz-period-modes button{border:0;background:none;padding:6px 12px;border-radius:8px;color:#6f8486;font-weight:600;font-size:13px;cursor:pointer}
.hz-period-modes button.on{background:#02626a;color:#fff}
.hz-period-step{display:flex;align-items:center;gap:4px}
.hz-period-step>button:not(.hz-period-now){width:32px;height:32px;border:0;background:none;border-radius:9px;color:#6f8486;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.hz-period-step>button:not(.hz-period-now):hover{background:#eef3f3;color:#02626a}
.hz-period-step b{font-family:HZDigits,HZLatin,Zawaya,Hamah,sans-serif;font-size:18px;color:#123e43;min-width:130px;text-align:center}
.hz-period-now{border:0;background:none;color:#6f8486;font-size:12.5px;font-weight:600;padding:5px 8px;border-radius:8px;cursor:pointer}
.hz-period-now:hover{background:#eef3f3}
.hz-period-range{display:flex;gap:8px;flex-wrap:wrap}
.hz-period-range label{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#123e43}
.hz-period-range input{border:1px solid #d6e2e2;border-radius:10px;padding:7px 10px;background:#fff;color:#1f3b3f}
html[data-theme=dark] .hz-period-modes{background:var(--hz-d-surface);border-color:var(--hz-d-line)}
html[data-theme=dark] .hz-period-modes button{color:var(--hz-d-muted)}
html[data-theme=dark] .hz-period-modes button.on{background:var(--hz-gold);color:#0b2c30}
html[data-theme=dark] .hz-period-step b,html[data-theme=dark] .hz-period-range label{color:var(--hz-d-head)}
html[data-theme=dark] .hz-period-step>button:not(.hz-period-now),html[data-theme=dark] .hz-period-now{color:var(--hz-d-muted)}
html[data-theme=dark] .hz-period-step>button:hover,html[data-theme=dark] .hz-period-now:hover{background:var(--hz-d-surface2);color:var(--hz-d-teal)}
html[data-theme=dark] .hz-period-range input{background:var(--hz-d-surface2);border-color:var(--hz-d-line);color:var(--hz-d-ink)}
@media(max-width:860px){.hz-period{justify-content:center;width:100%}.hz-period-step b{min-width:0;font-size:16px}}
