/* ===== Operations Platform: premium layer (overview, photo QC, schedule, polish) ===== */
:root {
  --navy: #070d1a;
  --navy-2: #0d1730;
  --cyan: #22d3ee;
  --glass: rgba(255, 255, 255, .06);
  --glass-b: rgba(160, 210, 255, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-lg: 0 10px 30px -12px rgba(15, 23, 42, .25);
}

/* View transitions */
.main.enter { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.main:focus { outline: none; }

/* Micro-interactions */
.card { transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.btn { transition: background .15s, transform .12s var(--ease), box-shadow .2s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.kpi:hover, .hc:hover { box-shadow: var(--shadow-lg); }
.nav a { transition: background .15s, color .15s; position: relative; }
.nav a:hover { background: #1f2227; color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav-new { margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; background: linear-gradient(135deg, #22d3ee, #a78bfa); color: #06111f; }
.role { transition: background .2s, border-color .2s, color .2s; }
.role:hover { border-color: #454b54; }
.wo { transition: transform .15s var(--ease), box-shadow .15s; }
.wo:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

/* Avatars (initials only) */
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 10px; font-weight: 800; color: #fff; background: hsl(var(--h) 45% 42%); margin-right: 6px; vertical-align: middle; }

/* Photo banners */
.banner {
  position: relative; overflow: hidden; border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 26px 24px 20px; margin-bottom: 16px; min-height: 150px; color: #fff;
  background: linear-gradient(100deg, rgba(7, 13, 26, .92) 0%, rgba(7, 13, 26, .72) 45%, rgba(7, 13, 26, .25) 100%), var(--hero) center / cover no-repeat, var(--navy);
}
.banner h1 { color: #fff; }
.banner .eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, .7); }
.banner-sub { margin-top: 4px; color: rgba(255, 255, 255, .78); font-size: 13px; max-width: 560px; }
.banner .pill { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.banner .pill.ok { background: rgba(63, 207, 134, .22); }
.banner .pill.warn { background: rgba(255, 176, 74, .25); }
.banner .pill.bad { background: rgba(255, 109, 109, .25); }

/* Owner overview: AI brief hero */
.brief {
  position: relative; overflow: hidden; border-radius: 18px; color: #e8f1ff;
  background:
    radial-gradient(600px 300px at 12% 20%, rgba(34, 211, 238, .22), transparent 60%),
    linear-gradient(100deg, rgba(7, 13, 26, .96) 0%, rgba(7, 13, 26, .82) 50%, rgba(7, 13, 26, .45) 100%),
    var(--hero) center / cover no-repeat, var(--navy);
  border: 1px solid rgba(120, 200, 255, .18);
  display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 22px; align-items: start;
  padding: 28px 28px 22px; margin-bottom: 14px;
  box-shadow: 0 20px 50px -25px rgba(34, 211, 238, .45);
}
.brief-orb {
  width: 96px; height: 96px; border-radius: 50%; margin-top: 4px;
  background: radial-gradient(circle at 35% 30%, #fff 0, #a5f3fc 12%, #22d3ee 35%, #3b82f6 62%, rgba(59, 130, 246, 0) 72%);
  box-shadow: 0 0 40px rgba(34, 211, 238, .55), inset 0 0 20px rgba(255, 255, 255, .35);
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.06); box-shadow: 0 0 60px rgba(34, 211, 238, .75), inset 0 0 26px rgba(255, 255, 255, .45); } }
.brief-k { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7dd3fc; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.brief h1 { color: #fff; font-size: 28px; margin: 6px 0 10px; }
.brief p { margin: 0; font-size: 15px; line-height: 1.65; color: #cfe0f5; max-width: 820px; min-height: 5em; }
.typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.brief-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 12px; color: #8fb0d4; }
.brief-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-glass { background: rgba(255, 255, 255, .08); border-color: rgba(160, 210, 255, .25); color: #e8f1ff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, .16); }

.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis-5 .kpi .value { font-size: 28px; }

/* Segmented filter */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: background .2s, color .2s; }
.seg button span { opacity: .6; margin-left: 3px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* Project health board */
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.hc {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface);
  display: flex; flex-direction: column; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 45ms);
  transition: opacity .3s, transform .3s var(--ease), box-shadow .25s;
}
.hc.hide { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.hc-img { position: relative; aspect-ratio: 16 / 8; overflow: hidden; background: var(--surface-2); }
.hc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.hc:hover .hc-img img { transform: scale(1.05); }
.hc-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .55)); }
.hc-badge { position: absolute; left: 10px; top: 10px; z-index: 1; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; color: #fff; }
.hc-pc { position: absolute; right: 10px; bottom: 8px; z-index: 1; color: #fff; font-weight: 800; font-size: 13px; }
.hc-green .hc-badge { background: #16884f; }
.hc-yellow .hc-badge { background: #c27a00; }
.hc-red .hc-badge { background: #c23434; }
.hc-green { box-shadow: inset 0 3px 0 #16884f; }
.hc-yellow { box-shadow: inset 0 3px 0 #e0a100; }
.hc-red { box-shadow: inset 0 3px 0 #c23434; }
.hc > *:not(.hc-img) { margin-left: 14px; margin-right: 14px; }
.hc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-top: 12px; }
.hc-top b { font-size: 13.5px; }
.hc-v { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc .bar { height: 6px; }
.hc-green .bar i { background: var(--ok); }
.hc-yellow .bar i { background: #e0a100; }
.hc-red .bar i { background: var(--bad); }
.hc-note { font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.hc-red .hc-note { color: var(--bad); }
.hc-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--muted); padding: 10px 0 12px; margin-top: auto; }
.link { border: 0; background: none; padding: 0; font-weight: 800; color: var(--text); margin-left: auto; font-size: 12px; }
.link:hover { text-decoration: underline; }

/* Money at risk and priorities */
.money { display: grid; gap: 4px; }
.m-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.m-row:last-child { border-bottom: 0; }
.m-amt { font-weight: 800; font-variant-numeric: tabular-nums; align-self: center; }
.m-bar { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.m-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #e0a100, var(--bad)); transition: width 1s var(--ease); }
.m-bar.in i { width: var(--w); }
.prio { display: grid; gap: 2px; }
.p-row { display: grid; grid-template-columns: 18px 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px; font-weight: 600; }
.p-row:last-child { border-bottom: 0; }
.p-row input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.p-time { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.p-row .p-t { transition: color .2s, opacity .2s; }
.p-row.done .p-t { text-decoration: line-through; opacity: .5; }

/* ===== AI Photo QC ===== */
.qc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; }
.deck { position: relative; height: 520px; perspective: 1200px; }
.qc-card {
  position: absolute; inset: 0; border-radius: 16px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .45);
  display: flex; flex-direction: column; touch-action: pan-y; user-select: none; cursor: grab;
  transform: translateY(calc(var(--d, 0) * 10px)) scale(calc(1 - var(--d, 0) * .04));
  transition: transform .35s var(--ease), opacity .35s;
}
.qc-card.drag { transition: none; cursor: grabbing; }
.qc-card:not(:last-child) { pointer-events: none; }
.qc-card:not(:last-child) .qc-b { opacity: .4; }
.qc-card.out-r { transform: translateX(120%) rotate(18deg) !important; opacity: 0; }
.qc-card.out-l { transform: translateX(-120%) rotate(-18deg) !important; opacity: 0; }
.qc-card[data-hint="ok"] { box-shadow: 0 0 0 3px var(--ok), 0 18px 40px -22px rgba(0, 0, 0, .45); }
.qc-card[data-hint="back"] { box-shadow: 0 0 0 3px var(--bad), 0 18px 40px -22px rgba(0, 0, 0, .45); }
.qc-photo { position: relative; height: 260px; flex: none; background: #1c2026; overflow: hidden; }
.qc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.qc-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 30%, transparent 70%, rgba(0, 0, 0, .35)); pointer-events: none; }
.qc-verdict, .qc-conf { position: absolute; top: 12px; z-index: 2; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 4px 9px; border-radius: 7px; }
.qc-verdict { left: 12px; color: #fff; }
.qc-verdict.v-ok { background: #16884f; }
.qc-verdict.v-warn { background: #c27a00; }
.qc-verdict.v-bad { background: #c23434; }
.qc-conf { right: 12px; background: rgba(7, 13, 26, .7); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); letter-spacing: .02em; }
.qc-box { position: absolute; z-index: 2; border: 2px solid #ff8a3d; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .18); opacity: 0; animation: boxIn .5s var(--ease) 1.1s forwards; }
.qc-box span { position: absolute; left: -2px; bottom: calc(100% + 4px); background: #ff8a3d; color: #1a0d00; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
@keyframes boxIn { from { opacity: 0; transform: scale(1.15); } to { opacity: 1; transform: none; } }
.qc-scan { position: absolute; left: 0; right: 0; top: 0; height: 40%; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .28) 85%, rgba(165, 243, 252, .95) 100%); }
.qc-card:last-child .qc-scan { animation: sweep 1.1s ease-in-out .15s 1; }
@keyframes sweep { 0% { opacity: 1; transform: translateY(-100%); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(250%); } }
.qc-b { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.qc-id { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.qc-b b { font-size: 15px; }
.qc-b p { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.subs { display: grid; gap: 6px; }
.sub { display: grid; grid-template-columns: 112px minmax(0, 1fr) 28px; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.sub em { font-style: normal; font-weight: 800; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.sub-bar { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.sub-bar i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--ok); animation: grow .8s var(--ease) both .3s; transform-origin: left; }
.sub-bar i.mid { background: #e0a100; }
.sub-bar i.lo { background: var(--bad); }
@keyframes grow { from { transform: scaleX(0); } }
.deck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.deck-actions .btn { justify-content: center; padding: 11px; font-size: 14px; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: var(--ok); filter: brightness(1.08); }
.btn-back { color: var(--bad); border-color: currentColor; }
.deck-done { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; border: 2px dashed var(--border); border-radius: 16px; padding: 20px; }
.deck-done b { font-size: 18px; }

/* Evidence map */
.ev-top { display: flex; align-items: center; gap: 22px; margin-bottom: 14px; flex-wrap: wrap; }
.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring-bg { stroke: var(--surface-2); }
.ring .rseg { stroke-dasharray: 0 999; transition: stroke-dasharray 1s var(--ease), stroke-dashoffset 1s var(--ease); stroke-linecap: butt; }
.s-cov, .c-cov { stroke: var(--ok); background: var(--ok); }
.s-stale, .c-stale { stroke: #e0a100; background: #e0a100; }
.s-none, .c-none { stroke: var(--bad); background: var(--bad); }
.ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-c b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-c span { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ring-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.ring-legend li { display: flex; align-items: center; gap: 8px; }
.ring-legend i { width: 10px; height: 10px; border-radius: 3px; }
.ring-legend b { margin-left: 6px; }
.evmap { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; border-radius: 12px; overflow: hidden; }
.ev { position: relative; border-radius: 10px; overflow: hidden; background: #11161d; aspect-ratio: 1 / 1; }
.ev-img, .ev-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-stale .ev-img img { filter: grayscale(.7) brightness(.75); }
.ev.ev-none .ev-img { background: repeating-linear-gradient(45deg, #1a2029, #1a2029 8px, #151a22 8px, #151a22 16px); }
.ev-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #7d8794; font-size: 11px; font-weight: 700; }
.ev::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .75)); }
.ev-z { position: absolute; left: 7px; right: 7px; bottom: 6px; z-index: 1; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1.2; }
.ev::before { content: ""; position: absolute; top: 7px; right: 7px; z-index: 2; width: 8px; height: 8px; border-radius: 50%; opacity: 0; transition: opacity .4s; }
.ev-covered::before { background: #3fcf86; }
.ev-stale::before { background: #f5b800; }
.ev-none::before { background: #ff6d6d; }
.scanned .ev::before { opacity: 1; }
.chip { position: absolute; left: 6px; top: 6px; right: 18px; z-index: 2; font-size: 9.5px; font-weight: 800; padding: 3px 6px; border-radius: 5px; line-height: 1.25;
  opacity: 0; transform: translateY(-4px) scale(.95); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.scanned .chip { opacity: 1; transform: none; }
.scanned .ev:nth-child(3n) .chip { transition-delay: .15s; }
.scanned .ev:nth-child(3n+1) .chip { transition-delay: .3s; }
.scanned .ev:nth-child(3n+2) .chip { transition-delay: .45s; }
.sev-high { background: #ff5d5d; color: #fff; box-shadow: 0 0 0 0 rgba(255, 93, 93, .7); }
.scanned .sev-high { animation: chipPulse 1.6s 1s 2; }
@keyframes chipPulse { 70% { box-shadow: 0 0 0 7px rgba(255, 93, 93, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 93, 93, 0); } }
.sev-med { background: #f5b800; color: #1a1400; }
.sev-low { background: rgba(255, 255, 255, .88); color: #1a2330; }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 70px; z-index: 5; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .22) 80%, rgba(165, 243, 252, .95) 98%, transparent);
  box-shadow: 0 2px 18px rgba(34, 211, 238, .6); }
.scanning .scanline { animation: scanPct 2.2s cubic-bezier(.45, 0, .55, 1) 1; }
.scanning .ev { filter: saturate(.6); }
@keyframes scanPct { 0% { opacity: 1; top: -70px; } 95% { opacity: 1; } 100% { opacity: 0; top: 100%; } }

/* Field photo scan */
.photo.scanning::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .3) 85%, rgba(165, 243, 252, .95)); animation: scanPct 1.2s ease-in-out infinite; }

/* ===== Schedule (Gantt) ===== */
.sched-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.g-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-legend i { display: inline-block; width: 18px; height: 8px; border-radius: 3px; }
.lg-base { background: repeating-linear-gradient(45deg, var(--faint), var(--faint) 2px, transparent 2px, transparent 4px); height: 5px !important; }
.lg-act { background: #4b8bf5; }
.lg-prog { background: #1e4fb8; }
.lg-today { width: 2px !important; height: 14px !important; background: var(--bad); }
.gantt { overflow-x: auto; }
.g-inner { --name: 220px; --var: 76px; position: relative; min-width: 780px; padding: 6px 0 10px; }
.g-row { display: grid; grid-template-columns: var(--name) minmax(0, 1fr) var(--var); align-items: center; border-bottom: 1px solid var(--border); min-height: 46px; }
.g-row:last-of-type { border-bottom: 0; }
.g-row:not(.g-head):hover { background: var(--surface-2); }
.g-name { padding: 6px 14px 6px 16px; }
.g-name b { display: block; font-size: 13px; }
.g-name small { color: var(--muted); font-size: 11.5px; }
.g-tag { color: var(--bad); font-weight: 800; }
.g-track { position: relative; height: 46px;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% * 7 / 147 - 1px), var(--border) calc(100% * 7 / 147 - 1px), var(--border) calc(100% * 7 / 147)); }
.g-head { min-height: 60px; }
.g-head .g-name, .g-head .g-var { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.g-head .g-track { height: 60px; background-image: none; }
.g-month { position: absolute; top: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-left: 6px; border-left: 1px solid var(--border); height: 16px; line-height: 16px; }
.g-ms { position: absolute; top: 30px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.g-ms i { width: 11px; height: 11px; background: var(--text); transform: rotate(45deg); border-radius: 2px; }
.g-ms em { position: absolute; top: 14px; white-space: nowrap; font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); }
.g-base { position: absolute; bottom: 8px; height: 5px; border-radius: 3px; background: repeating-linear-gradient(45deg, var(--faint), var(--faint) 2px, transparent 2px, transparent 4px); opacity: .9; }
.g-act { position: absolute; top: 10px; height: 18px; border-radius: 6px; background: #4b8bf5; overflow: hidden;
  box-shadow: 0 4px 10px -4px rgba(37, 99, 235, .6); transform-origin: left; animation: grow .8s var(--ease) both; animation-delay: calc(var(--i) * 60ms + .1s); }
.g-act.late { background: #f08a5d; box-shadow: 0 4px 10px -4px rgba(240, 138, 93, .7); }
.g-act i { display: block; height: 100%; background: rgba(10, 30, 90, .55); }
.g-act.late i { background: rgba(110, 30, 0, .45); }
.crit .g-act { outline: 2px solid rgba(207, 47, 47, .55); outline-offset: 1px; }
.g-var { text-align: center; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); left: calc(var(--name) + (100% - var(--name) - var(--var)) * var(--today) / 100); pointer-events: none; z-index: 2; }
.g-today span { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }

/* Client project rows with photos */
.proj-img { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.proj-img img { width: 96px; height: 68px; object-fit: cover; border-radius: 10px; display: block; }

/* Floating AI launcher */
.ai-launch {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px;
  background: rgba(7, 13, 26, .88); color: #e8f1ff; border: 1px solid rgba(120, 200, 255, .3);
  font-weight: 700; font-size: 13.5px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -8px rgba(34, 211, 238, .55); transition: transform .2s var(--ease), box-shadow .2s, opacity .2s;
}
.ai-launch:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(34, 211, 238, .8); }
.ai-launch.hide { opacity: 0; pointer-events: none; transform: translateY(10px); }
.mini-orb { width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #a5f3fc 14%, #22d3ee 38%, #3b82f6 66%, #1e3a8a 100%);
  box-shadow: 0 0 14px rgba(34, 211, 238, .8); animation: breathe 3s ease-in-out infinite; }
.toast { bottom: 76px; z-index: 60; }

/* Responsive */
@media (max-width: 1200px) {
  .kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .shell, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; }
  .side .nav { display: flex; order: 5; width: 100%; min-width: 0; overflow-x: auto; gap: 4px; padding-bottom: 2px; scrollbar-width: none; }
  .side .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; flex: none; }
  .nav a.on::before { display: none; }
  .roles { flex: 1; }
}
@media (max-width: 700px) {
  .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief { grid-template-columns: 1fr; padding: 22px 18px 18px; gap: 12px; }
  .brief-orb { width: 54px; height: 54px; }
  .brief h1 { font-size: 22px; }
  .brief p { font-size: 14px; }
  .evmap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .deck { height: 540px; }
  .qc-photo { height: 220px; }
  .banner { padding: 20px 16px 16px; min-height: 130px; }
  .ai-launch span:last-child { display: none; }
  .ai-launch { padding: 7px; }
}
@media (max-width: 520px) {
  .roles { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .role { font-size: 11.5px; padding: 7px 6px; text-align: center; }
  .side .brand { width: 100%; }
  h1 { font-size: 22px; }
  .sub { grid-template-columns: 96px minmax(0, 1fr) 26px; }
  .evmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-row { grid-template-columns: 18px 40px minmax(0, 1fr); }
  .p-row .pill { display: none; }
  .health { grid-template-columns: 1fr; }
  .card-h { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .qc-box { opacity: 1; }
}
