/* Sadat material finishes. A final screen-only layer; content and print semantics stay intact. */
@media screen {
  html[data-sadat-ui][data-palette="platinum"] {
    --sadat-bg:#10151c;--sadat-sidebar:#dbe4eb;--sadat-panel:#1a232e;--sadat-panel2:#293746;
    --sadat-text:#f5faff;--sadat-muted:#c3d0de;--sadat-accent:#d9edff;--sadat-line:#64798b;
    --sadat-input:#121b25;--sadat-control:#90a9bd;--sadat-button:#deedf7;--sadat-ink:#142332;
    --sadat-glow:#718da5;--sadat-deep:#344c61;--sadat-side-text:#142331;--sadat-side-muted:#384d5e;
    --sadat-hero-top:#354d62;--sadat-hero-bottom:#101b28;--sadat-edge:#b9d1e3;
    --sadat-material-glaze:linear-gradient(150deg,#f1f7fb,#bacbd8);
    --sadat-nav-active:linear-gradient(100deg,#ffffff,#c8d8e5);--sadat-nav-edge:#526f84;
    --sadat-panel-sheen:#d2eeff12;--sadat-case-shadow:#02070ba3;--sadat-body-light:#4a789b1d;
    --sadat-art:url('/static/accounting/sadat-pearl-v2.webp');--sadat-nav-rest:#f4f9fbd9;
  }
  html[data-sadat-ui][data-palette="sapphire"] {
    --sadat-bg:#040e23;--sadat-sidebar:#061535;--sadat-panel:#0a2049;--sadat-panel2:#102f63;
    --sadat-text:#f2f7ff;--sadat-muted:#cadbf5;--sadat-accent:#c0ddff;--sadat-line:#426b9d;
    --sadat-input:#06152f;--sadat-control:#82a9d5;--sadat-button:#bcd9ff;--sadat-ink:#09235d;
    --sadat-glow:#185de8;--sadat-deep:#103da2;--sadat-side-text:#f3f8ff;--sadat-side-muted:#c1d5f5;
    --sadat-hero-top:#164fcb;--sadat-hero-bottom:#091c46;--sadat-edge:#70d8ff;
    --sadat-material-glaze:linear-gradient(150deg,#082e52,#030b1a);--sadat-art:url('/static/accounting/sadat-material-v2.webp');--sadat-nav-rest:#020b1ba8;
    --sadat-nav-active:linear-gradient(100deg,#255dd6,#11377c);--sadat-nav-edge:#80dfff;
    --sadat-panel-sheen:#a8d2ff12;--sadat-case-shadow:#00071ca3;--sadat-body-light:#173b9c22;
  }
  html[data-sadat-ui][data-palette="champagne"] {
    --sadat-bg:#100f0c;--sadat-sidebar:#15130f;--sadat-panel:#211d16;--sadat-panel2:#332c20;
    --sadat-text:#fff6e4;--sadat-muted:#d7c8ac;--sadat-accent:#eacb8b;--sadat-line:#7b6847;
    --sadat-input:#17140f;--sadat-control:#b4a07b;--sadat-button:#e2c17c;--sadat-ink:#2c210e;
    --sadat-glow:#8b6c31;--sadat-deep:#4b3b1c;--sadat-side-text:#fff3d8;--sadat-side-muted:#dcc8a1;
    --sadat-hero-top:#5b4725;--sadat-hero-bottom:#1c1810;--sadat-edge:#e8ce96;
    --sadat-material-glaze:linear-gradient(150deg,#44300d,#100c05);--sadat-art:url('/static/accounting/sadat-champagne-v2.webp');--sadat-nav-rest:#0f0b04b0;
    --sadat-nav-active:linear-gradient(100deg,#6c5529,#342a18);--sadat-nav-edge:#e3c48a;
    --sadat-panel-sheen:#f2d29214;--sadat-case-shadow:#000000a3;--sadat-body-light:#81612a1a;
  }
  html[data-sadat-ui][data-palette="platinum"][data-theme="light"] {
    --sadat-bg:#eef2f5;--sadat-panel:#fbfdff;--sadat-panel2:#dde7ef;--sadat-text:#142b3c;
    --sadat-muted:#4b6377;--sadat-accent:#2a526e;--sadat-line:#a9becd;--sadat-input:#ffffff;
    --sadat-control:#6e8ba1;--sadat-button:#294e67;--sadat-ink:#f7fcff;--sadat-glow:#c6d9e7;--sadat-deep:#d4e3ed;
    --sadat-hero-top:#d9e7f0;--sadat-hero-bottom:#f7fbff;--sadat-edge:#6e8da3;
    --sadat-panel-sheen:#ffffffbb;--sadat-case-shadow:#23455f22;--sadat-body-light:#6d91ac12;
  }
  html[data-sadat-ui][data-palette="sapphire"][data-theme="light"] {
    --sadat-bg:#eaf0fc;--sadat-panel:#fbfdff;--sadat-panel2:#dfe9fc;--sadat-text:#10264f;
    --sadat-muted:#465b7a;--sadat-accent:#17429c;--sadat-line:#a5b9d8;--sadat-input:#fcfdff;
    --sadat-control:#607fae;--sadat-button:#17429c;--sadat-ink:#ffffff;--sadat-glow:#9cbcf2;--sadat-deep:#c8dcff;
    --sadat-hero-top:#bfd7ff;--sadat-hero-bottom:#f6faff;--sadat-edge:#4676b4;
    --sadat-panel-sheen:#ffffffbb;--sadat-case-shadow:#173c7b22;--sadat-body-light:#2d63ca12;
  }
  html[data-sadat-ui][data-palette="champagne"][data-theme="light"] {
    --sadat-bg:#f2eadc;--sadat-panel:#fffbf1;--sadat-panel2:#e9ddc6;--sadat-text:#332818;
    --sadat-muted:#6a5638;--sadat-accent:#71501f;--sadat-line:#c4aa7f;--sadat-input:#fffdf7;
    --sadat-control:#9b8157;--sadat-button:#5c411d;--sadat-ink:#fff9ec;--sadat-glow:#dcc391;--sadat-deep:#ead5af;
    --sadat-hero-top:#e8d3aa;--sadat-hero-bottom:#fff9eb;--sadat-edge:#98712d;
    --sadat-panel-sheen:#ffffffaa;--sadat-case-shadow:#59421a22;--sadat-body-light:#aa792215;
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) {
    --shadow:0 12px 28px var(--sadat-case-shadow),inset 0 1px var(--sadat-panel-sheen);
    background:radial-gradient(ellipse at 48% 0,var(--sadat-body-light),transparent 65%),var(--sadat-bg);
  }
  /* A real, local material image gives the navigation its grain and reflectance. */
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar {
    isolation:isolate;background-color:var(--sadat-sidebar);background-image:var(--sadat-material-glaze);
    background-size:100% 100%;background-repeat:no-repeat;border-inline-start:1px solid var(--sadat-nav-edge);
    box-shadow:inset 1px 0 #ffffff26,inset -8px 0 20px #00000035,0 0 32px #00000045;
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar::before {
    content:'';position:absolute;inset:0;pointer-events:none;opacity:1;z-index:-1;width:auto;height:auto;transform:none;
    background:linear-gradient(90deg,#ffffff0c,transparent 16%,transparent 85%,#00000024);animation:none;
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar::after {
    content:'';display:block;position:absolute;inset:auto 0 0;width:100%;height:auto;aspect-ratio:2/3;
    z-index:-1;pointer-events:none;opacity:1;border:0;border-radius:0;transform:none;filter:none;animation:none;
    background:var(--sadat-art) center bottom/cover;
    -webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 24%,#000 100%);
    mask-image:linear-gradient(to bottom,transparent 0%,#000 24%,#000 100%);
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .brand { position:relative;border-bottom:1px solid #e8d6b533;padding-bottom:20px; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .brand strong { color:var(--sadat-side-text);text-shadow:0 2px 8px #00000066; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar :is(.nav-item,.workspace-label,.sidebar-foot) { position:relative; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .nav-item { border-color:transparent;border-radius:10px; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .nav-item:hover { color:var(--sadat-side-text);background:#00000024;border-color:#ffffff32;box-shadow:inset 0 1px #ffffff13; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .nav-item.active {
    color:var(--sadat-side-text);background:var(--sadat-nav-active);border:1px solid var(--sadat-nav-edge);
    box-shadow:0 5px 12px #00000050,inset 0 1px #ffffff2b,inset 0 -1px #00000040;
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .nav-item.active svg { color:var(--sadat-side-text); }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .nav-item.active::before { width:3px;background:var(--sadat-nav-edge);box-shadow:0 0 9px var(--sadat-nav-edge); }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .workspace-label { background:#0000002e;border-color:#ffffff36;box-shadow:inset 0 1px #ffffff0f; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar-foot { border-top-color:#ffffff25; }
  /* Raised lacquer and metal edges, not translucent gray overlays. */
  html[data-sadat-ui][data-palette] body:not(.print-mode) :is(.panel,.kpi,.workdesk-modulebar,.onboarding,.balance-equation,.live-clock) {
    background:linear-gradient(160deg,var(--sadat-panel-sheen),transparent 34%),var(--sadat-panel);
    border:1px solid var(--sadat-line);box-shadow:var(--shadow);
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .featured {
    background:linear-gradient(125deg,var(--sadat-hero-top),var(--sadat-hero-bottom));border-color:var(--sadat-edge);
    box-shadow:0 12px 26px var(--sadat-case-shadow),inset 0 1px #ffffff25;
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .topbar { background:var(--sadat-bg);box-shadow:0 1px 0 var(--sadat-line),0 4px 18px var(--sadat-case-shadow);border-bottom:0; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) :is(.primary-button,.gold-button) { box-shadow:inset 0 1px #ffffff58,inset 0 -2px #00000024,0 5px 13px #00000025; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) :is(.icon-button,.quiet-button,.sadat-auth-theme,.ka-palette-picker) { box-shadow:inset 0 1px var(--sadat-panel-sheen),0 2px 6px #00000010; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .ka-palette-picker button[aria-pressed="true"] { background:var(--panel2);border-color:var(--sadat-accent);box-shadow:inset 0 0 0 1px var(--sadat-bg); }
  html[data-sadat-ui][data-palette] .ka-palette-platinum { background:linear-gradient(135deg,#d8e7f0 65%,#4a667a 65%); }
  html[data-sadat-ui][data-palette] .ka-palette-sapphire { background:linear-gradient(135deg,#1852c8 65%,#bcd9ff 65%); }
  html[data-sadat-ui][data-palette] .ka-palette-champagne { background:linear-gradient(135deg,#17140e 65%,#e3c383 65%); }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-workspace {
    --desk-hero-start:var(--sadat-hero-top);--desk-hero-end:var(--sadat-hero-bottom);--desk-edge:var(--sadat-line);
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-hero { border-color:var(--sadat-edge);box-shadow:0 14px 34px var(--sadat-case-shadow),inset 0 1px #ffffff22; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-calendars { background:linear-gradient(135deg,var(--sadat-panel2),var(--sadat-panel));border-color:var(--sadat-line); }
  /* Auth keeps its working forms and compact mobile order. The material stays behind the content. */
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .ambient {
    background-color:var(--sadat-bg);background-image:radial-gradient(ellipse at 70% 38%,var(--sadat-body-light),transparent 68%),linear-gradient(var(--sadat-bg),var(--sadat-bg));
    background-size:cover;background-position:center;opacity:1;
  }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .login-card {
    background:linear-gradient(145deg,var(--sadat-panel-sheen),transparent 30%),var(--sadat-panel);
    border:1px solid var(--sadat-edge);box-shadow:0 30px 70px var(--sadat-case-shadow),inset 0 1px #ffffff30,inset 0 -1px #00000033;
  }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .emblem { filter:drop-shadow(0 22px 25px #00000055); }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .access-seal { color:var(--gold);border-color:var(--sadat-edge);background:var(--sadat-input);box-shadow:inset 0 1px #ffffff1f; }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .input-wrap input { box-shadow:inset 0 2px 5px #00000016; }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .input-wrap input:focus { border-color:var(--sadat-accent);box-shadow:0 0 0 2px var(--sadat-panel2),inset 0 2px 5px #00000013; }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .input-wrap input:-webkit-autofill { box-shadow:0 0 0 1000px var(--input) inset; }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .input-wrap input:autofill { box-shadow:0 0 0 1000px var(--input) inset; }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .stone-surface { background:linear-gradient(140deg,var(--sadat-deep),var(--sadat-bg)); }
  html[data-sadat-ui][data-palette][data-theme="light"] body.luxury-login:not(.print-mode) .ambient { background-image:radial-gradient(ellipse at 70% 32%,var(--sadat-deep),transparent 70%),linear-gradient(var(--sadat-bg),var(--sadat-bg)); }
  html[data-sadat-ui][data-palette][data-theme="light"] body.luxury-login:not(.print-mode) .stone-surface { background:linear-gradient(140deg,var(--sadat-deep),var(--sadat-bg)); }
  @media(max-width:760px) {
    html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .login-card { box-shadow:0 14px 30px var(--sadat-case-shadow),inset 0 1px #ffffff30; }
    html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar { box-shadow:inset 1px 0 #ffffff26,0 12px 40px #00000080; }
  }
}

/* Each finish uses its own original chrome artwork, with no recoloring filter. */
@media screen {
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .nav-item {
    background:linear-gradient(90deg,transparent,var(--sadat-nav-rest) 30%,var(--sadat-nav-rest));
  }
  html[dir="ltr"][data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .nav-item {
    background:linear-gradient(270deg,transparent,var(--sadat-nav-rest) 30%,var(--sadat-nav-rest));
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .nav-item.active { background:var(--sadat-nav-active); }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .sidebar .sidebar-foot { background:var(--sadat-nav-rest);border-radius:10px; }
  html[data-sadat-ui][data-palette="platinum"] body:not(.print-mode) .sidebar { box-shadow:inset 1px 0 #ffffffaa,inset -6px 0 18px #33495e25,0 0 30px #00000035; }
  html[data-sadat-ui][data-palette="platinum"] body:not(.print-mode) .sidebar .brand strong { text-shadow:0 1px #ffffffaa; }
  html[data-sadat-ui][data-palette="platinum"] body:not(.print-mode) .sidebar .workspace-label { background:#f5faffc9;border-color:#6d899f; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-hero { position:relative;isolation:isolate;overflow:hidden; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-hero::before {
    content:'';display:block;position:absolute;inset:0 9% 0 20%;width:auto;height:auto;z-index:0;
    opacity:1;pointer-events:none;transform:none;filter:none;border:0;animation:none!important;
    background:var(--sadat-art) center 68%/cover;
    -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 20%,#000 72%,transparent 100%);
    mask-image:linear-gradient(90deg,transparent 0%,#000 20%,#000 72%,transparent 100%);
  }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-hero :is(.desk-aurora,.desk-aurora-haze,.desk-ribbon,.desk-filaments,.desk-stardust,.desk-star) { display:none; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-hero :is(.desk-welcome,.desk-timepiece,.desk-calendars) { position:relative;z-index:1; }
  html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-welcome { background:linear-gradient(270deg,var(--sadat-hero-bottom) 0%,var(--sadat-hero-bottom) 40%,transparent 100%); }
  html[dir="ltr"][data-sadat-ui][data-palette] body:not(.print-mode) .desk-welcome { background:linear-gradient(90deg,var(--sadat-hero-bottom) 0%,var(--sadat-hero-bottom) 40%,transparent 100%); }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .brand-stage { position:relative;isolation:isolate; }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .brand-stage::before {
    content:'';display:block;position:absolute;inset:-8% -7% auto;height:65%;min-height:300px;z-index:-1;
    pointer-events:none;opacity:1;filter:none;transform:none;background:var(--sadat-art) center 72%/cover;
    -webkit-mask-image:radial-gradient(ellipse at center,#000 30%,#0009 53%,transparent 73%);
    mask-image:radial-gradient(ellipse at center,#000 30%,#0009 53%,transparent 73%);
  }
  @media(max-width:760px) {
    html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-hero::before { inset:0;bottom:42%;background-position:center 68%; }
    html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-welcome { background:linear-gradient(var(--sadat-hero-bottom),var(--sadat-hero-bottom) 64%,transparent); }
    html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .brand-stage::before { inset:0 -2% auto;height:60%;min-height:250px; }
  }
}

@media screen {
  html[data-sadat-ui][data-palette] body:not(.print-mode) .desk-hero::before { border-radius:0;box-shadow:none; }
}

@media screen {
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .brand-stage > .eyebrow { display:none; }
  html[data-sadat-ui][data-palette] body.luxury-login:not(.print-mode) .brand-stage::before {
    -webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 16%,#000 72%,transparent 100%),linear-gradient(to right,transparent 0%,#000 14%,#000 86%,transparent 100%);
    mask-image:linear-gradient(to bottom,transparent 0%,#000 16%,#000 72%,transparent 100%),linear-gradient(to right,transparent 0%,#000 14%,#000 86%,transparent 100%);
    -webkit-mask-composite:source-in;mask-composite:intersect;
  }
}
