/* ============================================================================
   aurelia-skin.css — Navy + Gold luxury skin for the USER DASHBOARD.

   Activated by [data-skin="aurelia"] on <html>, which includes/v2/header.php
   sets ONLY on dashboard pages ($isDashboardLayout). The public marketing site
   and /admin share theme-tokens.css but never get data-skin, so they are
   completely untouched by this file. Higher specificity than theme-tokens.css
   (:root[data-skin] = 0,2,0 vs :root = 0,1,0) so it wins for both light/dark.

   Palette sampled from the client mockup. Option A = light table rows on the
   navy shell. Gold is an accent (borders / headings / pills), never body text.
   ============================================================================ */

:root[data-skin="aurelia"] {
  /* ---- shell token overrides: the whole dashboard turns navy + gold ---- */
  --c-bg:         223 88% 6%;    /* #020a1e navy page            */
  --c-card:       224 66% 11%;   /* #0a1430 navy card (pops)     */
  --c-line:       223 43% 24%;   /* #233257 navy hairline        */
  --c-mute:       219 33% 72%;   /* #9fb0cf muted text on navy   */
  --c-brand:      201 154 60;    /* #c99a3c GOLD (replaces green) */
  --c-brand-dark: 168 127 46;    /* #a87f2e deep gold            */

  /* ---- component palette ---- */
  --af-navy-900:#020a1e; --af-navy-850:#081227; --af-navy-800:#0f1d3d;
  --af-gold-100:#f6e7c8; --af-gold-300:#e8ce93; --af-gold-400:#d9b15e;
  --af-gold-500:#c99a3c; --af-gold-600:#a87f2e; --af-gold-700:#7a5a1c;
  --af-gold-grad:linear-gradient(135deg,#f6e7c8 0%,#d9b15e 22%,#b8892f 46%,#f3d98b 63%,#a87f2e 84%,#e8ce93 100%);
  --af-serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --af-row:#ffffff; --af-row-alt:#f4f1f8; --af-row-ink:#1b2440;
}

/* faint gold vignette on the page so it reads richer than flat navy */
[data-skin="aurelia"] body{
  background:
    radial-gradient(120% 80% at 88% -5%, rgba(201,154,60,.07) 0%, rgba(201,154,60,0) 42%),
    hsl(var(--c-bg));
}
/* poster margin accents — diagonal gold slashes on the free right margin */
@media(min-width:1360px){
  [data-skin="aurelia"] body::before,[data-skin="aurelia"] body::after{
    content:"";position:fixed;z-index:1;width:230px;height:2.5px;border-radius:2px;
    background:var(--af-gold-grad);opacity:.42;pointer-events:none;transform:rotate(-45deg)}
  [data-skin="aurelia"] body::before{top:150px;right:-70px}
  [data-skin="aurelia"] body::after{bottom:120px;right:-58px}
}

/* ---------- masthead: poster domain strip + brand band ---------- */
[data-skin="aurelia"] header > div{position:relative}
[data-skin="aurelia"][data-af-dash="1"] .af-domainline{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  color:var(--af-gold-300);font-size:12.5px;letter-spacing:.16em;white-space:nowrap;pointer-events:none}
@media(max-width:520px){[data-skin="aurelia"][data-af-dash="1"] .af-domainline{display:none}}

[data-skin="aurelia"] .af-band{position:relative;overflow:hidden;border-radius:16px;min-height:134px;
  background:
    radial-gradient(90% 160% at 86% 30%, rgba(201,154,60,.14) 0%, rgba(201,154,60,0) 55%),
    linear-gradient(180deg,#061024 0%,#030b1d 100%)}
/* dotted world-map texture cue across the band's right half */
[data-skin="aurelia"] .af-band::before{content:"";position:absolute;inset:0;pointer-events:none;
  background-image:radial-gradient(rgba(201,154,60,.12) 1px, transparent 1.4px);background-size:20px 20px;
  -webkit-mask-image:linear-gradient(90deg,transparent 26%,#000 60%);
          mask-image:linear-gradient(90deg,transparent 26%,#000 60%)}
/* gold rule closing the band, like the poster's band edge */
[data-skin="aurelia"] .af-band::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;
  background:var(--af-gold-grad);opacity:.85}
/* compact in-band falcon — MOBILE ONLY (md+ uses the big page-level one) */
[data-skin="aurelia"] .af-band-falcon{position:absolute;right:-4px;top:2px;bottom:4px;width:50%;z-index:0;
  background:url("/assets/images/brand/falcon-laptop.png?v=laptop4") right center/contain no-repeat;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 16%);
          mask-image:linear-gradient(90deg,transparent 0%,#000 16%)}
@media(min-width:768px){[data-skin="aurelia"] .af-band-falcon{display:none}}

/* ---------- PAGE-LEVEL falcon-laptop (md+): the FULL artwork, big, right ----------
   Client reference: the whole composition — laptop, claws on keys, candles,
   arrow — sits large on the page's right, overlapping the band and hero.
   contain + right-top anchor guarantees nothing is ever cropped away. */
[data-skin="aurelia"][data-af-dash="1"] .af-page-falcon{display:none}
@media(min-width:768px){
  [data-skin="aurelia"] main{position:relative}
  [data-skin="aurelia"][data-af-dash="1"] .af-page-falcon{display:block;position:absolute;z-index:30;pointer-events:none;
    top:14px;right:0;width:min(44vw,400px);aspect-ratio:560/313;
    background:url("/assets/images/brand/falcon-laptop.png?v=laptop4") right top/contain no-repeat;
    /* gold rim glow follows the artwork's silhouette (no rectangles) so the
       black laptop reads on navy; PNG alpha solidified at the source too */
    filter:drop-shadow(0 0 22px rgba(201,154,60,.32)) drop-shadow(0 18px 40px rgba(0,0,0,.5))}
  /* poster-style ambient golden haze behind the whole composition — huge and
     soft (fade completes well inside the box: no visible edges), laptop
     silhouettes against it exactly like the client's reference backdrop */
  [data-skin="aurelia"] body{overflow-x:clip}
  [data-skin="aurelia"][data-af-dash="1"] .af-page-falcon::before{content:"";position:absolute;z-index:-1;
    inset:-45% 0 -50% -60%;
    background:radial-gradient(60% 50% at 62% 48%, rgba(201,154,60,.20) 0%, rgba(201,154,60,.08) 34%, rgba(201,154,60,0) 55%)}
  /* top strips + top-of-page banners/checklist clear the artwork so no
     button or copy is ever buried under the falcon */
  [data-skin="aurelia"][data-af-dash="1"] main > section:has(h1):not(.af-frame),
  [data-skin="aurelia"][data-af-dash="1"] .af-inner .af-hero-inner{padding-right:clamp(150px,26vw,330px)}
}
@media(min-width:768px) and (max-width:1279px){
  [data-skin="aurelia"][data-af-dash="1"] .af-page-falcon{width:min(38vw,380px);top:20px}
  [data-skin="aurelia"][data-af-dash="1"] main > section:has(h1):not(.af-frame),
  [data-skin="aurelia"][data-af-dash="1"] .af-inner .af-hero-inner{padding-right:clamp(120px,22vw,290px)}
}
[data-skin="aurelia"] .af-band-inner{position:relative;z-index:1;display:flex;align-items:center;gap:16px;
  padding:18px 22px;text-decoration:none;width:fit-content}
[data-skin="aurelia"] .af-band-emblem{width:68px;height:68px;object-fit:contain;flex:none;
  filter:drop-shadow(0 6px 14px rgba(0,0,0,.65))}
[data-skin="aurelia"] .af-band-name{display:block;font-family:var(--af-serif);font-weight:700;font-size:27px;line-height:1.05;
  background:var(--af-gold-grad);-webkit-background-clip:text;background-clip:text;color:transparent}
[data-skin="aurelia"] .af-band-name b{font-weight:400}
[data-skin="aurelia"] .af-band-name i{font-style:normal;font-size:15px;vertical-align:super}
[data-skin="aurelia"] .af-band-tag{display:flex;align-items:center;gap:8px;margin-top:6px;
  font-size:10.5px;letter-spacing:.3em;text-transform:uppercase;color:var(--af-gold-500);white-space:nowrap}
[data-skin="aurelia"] .af-band-tag::before,[data-skin="aurelia"] .af-band-tag::after{
  content:"";display:inline-block;width:22px;height:1px;background:var(--af-gold-600)}
@media(max-width:640px){
  [data-skin="aurelia"] .af-band{min-height:96px;border-radius:12px}
  [data-skin="aurelia"] .af-band-inner{padding:14px 14px;gap:10px}
  [data-skin="aurelia"] .af-band-emblem{width:46px;height:46px}
  [data-skin="aurelia"] .af-band-name{font-size:19px}
  [data-skin="aurelia"] .af-band-name i{font-size:11px}
  [data-skin="aurelia"] .af-band-tag{font-size:8px;letter-spacing:.22em}
  [data-skin="aurelia"] .af-band-falcon{width:56%}
}

/* Headline money figures = the brand-page number style (gold-gradient serif).
   Targets only display-size .num combos; small mono numbers (tables, ids,
   dates) stay untouched. Client-approved from the brand theme page. */
[data-skin="aurelia"] main .num:is(.text-\[20px\],.text-\[22px\],.text-\[24px\],.text-\[26px\],.text-\[28px\],.text-\[32px\]){
  font-family:var(--af-serif);font-weight:700;letter-spacing:.01em;
  background:var(--af-gold-grad);-webkit-background-clip:text;background-clip:text;color:transparent}

/* serif display */
[data-skin="aurelia"] .af-serif{font-family:var(--af-serif)}
[data-skin="aurelia"] .af-gold-text{
  background:var(--af-gold-grad);-webkit-background-clip:text;background-clip:text;color:transparent}

/* ---------- gold-framed card (the signature border) ---------- */
[data-skin="aurelia"] .af-frame{position:relative;border-radius:20px;padding:1.5px;
  background:var(--af-gold-grad);
  box-shadow:0 22px 60px -30px rgba(0,0,0,.85),0 0 0 1px rgba(201,154,60,.12)}
[data-skin="aurelia"] .af-frame>.af-inner{border-radius:18.5px;background:var(--af-navy-850);overflow:hidden}
[data-skin="aurelia"] .af-slash{position:absolute;width:46px;height:2px;background:var(--af-gold-grad);opacity:.9;z-index:2}
[data-skin="aurelia"] .af-slash.tl{top:22px;left:-5px;transform:rotate(-45deg)}
[data-skin="aurelia"] .af-slash.br{bottom:22px;right:-5px;transform:rotate(-45deg)}

/* ---------- hero strip (falcon artwork lives in the masthead band) ---------- */
[data-skin="aurelia"] .af-hero{position:relative;overflow:hidden;display:flex;align-items:center}
[data-skin="aurelia"] .af-hero-inner{position:relative;z-index:1;padding:20px 22px;width:100%}
/* text protection where hero copy overlaps the bright falcon artwork */
[data-skin="aurelia"] .af-hero-scrim{background:rgba(2,10,30,.58);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  border-radius:12px;padding:8px 14px}
@media(max-width:640px){[data-skin="aurelia"] .af-hero-img{width:78%}}

/* ---------- data table — Option A: light rows on the navy shell ---------- */
[data-skin="aurelia"] .af-tscroll{overflow-x:auto}
[data-skin="aurelia"] .af-table{width:100%;border-collapse:collapse;min-width:660px}
[data-skin="aurelia"] .af-table thead th{background:var(--af-navy-850);color:var(--af-gold-300);
  font-family:var(--af-serif);font-weight:700;font-size:14px;letter-spacing:.01em;padding:16px 16px;
  text-align:center;border-bottom:1px solid rgba(201,154,60,.28);white-space:nowrap}
[data-skin="aurelia"] .af-table tbody td{padding:15px 16px;text-align:center;color:var(--af-row-ink);font-size:13.5px;font-weight:500}
[data-skin="aurelia"] .af-table tbody tr:nth-child(odd) td{background:var(--af-row)}
[data-skin="aurelia"] .af-table tbody tr:nth-child(even) td{background:var(--af-row-alt)}
[data-skin="aurelia"] .af-table tbody tr:hover td{background:#ece9f4}
[data-skin="aurelia"] .af-table td.af-num{font-weight:800;color:#111}
[data-skin="aurelia"] .af-table td.af-amt{font-variant-numeric:tabular-nums;font-weight:700}
[data-skin="aurelia"] .af-table td.af-remark{color:#33405f;line-height:1.4}
[data-skin="aurelia"] .af-table a.af-rowlink{color:inherit;text-decoration:none}

/* ---------- status pills (mockup-faithful; readable on light rows) ---------- */
[data-skin="aurelia"] .af-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 13px;border-radius:999px;
  font-weight:600;font-size:12.5px;white-space:nowrap}
[data-skin="aurelia"] .af-pill svg{width:15px;height:15px;flex:none}
[data-skin="aurelia"] .af-ok{background:rgba(201,154,60,.16);border:1px solid rgba(201,154,60,.55);color:#8a6a1f}
[data-skin="aurelia"] .af-ok svg circle{fill:var(--af-gold-500)}
[data-skin="aurelia"] .af-wait{background:rgba(90,110,160,.14);border:1px solid rgba(90,110,160,.5);color:#3d4d78}
[data-skin="aurelia"] .af-proc{background:rgba(60,130,180,.14);border:1px solid rgba(60,130,180,.5);color:#2a5f86}
[data-skin="aurelia"] .af-no{background:rgba(180,70,70,.12);border:1px solid rgba(180,70,70,.5);color:#8a2b2b}

/* ---------- mobile light cards (match the light-row treatment) ---------- */
[data-skin="aurelia"] .af-mlist{background:var(--af-navy-850)}
[data-skin="aurelia"] .af-mcard{display:flex;flex-direction:column;gap:6px;padding:14px 16px;background:var(--af-row);color:var(--af-row-ink)}
[data-skin="aurelia"] .af-mcard:nth-child(even){background:var(--af-row-alt)}
[data-skin="aurelia"] .af-mcard + .af-mcard{border-top:1px solid rgba(27,36,64,.08)}
[data-skin="aurelia"] .af-mcard .af-mtop{display:flex;align-items:center;justify-content:space-between;gap:10px}
[data-skin="aurelia"] .af-mcard .af-mdate{font-weight:700;color:#111;font-size:13.5px}
[data-skin="aurelia"] .af-mcard .af-mnet{font-variant-numeric:tabular-nums;font-weight:800;color:#111;font-size:15px}
[data-skin="aurelia"] .af-mcard .af-mrow{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:#4a5578}

/* section heading rule */
[data-skin="aurelia"] .af-head{display:flex;align-items:center;gap:14px;margin-bottom:2px}
[data-skin="aurelia"] .af-head h2{font-family:var(--af-serif);color:var(--af-gold-300);font-size:20px;margin:0}
[data-skin="aurelia"] .af-head::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,rgba(201,154,60,.55),transparent)}

/* ============================================================================
   GLOBAL COMPONENT OVERRIDES — keep every shared v2 component on-brand.
   ============================================================================ */

/* The skin is a NAVY+GOLD DARK identity: pin the zinc ramp + color-scheme to
   the dark values even if the user's saved theme is "light", otherwise the
   light-mode zinc mirror would put near-black text on the navy shell. The
   public site and admin keep their working light/dark toggle (no data-skin). */
:root[data-skin="aurelia"],
:root[data-skin="aurelia"][data-theme="light"] {
  color-scheme: dark;
  --c-bg:         223 88% 6%;
  --c-card:       224 66% 11%;
  --c-line:       223 43% 24%;
  --c-mute:       219 33% 72%;
  --c-brand:      201 154 60;
  --c-brand-dark: 168 127 46;
  --z-50:  250 250 250; --z-100: 244 244 245; --z-200: 228 228 231;
  --z-300: 212 212 216; --z-400: 161 161 170; --z-500: 113 113 122;
  --z-600:  82 82 91;   --z-700:  63 63 70;   --z-800:  39 39 42;
  --z-900:  24 24 27;   --z-950:   9 9 11;
}

/* gold-tinted hairline ring on every card (was flat navy) */
[data-skin="aurelia"] .ring-line{box-shadow:inset 0 0 0 1px rgba(201,154,60,.22)}

/* The skin is fixed-dark: the light/dark toggle is inert here (public site &
   admin keep theirs). Hide the control, its drawer row, and the whole profile
   "Appearance" card so no dead control is left visible. */
[data-skin="aurelia"] [data-theme-toggle]{display:none !important}
[data-skin="aurelia"] div:has(> [data-theme-toggle]){display:none !important}
[data-skin="aurelia"] section:has([data-theme-toggle]){display:none !important}

/* primary CTA — metallic gold, dark text (btn-brand text was already dark) */
[data-skin="aurelia"] .btn-brand{
  background:linear-gradient(135deg,#e8ce93 0%,#c99a3c 55%,#a87f2e 100%);color:#241a06;font-weight:600}
[data-skin="aurelia"] .btn-brand:hover{background:linear-gradient(135deg,#f0d9a8 0%,#d3a548 55%,#b0862f 100%)}
[data-skin="aurelia"] .btn-brand:disabled{background:rgb(63 63 70);color:rgb(161 161 170)}

/* v2 pills/alerts carried hard-coded GREEN text — recolour to gold */
[data-skin="aurelia"] .pill-brand{background:rgba(201,154,60,.16);color:#e8ce93}
[data-skin="aurelia"] .alert-v2.ok{color:#e8ce93}

/* select focus chevron was hard-coded green — gold under the skin */
[data-skin="aurelia"] select.input-v2:focus{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c99a3c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>")}

/* Page titles: serif + gold gradient across every dashboard page (pages the
   sweep hasn't hand-converted yet immediately read on-brand). */
[data-skin="aurelia"] main h1{
  font-family:var(--af-serif);font-weight:700;letter-spacing:.01em;
  background:var(--af-gold-grad);-webkit-background-clip:text;background-clip:text;color:transparent}

/* ============================================================================
   UNIVERSAL FALCON HERO — every dashboard page's title section becomes the
   gold-framed navy hero with the falcon on the RIGHT (client mandate), with
   zero per-page markup edits. Every page's first <main> section is the
   uniform title block (eyebrow <p> + <h1> [+ right-side widgets]); withdraw's
   hand-built .af-frame hero is excluded. Layers top→bottom: left navy scrim
   (text protection) → falcon art → navy base (padding-box) → metallic gold
   gradient (border-box) = real gradient border without wrapper markup.
   ============================================================================ */
/* One falcon per page — it lives in the masthead band (poster composition).
   Title sections are slim gold-framed strips: serif gold title + widgets. */
[data-skin="aurelia"][data-af-dash="1"] main > section:has(h1):not(.af-frame){
  position:relative;overflow:hidden;border-radius:16px;
  border:1.5px solid transparent;
  padding:18px 20px;min-height:0;
  background:
    linear-gradient(#081227,#081227) padding-box,
    var(--af-gold-grad) border-box;
  box-shadow:0 18px 50px -28px rgba(0,0,0,.85),0 0 0 1px rgba(201,154,60,.10);
}
[data-skin="aurelia"][data-af-dash="1"] main > section:has(h1):not(.af-frame) h1{font-size:24px;line-height:1.15}
@media(min-width:640px){[data-skin="aurelia"][data-af-dash="1"] main > section:has(h1):not(.af-frame) h1{font-size:28px}}
/* eyebrow line above the title picks up a soft gold */
[data-skin="aurelia"][data-af-dash="1"] main > section:has(h1):not(.af-frame) > div > p:first-child{color:var(--af-gold-300)}
/* right-side widgets read as a quiet navy panel on the strip */
[data-skin="aurelia"][data-af-dash="1"] main > section:has(h1):not(.af-frame) > :not(:first-child):not(script){
  background:rgba(2,10,30,.45);border-radius:12px;padding:8px 14px}

/* Legacy (not yet af-table) listings: gold column headers + gold hairlines so
   every table is branded even before its page is hand-converted. */
[data-skin="aurelia"] main table:not(.af-table) thead{color:var(--af-gold-300)}
[data-skin="aurelia"] main table:not(.af-table) thead tr{border-color:rgba(201,154,60,.28)}


/* ---------- marketing masthead band (public pages) ----------
   Same brand band as the dashboard; the compact in-band falcon stays visible
   at every width (no page-level overlay on marketing layouts). */
[data-skin="aurelia"] .af-band--mk .af-band-falcon{display:block;width:44%}
@media(min-width:768px){[data-skin="aurelia"] .af-band--mk .af-band-falcon{display:block}}
