/* =====================================================================================================
   EVIE · v8 design system — LIGHT theme (v10, 2026-11-23)
   The same depth language as the dark v8 (layered shadows, specular top edge, pointer-following light,
   lit background scene) translated to a bright "porcelain + glass" look. Loaded right after evie-v8.css.
   Every rule is scoped to html.evie-ui[data-theme="light"], so the dark theme is untouched.
   ===================================================================================================== */
html.evie-ui[data-theme="light"]{
  --v8-bg:#eef2f9;--v8-bg-2:#f6f8fc;
  --v8-surface:rgba(255,255,255,.78);--v8-surface-2:rgba(255,255,255,.88);--v8-surface-3:#fff;
  --v8-stroke:rgba(16,28,56,.08);--v8-stroke-hi:rgba(16,28,56,.15);--v8-stroke-top:rgba(255,255,255,.95);
  --v8-text:#0c1426;--v8-muted:#58627a;--v8-faint:#8b93a7;
  --v8-accent:#2f6fea;--v8-accent-2:#6a55e8;--v8-cyan:#0a8db0;--v8-good:#0f9a63;--v8-warn:#b86e00;--v8-bad:#d8324f;
  --v8-grad:linear-gradient(135deg,#4b8dff 0%,#6d5dff 55%,#9a5cff 100%);
  --v8-shadow-1:0 1px 0 rgba(255,255,255,.95) inset,0 1px 2px rgba(15,25,50,.06),0 8px 24px -10px rgba(15,25,50,.16);
  --v8-shadow-2:0 1px 0 rgba(255,255,255,.95) inset,0 2px 6px rgba(15,25,50,.05),0 22px 50px -24px rgba(15,25,50,.24);
  --v8-shadow-3:0 1px 0 #fff inset,0 4px 12px rgba(15,25,50,.07),0 36px 80px -30px rgba(15,25,50,.32);
  --v8-glow:0 0 0 1px rgba(47,111,234,.28),0 10px 40px -12px rgba(47,111,234,.4);
}
html.evie-ui[data-theme="light"] body{background:var(--v8-bg)!important;color:var(--v8-text);font-family:var(--v8-font);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}

/* ---------- Lit background: soft daylight with coloured bounce light and a faint lab grid ---------- */
html.evie-ui[data-theme="light"] .v8-scene{display:block;background:
  radial-gradient(120% 80% at 50% -12%,#ffffff 0%,rgba(255,255,255,0) 58%),
  radial-gradient(80% 60% at 100% 100%,rgba(139,123,255,.16) 0%,rgba(238,242,249,0) 62%),
  radial-gradient(70% 60% at 0% 80%,rgba(90,169,255,.14) 0%,rgba(238,242,249,0) 60%),
  linear-gradient(180deg,#f7f9fd 0%,#eaeff8 100%)}
html.evie-ui[data-theme="light"] .v8-light{mix-blend-mode:multiply;opacity:.22}
html.evie-ui[data-theme="light"] .v8-grid{opacity:.16;background-image:linear-gradient(rgba(47,111,234,.22) 1px,transparent 1px),linear-gradient(90deg,rgba(47,111,234,.22) 1px,transparent 1px)}
html.evie-ui[data-theme="light"] .v8-horizon{opacity:.18}
html.evie-ui[data-theme="light"] .v8-noise{opacity:.035}
html.evie-ui[data-theme="light"] .v8-vignette{background:radial-gradient(120% 90% at 50% 40%,transparent 60%,rgba(20,35,70,.08) 100%)}

/* ---------- Surfaces ---------- */
html.evie-ui[data-theme="light"] :is(.panel,.stat-card,.detail-card,.evm-card,.hud-card,.fc-panel,.v8-card,.empty-state){
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.72) 60%,rgba(255,255,255,.6)),var(--v8-surface)!important;
  border:1px solid var(--v8-stroke)!important;border-radius:var(--v8-r-lg)!important;box-shadow:var(--v8-shadow-2)!important;color:var(--v8-text);
  -webkit-backdrop-filter:blur(22px) saturate(160%);backdrop-filter:blur(22px) saturate(160%);position:relative;
  transition:box-shadow .35s var(--v8-ease),border-color .35s var(--v8-ease),transform .45s var(--v8-ease)}
html.evie-ui[data-theme="light"] :is(.panel,.stat-card,.detail-card,.evm-card,.hud-card,.fc-panel,.v8-card)::before{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0;
  background:radial-gradient(520px circle at var(--lx,50%) var(--ly,0%),rgba(47,111,234,.07),transparent 45%);opacity:0;transition:opacity .4s var(--v8-ease)}
html.evie-ui[data-theme="light"] :is(.panel,.stat-card,.detail-card,.evm-card,.hud-card,.fc-panel,.v8-card):hover::before{opacity:1}
html.evie-ui[data-theme="light"] :is(.stat-card,.evm-card,.hud-card,.v8-card):hover{border-color:var(--v8-stroke-hi)!important;box-shadow:var(--v8-shadow-3)!important}
html.evie-ui[data-theme="light"] :is(.panel,.stat-card,.detail-card,.evm-card,.hud-card,.fc-panel,.v8-card)>*{position:relative;z-index:1}
html.evie-ui[data-theme="light"] .panel-header h2,html.evie-ui[data-theme="light"] .panel h2{letter-spacing:-.015em;font-weight:650;color:var(--v8-text)}
html.evie-ui[data-theme="light"] .eyebrow{font-family:var(--v8-mono);font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:var(--v8-accent)!important;opacity:.95}
html.evie-ui[data-theme="light"] #main-content :is(h1,.page-title){letter-spacing:-.03em;font-weight:760;background:linear-gradient(180deg,#0c1426 35%,#3b4a72);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
html.evie-ui[data-theme="light"] :is(.muted,.page-subtitle,.dialog-subtitle){color:var(--v8-muted)}

/* ---------- Buttons ---------- */
html.evie-ui[data-theme="light"] .button{border-radius:999px!important;border:1px solid var(--v8-stroke-hi)!important;
  background:linear-gradient(180deg,#fff,#f2f5fb)!important;color:var(--v8-text)!important;
  box-shadow:0 1px 0 #fff inset,0 1px 2px rgba(15,25,50,.08),0 8px 18px -12px rgba(15,25,50,.3)!important;
  font-weight:600;letter-spacing:-.005em;transition:transform .25s var(--v8-spring),box-shadow .3s var(--v8-ease),background .3s var(--v8-ease),border-color .3s var(--v8-ease)!important}
html.evie-ui[data-theme="light"] .button:hover{border-color:rgba(16,28,56,.24)!important;transform:translateY(-1px);box-shadow:0 1px 0 #fff inset,0 2px 4px rgba(15,25,50,.08),0 12px 24px -12px rgba(15,25,50,.35)!important}
html.evie-ui[data-theme="light"] .button:active{transform:translateY(0) scale(.97)}
html.evie-ui[data-theme="light"] .button.primary{background:var(--v8-grad)!important;color:#fff!important;border-color:transparent!important;
  box-shadow:0 1px 0 rgba(255,255,255,.45) inset,0 -2px 6px rgba(40,20,120,.18) inset,0 10px 26px -8px rgba(70,100,240,.55),0 2px 5px rgba(15,25,50,.12)!important}
html.evie-ui[data-theme="light"] .button.primary:hover{filter:brightness(1.05) saturate(1.05)}
html.evie-ui[data-theme="light"] :is(.button.danger,.button.destructive){background:linear-gradient(180deg,#fff5f7,#ffe7ec)!important;border-color:rgba(216,50,79,.35)!important;color:#b0203d!important}
html.evie-ui[data-theme="light"] .icon-button{border-radius:14px!important;background:linear-gradient(180deg,#fff,#f1f4fa)!important;border:1px solid var(--v8-stroke)!important;color:var(--v8-text);
  box-shadow:0 1px 0 #fff inset,0 6px 14px -8px rgba(15,25,50,.28)!important;transition:transform .25s var(--v8-spring),border-color .3s,background .3s!important}
html.evie-ui[data-theme="light"] .icon-button:hover{border-color:var(--v8-stroke-hi)!important;transform:translateY(-1px)}
html.evie-ui[data-theme="light"] :is(.button,.icon-button,.nav-item,.v8-press):focus-visible{outline:none!important;box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(47,111,234,.7)!important}

/* ---------- Chips, tabs ---------- */
html.evie-ui[data-theme="light"] :is(.tag,.evie-chip,.chip){border-radius:999px!important;border:1px solid var(--v8-stroke)!important;background:rgba(16,28,56,.04)!important;color:var(--v8-muted)!important;font-weight:550}
html.evie-ui[data-theme="light"] :is(.tabs,.v5-tabs,.kisha-tabs){display:inline-flex;gap:4px;padding:4px!important;border-radius:999px!important;background:rgba(16,28,56,.055)!important;
  border:1px solid var(--v8-stroke)!important;box-shadow:inset 0 1px 3px rgba(15,25,50,.08)!important;flex-wrap:wrap;max-width:100%}
html.evie-ui[data-theme="light"] :is(.tabs,.v5-tabs,.kisha-tabs) :is(button,a,[role=tab]){border-radius:999px!important;border:0!important;background:transparent!important;color:var(--v8-muted)!important;
  box-shadow:none!important;min-height:36px;padding:0 14px;font-weight:600;transition:color .25s,background .35s var(--v8-ease),box-shadow .35s var(--v8-ease)!important}
html.evie-ui[data-theme="light"] :is(.tabs,.v5-tabs,.kisha-tabs) :is(button,a,[role=tab]):is(.active,[aria-selected="true"],[aria-current="page"],.primary){
  background:#fff!important;color:var(--v8-text)!important;box-shadow:0 1px 0 #fff inset,0 2px 8px -2px rgba(15,25,50,.22)!important}

/* ---------- Fields ---------- */
html.evie-ui[data-theme="light"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea){
  border-radius:14px!important;border:1px solid var(--v8-stroke-hi)!important;background:#fff!important;color:var(--v8-text)!important;
  box-shadow:inset 0 1px 2px rgba(15,25,50,.07)!important;transition:border-color .25s,box-shadow .25s!important;font-family:inherit}
html.evie-ui[data-theme="light"] :is(input,select,textarea):focus{outline:none!important;border-color:rgba(47,111,234,.6)!important;box-shadow:inset 0 1px 2px rgba(15,25,50,.07),0 0 0 4px rgba(47,111,234,.14)!important}
html.evie-ui[data-theme="light"] ::placeholder{color:var(--v8-faint)!important}
html.evie-ui[data-theme="light"] :is(input[type=checkbox],input[type=radio]){accent-color:var(--v8-accent)}

/* ---------- Sidebar ---------- */
@media (min-width:1024px){
html.evie-ui[data-theme="light"] .sidebar{background:linear-gradient(180deg,rgba(255,255,255,.86),rgba(246,248,252,.9))!important;-webkit-backdrop-filter:blur(30px) saturate(170%);backdrop-filter:blur(30px) saturate(170%);
  border-right:1px solid var(--v8-stroke)!important;box-shadow:1px 0 0 rgba(255,255,255,.9),24px 0 60px -40px rgba(15,25,50,.35)!important}
}
html.evie-ui[data-theme="light"] .sidebar .brand-logo{border-radius:12px;box-shadow:0 0 0 1px rgba(16,28,56,.08),0 8px 22px -8px rgba(47,111,234,.5)}
html.evie-ui[data-theme="light"] .sidebar .brand-word{letter-spacing:-.02em;font-weight:760;color:var(--v8-text)}
html.evie-ui[data-theme="light"] .sidebar .brand-version{border-radius:999px;border:1px solid rgba(47,111,234,.3);color:var(--v8-accent);background:rgba(47,111,234,.07);font-family:var(--v8-mono);letter-spacing:.12em}
html.evie-ui[data-theme="light"] .nav-group-label{font-family:var(--v8-mono);font-size:10.5px!important;letter-spacing:.24em!important;color:var(--v8-faint)!important;margin:18px 14px 8px!important;text-transform:uppercase}
html.evie-ui[data-theme="light"] .nav-item{position:relative;gap:12px!important;min-height:44px;padding:6px 10px!important;border-radius:14px!important;color:var(--v8-muted)!important;border:1px solid transparent!important;
  transition:color .25s var(--v8-ease),background .35s var(--v8-ease),border-color .35s var(--v8-ease),transform .35s var(--v8-spring)!important}
html.evie-ui[data-theme="light"] .nav-item>:is(svg,i){flex:none;box-sizing:content-box!important;width:17px!important;height:17px!important;padding:7.5px!important;border-radius:10px;stroke-width:1.9;
  background:linear-gradient(180deg,#fff,#eef2f9);box-shadow:0 1px 0 #fff inset,0 3px 8px -3px rgba(15,25,50,.22);color:#3b4a6b;transition:background .35s,color .35s,box-shadow .35s}
html.evie-ui[data-theme="light"] .nav-item:hover{color:var(--v8-text)!important;background:rgba(16,28,56,.04)!important;transform:translateX(2px)}
html.evie-ui[data-theme="light"] :is(.nav-item.active,.nav-item[aria-current="page"]){color:var(--v8-text)!important;background:linear-gradient(90deg,rgba(47,111,234,.12),rgba(106,85,232,.06) 60%,rgba(106,85,232,0))!important;
  border-color:rgba(47,111,234,.18)!important;box-shadow:0 1px 0 #fff inset,0 10px 26px -16px rgba(47,111,234,.5)!important}
html.evie-ui[data-theme="light"] :is(.nav-item.active,.nav-item[aria-current="page"])::before{content:"";position:absolute;left:-1px;top:10px;bottom:10px;width:3px;border-radius:3px;background:var(--v8-grad);box-shadow:0 0 10px 1px rgba(70,110,240,.45)}
html.evie-ui[data-theme="light"] :is(.nav-item.active,.nav-item[aria-current="page"])>:is(svg,i){background:var(--v8-grad);color:#fff;box-shadow:0 1px 0 rgba(255,255,255,.45) inset,0 6px 16px -5px rgba(70,100,240,.6)}
html.evie-ui[data-theme="light"] .sidebar-profile{border-radius:18px!important;border:1px solid var(--v8-stroke)!important;background:linear-gradient(180deg,#fff,#f4f6fb)!important;box-shadow:var(--v8-shadow-1)!important}
html.evie-ui[data-theme="light"] .avatar{background:var(--v8-grad)!important;color:#fff!important;box-shadow:0 0 0 2px #fff,0 6px 16px -6px rgba(70,100,240,.6)}

/* ---------- Topbar, dialogs, toasts ---------- */
html.evie-ui[data-theme="light"] .topbar{background:linear-gradient(180deg,rgba(255,255,255,.86),rgba(255,255,255,.66))!important;-webkit-backdrop-filter:blur(24px) saturate(170%);backdrop-filter:blur(24px) saturate(170%);border-bottom:1px solid var(--v8-stroke)!important}
html.evie-ui[data-theme="light"] dialog#app-dialog{background:linear-gradient(180deg,#ffffff,#f6f8fc)!important;border:1px solid var(--v8-stroke-hi)!important;color:var(--v8-text);
  box-shadow:0 1px 0 #fff inset,0 50px 120px -30px rgba(15,25,50,.45),0 0 0 1px rgba(16,28,56,.04)!important}
html.evie-ui[data-theme="light"] dialog#app-dialog::backdrop{background:rgba(220,228,242,.5);-webkit-backdrop-filter:blur(10px) saturate(130%);backdrop-filter:blur(10px) saturate(130%)}
html.evie-ui[data-theme="light"] .toast{border-radius:18px!important;border:1px solid var(--v8-stroke-hi)!important;background:rgba(255,255,255,.95)!important;color:var(--v8-text)!important;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:var(--v8-shadow-3)!important}

/* ---------- Mobile dock ---------- */
@media (max-width:1023px){
html.evie-ui[data-theme="light"] .mobile-nav{border-radius:28px!important;background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(244,247,252,.94))!important;border:1px solid var(--v8-stroke-hi)!important;
  -webkit-backdrop-filter:blur(26px) saturate(180%);backdrop-filter:blur(26px) saturate(180%);box-shadow:0 1px 0 #fff inset,0 22px 44px -18px rgba(15,25,50,.4),0 0 0 1px rgba(16,28,56,.03)!important}
html.evie-ui[data-theme="light"] .mobile-nav :is(a,button):not(.evie-orb-button){border-radius:18px!important;color:var(--v8-muted)!important;transition:color .25s,transform .35s var(--v8-spring)!important}
html.evie-ui[data-theme="light"] .mobile-nav :is(a,button):is(.active,[aria-current="page"]){color:var(--v8-accent)!important}
html.evie-ui[data-theme="light"] .mobile-nav :is(a,button):is(.active,[aria-current="page"]) svg{filter:drop-shadow(0 2px 6px rgba(47,111,234,.45))}
html.evie-ui[data-theme="light"] .mobile-nav :is(a,button):active{transform:scale(.92)}
html.evie-ui[data-theme="light"] :is(.panel,.stat-card,.detail-card,.evm-card,.hud-card,.fc-panel,.v8-card){border-radius:20px!important}
}

/* ---------- Scrollbars & selection ---------- */
html.evie-ui[data-theme="light"] ::selection{background:rgba(47,111,234,.22)}
html.evie-ui[data-theme="light"] *{scrollbar-width:thin;scrollbar-color:rgba(16,28,56,.18) transparent}
html.evie-ui[data-theme="light"] ::-webkit-scrollbar-thumb{background:rgba(16,28,56,.16);border-radius:10px;border:3px solid transparent;background-clip:padding-box}
@media (prefers-reduced-motion:reduce){html.evie-ui[data-theme="light"] :is(.panel,.stat-card,.evm-card,.hud-card,.button,.nav-item){transition:none!important}}
/* Granja: the hero keeps its deep-green panel in light theme (its mint text and hologram are designed for it). */
html.evie-ui[data-theme="light"] .rancho-hero{background:radial-gradient(ellipse at 88% 40%,#174f40,transparent 65%),#0b2420!important;color:#ecfff7!important;border-color:#28664b!important;box-shadow:0 18px 50px rgba(11,36,32,.28)!important}
html.evie-ui[data-theme="light"] .rancho-hero :is(h1,h2,h3,p,.rancho-eyebrow,.rancho-visual-label,.rancho-hero-copy,.rancho-brief,.rancho-notes){color:#ecfff7!important}
html.evie-ui[data-theme="light"] .rancho-hero :is(.rancho-eyebrow,.rancho-visual-label){color:#9adbc3!important}
html.evie-ui[data-theme="light"] .rancho-hero hr,html.evie-ui[data-theme="light"] .rancho-hero .rancho-start{border-color:#2d6b55!important}
html.evie-ui[data-theme="light"] #main-content .rancho-hero h1{background:linear-gradient(180deg,#ecfff7 40%,#9adbc3)!important;-webkit-background-clip:text!important;background-clip:text!important;-webkit-text-fill-color:transparent!important;color:#ecfff7!important}
