/* =========================================================================
   Brand looks. <body data-look="aun|applyuninow|classic" data-theme="light|dark">
   - aun: AUNtech "AUN Glass" from the PM app (pm.auntechconsulting.com): graphite neutrals,
     AUNtech orange #FF5C00 for actions and the current page, frosted surfaces over a quiet
     ember/cool glow with a faint dot grid. Plus Jakarta Sans.
   - applyuninow: ApplyUniNow logo colours, navy #1f3c88 and red #c41230. Poppins.
   - classic: the reference palette, kept for 1:1 layout checks.
   Words and numbers stay in ink; colour is for actions, the current page and status.
   ========================================================================= */

/* ---------- Shared extra tokens (classic dark is the fallback) ---------- */
body {
  --on-primary: #ffffff;
  --btn-primary-shadow: #0e54cd 0 -1.5px 0 0 inset, #4287ff 0 0 0 .5px inset, rgba(255, 255, 255, .18) 0 1.5px 0 0 inset;
  --card-shadow: #27292b 0 0 0 1px inset, rgba(0, 0, 0, .06) 0 6px 12px 4px;
  --table-edge: #27292b;
  --table-head-bg: #131415;
  --today-ring: #d5d6d7;
  --badge-pos-bg: rgba(0, 143, 71, .18);
  --badge-pos-text: #3aa670;
  --badge-neg-bg: rgba(208, 30, 17, .18);
  --file-btn-bg: rgba(128, 133, 137, .32);
  --primary-text: #4287ff;
  --link-icon: #4287ff;
  --logo-h: 40px;
  --logo-h-sm: 32px;
}
body[data-look="classic"][data-theme="light"] {
  --btn-primary-shadow: #0e54cd 0 -1.5px 0 0 inset, rgba(255, 255, 255, .18) 0 1.5px 0 0 inset;
  --card-shadow: #dee1e3 0 0 0 1px inset, rgba(41, 47, 50, .06) 0 6px 12px 4px;
  --table-edge: #dee1e3;
  --table-head-bg: #f7f7f7;
  --today-ring: #292f32;
  --badge-pos-bg: rgba(0, 143, 71, .09);
  --badge-pos-text: #00753b;
  --badge-neg-bg: rgba(208, 30, 17, .09);
  --file-btn-bg: rgba(67, 75, 81, .12);
  --primary-text: #1364f1;
  --link-icon: #1364f1;
  --topbar-line: #dee1e3 0 -1px 0 0 inset;
}

/* ---------- AUNtech — light ---------- */
body[data-look="aun"] {
  --font-text: "Plus Jakarta Sans", Inter, Arial, sans-serif;
  --font-heading: "Plus Jakarta Sans", Inter, Arial, sans-serif;
  --brand: #ff5c00;
  --logo-h: 22px;
  --logo-h-sm: 19px;
  --card-radius: 12px;
}
body[data-look="aun"][data-theme="light"] {
  color-scheme: light;
  --bg-subtle: #eef1f6;
  --bg-moderate: #eef1f6;
  --bg-intense: rgba(255, 255, 255, .78);
  --main-bg: transparent;
  --sidenav-bg: rgba(255, 255, 255, .55);
  --sidenav-blur: blur(16px) saturate(140%);
  --card-bg: linear-gradient(165deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .6));
  --card-blur: blur(14px) saturate(140%);
  --card-glass-shadow: 0 1px 0 rgba(255, 255, 255, .95) inset, 0 14px 36px -16px rgba(15, 23, 42, .18), 0 2px 6px -2px rgba(15, 23, 42, .05);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, .95) inset, 0 14px 36px -16px rgba(15, 23, 42, .18), 0 2px 6px -2px rgba(15, 23, 42, .05);
  --card-top-edge: rgba(255, 255, 255, .95);
  --page-art:
    radial-gradient(900px 520px at 88% -8%, rgba(255, 92, 0, .13), transparent 62%),
    radial-gradient(760px 520px at 8% 108%, rgba(79, 70, 229, .09), transparent 60%),
    radial-gradient(rgba(15, 23, 42, .07) 1px, transparent 1.2px) 0 0 / 22px 22px;
  --bg-topbar: rgba(255, 255, 255, .72);
  --topbar-blur: blur(16px) saturate(150%);
  --topbar-line: rgba(15, 23, 42, .07) 0 -1px 0 0 inset;

  --border-subtle: rgba(15, 23, 42, .1);
  --border-normal: rgba(15, 23, 42, .2);
  --border-muted: rgba(15, 23, 42, .07);
  --text-normal: #0f172a;
  --text-subtle: #3d4757;
  --text-muted: #5f6a7a;

  --primary: #be4d00;
  --primary-hover: #a34200;
  --on-primary: #ffffff;
  --btn-primary-shadow: rgba(0, 0, 0, .14) 0 -1.5px 0 0 inset, rgba(255, 255, 255, .22) 0 1.5px 0 0 inset;
  --primary-text: #be4d00;
  --link: #be4d00;
  --link-hover: #8f3a00;
  --link-icon: #be4d00;
  --negative: #ba1a1a;
  --info-bg: color-mix(in oklab, #ff5c00 14%, #ffffff);
  --info-text: #a34200;

  --gray-hover: rgba(15, 23, 42, .05);
  --gray-active: rgba(15, 23, 42, .08);
  --gray-chip: rgba(15, 23, 42, .06);
  --nav-current-bg: color-mix(in oklab, #ff5c00 12%, rgba(255, 255, 255, .85));
  --nav-current-ring: inset 0 0 0 1px color-mix(in oklab, #ff5c00 38%, transparent), 0 8px 18px -10px color-mix(in oklab, #ff5c00 45%, transparent);
  --nav-current-icon: #d94f00;
  --nav-current-text: #0f172a;

  --popup-bg: rgba(255, 255, 255, .86);
  --popup-solid: #ffffff;
  --popup-shadow: rgba(15, 23, 42, .08) 0 0 0 1px inset, 0 14px 36px -16px rgba(15, 23, 42, .28), 0 2px 6px -2px rgba(15, 23, 42, .08);
  --btn-ring: rgba(15, 23, 42, .1) 0 0 0 1px inset, rgba(255, 255, 255, .9) 0 1px 0 0 inset;
  --btn-ring-hover: rgba(15, 23, 42, .2) 0 0 0 1px inset, rgba(255, 255, 255, .9) 0 1px 0 0 inset;
  --focus-ring: color-mix(in oklab, #ff5c00 40%, transparent);
  --overlay: rgba(15, 23, 42, .32);
  --drawer-tint: radial-gradient(150% 100% at 50% 100%, rgba(255, 255, 255, 0) 0%, rgba(255, 92, 0, .12) 100%);

  --table-edge: rgba(15, 23, 42, .07);
  --table-head-bg: rgba(15, 23, 42, .035);
  --today-ring: #0f172a;
  --badge-pos-bg: rgba(27, 135, 63, .12);
  --badge-pos-text: #1b6f37;
  --badge-neg-bg: rgba(186, 26, 26, .1);
  --file-btn-bg: color-mix(in oklab, #ff5c00 10%, #ffffff);
}

/* ---------- AUNtech — dark ---------- */
body[data-look="aun"][data-theme="dark"] {
  color-scheme: dark;
  --bg-subtle: #0a0c11;
  --bg-moderate: #0a0c11;
  --bg-intense: rgba(36, 40, 52, .72);
  --main-bg: transparent;
  --sidenav-bg: rgba(18, 21, 28, .62);
  --sidenav-blur: blur(16px) saturate(140%);
  --card-bg: linear-gradient(165deg, rgba(40, 45, 58, .62), rgba(22, 25, 33, .5));
  --card-blur: blur(14px) saturate(140%);
  --card-glass-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 18px 44px -18px rgba(0, 0, 0, .75);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 18px 44px -18px rgba(0, 0, 0, .75);
  --card-top-edge: rgba(255, 255, 255, .1);
  --page-art:
    radial-gradient(900px 520px at 88% -8%, rgba(255, 92, 0, .16), transparent 62%),
    radial-gradient(760px 520px at 8% 108%, rgba(99, 102, 241, .12), transparent 60%),
    radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.2px) 0 0 / 22px 22px;
  --bg-topbar: rgba(10, 12, 17, .72);
  --topbar-blur: blur(16px) saturate(150%);
  --topbar-line: rgba(255, 255, 255, .07) 0 -1px 0 0 inset;

  --border-subtle: rgba(255, 255, 255, .1);
  --border-normal: rgba(255, 255, 255, .2);
  --border-muted: rgba(255, 255, 255, .07);
  --text-normal: #eef1f6;
  --text-subtle: #c3cad6;
  --text-muted: #9aa3b2;

  --primary: #ff7a2e;
  --primary-hover: #ff9152;
  --on-primary: #1a0a00;
  --btn-primary-shadow: rgba(0, 0, 0, .25) 0 -1.5px 0 0 inset, rgba(255, 255, 255, .25) 0 1.5px 0 0 inset;
  --primary-text: #ff9a5c;
  --link: #ff9a5c;
  --link-hover: #ffb889;
  --link-icon: #ff9a5c;
  --negative: #ff8a80;
  --info-bg: color-mix(in oklab, #ff5c00 26%, #151821);
  --info-text: #ffcfb0;

  --gray-hover: rgba(255, 255, 255, .06);
  --gray-active: rgba(255, 255, 255, .1);
  --gray-chip: rgba(255, 255, 255, .08);
  --nav-current-bg: color-mix(in oklab, #ff5c00 18%, rgba(255, 255, 255, .06));
  --nav-current-ring: inset 0 0 0 1px color-mix(in oklab, #ff5c00 45%, transparent), 0 8px 18px -10px color-mix(in oklab, #ff5c00 55%, transparent);
  --nav-current-icon: #ff7a2e;
  --nav-current-text: #ffffff;

  --popup-bg: rgba(24, 27, 36, .9);
  --popup-solid: #1b1f29;
  --popup-shadow: rgba(255, 255, 255, .08) 0 0 0 1px inset, 0 18px 44px -18px rgba(0, 0, 0, .8);
  --btn-ring: rgba(255, 255, 255, .1) 0 0 0 1px inset, rgba(255, 255, 255, .05) 0 1px 0 0 inset;
  --btn-ring-hover: rgba(255, 255, 255, .2) 0 0 0 1px inset, rgba(255, 255, 255, .05) 0 1px 0 0 inset;
  --focus-ring: color-mix(in oklab, #ff5c00 45%, transparent);
  --overlay: rgba(0, 0, 0, .7);
  --drawer-tint: radial-gradient(150% 100% at 50% 100%, rgba(0, 0, 0, 0) 0%, rgba(255, 92, 0, .18) 100%);

  --table-edge: rgba(255, 255, 255, .07);
  --table-head-bg: rgba(255, 255, 255, .03);
  --today-ring: #eef1f6;
  --badge-pos-bg: rgba(58, 166, 112, .18);
  --badge-pos-text: #6fd39c;
  --badge-neg-bg: rgba(255, 138, 128, .14);
  --file-btn-bg: rgba(255, 92, 0, .14);
}

/* ---------- ApplyUniNow — light ---------- */
body[data-look="applyuninow"] {
  --font-text: Poppins, Inter, Arial, sans-serif;
  --font-heading: Poppins, Inter, Arial, sans-serif;
  --logo-h: 34px;
  --logo-h-sm: 28px;
  --card-radius: 10px;
}
body[data-look="applyuninow"][data-theme="light"] {
  color-scheme: light;
  --bg-subtle: #f4f6fb;
  --bg-moderate: #f4f6fb;
  --bg-intense: #ffffff;
  --sidenav-bg: #ffffff;
  --main-bg: #f4f6fb;
  --card-glass-shadow: 0 1px 2px rgba(20, 33, 61, .05);
  --card-shadow: 0 1px 2px rgba(20, 33, 61, .05), #e3e8f2 0 0 0 1px inset;
  --card-top-edge: #e3e8f2;
  --bg-topbar: #ffffff;
  --topbar-line: #e3e8f2 0 -1px 0 0 inset;

  --border-subtle: #e3e8f2;
  --border-normal: #c9d2e3;
  --border-muted: #edf0f6;
  --text-normal: #14213d;
  --text-subtle: #3b4a68;
  --text-muted: #66738f;

  --primary: #c41230;
  --primary-hover: #a50f28;
  --on-primary: #ffffff;
  --btn-primary-shadow: rgba(0, 0, 0, .16) 0 -1.5px 0 0 inset, rgba(255, 255, 255, .2) 0 1.5px 0 0 inset;
  --primary-text: #1f3c88;
  --link: #1f4fb0;
  --link-hover: #c41230;
  --link-icon: #1f3c88;
  --negative: #c41230;
  --info-bg: rgba(31, 60, 136, .1);
  --info-text: #1f3c88;

  --gray-hover: rgba(31, 60, 136, .05);
  --gray-active: rgba(31, 60, 136, .09);
  --gray-chip: rgba(20, 33, 61, .06);
  --nav-current-bg: rgba(31, 60, 136, .08);
  --nav-current-ring: inset 3px 0 0 0 #c41230;
  --nav-current-icon: #c41230;
  --nav-current-text: #1f3c88;

  --popup-bg: rgba(255, 255, 255, .96);
  --popup-solid: #ffffff;
  --popup-shadow: #e3e8f2 0 0 0 1px inset, 0 12px 32px -12px rgba(20, 33, 61, .22);
  --btn-ring: #d8dfec 0 0 0 1px inset;
  --btn-ring-hover: #b9c4da 0 0 0 1px inset;
  --focus-ring: rgba(31, 60, 136, .28);
  --overlay: rgba(20, 33, 61, .4);
  --drawer-tint: radial-gradient(150% 100% at 50% 100%, rgba(255, 255, 255, 0) 0%, rgba(31, 60, 136, .1) 100%);

  --table-edge: #e3e8f2;
  --table-head-bg: #f7f9fc;
  --today-ring: #1f3c88;
  --badge-pos-bg: rgba(16, 128, 67, .1);
  --badge-pos-text: #0f7a3f;
  --badge-neg-bg: rgba(196, 18, 48, .09);
  --file-btn-bg: rgba(31, 60, 136, .08);
}

/* ---------- ApplyUniNow — dark ---------- */
body[data-look="applyuninow"][data-theme="dark"] {
  color-scheme: dark;
  --bg-subtle: #0b1120;
  --bg-moderate: #0b1120;
  --bg-intense: #121b31;
  --sidenav-bg: #0e1628;
  --main-bg: #0b1120;
  --card-glass-shadow: none;
  --card-shadow: #1f2a44 0 0 0 1px inset, 0 8px 20px -10px rgba(0, 0, 0, .5);
  --card-top-edge: #24324f;
  --bg-topbar: #0e1628;
  --topbar-line: #1f2a44 0 -1px 0 0 inset;

  --border-subtle: #1f2a44;
  --border-normal: #34446a;
  --border-muted: #18223a;
  --text-normal: #eef2fa;
  --text-subtle: #bcc6db;
  --text-muted: #8a96b2;

  --primary: #d42a46;
  --primary-hover: #e4405b;
  --on-primary: #ffffff;
  --btn-primary-shadow: rgba(0, 0, 0, .25) 0 -1.5px 0 0 inset, rgba(255, 255, 255, .18) 0 1.5px 0 0 inset;
  --primary-text: #9db8ff;
  --link: #8fb0ff;
  --link-hover: #b9ceff;
  --link-icon: #8fb0ff;
  --negative: #ff7a8e;
  --info-bg: rgba(143, 176, 255, .16);
  --info-text: #b9ceff;

  --gray-hover: rgba(143, 176, 255, .07);
  --gray-active: rgba(143, 176, 255, .12);
  --gray-chip: rgba(143, 176, 255, .1);
  --nav-current-bg: rgba(143, 176, 255, .12);
  --nav-current-ring: inset 3px 0 0 0 #e4405b;
  --nav-current-icon: #ff7a8e;
  --nav-current-text: #ffffff;

  --popup-bg: rgba(18, 27, 49, .96);
  --popup-solid: #16213b;
  --popup-shadow: #24324f 0 0 0 1px inset, 0 18px 40px -16px rgba(0, 0, 0, .7);
  --btn-ring: #24324f 0 0 0 1px inset;
  --btn-ring-hover: #3a4b73 0 0 0 1px inset;
  --focus-ring: rgba(143, 176, 255, .35);
  --overlay: rgba(3, 7, 18, .72);
  --drawer-tint: radial-gradient(150% 100% at 50% 100%, rgba(0, 0, 0, 0) 0%, rgba(196, 18, 48, .16) 100%);

  --table-edge: #1f2a44;
  --table-head-bg: #0f182c;
  --today-ring: #eef2fa;
  --badge-pos-bg: rgba(52, 199, 120, .14);
  --badge-pos-text: #6fdba0;
  --badge-neg-bg: rgba(255, 122, 142, .14);
  --file-btn-bg: rgba(143, 176, 255, .12);
}

/* AUN glass: frosted popovers read better with a touch more blur */
body[data-look="aun"] .popover { -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
/* Headings in the brand looks use the text family (no display face) and stay ink */
body[data-look="aun"] .module h2, body[data-look="applyuninow"] .module h2 { letter-spacing: -.01em; }
