/* =====================================================================
   Dev Enterprises ERP — THEME LAYER v2 · "EMBER GLASS"
   Midnight ink + molten flame/gold, liquid-glass surfaces, ember particles.
   Loaded AFTER app.css on screen pages. It only restyles; it never hides
   or moves functionality. Delete this file's <link> to get the plain look.
   ===================================================================== */

/* ---------- Tokens (light) ---------- */
:root {
  --ink: #07090F; --ink-2: #0E1320; --ink-3: #161D2E; --ink-ln: rgba(255, 255, 255, .08);
  --or: #FF7A2F; --or-d: #C2410C; --or-l: #FFF2E6; --gold: #FFC861; --ember: #E8432E;
  --ch: #0E1320; --ch2: #1B2438;
  --bg: #F6F4EF; --card: #FFFFFF; --ln: #E9E4DA; --tx: #111827; --mut: #5B6475;
  --sand: #F3EFE7; --glass: rgba(255, 255, 255, .72); --glass-ln: rgba(255, 255, 255, .9);
  --g: #15803d; --g-l: #E7F6EC; --y: #a16207; --y-l: #FDF5E2; --r: #B91C1C; --r-l: #FDECEC; --b: #1D4ED8; --b-l: #EAF0FE;
  --rad: 18px;
  --sh: 0 1px 1px rgba(17, 24, 39, .03), 0 2px 6px rgba(17, 24, 39, .04), 0 18px 36px -24px rgba(17, 24, 39, .22);
  --sh-lg: 0 2px 4px rgba(17, 24, 39, .04), 0 40px 80px -36px rgba(17, 24, 39, .38);
  --glow: 0 18px 40px -16px rgba(255, 122, 47, .65);
  --grad: linear-gradient(120deg, #FFC861 0%, #FF9A3D 38%, #FF7A2F 62%, #E8432E 100%);
  --grad-text: linear-gradient(100deg, #FFB547, #FF7A2F 45%, #E8432E);
  --grad-soft: linear-gradient(135deg, #FFF6E8 0%, #FFE8D2 55%, #FFDCC6 100%);
  --on-grad: #1A0D04;
  --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --fd: 'Sora', 'Manrope', system-ui, sans-serif;
  --fb: 'Manrope', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-family: var(--fb);
}
html[data-theme=dark] {
  --bg: #07090F; --card: #0F1422; --ln: #1E2638; --tx: #E8ECF4; --mut: #97A1B4;
  --or: #FF8A3D; --or-d: #FFB066; --or-l: #24160C; --sand: #121828; --glass: rgba(15, 20, 34, .72); --glass-ln: rgba(255, 255, 255, .06);
  --g-l: #0E2318; --y-l: #241C08; --r-l: #2A1012; --b-l: #0E1A33; --g: #4ADE80; --y: #FBBF24; --r: #F87171; --b: #93B4FF;
  --sh: 0 1px 2px rgba(0, 0, 0, .4), 0 20px 40px -24px rgba(0, 0, 0, .7);
  --sh-lg: 0 40px 80px -30px rgba(0, 0, 0, .85);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { font-family: var(--fb); -webkit-font-smoothing: antialiased; color: var(--tx); }
h1, h2, h3 { font-family: var(--fd); font-weight: 700; letter-spacing: -.025em; }
a { color: var(--or-d); }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; border-radius: 8px; }
.ic { stroke-width: 1.8; }
code { font-family: var(--fm); font-size: .9em; }

/* ambient aurora behind the app (drifts slowly) */
body.shell::before, body.pa::before {
  content: ''; position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(32% 38% at 88% 6%, rgba(255, 186, 102, .42), transparent 70%),
    radial-gradient(16% 22% at 20% 30%, rgba(255, 160, 90, .4), transparent 70%),   /* colour behind the glass sidebar */
    radial-gradient(15% 20% at 22% 62%, rgba(150, 170, 240, .34), transparent 70%),
    radial-gradient(28% 34% at 12% 96%, rgba(255, 122, 47, .16), transparent 70%),
    radial-gradient(30% 40% at 55% 60%, rgba(186, 200, 230, .28), transparent 70%), var(--bg);
  animation: eg-aurora 28s ease-in-out infinite alternate;
}
body.shell::after, body.pa::after {   /* fine grain for a printed, premium feel */
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme=dark] body.shell::before { background: radial-gradient(32% 38% at 88% 6%, rgba(255, 122, 47, .16), transparent 70%), radial-gradient(16% 22% at 20% 30%, rgba(255, 122, 47, .2), transparent 70%), radial-gradient(15% 20% at 22% 62%, rgba(90, 110, 220, .24), transparent 70%),radial-gradient(28% 34% at 12% 96%, rgba(232, 67, 46, .12), transparent 70%), radial-gradient(30% 40% at 55% 60%, rgba(60, 80, 140, .18), transparent 70%), var(--bg); }
html[data-theme=dark] body.shell::after { mix-blend-mode: screen; opacity: .25; }
@keyframes eg-aurora { 0% { transform: translate3d(0, 0, 0) rotate(0); } 100% { transform: translate3d(-3%, 2%, 0) rotate(4deg); } }
body.shell { background: transparent; }

/* cursor spotlight that follows the pointer across the page (motion.js sets --cx/--cy) */
.eg-spot { position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(520px circle at var(--cx, -999px) var(--cy, -999px), rgba(255, 168, 92, .10), transparent 60%); transition: opacity .4s; }
html[data-theme=dark] .eg-spot { background: radial-gradient(520px circle at var(--cx, -999px) var(--cy, -999px), rgba(255, 122, 47, .07), transparent 60%); }

/* ---------- Shell: sidebar — a floating frosted-glass panel over the dashboard background ---------- */
:root {
  --side-glass: radial-gradient(130% 22% at 0% 0%, rgba(255, 255, 255, .85), transparent 62%),   /* specular highlight, top-left */
                linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .28) 48%, transparent 56%),   /* faint diagonal sheen */
                linear-gradient(165deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .32) 55%, rgba(255, 255, 255, .5) 100%);
  --side-edge: rgba(255, 255, 255, .78);
  --side-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 0 1px rgba(17, 24, 39, .04), 0 32px 64px -30px rgba(17, 24, 39, .3), 0 10px 24px -14px rgba(255, 122, 47, .22);
  --side-chip: rgba(255, 255, 255, .6);
  --side-brand: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .35));
}
html[data-theme=dark] {
  --side-glass: radial-gradient(130% 22% at 0% 0%, rgba(255, 255, 255, .1), transparent 62%),
                linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .04) 48%, transparent 56%),
                linear-gradient(165deg, rgba(40, 48, 72, .55) 0%, rgba(15, 20, 34, .38) 55%, rgba(26, 32, 52, .5) 100%);
  --side-edge: rgba(255, 255, 255, .1);
  --side-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .03), 0 32px 64px -28px rgba(0, 0, 0, .8), 0 10px 30px -16px rgba(255, 122, 47, .18);
  --side-chip: rgba(255, 255, 255, .07);
  --side-brand: linear-gradient(180deg, rgba(22, 28, 44, .75), rgba(15, 20, 34, .35));
}
.side {
  inset: 12px auto 12px 12px; width: 248px; border-radius: 24px; color: var(--tx); scrollbar-width: thin; scrollbar-color: var(--ln) transparent;
  border: 1px solid var(--side-edge); background: var(--side-glass); box-shadow: var(--side-shadow);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
}
.main { margin-left: 272px; }
.brand { background: var(--side-brand); border-bottom: 1px solid var(--side-edge); padding: 18px 16px 16px; z-index: 2; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.brand b { color: var(--tx); font-family: var(--fd); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand small { color: var(--or-d); font-family: var(--fm); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.brand .lm-l { display: inline-flex; } .brand .lm-d { display: none; }
html[data-theme=dark] .brand .lm-l { display: none; } html[data-theme=dark] .brand .lm-d { display: inline-flex; }
.brand .logo-mark { transition: transform .8s var(--spring); filter: drop-shadow(0 6px 14px rgba(255, 122, 47, .35)); }
.brand:hover .logo-mark { transform: rotate(-12deg) scale(1.1); }
.nav-g { padding: 12px 12px 2px; }
.nav-h { font-family: var(--fm); font-size: 10px; letter-spacing: .18em; color: var(--mut); opacity: .85; padding: 6px 10px; }
.nav-a { position: relative; color: var(--mut); font-weight: 600; font-size: 13.5px; padding: 9px 11px; border-radius: 12px; isolation: isolate; overflow: hidden; transition: color .3s, background .3s, transform .45s var(--ease); }
.nav-a .ic { color: var(--or); transition: transform .5s var(--spring), color .3s; }
.nav-a::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); transform: scaleY(0); transition: transform .4s var(--ease); }
.nav-a:hover { background: var(--side-chip); color: var(--tx); transform: translateX(3px); text-decoration: none; box-shadow: inset 0 1px 0 var(--side-edge), 0 6px 16px -10px rgba(17, 24, 39, .25); }
.nav-a:hover .ic { color: var(--or-d); transform: scale(1.15) rotate(-8deg); }
.nav-a:hover::before { transform: scaleY(1); }
.nav-a.on { color: var(--on-grad); background: var(--grad); box-shadow: 0 12px 26px -12px rgba(255, 122, 47, .85), inset 0 1px 0 rgba(255, 255, 255, .45); }
.nav-a.on::before { display: none; }
.nav-a.on .ic { color: var(--on-grad); }
.nav-a.on::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%); transform: translateX(-120%); animation: eg-sheen 5s ease-in-out infinite 1.2s; }
.nav-n { font-style: normal; margin-left: auto; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--side-chip); color: var(--tx); border: 1px solid var(--side-edge); }
.nav-n.hot { background: var(--grad); color: var(--on-grad); box-shadow: 0 0 0 0 rgba(255, 122, 47, .6); animation: eg-ping 2.4s var(--ease) infinite; }
@keyframes eg-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 47, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255, 122, 47, 0); } }
@keyframes eg-sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* ---------- Shell: top bar ---------- */
.top { background: var(--glass); border-bottom: 1px solid var(--ln); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); padding: 12px 26px; }
.top h1 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; position: relative; }
.top h1::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 34px; height: 3px; border-radius: 3px; background: var(--grad); transform-origin: left; animation: eg-grow .9s var(--ease) .2s both; }
@keyframes eg-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.icon-btn { border-radius: 12px; border-color: var(--ln); background: var(--card); color: var(--tx); transition: transform .45s var(--spring), box-shadow .4s, border-color .3s, color .3s; }
.icon-btn:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: var(--or); color: var(--or-d); }
.bell i { background: var(--grad); color: var(--on-grad); font-weight: 800; box-shadow: 0 0 0 2px var(--card); animation: eg-pop 2.6s var(--ease) infinite; }
.bell:hover .ic { animation: eg-ring .8s var(--ease); }
@keyframes eg-pop { 0%, 85%, 100% { transform: scale(1); } 90% { transform: scale(1.28); } }
@keyframes eg-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-5deg); } }
.av { background: var(--grad); color: var(--on-grad); font-family: var(--fd); font-weight: 800; box-shadow: 0 6px 16px -8px rgba(255, 122, 47, .8), 0 0 0 2px var(--card), 0 0 0 3.5px rgba(255, 122, 47, .35); }
.um summary { padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid transparent; transition: background .3s, border-color .3s; }
.um summary:hover { background: var(--card); border-color: var(--ln); }
.um-m { border-radius: 16px; border-color: var(--ln); background: var(--card); box-shadow: var(--sh-lg); animation: eg-drop .4s var(--ease); padding: 8px; }
.um-m a { border-radius: 10px; color: var(--tx); } .um-m a:hover { background: var(--sand); }
@keyframes eg-drop { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
.gs input { border-radius: 14px; background: var(--card); border-color: var(--ln); }
.gs input:focus { border-color: var(--or); box-shadow: 0 0 0 4px rgba(255, 122, 47, .16); }
.gs-k { font-family: var(--fm); border-radius: 6px; }
.gs-dd { border-radius: 18px; border-color: var(--ln); box-shadow: var(--sh-lg); animation: eg-drop .3s var(--ease); background: var(--card); }
.gs-i { border-radius: 10px; }
.wh-f select { border-radius: 12px; }
.pa-btn { border-radius: 999px !important; }
.content { padding: 28px 30px 80px; position: relative; z-index: 1; }

/* scroll progress hairline under the top bar */
.eg-progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 60; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--grad); pointer-events: none; }

/* ---------- Cards & KPIs ---------- */
.card { position: relative; border-radius: 22px; border: 1px solid var(--ln); background: var(--card); box-shadow: var(--sh); transition: box-shadow .5s var(--ease), border-color .4s, transform .5s var(--ease); }
.card::before {   /* gradient hairline that lights up on hover */
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: linear-gradient(140deg, rgba(255, 200, 97, .9), rgba(255, 122, 47, .5) 30%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover { box-shadow: var(--sh-lg); }
.card:hover::before { opacity: 1; }
.card-h { padding: 16px 22px; border-bottom-color: var(--ln); }
.card-h h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-h h2::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(255, 122, 47, .15); flex: none; animation: eg-breathe 3s ease-in-out infinite; }
@keyframes eg-breathe { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 122, 47, .15); } 50% { box-shadow: 0 0 0 7px rgba(255, 122, 47, .05); } }
.card-b { padding: 18px 22px; }
.kpis { gap: 14px; perspective: 900px; }
.kpi { position: relative; overflow: hidden; isolation: isolate; border: 1px solid var(--ln); border-left: 1px solid var(--ln); border-radius: 20px; padding: 16px 18px; background: var(--card); color: var(--tx); box-shadow: var(--sh); transform-style: preserve-3d; transition: transform .5s var(--ease), box-shadow .5s, border-color .3s; }
.kpi::before { content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 3px; border-radius: 0 0 4px 4px; background: var(--ln); }
.kpi.or::before { background: var(--grad); } .kpi.ok::before { background: linear-gradient(90deg, #4ADE80, #15803d); }
.kpi.warn::before { background: linear-gradient(90deg, #FFC861, #D97706); } .kpi.bad::before { background: linear-gradient(90deg, #F87171, #B91C1C); }
.kpi::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 186, 102, .32), transparent 60%); }
.kpi:hover::after { opacity: 1; }
.kpi:hover, a.kpi:hover { box-shadow: var(--sh-lg); border-color: rgba(255, 122, 47, .45); text-decoration: none; }
.kpi small { font-family: var(--fm); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.kpi b { display: block; margin-top: 8px; font-family: var(--fd); font-weight: 700; font-size: 28px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
html[data-theme=dark] .kpi::after { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 122, 47, .16), transparent 60%); }

/* ---------- Buttons ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; border: 0; border-radius: 13px; padding: 10px 18px; background: var(--grad); background-size: 140% 100%; color: var(--on-grad); font: 700 13.5px var(--fb); box-shadow: 0 12px 24px -14px rgba(255, 122, 47, .95), inset 0 1px 0 rgba(255, 255, 255, .45); transition: transform .45s var(--spring), box-shadow .45s, background-position .6s var(--ease), filter .3s; }
.btn::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%); transform: translateX(-120%); transition: transform .9s var(--ease); }
.btn:hover { background: var(--grad); background-size: 140% 100%; background-position: 100% 0; transform: translateY(-2px); box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .45); text-decoration: none; }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.96); transition-duration: .12s; }
.btn.ghost { background: var(--card); color: var(--tx); border: 1px solid var(--ln); box-shadow: 0 1px 0 rgba(17, 24, 39, .03); }
.btn.ghost::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 186, 102, .25) 50%, transparent 70%); }
.btn.ghost:hover { border-color: var(--or); color: var(--or-d); box-shadow: var(--sh); background: var(--card); }
.btn.dark { background: var(--ink); color: #fff; box-shadow: 0 12px 24px -14px rgba(7, 9, 15, .9); }
.btn.red { background: linear-gradient(120deg, #F87171, #B91C1C); color: #fff; box-shadow: 0 12px 24px -14px rgba(185, 28, 28, .8); }
.btn.green { background: linear-gradient(120deg, #4ADE80, #15803d); color: #04140A; box-shadow: 0 12px 24px -14px rgba(21, 128, 61, .8); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.btn.block { padding: 13px; }
.btn[disabled] { filter: grayscale(.6); opacity: .55; transform: none; box-shadow: none; }
html[data-theme=dark] .btn.ghost { background: var(--card); color: var(--tx); }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, .55); transform: scale(0); animation: eg-ripple .7s ease-out forwards; z-index: 0; }
@keyframes eg-ripple { to { transform: scale(2.6); opacity: 0; } }

/* ---------- Badges, flashes, tabs ---------- */
.bd { border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 11px; letter-spacing: .02em; }
.flash { position: relative; border-radius: 16px; padding: 13px 18px 13px 20px; border-width: 1px; overflow: hidden; box-shadow: var(--sh); animation: eg-slide .7s var(--spring) both; }
.flash::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: currentColor; opacity: .6; }
.flash::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .25; transform-origin: left; animation: eg-drain 7s linear forwards; }
@keyframes eg-slide { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes eg-drain { to { transform: scaleX(0); } }
html[data-theme=dark] .flash.ok { color: #86EFAC; border-color: #14532d; } html[data-theme=dark] .flash.err { color: #FCA5A5; border-color: #7f1d1d; }
html[data-theme=dark] .flash.warn { color: #FCD34D; border-color: #713f12; } html[data-theme=dark] .flash.info { color: #A5C0FF; border-color: #1e3a8a; }
.tabs { gap: 6px; border-bottom-color: var(--ln); }
.tabs a { position: relative; border-radius: 12px 12px 0 0; padding: 9px 16px; transition: color .3s, background .3s; }
.tabs a:hover { color: var(--tx); background: var(--sand); text-decoration: none; }
.tabs a.on { background: var(--card); border-color: var(--ln); border-bottom-color: var(--card); color: var(--tx); }
.tabs a.on::after { content: ''; position: absolute; left: 14px; right: 14px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }

/* ---------- Tables ---------- */
.card .tbl-w { margin: 0 -2px; }
.tbl { font-size: 13.5px; }
.tbl th { background: var(--sand); color: var(--mut); font-family: var(--fm); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; border-bottom: 1px solid var(--ln); padding: 11px 12px; }
.tbl th:first-child { border-top-left-radius: 12px; } .tbl th:last-child { border-top-right-radius: 12px; }
.tbl td { padding: 12px; border-bottom-color: var(--ln); }
.tbl tbody tr { transition: background .25s, box-shadow .25s; }
.tbl tbody tr:hover { background: var(--or-l); box-shadow: inset 3px 0 0 var(--or); }
.tbl tfoot td { background: var(--sand); border-top: 1px solid var(--ln); }
html[data-theme=dark] .tbl th, html[data-theme=dark] .tbl tfoot td { background: #111829; }
.pager { font-family: var(--fm); font-size: 12px; }

/* ---------- Forms ---------- */
input, select, textarea { border-radius: 12px; border-color: #E2DCD0; background: #FFFEFB; color: var(--tx); padding: 10px 12px; transition: border-color .25s, box-shadow .3s, background .25s; }
input:hover, select:hover, textarea:hover { border-color: #CFC5B4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--or); background: #fff; box-shadow: 0 0 0 4px rgba(255, 122, 47, .16); }
input[type=checkbox], input[type=radio] { accent-color: var(--or); }
html[data-theme=dark] input, html[data-theme=dark] select, html[data-theme=dark] textarea { background: #0B101C; border-color: var(--ln); color: var(--tx); }
.fld label { font-family: var(--fm); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; color: var(--mut); }
.form h3 { font-size: 16px; }
.filters { padding: 12px; border-radius: 18px; background: var(--glass); border: 1px solid var(--ln); box-shadow: var(--sh); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bar { border-radius: 999px; background: var(--sand); } .bar i { background: var(--grad); border-radius: 999px; }

/* ---------- Page entrance & reveal (motion.js adds the classes) ---------- */
html.m-on .content > *, html.m-on .kpis > *, html.m-on .grid > *, html.m-on .bk-tiles > * { opacity: 0; transform: translateY(22px) scale(.985); filter: blur(4px); }
html.m-on .m-in { opacity: 1 !important; transform: none !important; filter: none !important; transition: opacity .8s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s), filter .8s var(--ease) var(--d, 0s); }
html.m-leave .content { opacity: 0; transform: translateY(-8px); filter: blur(3px); transition: opacity .25s, transform .3s var(--ease), filter .25s; }
.loadbar { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 9999; pointer-events: none; transform-origin: left; transform: scaleX(0); background: var(--grad); box-shadow: 0 0 14px rgba(255, 122, 47, .8); opacity: 0; transition: opacity .3s; }
.loadbar.on { opacity: 1; animation: eg-load 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes eg-load { 0% { transform: scaleX(0); } 20% { transform: scaleX(.45); } 100% { transform: scaleX(.92); } }

/* ---------- Mobile sidebar ---------- */
@media (max-width: 900px) {
  .main { margin-left: 0; }
  .side { inset: 10px auto 10px 10px; transform: translateX(calc(-100% - 24px)); transition: transform .5s var(--ease); background: var(--side-glass), var(--glass); box-shadow: var(--side-shadow), 30px 0 60px -20px rgba(17, 24, 39, .35); }
  body.nav-open .scrim { background: rgba(7, 9, 15, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .top { padding: 10px 14px; } .top h1 { font-size: 19px; }
  .content { padding: 18px 14px 64px; }
}
@media (max-width: 640px) {
  .tbl tr { border-radius: 16px; border-color: var(--ln); background: var(--card); box-shadow: var(--sh); }
  .tbl td::before { font-family: var(--fm); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
}

/* =====================================================================
   BACKUP & IMPORT (Admin → Backup & import)
   ===================================================================== */
.bk-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 6px 4px 22px; }
.bk-eye { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fm); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--or-d); padding: 6px 12px; border-radius: 999px; background: var(--or-l); border: 1px solid rgba(255, 122, 47, .25); }
.bk-hero h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.045em; margin: 14px 0 8px; background: linear-gradient(100deg, var(--tx) 30%, var(--or-d)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bk-hero p { margin: 0; color: var(--mut); font-size: 15.5px; max-width: 640px; line-height: 1.6; }
.bk-orb { position: relative; flex: none; width: 112px; height: 112px; display: grid; place-items: center; border-radius: 32px; color: var(--on-grad); background: var(--grad); box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .5); animation: eg-float 6s ease-in-out infinite; }
.bk-orb i { position: absolute; inset: -10px; border-radius: 40px; border: 1px dashed rgba(255, 122, 47, .45); animation: eg-spin 18s linear infinite; }
.bk-orb i:nth-child(2) { inset: -22px; border-radius: 50px; border-style: solid; border-color: rgba(255, 200, 97, .25); animation-duration: 26s; animation-direction: reverse; }
.bk-orb i:nth-child(3) { inset: auto; width: 10px; height: 10px; border: 0; border-radius: 50%; top: -24px; left: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold); transform-origin: 0 80px; animation: eg-orbit 7s linear infinite; }
@keyframes eg-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes eg-spin { to { transform: rotate(360deg); } }
@keyframes eg-orbit { to { transform: rotate(360deg); } }
.bk-stats .card-b { padding: 0; }
.bk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.bk-stat { position: relative; padding: 18px 22px; border-right: 1px solid var(--ln); border-bottom: 1px solid var(--ln); transition: background .3s; }
.bk-stat:hover { background: var(--or-l); }
.bk-stat small { display: block; font-family: var(--fm); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.bk-stat b { display: block; margin-top: 6px; font: 700 30px/1 var(--fd); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.bk-row { margin-bottom: 16px; align-items: stretch; }
.bk-row > .card, .bk-row > div > .card { height: calc(100% - 16px); }
.bk-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.bk-acts .btn { padding: 12px 18px; font-size: 14px; }
.bk-note { font-size: 13px; color: var(--mut); line-height: 1.6; padding: 12px 14px; border-radius: 14px; background: var(--sand); border: 1px dashed var(--ln); margin: 4px 0 0; }
.bk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 12px; border: 1px solid var(--ln); background: var(--card); font-size: 13.5px; font-weight: 600; transition: border-color .3s, transform .4s var(--spring), box-shadow .3s; }
.bk-chip:hover { border-color: rgba(255, 122, 47, .5); transform: translateY(-2px); box-shadow: var(--sh); }
.bk-chip span { margin-right: 6px; }
.bk-chip a { font-family: var(--fm); font-size: 11.5px; font-weight: 500; color: var(--tx); padding: 5px 9px; border-radius: 8px; transition: background .25s, color .25s; }
.bk-chip a:hover { background: var(--grad); color: var(--on-grad); text-decoration: none; }
.bk-file { font-size: 12.5px; padding: 3px 8px; border-radius: 8px; background: var(--sand); border: 1px solid var(--ln); word-break: break-all; }
.bk-ta { white-space: nowrap; text-align: right; } .bk-ta > * { margin-left: 6px; }
.btn.bk-danger { background: var(--card); color: var(--r); border: 1px solid rgba(185, 28, 28, .3); box-shadow: none; }
.btn.bk-danger:hover { background: linear-gradient(120deg, #F87171, #B91C1C); color: #fff; border-color: transparent; box-shadow: 0 14px 28px -14px rgba(185, 28, 28, .8); }
.btn.bk-x { padding: 6px 10px; color: var(--mut); }
.bk-form { display: grid; gap: 12px; }
.bk-drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; border: 1.5px dashed #D9CFBF; background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255, 186, 102, .06) 10px 20px), var(--card); cursor: pointer; transition: border-color .3s, background-color .3s, transform .4s var(--spring), box-shadow .3s; }
.bk-drop:hover, .bk-drop.over { border-color: var(--or); box-shadow: 0 0 0 5px rgba(255, 122, 47, .12); transform: translateY(-2px); }
.bk-drop.over { transform: scale(1.015); }
.bk-drop.has { border-style: solid; border-color: rgba(21, 128, 61, .45); }
.bk-drop.has .bk-drop-i { background: linear-gradient(120deg, #4ADE80, #15803d); }
.bk-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.bk-drop input:disabled { cursor: not-allowed; }
.bk-drop-i { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--grad); color: var(--on-grad); box-shadow: var(--glow); transition: transform .5s var(--spring); }
.bk-drop:hover .bk-drop-i { transform: translateY(-3px) rotate(-6deg); }
.bk-drop-t b { display: block; font-size: 14.5px; } .bk-drop-t small { display: block; color: var(--mut); font-size: 12.5px; margin-top: 2px; word-break: break-all; }
.bk-plan { margin-top: 16px; border: 1px solid var(--ln); border-radius: 18px; padding: 14px; background: var(--sand); animation: eg-slide .6s var(--spring) both; }
.bk-plan-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 10px; }
.bk-plan-h > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.bk-new { color: var(--g); font-size: 16px; }
.bk-plan .tbl-w { max-height: 280px; overflow: auto; border-radius: 12px; background: var(--card); }
@media (max-width: 900px) { .bk-orb { display: none; } .bk-row.g2 { grid-template-columns: 1fr; } }

/* =====================================================================
   SIGN-IN SCREENS (body.lx) — "Ember Forge"
   ===================================================================== */
body.lx { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ink); color: #E9ECF3; font-family: var(--fb); overflow-x: hidden; display: flex; flex-direction: column; position: relative; isolation: isolate; }
.lx a { color: var(--gold); }
.lx-embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.lx-aurora { position: fixed; inset: 0; z-index: -3; pointer-events: none; overflow: hidden; }
.lx-aurora i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .7; will-change: transform; animation: lx-drift 22s ease-in-out infinite alternate; }
.lx-aurora i:nth-child(1) { width: 60vmax; height: 60vmax; left: -18vmax; top: -24vmax; background: radial-gradient(circle, rgba(255, 122, 47, .55), transparent 62%); }
.lx-aurora i:nth-child(2) { width: 46vmax; height: 46vmax; right: -16vmax; top: 10vh; background: radial-gradient(circle, rgba(232, 67, 46, .38), transparent 62%); animation-duration: 28s; }
.lx-aurora i:nth-child(3) { width: 50vmax; height: 50vmax; left: 30vw; bottom: -34vmax; background: radial-gradient(circle, rgba(255, 200, 97, .32), transparent 62%); animation-duration: 34s; }
.lx-aurora i:nth-child(4) { width: 36vmax; height: 36vmax; left: 8vw; bottom: -10vmax; background: radial-gradient(circle, rgba(72, 92, 180, .35), transparent 62%); animation-duration: 40s; }
@keyframes lx-drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(6vw, 4vh, 0) scale(1.12); } 100% { transform: translate3d(-4vw, 7vh, 0) scale(.92); } }
.lx-floor { position: fixed; left: -50%; right: -50%; bottom: -10vh; height: 55vh; z-index: -2; pointer-events: none; transform: perspective(600px) rotateX(62deg); transform-origin: bottom;
  background-image: linear-gradient(rgba(255, 160, 90, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 160, 90, .22) 1px, transparent 1px); background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%); animation: lx-floor 6s linear infinite; }
@keyframes lx-floor { to { background-position: 0 64px; } }
.lx-grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"); }
.lx-wm { position: fixed; left: 50%; bottom: -3vw; transform: translateX(-50%); z-index: -2; pointer-events: none; user-select: none; white-space: nowrap; font: 800 clamp(120px, 22vw, 360px)/.8 var(--fd); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px rgba(255, 186, 102, .1); }

.lx-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px clamp(16px, 4vw, 56px); }
.lx-brand { display: inline-flex; }
.lx-logo { height: 76px; width: auto; filter: drop-shadow(0 10px 24px rgba(255, 122, 47, .35)); }
.lx-top-r { display: flex; align-items: center; gap: 14px; }
.lx-clock { font-family: var(--fm); font-size: 12.5px; letter-spacing: .08em; color: #A9B1C2; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--ink-ln); background: rgba(255, 255, 255, .03); }
.lx-clock:empty { display: none; }
.lx-back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); color: #E9ECF3 !important; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, .04); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .3s, border-color .3s, transform .45s var(--spring), color .3s; }
.lx-back:hover { background: #fff; color: var(--ink) !important; border-color: #fff; transform: translateX(-4px); text-decoration: none; }

.lx-stage { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; gap: clamp(28px, 5vw, 80px); padding: 12px clamp(16px, 4vw, 56px) 30px; }
.lx-stage.solo { grid-template-columns: minmax(0, 480px); justify-content: center; }

/* left: story */
.lx-eye { display: inline-flex; align-items: center; gap: 10px; font-family: var(--fm); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); padding: 8px 14px; border-radius: 999px; background: rgba(255, 200, 97, .07); border: 1px solid rgba(255, 200, 97, .2); }
.lx-pulse { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); animation: lx-pulse 2s infinite; }
@keyframes lx-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.lx-h1 { margin: 24px 0 20px; font: 800 clamp(38px, 4.4vw, 66px)/1.04 var(--fd); letter-spacing: -.05em; color: #fff; }
.lx-line { display: block; overflow: hidden; padding-bottom: .06em; }
.lx-rot { position: relative; display: inline-grid; vertical-align: bottom; }
.lx-rot b { grid-area: 1 / 1; font-weight: 800; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; transform: translateY(70%) rotateX(-70deg); filter: blur(8px); transform-origin: 50% 100%; transition: opacity .6s var(--ease), transform .8s var(--ease), filter .6s var(--ease); white-space: nowrap; }
.lx-rot b.on { opacity: 1; transform: none; filter: none; }
.lx-rot b.out { opacity: 0; transform: translateY(-60%) rotateX(60deg); filter: blur(8px); }
.lx-lead { margin: 0 0 32px; max-width: 560px; color: #A9B1C2; font-size: clamp(15.5px, 1.25vw, 18px); line-height: 1.65; }
.lx-lead strong { color: #fff; font-weight: 700; }
.lx-tiles { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; perspective: 900px; }
.lx-tile { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; isolation: isolate; transition: transform .6s var(--ease), border-color .4s, box-shadow .5s; }
.lx-tile::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 140, 60, .22), transparent 65%); }
.lx-tile:hover { border-color: rgba(255, 160, 90, .35); box-shadow: 0 30px 60px -30px rgba(255, 122, 47, .5); }
.lx-tile:hover::after { opacity: 1; }
.lx-tile i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--grad); color: var(--on-grad); box-shadow: 0 10px 24px -10px rgba(255, 122, 47, .9); transition: transform .6s var(--spring); }
.lx-tile:hover i { transform: rotate(-10deg) scale(1.08); }
.lx-tile b { display: block; color: #fff; font-family: var(--fd); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.lx-tile span { display: block; color: #8F99AD; font-size: 13px; line-height: 1.5; margin-top: 4px; }
.lx-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #7F8AA0; font-size: 12.5px; }
.lx-trust span { display: inline-flex; align-items: center; gap: 7px; } .lx-trust .ic { color: var(--gold); }

/* right: glass card with a rotating molten ring */
.lx-panel { perspective: 1200px; }
.lx-card { position: relative; border-radius: 30px; padding: clamp(26px, 3.2vw, 44px); background: linear-gradient(160deg, rgba(22, 28, 44, .82), rgba(10, 13, 22, .9)); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); transform-style: preserve-3d; transition: transform .5s var(--ease); isolation: isolate; }
@property --lx-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.lx-ring { position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; z-index: -1; pointer-events: none; background: conic-gradient(from var(--lx-a), transparent 0 55%, rgba(255, 200, 97, .9) 68%, #FF7A2F 76%, #E8432E 82%, transparent 92%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: lx-ring 6s linear infinite; }
.lx-ring::after { content: ''; position: absolute; inset: 0; border-radius: inherit; filter: blur(18px); background: inherit; opacity: .6; }
@keyframes lx-ring { to { --lx-a: 360deg; } }
.lx-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; background: radial-gradient(400px circle at var(--gx, 30%) var(--gy, 0%), rgba(255, 255, 255, .09), transparent 55%); }
.lx-f { position: relative; z-index: 2; display: flex; flex-direction: column; }
.lx-mob { display: none; }
.lx-orb { position: relative; width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; margin-bottom: 22px; color: #fff; background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .12); transition: background .5s, color .5s, transform .6s var(--spring), box-shadow .5s; }
.lx-orb span { font: 800 26px/1 var(--fd); display: grid; place-items: center; }
.lx-orb.has { background: var(--grad); color: var(--on-grad); border-color: transparent; box-shadow: var(--glow); transform: rotate(-6deg); }
.lx-orb::after { content: ''; position: absolute; inset: -7px; border-radius: 27px; border: 1px dashed rgba(255, 200, 97, .35); animation: eg-spin 14s linear infinite; }
.lx-f h2 { margin: 0; font: 800 clamp(30px, 3vw, 40px)/1.05 var(--fd); letter-spacing: -.045em; color: #fff; }
.lx-sub { margin: 10px 0 24px; color: #97A1B4; font-size: 15px; line-height: 1.55; }
.lx .flash { margin-bottom: 16px; box-shadow: none; }
.lx .flash.err { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .35); color: #FCA5A5; }
.lx .flash.ok { background: rgba(74, 222, 128, .1); border-color: rgba(74, 222, 128, .3); color: #86EFAC; }
.lx .flash.warn { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .3); color: #FCD34D; }

/* floating-label fields */
.lx-fld { position: relative; margin-bottom: 16px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); transition: border-color .3s, background .3s, box-shadow .4s, transform .5s var(--spring); }
.lx-fld:hover { border-color: rgba(255, 255, 255, .2); }
.lx-fld:focus-within { border-color: rgba(255, 140, 60, .8); background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 5px rgba(255, 122, 47, .14), 0 20px 40px -24px rgba(255, 122, 47, .7); transform: translateY(-2px); }
.lx-ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #7F8AA0; display: grid; transition: color .3s, transform .5s var(--spring); pointer-events: none; }
.lx-fld:focus-within .lx-ic { color: var(--gold); transform: translateY(-50%) scale(1.1); }
.lx-fld input { width: 100%; height: 62px; padding: 24px 52px 8px 50px !important; border: 0 !important; border-radius: 16px; background: transparent !important; color: #fff; font: 600 16px var(--fb); box-shadow: none !important; outline: none; }
.lx-fld input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 60px #141a28 inset !important; caret-color: #fff; }
.lx-fld label { position: absolute; left: 50px; top: 50%; transform: translateY(-50%); color: #8F99AD; font-size: 15px; font-weight: 500; pointer-events: none; transform-origin: left; transition: transform .35s var(--ease), color .3s, top .35s var(--ease); }
.lx-fld input:focus + label, .lx-fld input:not(:placeholder-shown) + label { top: 17px; transform: translateY(-50%) scale(.74); color: var(--gold); letter-spacing: .04em; }
.lx-bar { position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .5s var(--ease); }
.lx-fld:focus-within .lx-bar { transform: scaleX(1); }
.lx-show { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: #8F99AD; cursor: pointer; transition: background .3s, color .3s; }
.lx-show:hover, .lx-show.on { color: var(--gold); background: rgba(255, 255, 255, .06); }
.lx-show.on .ic { animation: eg-ring .5s var(--ease); }
.lx-caps { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 12px; font-size: 12.5px; font-weight: 600; color: #FCD34D; animation: eg-slide .4s var(--ease); }
.lx-caps[hidden] { display: none; }
.lx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; font-size: 14px; }
.lx-row a { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.lx-rem { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: #C9CFDB; min-height: 44px; }
.lx-rem input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lx-sw { position: relative; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .12); transition: background .35s; flex: none; }
.lx-sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .45s var(--spring); }
.lx-rem input:checked + .lx-sw { background: var(--grad); }
.lx-rem input:checked + .lx-sw::after { transform: translateX(16px); }
.lx-rem input:focus-visible + .lx-sw { outline: 2px solid var(--or); outline-offset: 2px; }
.lx-fgt { display: flex; gap: 10px; align-items: flex-start; margin: -8px 0 18px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 200, 97, .07); border: 1px solid rgba(255, 200, 97, .2); color: #E3D3B4; font-size: 13.5px; line-height: 1.5; animation: eg-slide .5s var(--spring); }
.lx-fgt[hidden] { display: none; }
.lx-fgt .ic { color: var(--gold); margin-top: 2px; }

/* the call to action: molten button with a sheen and a busy spinner */
.lx-btn { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 58px; border: 0; border-radius: 16px; cursor: pointer; padding: 16px 20px; background: var(--grad); background-size: 160% 100%; color: var(--on-grad); font: 800 16px var(--fd); letter-spacing: -.01em; box-shadow: 0 20px 40px -18px rgba(255, 122, 47, .95), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .45s var(--spring), box-shadow .45s, background-position .8s var(--ease); }
.lx-btn::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); animation: eg-sheen 4.5s ease-in-out infinite 1.2s; }
.lx-btn:hover { background-position: 100% 0; transform: translateY(-3px); box-shadow: 0 28px 50px -18px rgba(255, 122, 47, 1), inset 0 1px 0 rgba(255, 255, 255, .5); }
.lx-btn:active { transform: scale(.97); transition-duration: .12s; }
.lx-btn-i { display: grid; transition: transform .5s var(--spring); } .lx-btn:hover .lx-btn-i { transform: translateX(6px); }
.lx-spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(26, 13, 4, .3); border-top-color: var(--on-grad); animation: eg-spin .7s linear infinite; }
.lx-btn.is-busy { pointer-events: none; } .lx-btn.is-busy .lx-btn-i { display: none; } .lx-btn.is-busy .lx-spin { display: block; }
.lx-help { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); color: #8F99AD; font-size: 13px; line-height: 1.6; text-align: center; }
.lx .inst { margin-top: 14px; }
.lx .inst-btn { background: var(--grad); color: var(--on-grad); font-family: var(--fb); }
.lx .inst-apk { background: rgba(255, 255, 255, .05); color: #E9ECF3; border: 1px solid rgba(255, 255, 255, .12); font-family: var(--fb); font-size: 14px; }
.lx .inst-apk:hover { border-color: var(--gold); text-decoration: none; }
.lx .inst-ios { color: #8F99AD; }
.lx-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: -4px 0 20px; }
.lx-meter i { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); transition: background .4s; }
.lx-meter[data-s="1"] i:nth-child(-n+1) { background: #F87171; } .lx-meter[data-s="2"] i:nth-child(-n+2) { background: #FBBF24; }
.lx-meter[data-s="3"] i:nth-child(-n+3) { background: #FF9A3D; } .lx-meter[data-s="4"] i { background: #4ADE80; }
.lx-foot { display: flex; justify-content: space-between; gap: 12px; padding: 16px clamp(16px, 4vw, 56px) 22px; color: #5E687C; font-family: var(--fm); font-size: 11.5px; letter-spacing: .08em; }

.lx-shake { animation: lx-shake .55s var(--ease); }
@keyframes lx-shake { 10%, 90% { translate: -2px 0; } 20%, 80% { translate: 4px 0; } 30%, 50%, 70% { translate: -8px 0; } 40%, 60% { translate: 8px 0; } }

/* entrance choreography (motion.js adds html.m-on and .m-in) */
html.m-on .lx-story > *, html.m-on .lx-f > *, html.m-on .lx-tile, html.m-on .lx-top > * { opacity: 0; transform: translateY(26px); filter: blur(6px); }
html.m-on .lx-card { opacity: 0; transform: translateY(40px) rotateX(10deg) scale(.96); }
html.m-on .m-in { opacity: 1 !important; transform: none !important; filter: none !important; transition: opacity .9s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s), filter .9s var(--ease) var(--d, 0s); }
html.m-on .lx-card.m-in { transition: opacity 1s var(--ease) .15s, transform 1.2s var(--ease) .15s; }
html.m-on .lx-card.m-in.tilting { transition: transform .15s linear; }

@media (max-width: 1080px) { .lx-tiles { grid-template-columns: 1fr; } .lx-tile { flex-direction: row; align-items: center; } }
@media (max-width: 900px) {
  .lx-stage { grid-template-columns: 1fr; gap: 26px; padding-top: 0; }
  .lx-panel { order: -1; }
  .lx-story { text-align: left; }
  .lx-h1 { font-size: clamp(34px, 9vw, 52px); margin-top: 18px; }
  .lx-tiles { grid-template-columns: 1fr; }
  .lx-clock { display: none; }
  .lx-top .lx-brand { display: none; }
  .lx-top { justify-content: flex-end; padding-bottom: 10px; }
  .lx-mob { display: block; margin-bottom: 18px; } .lx-mob .lx-logo { height: 44px; }
  .lx-orb { display: none; }
  .lx-wm { display: none; }
}
@media (max-width: 480px) { .lx-card { border-radius: 24px; padding: 24px 18px; } .lx-foot { flex-direction: column; align-items: center; } }

/* =====================================================================
   PLUMBER PHONE APP (body.pa)
   ===================================================================== */
body.pa { background: transparent; }
.app { background: transparent; }
.pa-hello h1, .pa-sub h1 { font-family: var(--fd); font-weight: 800; letter-spacing: -.035em; }
.pa-av { background: var(--grad) !important; color: var(--on-grad) !important; }
.pa-lang, .pa-back { border-radius: 14px; background: var(--card); border-color: var(--ln); }
.pa-earn { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(160deg, #141B2C, #07090F); border-radius: 26px; box-shadow: 0 30px 60px -28px rgba(7, 9, 15, .8); }
.pa-earn::before { content: ''; position: absolute; z-index: -1; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 160, 80, .5), transparent 65%); animation: lx-drift 12s ease-in-out infinite alternate; }
.pa-earn .amt { font-family: var(--fd); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pa-earn .lbl { font-family: var(--fm); font-size: 11.5px; }
.pa-tile { border-radius: 20px; border-color: var(--ln); background: var(--card); transition: transform .5s var(--spring), box-shadow .45s, border-color .3s; }
.pa-tile:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: rgba(255, 122, 47, .5); }
.pa-tile.hot { background: var(--grad); color: var(--on-grad); border-color: transparent; box-shadow: var(--glow); }
.pa-h { font-family: var(--fm); font-size: 12px; font-weight: 500; letter-spacing: .14em; }
.pa-h .n { background: var(--grad); color: var(--on-grad); font-weight: 800; }
.pa-job, .pa-list, .pa-att, .attbox, .step, .jc { border-radius: 20px; border-color: var(--ln); box-shadow: var(--sh); transition: transform .45s var(--ease), box-shadow .45s; }
.pa-job:hover, .jc:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.pa-job h3 { font-family: var(--fd); font-weight: 700; text-transform: none; letter-spacing: -.02em; }
.step h3 i { background: var(--grad); color: var(--on-grad); }
.app-nav { left: 50%; bottom: 12px; width: calc(100% - 24px); max-width: 576px; border: 1px solid var(--ln); border-radius: 24px; background: var(--glass); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); box-shadow: var(--sh-lg); padding: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
.app-nav a { border-radius: 18px; padding: 8px 2px 9px; font-weight: 650; transition: background .3s, color .3s; }
.app-nav a.on { background: var(--grad); color: var(--on-grad); }
.app-nav a i { transition: transform .45s var(--spring); } .app-nav a:active i { transform: scale(.82); }
.pill { border-radius: 999px; font-weight: 700; }

/* ---------- Reduced motion: final states, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .lx-embers, .eg-spot { display: none; }
}
