/* ═══════════════════════════════════════════════════════════════════════════
   "Midnight aurora" look for the hub: deep navy, drifting aurora light, glass
   panels with glowing edges, gradient buttons and gentle motion.
   Loaded after hub.css and only restyles it. To go back to the original glass
   look, remove the <link> to this file from index.html (or run
   design-backups\2026-10-09-original-glass\restore-graphics.ps1).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --text: #f3f6ff;
  --text-2: rgba(226, 232, 255, 0.80);
  --text-3: rgba(203, 213, 245, 0.58);
  --glass: rgba(148, 163, 255, 0.09);
  --glass-strong: rgba(148, 163, 255, 0.18);
  --stroke: rgba(160, 175, 255, 0.24);
  --stroke-soft: rgba(160, 175, 255, 0.13);
  --clear: #4ade80;
  --defect: #fb7185;
  --progress: #fbbf24;
  --accent: #7dd3fc;
  --accent-2: #a5b4fc;
  --grad: linear-gradient(135deg, #38bdf8 0%, #818cf8 55%, #c084fc 100%);
  --card: rgba(148, 163, 255, 0.055);
  --card-hover: rgba(148, 163, 255, 0.10);
  --glow: 0 0 0 1px rgba(125, 211, 252, 0.35), 0 10px 30px rgba(56, 189, 248, 0.18);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 20px;
  font-family: "Inter", "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01";
}

body {
  background: radial-gradient(120% 90% at 10% 0%, #13213d 0%, #0a1224 45%, #060b17 100%);
  text-shadow: none;
}
::selection { background: rgba(56, 189, 248, 0.35); }

/* ── background: slowly drifting aurora light + a faint dot grid ── */
.bg i { filter: blur(110px); will-change: transform; }
.bg i:nth-child(1) { width: 52vw; height: 52vw; left: -14vw; top: -26vw; background: #2563eb; opacity: 0.42; animation: drift-a 26s ease-in-out infinite alternate; }
.bg i:nth-child(2) { width: 40vw; height: 40vw; right: -10vw; top: 6vh; background: #7c3aed; opacity: 0.30; animation: drift-b 32s ease-in-out infinite alternate; }
.bg i:nth-child(3) { width: 50vw; height: 30vw; left: 18vw; bottom: -16vw; background: #0d9488; opacity: 0.28; animation: drift-c 29s ease-in-out infinite alternate; }
.bg i:nth-child(4) { width: 32vw; height: 32vw; left: 46vw; top: 22vh; background: #0ea5e9; opacity: 0.22; animation: drift-b 37s ease-in-out infinite alternate-reverse; }
.bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(180, 195, 255, 0.10) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
@keyframes drift-a { to { transform: translate(12vw, 10vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-10vw, 14vh) scale(0.9); } }
@keyframes drift-c { to { transform: translate(8vw, -12vh) scale(1.2); } }

/* ── glass panels: deeper, with a glowing gradient edge ── */
.glass {
  background: linear-gradient(160deg, rgba(30, 41, 72, 0.72), rgba(13, 20, 40, 0.62));
  border: 1px solid rgba(160, 175, 255, 0.14);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.glass:not(dialog) { position: relative; }
.glass:not(dialog)::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(125, 211, 252, 0.45), rgba(129, 140, 248, 0.10) 35%, rgba(255, 255, 255, 0) 60%, rgba(192, 132, 252, 0.30));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

h1, h2 { letter-spacing: -0.02em; }
h2 { font-weight: 650; }
.display { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }

/* ── top bar ── */
.topbar { padding: 10px 16px; }
.logo {
  background: var(--grad); border: 0; color: #fff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tabs { background: rgba(8, 13, 28, 0.55); border-color: var(--stroke-soft); }
.tab { transition: color .2s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease); }
.tab:hover { color: var(--text); background: rgba(148, 163, 255, 0.08); }
.tab.active {
  color: #fff; font-weight: 600;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(129, 140, 248, 0.32));
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.45), 0 6px 18px rgba(56, 189, 248, 0.22);
}
.dot { position: relative; }
.dot.on::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--clear);
  animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 80%, 100% { transform: scale(1.9); opacity: 0; } }

/* ── buttons ── */
.btn {
  background: rgba(148, 163, 255, 0.08); border: 1px solid rgba(160, 175, 255, 0.22); font-weight: 500;
  transition: transform .18s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: rgba(148, 163, 255, 0.16); border-color: rgba(125, 211, 252, 0.55); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(56, 189, 248, 0.16); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn:focus-visible, .tab:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary {
  color: #fff; font-weight: 650; border: 0; text-shadow: 0 1px 2px rgba(10, 20, 50, 0.35);
  background: linear-gradient(110deg, #0ea5e9, #6366f1 45%, #a855f7 70%, #0ea5e9);
  background-size: 220% 100%; background-position: 0% 0;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.30);
  transition: transform .18s var(--ease), background-position .6s var(--ease), box-shadow .2s var(--ease);
}
.btn.primary:hover { background-position: 100% 0; box-shadow: 0 12px 32px rgba(99, 102, 241, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.danger { color: #ffe4e8; border-color: rgba(251, 113, 133, 0.55); background: rgba(251, 113, 133, 0.10); }
.btn.danger:hover { background: rgba(251, 113, 133, 0.20); border-color: #fb7185; box-shadow: 0 8px 22px rgba(251, 113, 133, 0.22); }
.btn:disabled { opacity: 0.55; transform: none; box-shadow: none; cursor: default; }
.icon-btn { transition: background .2s, transform .2s var(--ease); }
.icon-btn:hover { background: var(--glass-strong); transform: scale(1.06); }

/* ── inputs ── */
.input {
  background: rgba(6, 11, 26, 0.55); border: 1px solid rgba(160, 175, 255, 0.20); border-radius: 12px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.input:hover { border-color: rgba(160, 175, 255, 0.34); }
.input:focus { border-color: var(--accent); background: rgba(6, 11, 26, 0.75); box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16); }
select.input option { color: #e2e8ff; background: #111a30; }
input[type="checkbox"], input[type="radio"] { accent-color: #38bdf8; }

/* ── calendar & lists ── */
.day { transition: background .2s var(--ease), transform .2s var(--ease); }
.day:hover { transform: translateY(-1px); }
.day.sel { background: linear-gradient(160deg, rgba(56, 189, 248, 0.28), rgba(129, 140, 248, 0.22)); border-color: rgba(125, 211, 252, 0.55); box-shadow: 0 6px 18px rgba(56, 189, 248, 0.20); }
.day .dc, .day.today .dd { color: var(--accent); }

.job, .stat, .asset, .user, .site, .job-billing, .money, .existing-summary, .totals, .box, .choice, .doc-chip, .dash-row, .join-code, .seg, .pay-row, .ci {
  background: var(--card); border-color: var(--stroke-soft);
}
.job, .stat, .user, .doc-chip, .money {
  transition: transform .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease), box-shadow .22s var(--ease);
}
.job:hover, .user:hover, .money:hover, .doc-chip:hover { background: var(--card-hover); border-color: rgba(125, 211, 252, 0.35); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28); }
.job.sel { background: linear-gradient(160deg, rgba(56, 189, 248, 0.16), rgba(129, 140, 248, 0.10)); border-color: rgba(125, 211, 252, 0.55); box-shadow: var(--glow); }
.stat:hover { border-color: rgba(125, 211, 252, 0.30); transform: translateY(-2px); }
.stat .v { font-weight: 650; letter-spacing: -0.03em; }
.stat .v:not([style]) { background: linear-gradient(180deg, #ffffff, #a5c8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; color: var(--text-3); font-weight: 600; }
.jobno { background: rgba(56, 189, 248, 0.14); border-color: rgba(125, 211, 252, 0.35); color: #bae6fd; }

.asset { transition: border-color .22s var(--ease), box-shadow .22s var(--ease); }
.asset:hover { border-color: rgba(125, 211, 252, 0.30); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }
.asset-head:hover { background: rgba(148, 163, 255, 0.05); }
.cover { background: rgba(148, 163, 255, 0.10); }
.cover, .site-photo, .ci .photos img { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
img.cover:hover, .site-photo:hover, .ci .photos img:hover { transform: scale(1.04); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); }
.bay { background: linear-gradient(180deg, #fff, #9ec5ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bay small { -webkit-text-fill-color: var(--text-3); }
.avatar { background: var(--grad); border: 0; color: #fff; box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35); }

/* ── pills (status colours kept: green clear, amber in progress, rose deficiency) ── */
.pill { border-color: rgba(160, 175, 255, 0.22); }
.pill.completed, .pill.st-paid, .pill.st-accepted { background: rgba(74, 222, 128, 0.14); border-color: rgba(74, 222, 128, 0.55); color: #bbf7d0; }
.pill.in_progress, .pill.st-partial { background: rgba(251, 191, 36, 0.13); border-color: rgba(251, 191, 36, 0.55); color: #fde68a; }
.pill.defects, .pill.st-overdue, .pill.st-declined, .pill.st-expired { background: rgba(251, 113, 133, 0.14); border-color: rgba(251, 113, 133, 0.55); color: #fecdd3; }
.pill.working, .pill.admin, .pill.st-sent { background: rgba(56, 189, 248, 0.14); border-color: rgba(125, 211, 252, 0.55); color: #bae6fd; }
.pill.working { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12); } }

/* ── progress & life bars: gradient fills that grow in, with a passing shine ── */
.bar, .dash-meter, .dash-mini { background: rgba(148, 163, 255, 0.12); }
.bar > span, .dash-meter > span { position: relative; overflow: hidden; }
/* Bars grow in when a dashboard row is opened (not on every refresh). */
.dash-row.fresh > .dash-row-body :is(.dash-meter > span, .dash-mix-bar > span, .dash-stack > span, .dash-mini > span) { animation: grow .9s var(--ease) both; transform-origin: left; }
.bar > span { background: linear-gradient(90deg, #22c55e, #4ade80); box-shadow: 0 0 12px rgba(74, 222, 128, 0.45); }
.bar > span::after, .dash-meter > span::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.45) 50%, transparent 80%);
  transform: translateX(-100%); animation: shine 3.2s ease-in-out 1s infinite;
}
@keyframes grow { from { transform: scaleX(0); } }
@keyframes shine { 0% { transform: translateX(-100%); } 45%, 100% { transform: translateX(100%); } }
.life-bar > span.life-fill-good, .dash-meter .good, .dash-mini .good, .dash-stack .good, .dash-legend i.good { background: linear-gradient(90deg, #22c55e, #4ade80); }
.life-bar > span.life-fill-warn, .dash-meter .fair, .dash-mini .fair, .dash-stack .fair, .dash-legend i.fair { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.life-bar > span.life-fill-low, .dash-meter .soon, .dash-mini .soon, .dash-stack .soon, .dash-legend i.soon { background: linear-gradient(90deg, #e11d48, #fb7185); }
.dash-meter .review, .dash-mini .review, .dash-stack .review, .dash-legend i.review { background: rgba(203, 213, 245, 0.45); }
.life-bar > span.life-fill-good { box-shadow: 0 0 12px rgba(74, 222, 128, 0.45); }
.life-bar > span.life-fill-warn { box-shadow: 0 0 12px rgba(251, 191, 36, 0.40); }
.life-bar > span.life-fill-low { box-shadow: 0 0 12px rgba(251, 113, 133, 0.45); }
.dash-mix-bar { background: rgba(148, 163, 255, 0.08); }
.dash-mix-bar > span { background: rgba(165, 180, 252, 0.45); }
.dash-mix-bar > span.top { background: var(--grad); box-shadow: 0 0 14px rgba(129, 140, 248, 0.45); }
.pill.dash-pill.good { background: rgba(74, 222, 128, 0.14); border-color: rgba(74, 222, 128, 0.6); }
.pill.dash-pill.fair { background: rgba(251, 191, 36, 0.13); border-color: rgba(251, 191, 36, 0.6); }
.pill.dash-pill.soon { background: rgba(251, 113, 133, 0.15); border-color: rgba(251, 113, 133, 0.6); }

/* ── dashboard rows ── */
.dash-row { transition: border-color .22s var(--ease), background .22s var(--ease), box-shadow .22s var(--ease); }
.dash-row:hover { border-color: rgba(125, 211, 252, 0.28); }
.dash-row.open { background: linear-gradient(160deg, rgba(56, 189, 248, 0.07), rgba(129, 140, 248, 0.04)); border-color: rgba(125, 211, 252, 0.30); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25); }
.dash-row-head[data-dash-row]:hover { background: rgba(148, 163, 255, 0.06); }
.dash-chev { transition: transform .3s var(--ease), color .2s; }
.dash-row.open > .dash-row-head > .dash-chev { color: var(--accent); }
.dash-row-logo > span { background: var(--grad); color: #fff; }
.dash-row.fresh > .dash-row-body > * { animation: rise .45s var(--ease) both; }
.dash-row.fresh > .dash-row-body > *:nth-child(2) { animation-delay: .05s; }
.dash-row.fresh > .dash-row-body > *:nth-child(3) { animation-delay: .10s; }
.dash-row.fresh > .dash-row-body > *:nth-child(4) { animation-delay: .15s; }
.dash-row.fresh > .dash-row-body > *:nth-child(n+5) { animation-delay: .2s; }
.dash-overview { background: rgba(6, 11, 26, 0.35); border: 1px solid var(--stroke-soft); }

/* ── tables ── */
.table-wrap { background: rgba(6, 11, 26, 0.30); }
.table th { background: rgba(14, 21, 42, 0.97); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; font-weight: 600; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { background: rgba(148, 163, 255, 0.06); }

/* ── drop-downs ── */
.combo-list { background: rgba(14, 21, 42, 0.97); border-color: rgba(125, 211, 252, 0.30); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); animation: drop .18s var(--ease); }
.combo-opt { transition: background .12s; }
.combo-opt:hover, .combo-opt.active { background: linear-gradient(90deg, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.12)); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ── dialogs, photos, toasts ── */
.dialog { background: linear-gradient(160deg, rgba(24, 34, 62, 0.94), rgba(10, 16, 34, 0.94)); border-color: rgba(125, 211, 252, 0.25); }
dialog[open].dialog { animation: dialog-in .32s var(--ease); }
dialog[open]::backdrop { animation: fade .3s ease; }
.dialog::backdrop { background: rgba(3, 7, 18, 0.62); backdrop-filter: blur(6px); }
.photo-dialog::backdrop { background: rgba(3, 7, 18, 0.85); }
dialog[open].photo-dialog img { animation: dialog-in .3s var(--ease); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes fade { from { opacity: 0; } }
.toast { animation: toast-in .45s var(--ease); border-color: rgba(125, 211, 252, 0.35); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(125, 211, 252, 0.15); }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(0.96); } }

.photo-box { background: rgba(6, 11, 26, 0.4); border-color: rgba(160, 175, 255, 0.28); transition: border-color .2s, background .2s; }
.photo-box:hover { border-color: rgba(125, 211, 252, 0.6); }
.photo-box.drag { border-color: var(--accent); background: rgba(56, 189, 248, 0.14); box-shadow: inset 0 0 0 1px var(--accent); }
.people-pick .person { background: var(--card); transition: background .2s, border-color .2s, transform .2s var(--ease); }
.people-pick .person:hover { transform: translateY(-1px); border-color: rgba(125, 211, 252, 0.4); }
.people-pick .person:has(input:checked), .choice .option:has(input:checked) { background: rgba(74, 222, 128, 0.14); border-color: rgba(74, 222, 128, 0.6); }

/* ── entrances: a view's panels rise in when it's opened ── */
.view:not(.hidden) > *, .auth:not(.hidden) > * { animation: rise .5s var(--ease) both; }
.view:not(.hidden) > *:nth-child(2), .auth:not(.hidden) > *:nth-child(2) { animation-delay: .07s; }
.view:not(.hidden) > *:nth-child(3), .auth:not(.hidden) > *:nth-child(3) { animation-delay: .14s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 255, 0.22); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(125, 211, 252, 0.45); background-clip: padding-box; }

/* Fewer effects for anyone who has asked their computer for less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body { background: #fff; }
  .glass:not(dialog)::before { display: none; }
}
