/* ==========================================================================
   Bromerzon — "Aurora" design layer. Pure visual layer over styles.css:
   no button, field or information changes. To go back, remove the <link>.
   Rule kept on purpose: no transform / filter / backdrop-filter on .app,
   .main or .page (they hold fixed bars that must stay centred).
   ========================================================================== */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #04050d;
  --bg-2: #080a17;
  --panel: rgba(16, 18, 36, 0.62);
  --panel-2: rgba(24, 27, 52, 0.7);
  --panel-3: rgba(34, 38, 70, 0.75);
  --border: rgba(160, 170, 255, 0.10);
  --border-2: rgba(160, 170, 255, 0.18);
  --text: #f5f6ff;
  --text-2: #cdd1ef;
  --muted: #8d93bd;
  --faint: #5f658e;
  --green: #4ff0b4;
  --green-2: #19d39a;
  --green-ink: #03140f;
  --green-soft: rgba(79, 240, 180, 0.12);
  --yellow: #ffd88a;
  --yellow-soft: rgba(255, 216, 138, 0.12);
  --blue: #a8b4ff;
  --blue-soft: rgba(168, 180, 255, 0.13);
  --violet: #9d7bff;
  --cyan: #45d9ff;
  --radius: 22px;
  --radius-sm: 13px;
  --aurora: linear-gradient(110deg, #4ff0b4 0%, #45d9ff 45%, #9d7bff 100%);
  --edge: linear-gradient(140deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.02) 60%, rgba(157, 123, 255, 0.28));
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.015) inset;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Living background ---------- */
body { background: var(--bg); letter-spacing: -0.005em; }
body::before {
  content: ""; position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 32% at 18% 12%, rgba(79, 240, 180, 0.15), transparent 70%),
    radial-gradient(34% 30% at 82% 8%, rgba(157, 123, 255, 0.19), transparent 70%),
    radial-gradient(40% 36% at 60% 90%, rgba(69, 217, 255, 0.09), transparent 70%),
    radial-gradient(30% 30% at 95% 55%, rgba(236, 72, 153, 0.07), transparent 70%);
  filter: blur(40px);
  animation: aurora 26s ease-in-out infinite alternate;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(4%, 3%, 0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(-3%, 5%, 0) rotate(-6deg) scale(1.04); }
}
.app, .auth { position: relative; z-index: 1; }
.auth { overflow: hidden; }
h1, h2, h3, .brand-name, .big-figure, .stat .value, .tile b, .mb-head h2, .wk-range, .mini-stat .v, .modal-head h2, .drawer-head h2, .auth-card h1 { font-family: var(--display); }
::selection { background: rgba(157, 123, 255, 0.4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(160, 170, 255, 0.18); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: linear-gradient(180deg, rgba(10, 12, 28, 0.78), rgba(6, 7, 18, 0.88));
  backdrop-filter: blur(22px) saturate(140%);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.02), 20px 0 60px -30px rgba(157, 123, 255, 0.25);
}
.brand { gap: 12px; padding-bottom: 24px; }
.brand .logo { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 26px -10px rgba(79, 240, 180, 0.45); border-radius: 12px; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { color: var(--faint); letter-spacing: .04em; }
.nav-title { color: var(--faint); letter-spacing: .18em; font-size: 10.5px; }
.nav a { border-radius: 12px; color: var(--muted); font-weight: 520; transition: background .2s, color .2s, box-shadow .2s; }
.nav a:hover { background: rgba(160, 170, 255, 0.07); color: var(--text); text-decoration: none; }
.nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(79, 240, 180, 0.16), rgba(157, 123, 255, 0.10) 70%, transparent) padding-box, var(--edge) border-box;
  border: 1px solid transparent;
  box-shadow: 0 8px 22px -14px rgba(79, 240, 180, 0.3);
}
.nav a.active::before { background: var(--aurora); box-shadow: 0 0 8px rgba(79, 240, 180, 0.5); }
.nav a.active svg { color: var(--green); filter: drop-shadow(0 0 4px rgba(79, 240, 180, 0.35)); }
.sidebar-foot { border-top: 1px solid var(--border); }
.user-chip { background: rgba(160, 170, 255, 0.05); border: 1px solid rgba(160, 170, 255, 0.14); border-radius: 16px; padding: 10px; }
.avatar { background: var(--aurora); color: #05060f; border: 0; font-weight: 800; box-shadow: 0 6px 16px -8px rgba(69, 217, 255, 0.45); }

/* ---------- Top bar & headings ---------- */
.lang-btn { background: rgba(16, 18, 36, 0.7); border: 1px solid rgba(160, 170, 255, 0.2); border-radius: 999px; backdrop-filter: blur(12px); }
.page-head { margin-bottom: 28px; }
.page-head h1 {
  font-size: 36px; font-weight: 700; letter-spacing: -0.045em; line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 25%, #b9bff0 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-head .sub { color: var(--muted); font-size: 14.5px; }
.eyebrow { background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .22em; font-weight: 700; font-size: 10.5px; }

/* ---------- Glass surfaces with luminous edges ---------- */
.card, .place, .wk, .tile, .owner-card {
  background: linear-gradient(180deg, rgba(22, 25, 50, 0.66), rgba(12, 14, 30, 0.66)) padding-box, var(--edge) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(130%);
}
.card { border-radius: var(--radius); padding: 24px; transition: box-shadow .3s; }
.card:hover { box-shadow: var(--shadow), 0 0 0 1px rgba(157, 123, 255, 0.10), 0 20px 50px -34px rgba(157, 123, 255, 0.3); }
.card-head h3 { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }
.stat .label { color: var(--muted); }
.stat .value { font-size: 30px; font-weight: 700; letter-spacing: -0.04em; }
.stat .icon { background: rgba(160, 170, 255, 0.08); border: 1px solid var(--border); border-radius: 11px; color: var(--text-2); }
.stat.accent {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(79, 240, 180, 0.26), transparent 55%),
    radial-gradient(80% 120% at 100% 100%, rgba(69, 217, 255, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(14, 30, 36, 0.8), rgba(9, 16, 26, 0.8)) padding-box,
    linear-gradient(140deg, rgba(79, 240, 180, 0.6), rgba(69, 217, 255, 0.15) 40%, rgba(157, 123, 255, 0.4)) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow), 0 30px 70px -44px rgba(79, 240, 180, 0.38);
}
.stat.yellow {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255, 216, 138, 0.20), transparent 55%),
    radial-gradient(80% 120% at 100% 100%, rgba(236, 72, 153, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(32, 26, 30, 0.8), rgba(18, 15, 24, 0.8)) padding-box,
    linear-gradient(140deg, rgba(255, 216, 138, 0.55), rgba(255, 216, 138, 0.08) 45%, rgba(236, 72, 153, 0.3)) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow), 0 30px 70px -44px rgba(255, 196, 100, 0.28);
}
.big-figure { font-size: 50px; font-weight: 700; letter-spacing: -0.05em; }
.stat.accent .big-figure, .big-figure.green {
  background: linear-gradient(100deg, #7dffcf, #45d9ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(79, 240, 180, 0.2));
}
.stat.yellow .big-figure { background: linear-gradient(100deg, #ffe7a8, #ffb37a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(255, 190, 110, 0.18)); }
.mini-stat, .team-owner { background: rgba(4, 5, 13, 0.45); border: 1px solid var(--border); border-radius: 15px; }
.team-owner .track, .progress { background: rgba(160, 170, 255, 0.1); }
.scope-tag { backdrop-filter: blur(6px); }
.demo-banner { border-radius: 18px; }
.info-note { border-radius: 16px; }

/* ---------- Buttons ---------- */
.btn {
  height: 40px; border-radius: 12px; font-weight: 600; letter-spacing: -0.01em; color: var(--text);
  background: rgba(160, 170, 255, 0.07); border: 1px solid rgba(160, 170, 255, 0.2);
  transition: background .2s, box-shadow .25s, color .2s;
}
.btn:hover { background: rgba(160, 170, 255, 0.14); border-color: rgba(160, 170, 255, 0.34); text-decoration: none; }
.btn.primary {
  position: relative; overflow: hidden; color: #04121a; font-weight: 700;
  background: linear-gradient(110deg, #5af5bd, #45d9ff 55%, #8f86ff) padding-box, linear-gradient(110deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1)) border-box;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 10px 26px -14px rgba(69, 217, 255, 0.6), 0 6px 18px -12px rgba(157, 123, 255, 0.45);
}
.btn.primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transition: left .6s ease; pointer-events: none;
}
.btn.primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 14px 32px -14px rgba(69, 217, 255, 0.75), 0 8px 22px -12px rgba(157, 123, 255, 0.6); }
.btn.primary:hover::after { left: 120%; }
.btn.ghost, .btn.ghost:hover { border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(160, 170, 255, 0.09); }
.btn.danger { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.35); }
.btn.sm { height: 33px; border-radius: 10px; }
.icon-btn { border-radius: 10px; }
.icon-btn:hover { background: rgba(160, 170, 255, 0.12); }

/* ---------- Inputs & segmented controls ---------- */
.input, .select, textarea.input {
  background: rgba(4, 5, 13, 0.5); border: 1px solid var(--border-2); border-radius: 12px; height: 40px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea.input { height: auto; }
.input:hover, .select:hover { border-color: rgba(160, 170, 255, 0.32); }
.input:focus, .select:focus { border-color: rgba(69, 217, 255, 0.75); box-shadow: 0 0 0 4px rgba(69, 217, 255, 0.12), 0 0 18px -8px rgba(69, 217, 255, 0.35); background: rgba(4, 5, 13, 0.7); }
.seg, .year-switch { background: rgba(4, 5, 13, 0.5); border: 1px solid var(--border); border-radius: 13px; }
.seg button[aria-pressed="true"], .year-switch button[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(110deg, rgba(79, 240, 180, 0.22), rgba(157, 123, 255, 0.22)) padding-box, linear-gradient(110deg, rgba(79, 240, 180, 0.6), rgba(157, 123, 255, 0.6)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 6px 16px -10px rgba(79, 240, 180, 0.38);
}
.period-label { background: rgba(16, 18, 36, 0.6); border: 1px solid rgba(160, 170, 255, 0.2); border-radius: 13px; }
.period-label .txt { font-family: var(--display); font-weight: 650; }

/* ---------- Badges ---------- */
.badge { border-radius: 999px; font-weight: 600; }
.badge.ok { background: rgba(79, 240, 180, 0.12); color: #7dffcf; box-shadow: inset 0 0 0 1px rgba(79, 240, 180, 0.25); }
.badge.bad { background: rgba(255, 107, 129, 0.12); color: #ff9fae; box-shadow: inset 0 0 0 1px rgba(255, 107, 129, 0.28); }
.badge.neutral { background: rgba(160, 170, 255, 0.1); }
.gstat { background: rgba(4, 5, 13, 0.45); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; }
.chip { background: rgba(160, 170, 255, 0.07); border-color: var(--border-2); }
.circle-check[aria-checked="true"] { background: var(--aurora); border-color: transparent; box-shadow: 0 4px 12px -6px rgba(69, 217, 255, 0.6); }

/* ---------- Tables ---------- */
.table-wrap { border-radius: 16px; }
.tbl th { color: var(--faint); font-size: 10.5px; letter-spacing: .14em; font-weight: 700; background: rgba(4, 5, 13, 0.4); }
.tbl td { border-bottom-color: rgba(160, 170, 255, 0.07); }
.tbl tbody tr { transition: background .2s; }
.tbl tbody tr:hover { background: linear-gradient(90deg, rgba(79, 240, 180, 0.06), rgba(157, 123, 255, 0.04) 60%, transparent); }
.tbl .primary-cell { font-weight: 600; }
.list-row.clickable:hover { background: rgba(160, 170, 255, 0.06); }

/* ---------- Approved accounts board ---------- */
.place, .wk { border-radius: var(--radius); }
.month-strip button[aria-selected="true"] { border-bottom-color: var(--cyan); }
.month-strip button[aria-selected="true"] b { background: var(--aurora); color: #04121a; }
.mb-head h2 { font-size: 34px; font-weight: 700; letter-spacing: -0.045em; background: linear-gradient(180deg, #fff 25%, #b9bff0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile { border-radius: 18px; }
.tile b { font-size: 25px; font-weight: 700; letter-spacing: -0.035em; }
.tile.wide {
  background: radial-gradient(120% 140% at 0% 0%, rgba(79, 240, 180, 0.24), transparent 60%), linear-gradient(180deg, rgba(14, 30, 36, 0.85), rgba(9, 16, 26, 0.85)) padding-box,
    linear-gradient(140deg, rgba(79, 240, 180, 0.6), rgba(157, 123, 255, 0.35)) border-box;
}
.tile.wide b { background: linear-gradient(100deg, #7dffcf, #45d9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wk.open { box-shadow: var(--shadow), 0 30px 60px -44px rgba(69, 217, 255, 0.32); }
.wk.empty { background: transparent; box-shadow: none; backdrop-filter: none; border: 1px dashed var(--border); }
.wk-n { background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .2em; }
.wk-range { font-weight: 700; letter-spacing: -0.03em; }
.wk-bar { background: rgba(160, 170, 255, 0.1); height: 7px; }
.wk-bar .sold { background: var(--aurora); box-shadow: 0 0 8px rgba(69, 217, 255, 0.35); }
.week-preview { background: radial-gradient(120% 140% at 0% 0%, rgba(79, 240, 180, 0.16), transparent 60%), rgba(4, 5, 13, 0.5); border-color: rgba(79, 240, 180, 0.3); }

/* ---------- Overlays ---------- */
.overlay { background: rgba(2, 3, 10, 0.6); backdrop-filter: blur(8px) saturate(120%); }
.modal, .drawer {
  background: linear-gradient(180deg, rgba(20, 22, 44, 0.97), rgba(10, 11, 26, 0.98)) padding-box, var(--edge) border-box;
  border: 1px solid transparent;
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95), 0 0 70px -44px rgba(157, 123, 255, 0.3);
}
.modal { border-radius: 26px; }
.modal-head h2, .drawer-head h2 { font-weight: 700; letter-spacing: -0.035em; }
.dsec { background: rgba(4, 5, 13, 0.4); border-color: var(--border); }
.popover, .chart-tip { background: rgba(16, 18, 38, 0.97); border-color: var(--border-2); border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9); }
.toast { background: rgba(16, 18, 38, 0.96); border-color: var(--border-2); border-radius: 15px; }
.sel-bar {
  background: linear-gradient(180deg, rgba(20, 22, 44, 0.96), rgba(12, 13, 30, 0.96)) padding-box, linear-gradient(110deg, rgba(79, 240, 180, 0.7), rgba(69, 217, 255, 0.4), rgba(157, 123, 255, 0.7)) border-box;
  border: 1px solid transparent; border-radius: 18px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.95), 0 0 40px -18px rgba(69, 217, 255, 0.32);
}

/* ---------- Charts: light glass bars, column lights up on hover like the menu ---------- */
.chart .grid line { stroke: rgba(160, 170, 255, 0.08); }
.chart .axis text { fill: #6a70a0; }
.chart .bar { transition: filter .25s ease, opacity .25s ease; opacity: .88; }
.chart .bar-bg { rx: 12px; stroke: transparent; stroke-width: 1px; transition: fill .25s ease, stroke .25s ease; }
.chart .bar-bg { display: none; }
.chart .bar-g:hover .bar { opacity: 1; filter: brightness(1.18) drop-shadow(0 -2px 10px rgba(160, 200, 255, 0.18)); }
.chart .hit { cursor: pointer; }
.donut-wrap svg path, .donut-wrap svg circle { fill-opacity: .55; transition: fill-opacity .25s ease, filter .25s ease; }
.donut-wrap svg circle[fill="none"] { stroke-opacity: .6; }
.donut-wrap svg path:hover { fill-opacity: .9; filter: drop-shadow(0 0 8px rgba(160, 170, 255, 0.3)); }
.donut-legend .row { border-radius: 10px; transition: background .2s; }
.donut-legend .row:hover { background: rgba(160, 170, 255, 0.07); }
.owner-bar .fill, .team-owner .fill { opacity: .7; box-shadow: 0 0 10px -2px rgba(255, 255, 255, 0.15); transition: width .5s ease, opacity .2s; }
.owner-bar:hover .fill, .team-owner:hover .fill { opacity: 1; }
.owner-bar { border-radius: 12px; padding: 6px 8px; margin-left: -8px; margin-right: -8px; transition: background .2s; }
.owner-bar:hover { background: rgba(160, 170, 255, 0.05); }
.chart-tip { backdrop-filter: blur(14px) saturate(140%); background: rgba(16, 18, 38, 0.72); }

/* ---------- Sign-in: the showpiece ---------- */
.auth::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 760px; height: 760px; margin: -380px 0 0 -380px; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(79, 240, 180, 0.25), rgba(69, 217, 255, 0.18), rgba(157, 123, 255, 0.3), rgba(236, 72, 153, 0.15), rgba(79, 240, 180, 0.25));
  border-radius: 50%; filter: blur(90px); animation: halo 18s linear infinite;
}
@keyframes halo { to { rotate: 360deg; } }
.auth-card {
  position: relative; border-radius: 28px; padding: 38px;
  background: linear-gradient(180deg, rgba(18, 20, 42, 0.86), rgba(9, 10, 24, 0.9)) padding-box,
    conic-gradient(from var(--spin), rgba(79, 240, 180, 0.9), rgba(69, 217, 255, 0.2), rgba(157, 123, 255, 0.9), rgba(236, 72, 153, 0.2), rgba(79, 240, 180, 0.9)) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(20px);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.95), 0 0 90px -30px rgba(157, 123, 255, 0.55);
  animation: spin 8s linear infinite;
}
@keyframes spin { to { --spin: 360deg; } }
.auth-card h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.045em; background: linear-gradient(180deg, #fff 30%, #b9bff0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-card .btn.primary { height: 48px; font-size: 15px; border-radius: 14px; }

/* ---------- Gentle entrance (opacity only, never transform) ---------- */
@keyframes softIn { from { opacity: 0; } to { opacity: 1; } }
.page > * { animation: softIn .45s ease both; }
.page > *:nth-child(2) { animation-delay: .05s; }
.page > *:nth-child(3) { animation-delay: .1s; }
.page > *:nth-child(n+4) { animation-delay: .15s; }
.page > .sel-bar { animation: selBarIn .2s ease; }

@media (prefers-reduced-motion: reduce) {
  body::before, .auth::before, .auth-card, .page > * { animation: none; }
}
@media (max-width: 1000px) {
  .topbar-mobile { background: rgba(4, 5, 13, 0.82); backdrop-filter: blur(16px); }
  .page-head h1 { font-size: 28px; }
  .big-figure { font-size: 38px; }
}
@media (max-width: 520px) { .page > .sel-bar { animation: fadeIn .2s ease; } }

/* ==========================================================================
   LIGHT THEME — opt-in via <html data-theme="light">. Dark (Aurora) stays the
   default. Keeps the same accent gradients, recolours every surface for light.
   ========================================================================== */
:root[data-theme="light"] {
  --bg: #eef1f8;
  --bg-2: #e6eaf4;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-2: rgba(255, 255, 255, 0.9);
  --panel-3: rgba(240, 242, 250, 0.95);
  --border: rgba(30, 40, 90, 0.10);
  --border-2: rgba(30, 40, 90, 0.16);
  --text: #171a28;
  --text-2: #3a3f57;
  --muted: #646a85;
  --faint: #929ab4;
  --green: #0ea571;
  --green-2: #059669;
  --green-ink: #ffffff;
  --green-soft: rgba(14, 165, 113, 0.12);
  --yellow: #b7791f;
  --yellow-soft: rgba(217, 160, 30, 0.14);
  --red: #e0384f;
  --red-soft: rgba(224, 56, 79, 0.1);
  --blue: #5b63e6;
  --blue-soft: rgba(91, 99, 230, 0.12);
  --violet: #7c3aed;
  --cyan: #0e9bc9;
  --aurora: linear-gradient(110deg, #0ea571 0%, #0e9bc9 45%, #7c3aed 100%);
  --edge: linear-gradient(140deg, rgba(30, 40, 90, 0.14), rgba(30, 40, 90, 0.04) 40%, rgba(124, 58, 237, 0.16));
  --shadow: 0 20px 44px -26px rgba(40, 54, 110, 0.3), 0 0 0 1px rgba(30, 40, 90, 0.02) inset;
  color-scheme: light;
}
:root[data-theme="light"] body { background: var(--bg); color: var(--text); }
:root[data-theme="light"] body::before {
  background:
    radial-gradient(40% 34% at 16% 10%, rgba(14, 165, 113, 0.1), transparent 70%),
    radial-gradient(36% 30% at 84% 6%, rgba(124, 58, 237, 0.1), transparent 70%),
    radial-gradient(42% 38% at 60% 92%, rgba(14, 155, 201, 0.08), transparent 70%);
  filter: blur(50px); opacity: .7;
}
:root[data-theme="light"] body::after { background-image: radial-gradient(rgba(30, 40, 90, 0.05) 1px, transparent 1px); opacity: .55; }
:root[data-theme="light"] ::selection { background: rgba(124, 58, 237, 0.2); }
:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(30, 40, 90, 0.18); }

/* Sidebar */
:root[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 252, 0.92));
  box-shadow: 1px 0 0 rgba(30, 40, 90, 0.04), 20px 0 60px -42px rgba(80, 90, 160, 0.25);
}
:root[data-theme="light"] .nav a:hover { background: rgba(30, 40, 90, 0.05); }
:root[data-theme="light"] .nav a.active {
  color: #0b1020;
  background: linear-gradient(90deg, rgba(14, 165, 113, 0.14), rgba(124, 58, 237, 0.08) 70%, transparent) padding-box, var(--edge) border-box;
}
:root[data-theme="light"] .user-chip { background: rgba(30, 40, 90, 0.04); border-color: rgba(30, 40, 90, 0.1); }
:root[data-theme="light"] .avatar { color: #fff; }

/* Headings that used a white gradient */
:root[data-theme="light"] .page-head h1,
:root[data-theme="light"] .mb-head h2,
:root[data-theme="light"] .auth-card h1 {
  background: linear-gradient(180deg, #1b2030 20%, #4b5270 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Glass surfaces */
:root[data-theme="light"] .card,
:root[data-theme="light"] .place,
:root[data-theme="light"] .wk,
:root[data-theme="light"] .tile,
:root[data-theme="light"] .owner-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 254, 0.92)) padding-box, var(--edge) border-box;
}
:root[data-theme="light"] .mini-stat,
:root[data-theme="light"] .team-owner,
:root[data-theme="light"] .gstat,
:root[data-theme="light"] .seg,
:root[data-theme="light"] .year-switch,
:root[data-theme="light"] .period-label,
:root[data-theme="light"] .lang-btn,
:root[data-theme="light"] .stat .icon { background: rgba(255, 255, 255, 0.82); border-color: var(--border); }
:root[data-theme="light"] .team-owner .track,
:root[data-theme="light"] .progress,
:root[data-theme="light"] .wk-bar { background: rgba(30, 40, 90, 0.1); }

/* Accent tiles */
:root[data-theme="light"] .stat.accent {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(14, 165, 113, 0.14), transparent 55%),
    linear-gradient(180deg, #ffffff, #f2fbf7) padding-box,
    linear-gradient(140deg, rgba(14, 165, 113, 0.5), rgba(14, 155, 201, 0.2) 45%, rgba(124, 58, 237, 0.4)) border-box;
}
:root[data-theme="light"] .stat.yellow {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(217, 160, 30, 0.14), transparent 55%),
    linear-gradient(180deg, #ffffff, #fdf8ee) padding-box,
    linear-gradient(140deg, rgba(217, 160, 30, 0.5), rgba(236, 72, 153, 0.22)) border-box;
}
:root[data-theme="light"] .tile.wide {
  background: radial-gradient(120% 140% at 0% 0%, rgba(14, 165, 113, 0.14), transparent 60%), linear-gradient(180deg, #fff, #f2fbf7) padding-box,
    linear-gradient(140deg, rgba(14, 165, 113, 0.5), rgba(124, 58, 237, 0.3)) border-box;
}
:root[data-theme="light"] .week-preview { background: radial-gradient(120% 140% at 0% 0%, rgba(14, 165, 113, 0.12), transparent 60%), rgba(255, 255, 255, 0.85); border-color: rgba(14, 165, 113, 0.35); }

/* Buttons */
:root[data-theme="light"] .btn { background: rgba(30, 40, 90, 0.05); border-color: rgba(30, 40, 90, 0.14); }
:root[data-theme="light"] .btn:hover { background: rgba(30, 40, 90, 0.09); border-color: rgba(30, 40, 90, 0.22); }
:root[data-theme="light"] .btn.ghost { background: transparent; border-color: transparent; }
:root[data-theme="light"] .btn.ghost:hover { background: rgba(30, 40, 90, 0.06); }
:root[data-theme="light"] .icon-btn:hover { background: rgba(30, 40, 90, 0.08); }
:root[data-theme="light"] .seg button[aria-pressed="true"],
:root[data-theme="light"] .year-switch button[aria-pressed="true"] {
  color: #0b1020;
  background: linear-gradient(110deg, rgba(14, 165, 113, 0.18), rgba(124, 58, 237, 0.16)) padding-box, linear-gradient(110deg, rgba(14, 165, 113, 0.6), rgba(124, 58, 237, 0.5)) border-box;
}
:root[data-theme="light"] .month-strip button[aria-selected="true"] b { color: #fff; }

/* Inputs */
:root[data-theme="light"] .input,
:root[data-theme="light"] .select,
:root[data-theme="light"] textarea.input { background: #ffffff; border-color: var(--border-2); }
:root[data-theme="light"] .input:hover,
:root[data-theme="light"] .select:hover { border-color: rgba(30, 40, 90, 0.3); }
:root[data-theme="light"] .input:focus,
:root[data-theme="light"] .select:focus { background: #fff; border-color: rgba(14, 155, 201, 0.7); box-shadow: 0 0 0 4px rgba(14, 155, 201, 0.12); }
:root[data-theme="light"] .chip { background: rgba(30, 40, 90, 0.05); border-color: var(--border-2); }

/* Badges */
:root[data-theme="light"] .badge.ok { background: rgba(14, 165, 113, 0.12); color: #067a52; box-shadow: inset 0 0 0 1px rgba(14, 165, 113, 0.3); }
:root[data-theme="light"] .badge.bad { background: rgba(224, 56, 79, 0.1); color: #c02b4a; box-shadow: inset 0 0 0 1px rgba(224, 56, 79, 0.28); }
:root[data-theme="light"] .badge.neutral { background: rgba(30, 40, 90, 0.08); }

/* Tables */
:root[data-theme="light"] .tbl th { background: rgba(240, 242, 250, 0.85); color: var(--faint); }
:root[data-theme="light"] .tbl td { border-bottom-color: rgba(30, 40, 90, 0.08); }
:root[data-theme="light"] .tbl tbody tr:hover { background: linear-gradient(90deg, rgba(14, 165, 113, 0.06), rgba(124, 58, 237, 0.04) 60%, transparent); }
:root[data-theme="light"] .list-row.clickable:hover { background: rgba(30, 40, 90, 0.05); }

/* Overlays */
:root[data-theme="light"] .overlay { background: rgba(20, 26, 50, 0.32); }
:root[data-theme="light"] .modal,
:root[data-theme="light"] .drawer { background: linear-gradient(180deg, #ffffff, #f7f9fc) padding-box, var(--edge) border-box; box-shadow: 0 50px 120px -46px rgba(30, 40, 90, 0.4); }
:root[data-theme="light"] .dsec { background: rgba(245, 247, 252, 0.7); border-color: var(--border); }
:root[data-theme="light"] .popover,
:root[data-theme="light"] .chart-tip,
:root[data-theme="light"] .toast { background: rgba(255, 255, 255, 0.98); border-color: var(--border-2); box-shadow: 0 24px 60px -24px rgba(30, 40, 90, 0.3); }
:root[data-theme="light"] .sel-bar {
  background: linear-gradient(180deg, #ffffff, #f5f7fc) padding-box, linear-gradient(110deg, rgba(14, 165, 113, 0.6), rgba(14, 155, 201, 0.4), rgba(124, 58, 237, 0.6)) border-box;
  box-shadow: 0 30px 70px -28px rgba(30, 40, 90, 0.35);
}
:root[data-theme="light"] .topbar-mobile { background: rgba(255, 255, 255, 0.85); }

/* Charts */
:root[data-theme="light"] .chart .grid line { stroke: rgba(30, 40, 90, 0.08); }
:root[data-theme="light"] .chart .axis text { fill: #7a7f9c; }
:root[data-theme="light"] .donut-legend .row:hover,
:root[data-theme="light"] .owner-bar:hover { background: rgba(30, 40, 90, 0.05); }

/* Sign-in */
:root[data-theme="light"] .auth::before { opacity: .45; filter: blur(100px); }
:root[data-theme="light"] .auth-card {
  background: linear-gradient(180deg, #ffffff, #f6f8fc) padding-box,
    conic-gradient(from var(--spin), rgba(14, 165, 113, 0.8), rgba(14, 155, 201, 0.2), rgba(124, 58, 237, 0.8), rgba(236, 72, 153, 0.2), rgba(14, 165, 113, 0.8)) border-box;
  box-shadow: 0 60px 120px -46px rgba(30, 40, 90, 0.35);
}

/* Theme toggle button */
.theme-btn.icon-only { width: 34px; padding: 0; justify-content: center; }
.theme-btn.icon-only svg { color: var(--text-2); }
.theme-btn.icon-only:hover svg { color: var(--text); }
