/* ═══════════════════════════════════════════════════════════════════════════
   Light mode for the hub (Settings → Appearance → Light). Everything here only
   applies when <html data-theme="light">; dark stays exactly as it was.
   Same "aurora" design as theme-modern.css, on a bright daylight background.
   ═══════════════════════════════════════════════════════════════════════════ */

:root[data-theme="light"] {
  --text: #0f172a;
  --text-2: rgba(15, 23, 42, 0.74);
  --text-3: rgba(15, 23, 42, 0.52);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --stroke: rgba(30, 41, 90, 0.16);
  --stroke-soft: rgba(30, 41, 90, 0.09);
  --clear: #16a34a;
  --defect: #e11d48;
  --progress: #d97706;
  --accent: #2563eb;
  --accent-2: #4f46e5;
  --card: rgba(255, 255, 255, 0.58);
  --card-hover: rgba(255, 255, 255, 0.88);
  --glow: 0 0 0 1px rgba(37, 99, 235, 0.30), 0 10px 26px rgba(37, 99, 235, 0.14);
  color-scheme: light;
}
:root[data-theme="light"] body { background: radial-gradient(120% 90% at 10% 0%, #f6f9ff 0%, #ebf0fb 50%, #dfe6f6 100%); }
:root[data-theme="light"] ::selection { background: rgba(37, 99, 235, 0.22); }

/* Switching between dark and light: a quick cross-fade. */
.theme-switching, .theme-switching * { transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease !important; }

/* background light: soft pastel aurora */
:root[data-theme="light"] .bg i:nth-child(1) { background: #93c5fd; opacity: 0.55; }
:root[data-theme="light"] .bg i:nth-child(2) { background: #c4b5fd; opacity: 0.50; }
:root[data-theme="light"] .bg i:nth-child(3) { background: #5eead4; opacity: 0.38; }
:root[data-theme="light"] .bg i:nth-child(4) { background: #7dd3fc; opacity: 0.32; }
:root[data-theme="light"] .bg::after { background-image: radial-gradient(rgba(30, 41, 90, 0.10) 1px, transparent 1px); }

/* glass */
:root[data-theme="light"] .glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.64));
  border-color: rgba(30, 41, 90, 0.10);
  box-shadow: 0 20px 50px rgba(30, 41, 90, 0.12), inset 0 1px 0 #fff;
}
:root[data-theme="light"] .glass:not(dialog)::before {
  background: linear-gradient(140deg, rgba(59, 130, 246, 0.45), rgba(129, 140, 248, 0.12) 35%, rgba(255, 255, 255, 0) 60%, rgba(168, 85, 247, 0.30));
}

/* top bar & tabs */
:root[data-theme="light"] .tabs { background: rgba(255, 255, 255, 0.6); }
:root[data-theme="light"] .tab:hover { background: rgba(37, 99, 235, 0.07); }
:root[data-theme="light"] .tab.active { color: #1e1b4b; background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.24)); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35), 0 6px 16px rgba(37, 99, 235, 0.14); }

/* buttons */
:root[data-theme="light"] .btn { background: rgba(255, 255, 255, 0.72); border-color: rgba(30, 41, 90, 0.16); }
:root[data-theme="light"] .btn:hover { background: #fff; border-color: rgba(37, 99, 235, 0.45); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.14); }
:root[data-theme="light"] .btn.primary { color: #fff; border: 0; background: linear-gradient(110deg, #0ea5e9, #6366f1 45%, #a855f7 70%, #0ea5e9); background-size: 220% 100%; }
:root[data-theme="light"] .btn.primary:hover { background-position: 100% 0; }
:root[data-theme="light"] .btn.danger { color: #be123c; background: rgba(225, 29, 72, 0.06); border-color: rgba(225, 29, 72, 0.45); }
:root[data-theme="light"] .btn.danger:hover { background: rgba(225, 29, 72, 0.12); }
:root[data-theme="light"] .icon-btn { background: rgba(255, 255, 255, 0.7); }

/* inputs */
:root[data-theme="light"] .input { background: rgba(255, 255, 255, 0.82); border-color: rgba(30, 41, 90, 0.16); }
:root[data-theme="light"] .input:hover { border-color: rgba(30, 41, 90, 0.28); }
:root[data-theme="light"] .input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
:root[data-theme="light"] select.input option { color: #0f172a; background: #fff; }
:root[data-theme="light"] .error, :root[data-theme="light"] .join-org.bad { color: #be123c; }

/* numbers & headings */
:root[data-theme="light"] .stat .v:not([style]), :root[data-theme="light"] .bay { background: linear-gradient(180deg, #0f172a, #3b5bdb); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .jobno { background: rgba(37, 99, 235, 0.10); border-color: rgba(37, 99, 235, 0.30); color: #1e40af; }
:root[data-theme="light"] .job:hover, :root[data-theme="light"] .user:hover, :root[data-theme="light"] .money:hover, :root[data-theme="light"] .doc-chip:hover, :root[data-theme="light"] .asset:hover { box-shadow: 0 12px 26px rgba(30, 41, 90, 0.12); }
:root[data-theme="light"] .job.sel { background: linear-gradient(160deg, rgba(56, 189, 248, 0.14), rgba(129, 140, 248, 0.10)); border-color: rgba(37, 99, 235, 0.45); }
:root[data-theme="light"] .cover, :root[data-theme="light"] .ci { background: rgba(30, 41, 90, 0.05); }

/* pills: darker text so they read on white */
:root[data-theme="light"] .pill.completed, :root[data-theme="light"] .pill.st-paid, :root[data-theme="light"] .pill.st-accepted { background: rgba(22, 163, 74, 0.12); border-color: rgba(22, 163, 74, 0.5); color: #166534; }
:root[data-theme="light"] .pill.in_progress, :root[data-theme="light"] .pill.st-partial { background: rgba(217, 119, 6, 0.12); border-color: rgba(217, 119, 6, 0.5); color: #92400e; }
:root[data-theme="light"] .pill.defects, :root[data-theme="light"] .pill.st-overdue, :root[data-theme="light"] .pill.st-declined, :root[data-theme="light"] .pill.st-expired { background: rgba(225, 29, 72, 0.10); border-color: rgba(225, 29, 72, 0.45); color: #9f1239; }
:root[data-theme="light"] .pill.working, :root[data-theme="light"] .pill.admin, :root[data-theme="light"] .pill.st-sent { background: rgba(37, 99, 235, 0.10); border-color: rgba(37, 99, 235, 0.45); color: #1e40af; }
:root[data-theme="light"] .pill.dash-pill.good { background: rgba(22, 163, 74, 0.12); border-color: rgba(22, 163, 74, 0.55); color: #166534; }
:root[data-theme="light"] .pill.dash-pill.fair { background: rgba(217, 119, 6, 0.12); border-color: rgba(217, 119, 6, 0.55); color: #92400e; }
:root[data-theme="light"] .pill.dash-pill.soon { background: rgba(225, 29, 72, 0.10); border-color: rgba(225, 29, 72, 0.5); color: #9f1239; }
:root[data-theme="light"] .pill.dash-pill.review, :root[data-theme="light"] .pill.dash-pill.unrated { background: rgba(30, 41, 90, 0.06); }

/* bars */
:root[data-theme="light"] .bar, :root[data-theme="light"] .dash-meter, :root[data-theme="light"] .dash-mini, :root[data-theme="light"] .dash-mix-bar { background: rgba(30, 41, 90, 0.09); }
:root[data-theme="light"] .dash-mix-bar > span { background: rgba(99, 102, 241, 0.32); }
:root[data-theme="light"] .dash-mix-bar > span.top { background: var(--grad); }
:root[data-theme="light"] .dash-meter .review, :root[data-theme="light"] .dash-mini .review, :root[data-theme="light"] .dash-stack .review, :root[data-theme="light"] .dash-legend i.review { background: rgba(30, 41, 90, 0.25); }
:root[data-theme="light"] .dash-stack .unrated, :root[data-theme="light"] .dash-legend i.unrated { background: repeating-linear-gradient(135deg, rgba(30, 41, 90, 0.22) 0 3px, rgba(30, 41, 90, 0.08) 3px 6px); }
:root[data-theme="light"] .dash-mix-bar > span.other { background: repeating-linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0 3px, rgba(99, 102, 241, 0.12) 3px 6px); }

/* dashboard */
:root[data-theme="light"] .dash-row.open { background: linear-gradient(160deg, rgba(37, 99, 235, 0.06), rgba(129, 140, 248, 0.04)); border-color: rgba(37, 99, 235, 0.25); box-shadow: 0 16px 36px rgba(30, 41, 90, 0.10); }
:root[data-theme="light"] .dash-row-head[data-dash-row]:hover { background: rgba(37, 99, 235, 0.05); }
:root[data-theme="light"] .dash-overview { background: rgba(255, 255, 255, 0.55); }

/* tables */
:root[data-theme="light"] .table-wrap { background: rgba(255, 255, 255, 0.55); }
:root[data-theme="light"] .table th { background: rgba(246, 248, 255, 0.98); }
:root[data-theme="light"] .table td { border-bottom-color: rgba(30, 41, 90, 0.08); }
:root[data-theme="light"] .table tbody tr:hover td, :root[data-theme="light"] #hRows tr[data-job]:hover td { background: rgba(37, 99, 235, 0.05); }

/* drop-downs */
:root[data-theme="light"] .combo-list { background: rgba(255, 255, 255, 0.98); border-color: rgba(37, 99, 235, 0.25); box-shadow: 0 18px 40px rgba(30, 41, 90, 0.16); }
:root[data-theme="light"] .combo-opt:hover, :root[data-theme="light"] .combo-opt.active { background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(129, 140, 248, 0.10)); }
:root[data-theme="light"] .combo-toggle:hover { background: rgba(30, 41, 90, 0.08); }

/* dialogs, photos, toasts */
:root[data-theme="light"] .dialog { background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(243, 246, 255, 0.98)); border-color: rgba(37, 99, 235, 0.20); box-shadow: 0 30px 70px rgba(30, 41, 90, 0.25); }
:root[data-theme="light"] .dialog::backdrop { background: rgba(15, 23, 42, 0.32); }
:root[data-theme="light"] .toast { box-shadow: 0 16px 36px rgba(30, 41, 90, 0.18), 0 0 0 1px rgba(37, 99, 235, 0.15); }
:root[data-theme="light"] .photo-box { background: rgba(255, 255, 255, 0.6); border-color: rgba(30, 41, 90, 0.22); }
:root[data-theme="light"] .photo-box.drag { background: rgba(37, 99, 235, 0.08); }
:root[data-theme="light"] .join-code { background: rgba(255, 255, 255, 0.7); }

:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(30, 41, 90, 0.20); background-clip: padding-box; }
:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(37, 99, 235, 0.40); background-clip: padding-box; }

/* ── Settings dialog: appearance choice (both modes) ── */
.icon-text { display: inline-flex; align-items: center; gap: 6px; }
.appearance-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.appearance-opt { position: relative; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border-radius: 16px; cursor: pointer; color: var(--text); font-size: 13px; text-align: center; border: 1px solid var(--stroke-soft); background: var(--card); transition: border-color .2s, box-shadow .2s, transform .2s; }
.appearance-opt:hover { transform: translateY(-1px); border-color: var(--stroke); }
.appearance-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22); }
.appearance-opt input { position: absolute; opacity: 0; pointer-events: none; }
.appearance-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.appearance-swatch { width: 100%; height: 64px; border-radius: 10px; position: relative; overflow: hidden; border: 1px solid rgba(128, 140, 180, 0.3); }
.appearance-swatch.dark { background: radial-gradient(circle at 20% 10%, #2563eb 0, transparent 55%), radial-gradient(circle at 90% 80%, #7c3aed 0, transparent 55%), #0a1224; }
.appearance-swatch.light { background: radial-gradient(circle at 20% 10%, #93c5fd 0, transparent 55%), radial-gradient(circle at 90% 80%, #c4b5fd 0, transparent 55%), #eef2fb; }
.appearance-swatch.system { background: linear-gradient(135deg, #0a1224 49.5%, #eef2fb 50.5%); }
.appearance-swatch i { position: absolute; left: 10px; right: 10px; height: 8px; border-radius: 4px; }
.appearance-swatch i:nth-child(1) { top: 12px; width: 40%; background: linear-gradient(90deg, #0ea5e9, #a855f7); }
.appearance-swatch i:nth-child(2) { top: 28px; background: rgba(148, 163, 255, 0.35); }
.appearance-swatch i:nth-child(3) { top: 42px; width: 60%; background: rgba(148, 163, 255, 0.25); }
@media (max-width: 520px) { .appearance-pick { grid-template-columns: 1fr; } }
:root[data-theme="light"] .m-day.today .m-num, :root[data-theme="light"] .m-add:hover { color: #fff; }
