/* Intech Growth Agents: matches intechsolutionsltd.co.nz */
:root {
  --bg: #050505;
  --bg-2: #0a0a0b;
  --bg-3: #111113;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f5f5f3;
  --muted: #a3a3a0;
  --dim: #6c6c6a;
  --accent: #ff6600;
  --accent-light: #ffb088;
  --accent-grad: linear-gradient(135deg, #ff8533, #ff6600);
  --accent-text: linear-gradient(135deg, #ff6600, #ffb088);
  --accent-soft: rgba(255, 102, 0, .14);
  --blue: #2f86ff;
  --green: #3ddc84;
  --red: #ff5a5a;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --r: 1.5rem;
  --r-sm: .9rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: min(1320px, 100% - clamp(2rem, 6vw, 6rem));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; min-height: 100vh; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; background: var(--accent-text); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.01em; padding-right: .06em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--red); min-height: 1.2em; margin: .4rem 0 0; font-size: .9rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: var(--wrap); margin-inline: auto; }

/* Background: grid + warm glow like the website hero */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55rem 35rem at 78% 8%, rgba(255, 102, 0, .16), transparent 60%),
    radial-gradient(40rem 30rem at 0% 100%, rgba(255, 102, 0, .06), transparent 60%),
    var(--bg); }
.backdrop::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .35;
  mask-image: radial-gradient(70rem 40rem at 70% 0%, #000, transparent 75%); }

.glass { background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02)); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(14px); }

/* Type */
.tagline { display: inline-flex; align-items: center; gap: .65rem; padding: .55rem 1.1rem; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .03);
  font: 500 .72rem var(--font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.tagline i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.eyebrow { display: inline-flex; align-items: center; gap: .8rem; font: 500 .75rem var(--font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: var(--accent); opacity: .6; }
.h-hero { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1.02; margin: 1.4rem 0 1.2rem; }
.h-section { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.08; margin-top: .7rem; }
.h-display { font-size: 2.2rem; line-height: 1.1; }
.h-room { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; margin: .7rem 0 1rem; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 38rem; margin: 0; }
.lead b, .lead strong { color: var(--text); font-weight: 500; }

/* Buttons (website style: pill + arrow circle) */
.btn { --bg-btn: var(--accent-grad); --fg-btn: #fff;
  display: inline-flex; align-items: center; gap: .9rem; padding: .4rem .4rem .4rem 1.6rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--bg-btn); color: var(--fg-btn); font: 600 .95rem var(--font-display); letter-spacing: -.005em; white-space: nowrap;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), filter .3s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(255, 133, 51, .3), 0 14px 40px -12px rgba(255, 102, 0, .5); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.btn-ico { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); flex: none; overflow: hidden; }
.btn-ico svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.btn:hover .btn-ico svg { transform: rotate(45deg); }
.btn-ghost { --bg-btn: transparent; --fg-btn: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 30px -12px rgba(0, 0, 0, .6); background: rgba(255, 255, 255, .03); }
.btn-ghost .btn-ico { background: var(--text); color: #000; }
.btn-sm { padding: .65rem 1.2rem; font-size: .85rem; }
.btn-text { background: none; border: 0; color: var(--muted); font: 500 .9rem var(--font-display); cursor: pointer; padding: .4rem .2rem; transition: color .2s; }
.btn-text:hover { color: var(--text); }
.btn-pill { font: 500 .82rem var(--font-display); color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: .55rem 1rem; cursor: pointer; transition: background .2s, border-color .2s; }
.btn-pill:hover { background: var(--surface-2); }
.btn-pill.accent { background: var(--accent-grad); border-color: transparent; color: #fff; }

/* Inputs */
label { display: flex; flex-direction: column; gap: .45rem; font: 500 .8rem var(--font-display); color: var(--muted); letter-spacing: .02em; }
input, select, textarea { font: 400 .95rem var(--font-body); color: var(--text); background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: .8rem; padding: .8rem .95rem; width: 100%; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; min-height: 4.2rem; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(255, 102, 0, .6); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: min(420px, 100%); padding: 2.4rem 2rem; display: flex; flex-direction: column; gap: 1rem; align-items: stretch; box-shadow: 0 40px 100px rgba(0, 0, 0, .6); }
.auth-card > .auth-logo, .auth-card > .tagline, .auth-card > h1, .auth-card > p:not(.error) { align-self: center; text-align: center; margin: 0; }
.auth-card .btn { justify-content: space-between; margin-top: .3rem; }


/* Office floor: each agent at a desk */
.floor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; perspective: 1400px; }
.desk { --rx: 0deg; --ry: 0deg; --px: 0; --py: 0; --lift: 0px;
  position: relative; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; cursor: pointer; isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift)); transform-style: preserve-3d;
  transition: transform .6s var(--ease), border-color .3s, box-shadow .6s var(--ease); will-change: transform; }
.desk.tilting { transition: transform .12s linear, border-color .3s, box-shadow .6s var(--ease); }
.desk:hover { --lift: -6px; border-color: var(--line-2); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .04); }
/* Glare that follows the cursor */
.desk::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .4s;
  background: radial-gradient(28rem 20rem at var(--gx, 50%) var(--gy, 0%), rgba(255, 170, 110, .14), transparent 60%); }
.desk:hover::after { opacity: 1; }
.desk.picked { border-color: rgba(255, 102, 0, .6); box-shadow: 0 0 0 1px rgba(255, 102, 0, .3), 0 30px 80px -30px rgba(255, 102, 0, .55); }
.desk.is-working { border-color: rgba(255, 102, 0, .45); }
.desk.is-working::before { content: ""; position: absolute; inset: -1px; z-index: 4; border-radius: inherit; pointer-events: none; padding: 1px;
  background: conic-gradient(from var(--spin, 0deg), transparent 0 70%, #ff6600 85%, #ffb088 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: orbit 3.5s linear infinite; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes orbit { to { --spin: 360deg; } }

.scene { position: relative; aspect-ratio: 400 / 250; overflow: hidden; container-type: inline-size;
  background:
    radial-gradient(70% 60% at 55% 40%, rgba(255, 102, 0, .07), transparent 70%),
    linear-gradient(180deg, #0c0c0f 0%, #0a0a0c 70%, #0f0f12 70.5%, #08080a 100%); }
.scene .art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scene .art.back { transform: translate(calc(var(--px, 0) * -5px), calc(var(--py, 0) * -3px)); transition: transform .3s var(--ease); }
.scene .art.front { transform: translate(calc(var(--px, 0) * 7px), calc(var(--py, 0) * 4px)); transition: transform .3s var(--ease); }

/* Blurred city lights behind the desk */
.bokeh { position: absolute; inset: 0; transform: translate(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -6px)); transition: transform .3s var(--ease); }
.bokeh i { position: absolute; border-radius: 50%; filter: blur(6px); opacity: .5; animation: drift 9s ease-in-out infinite; }
.bokeh i:nth-child(1) { left: 6%; top: 8%; width: 7cqw; height: 7cqw; background: rgba(255, 102, 0, .35); }
.bokeh i:nth-child(2) { left: 22%; top: 2%; width: 4cqw; height: 4cqw; background: rgba(47, 134, 255, .35); animation-delay: -3s; }
.bokeh i:nth-child(3) { right: 4%; top: 4%; width: 9cqw; height: 9cqw; background: rgba(255, 133, 51, .25); animation-delay: -5s; }
.bokeh i:nth-child(4) { right: 18%; top: 18%; width: 3cqw; height: 3cqw; background: rgba(255, 176, 136, .45); animation-delay: -2s; }
.bokeh i:nth-child(5) { left: 40%; top: 0; width: 5cqw; height: 5cqw; background: rgba(47, 134, 255, .2); animation-delay: -6s; }
.bokeh i:nth-child(6) { left: 2%; top: 38%; width: 4cqw; height: 4cqw; background: rgba(255, 102, 0, .25); animation-delay: -1s; }
@keyframes drift { 50% { transform: translate(6px, -4px) scale(1.15); opacity: .7; } }

/* Lighting: dim when idle, glowing when working */
.screen-glow, .led-glow, .desk-spill, .rim { transition: opacity .8s var(--ease); }
.scene .screen-glow { opacity: .35; } .st-working .screen-glow { opacity: 1; animation: flicker 4s ease-in-out infinite; }
.scene .led-glow { opacity: .35; } .st-working .led-glow { opacity: 1; }
.scene .led { opacity: .55; } .st-working .led { opacity: 1; filter: drop-shadow(0 0 3px #ff6600); }
.scene .rim { opacity: .45; } .st-working .rim { opacity: 1; }
.scene .desk-spill { opacity: .1; } .st-working .desk-spill { opacity: .3; }
.cup-led { animation: blink 2.4s ease-in-out infinite; }
.st-working .keys-led { opacity: 1; animation: keys 1.4s linear infinite; stroke-dasharray: 6 10; }
@keyframes keys { to { stroke-dashoffset: -32; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 45% { opacity: .82; } 50% { opacity: .95; } }
.feed { animation: feed 9s linear infinite; }
@keyframes feed { to { transform: translateY(-108px); } }
.steam path { animation: steam 3s ease-in-out infinite; opacity: 0; }
.steam path:nth-child(2) { animation-delay: 1.2s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px); } 50% { opacity: .55; } 100% { opacity: 0; transform: translateY(-8px); } }
.lamp-glow { opacity: .25; transition: opacity .8s; } .st-working .lamp-glow { opacity: .75; }
.typing-arm { transform-box: view-box; transform-origin: 142px 214px; }
.scr-ticker { padding-left: 9cqw; }
.st-working .typing-arm { animation: tap .32s ease-in-out infinite alternate; }
@keyframes tap { to { transform: rotate(-2.2deg) translateY(-.6px); } }
.person { transform-box: view-box; transform-origin: 88px 250px; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.008) translateY(-.6px); } }

/* Main monitor screen (HTML) */
.screen { position: absolute; left: 29.75%; top: 10.8%; width: 49.5%; height: 48.8%; border-radius: 1.2cqw; overflow: hidden;
  display: flex; flex-direction: column; background: linear-gradient(180deg, #121216, #0b0b0e); font-family: var(--font-display);
  transform: translate(calc(var(--px, 0) * -5px), calc(var(--py, 0) * -3px)); transition: transform .3s var(--ease), filter .8s; }
.st-idle .screen, .st-next .screen { filter: saturate(.75) brightness(.85); }
.st-working .screen { box-shadow: 0 0 6cqw rgba(255, 102, 0, .35); }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .07), transparent 35%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .015) 0 1px, transparent 1px 3px); }
.scr-top { display: flex; align-items: center; gap: .6cqw; padding: 1cqw 1.4cqw; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 1.6cqw; color: var(--muted); letter-spacing: .04em; }
.scr-top i { width: 1cqw; height: 1cqw; border-radius: 50%; background: #3a3a42; }
.scr-top i:first-child { background: #ff5f57; } .scr-top i:nth-child(2) { background: #febc2e; } .scr-top i:nth-child(3) { background: #28c840; }
.scr-top span { margin-left: .6cqw; }
.scr-body { flex: 1; position: relative; padding: 1.4cqw; min-height: 0; }
.scr-ticker { display: flex; align-items: center; gap: .8cqw; padding: .9cqw 1.4cqw; font-size: 1.75cqw; color: var(--muted); border-top: 1px solid rgba(255, 255, 255, .06); background: rgba(0, 0, 0, .3); white-space: nowrap; overflow: hidden; }
.scr-ticker svg { width: 2cqw; height: 2cqw; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.st-working .scr-ticker { color: var(--accent-light); background: linear-gradient(90deg, rgba(255, 102, 0, .2), rgba(0, 0, 0, .3)); }
.scr-ticker .live { width: 1cqw; height: 1cqw; border-radius: 50%; background: var(--accent); box-shadow: 0 0 1.4cqw var(--accent); animation: blink 1s infinite; flex: none; }
.scr-ticker .idle { width: 1cqw; height: 1cqw; border-radius: 50%; background: var(--green); flex: none; }
.caret { width: .3cqw; height: 2cqw; background: var(--accent-light); animation: blink .8s steps(1) infinite; }
.st-idle .scr-ticker svg, .st-next .scr-ticker svg { color: var(--green); }
.st-next .scr-ticker svg { color: var(--accent-light); }

/* Floating stat above the monitor */
.holo { position: absolute; left: 33%; top: 3.2%; z-index: 2; display: inline-flex; align-items: center; gap: .8cqw; padding: .9cqw 1.6cqw;
  border-radius: 99px; font: 600 2cqw var(--font-display); color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, rgba(255, 133, 51, .95), rgba(255, 102, 0, .85)); box-shadow: 0 1cqw 4cqw rgba(255, 102, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
  transform: translate(calc(var(--px, 0) * 10px), calc(var(--py, 0) * 6px)); animation: holo 5s ease-in-out infinite; }
.holo svg { width: 2.2cqw; height: 2.2cqw; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-idle .holo, .st-next .holo { background: rgba(20, 20, 24, .85); color: var(--text); box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.st-idle .holo svg, .st-next .holo svg { color: var(--accent); }
@keyframes holo { 50% { translate: 0 -1.2cqw; } }

/* Mini apps on the screens */
.scr-body em { font-style: normal; }
.ui-roadmap { display: flex; flex-direction: column; justify-content: space-around; height: 100%; position: relative; }
.rm-row { display: grid; grid-template-columns: 8cqw 1fr; align-items: center; gap: 1cqw; font-size: 1.5cqw; color: var(--dim); }
.rm-row span { position: relative; height: 2.4cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .04); }
.rm-row span i { position: absolute; left: var(--l); width: var(--w); top: 0; bottom: 0; border-radius: 1cqw; background: linear-gradient(90deg, #ff6600, #ffb088);
  transform-origin: left; animation: grow 3.2s var(--ease) var(--d) infinite; }
.rm-now { position: absolute; top: 0; bottom: 0; left: 9cqw; width: 1px; background: #2f86ff; box-shadow: 0 0 1cqw #2f86ff; animation: now 6.4s linear infinite; }
@keyframes now { to { left: 100%; } }
@keyframes grow { 0% { transform: scaleX(0); } 40%, 85% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: .35; } }

.ui-kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1cqw; height: 100%; position: relative; }
.kb-col { display: flex; flex-direction: column; gap: .8cqw; padding: .8cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .03); font-size: 1.4cqw; color: var(--dim); }
.kb-col span { height: 3.6cqw; border-radius: .7cqw; background: #1e1e24; border-left: .4cqw solid #3a3a42; }
.kb-col:nth-child(3) span { border-left-color: #2f86ff; } .kb-col:nth-child(4) span { border-left-color: var(--green); }
.kb-move { position: absolute; left: 1cqw; top: 3.6cqw; width: 9.4cqw; height: 3.6cqw; border-radius: .7cqw; background: linear-gradient(90deg, #ff6600, #ff8533);
  box-shadow: 0 1cqw 2cqw rgba(255, 102, 0, .5); animation: move 6s var(--ease) infinite; }
@keyframes move { 0%, 12% { transform: none; } 30%, 42% { transform: translate(11.3cqw, 4.4cqw); } 60%, 72% { transform: translate(22.6cqw, 4.4cqw) rotate(-2deg); } 88%, 100% { transform: translate(33.9cqw, 0); } }

.ui-serp { display: flex; flex-direction: column; gap: 1.2cqw; }
.sr-bar { display: flex; align-items: center; gap: 1cqw; padding: .9cqw 1.4cqw; border-radius: 99px; background: #1c1c22; font-size: 1.6cqw; color: var(--text); overflow: hidden; }
.sr-bar i { width: 1.6cqw; height: 1.6cqw; border-radius: 50%; border: .35cqw solid var(--muted); flex: none; }
.sr-bar span { overflow: hidden; white-space: nowrap; border-right: .3cqw solid var(--accent); width: 0; animation: typing 5s steps(18) infinite; }
@keyframes typing { 0% { width: 0; } 40%, 90% { width: 18ch; } 100% { width: 0; } }
.sr-res { display: flex; align-items: center; gap: 1cqw; padding: .8cqw 1cqw; border-radius: 1cqw; }
.sr-res span { flex: 1; display: flex; flex-direction: column; gap: .7cqw; }
.sr-res b { height: 1.3cqw; width: 70%; border-radius: 1cqw; background: #6aa0ff; opacity: .7; }
.sr-res s { height: 1cqw; width: 90%; border-radius: 1cqw; background: #2a2a31; }
.sr-res.top { background: rgba(255, 102, 0, .1); box-shadow: inset 0 0 0 1px rgba(255, 102, 0, .35); animation: rise 5s var(--ease) infinite; }
.sr-res.top em { font-size: 1.8cqw; font-weight: 600; color: #fff; background: var(--accent-grad); padding: .4cqw .9cqw; border-radius: 99px; }
@keyframes rise { 0%, 30% { transform: translateY(8cqw); opacity: .4; } 55%, 100% { transform: none; opacity: 1; } }

.ui-ads { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.4cqw; height: 100%; }
.ad-card { display: flex; flex-direction: column; gap: .9cqw; padding: 1.2cqw; border-radius: 1.2cqw; background: #18181d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ad-card em { font-size: 1.3cqw; font-weight: 600; color: var(--text); }
.ad-card b { height: 1.6cqw; width: 90%; border-radius: 1cqw; background: #6aa0ff; }
.ad-card s { height: 1cqw; width: 100%; border-radius: 1cqw; background: #2a2a31; } .ad-card s.short { width: 60%; }
.ad-bars { display: flex; align-items: flex-end; gap: .8cqw; padding: 0 .4cqw; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ad-bars i { flex: 1; height: var(--h); border-radius: .6cqw .6cqw 0 0; background: linear-gradient(180deg, #ff8533, rgba(255, 102, 0, .25)); transform-origin: bottom; animation: bars 3.6s var(--ease) var(--d) infinite; }
@keyframes bars { 0% { transform: scaleY(.15); } 45%, 100% { transform: scaleY(1); } }

.ui-meta { display: grid; grid-template-columns: auto 1fr; gap: 2cqw; height: 100%; align-items: center; }
.mt-phone { position: relative; width: 13cqw; height: 100%; border-radius: 1.6cqw; background: #18181d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); padding: .9cqw; display: flex; flex-direction: column; gap: .7cqw; }
.mt-img { flex: 1; border-radius: 1cqw; background: linear-gradient(135deg, #ff8533, #c23d00 55%, #2f86ff); }
.mt-phone s { height: .9cqw; border-radius: 1cqw; background: #2a2a31; } .mt-phone s.short { width: 60%; }
.heart { position: absolute; right: -1cqw; bottom: 4cqw; width: 2.4cqw; height: 2.4cqw; background: #ff4d6d; opacity: 0;
  clip-path: path("M12 21 3.5 12.7A5 5 0 0 1 12 6a5 5 0 0 1 8.5 6.7z"); transform: scale(.1); animation: heart 2.4s ease-out var(--d) infinite; }
@supports not (clip-path: path("M0 0")) { .heart { border-radius: 50%; } }
@keyframes heart { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-2cqw, -12cqw) scale(1.1); } }
.mt-stats { display: flex; flex-direction: column; gap: 1.2cqw; font-size: 1.4cqw; color: var(--dim); }
.mt-stats span { display: flex; flex-direction: column; }
.mt-stats b { font-size: 2.8cqw; color: var(--text); line-height: 1.1; }
.mt-stats span:last-child b { color: var(--accent-light); }

.ui-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .7cqw; height: 100%; align-content: space-between; }
.ui-cal em { font-size: 1.3cqw; color: var(--dim); text-align: center; }
.ui-cal i { aspect-ratio: 1.5; border-radius: .7cqw; background: rgba(255, 255, 255, .04); }
.ui-cal i.post { background: rgba(255, 102, 0, .2); animation: pop 4s var(--ease) var(--d) infinite; }
@keyframes pop { 0%, 20% { background: rgba(255, 102, 0, .15); transform: scale(1); } 30% { background: #ff6600; transform: scale(1.15); box-shadow: 0 0 2cqw rgba(255, 102, 0, .6); } 45%, 100% { background: rgba(255, 102, 0, .55); transform: scale(1); } }

.ui-inbox { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.ib-row { display: flex; align-items: center; gap: 1.2cqw; padding: .7cqw 1cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .03); animation: slidein 3.6s var(--ease) var(--d) infinite; }
.ib-row > i { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: linear-gradient(135deg, #ff8533, #2f86ff); flex: none; }
.ib-row span { flex: 1; display: flex; flex-direction: column; gap: .6cqw; }
.ib-row b { height: 1.1cqw; width: 55%; border-radius: 1cqw; background: #4a4a54; }
.ib-row s { height: .9cqw; width: 85%; border-radius: 1cqw; background: #26262c; }
.ib-row em { font-size: 1.3cqw; font-weight: 600; padding: .3cqw .9cqw; border-radius: 99px; color: var(--green); background: rgba(61, 220, 132, .12); }
.ib-row:last-child em { color: #fff; background: var(--accent-grad); }
@keyframes slidein { 0% { transform: translateX(-6cqw); opacity: 0; } 25%, 100% { transform: none; opacity: 1; } }

.ui-chart { display: flex; flex-direction: column; gap: 1cqw; height: 100%; }
.ch-kpis { display: flex; gap: 2.4cqw; font-size: 1.3cqw; color: var(--dim); }
.ch-kpis span { display: flex; flex-direction: column; }
.ch-kpis b { font-size: 2.6cqw; color: var(--text); line-height: 1.1; }
.ch-kpis span:first-child b { color: var(--accent-light); }
.ui-chart svg { flex: 1; width: 100%; min-height: 0; }
.ui-chart .area { fill: rgba(255, 102, 0, .16); animation: fadearea 4s ease-in-out infinite; }
.ui-chart .line { fill: none; stroke: #ff8533; stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 4s var(--ease) infinite; filter: drop-shadow(0 0 2px #ff6600); }
@keyframes draw { 0% { stroke-dashoffset: 1; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes fadearea { 0%, 20% { opacity: 0; } 60%, 100% { opacity: 1; } }

.ui-radar { display: grid; grid-template-columns: auto 1fr; gap: 2cqw; align-items: center; height: 100%; }
.rd-dial { position: relative; height: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: repeating-radial-gradient(circle, transparent 0 3.4cqw, rgba(255, 102, 0, .22) 3.4cqw 3.55cqw), radial-gradient(circle, rgba(255, 102, 0, .08), transparent 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 102, 0, .35); }
.rd-dial::before, .rd-dial::after { content: ""; position: absolute; background: rgba(255, 102, 0, .2); }
.rd-dial::before { left: 50%; top: 0; bottom: 0; width: 1px; } .rd-dial::after { top: 50%; left: 0; right: 0; height: 1px; }
.sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255, 102, 0, .55), transparent 25%); animation: sweep 3s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.rd-dial b { position: absolute; width: 1.4cqw; height: 1.4cqw; margin: -.7cqw; border-radius: 50%; background: #ffb088; box-shadow: 0 0 1.6cqw #ff6600; animation: blip 3s ease-out var(--d) infinite; }
@keyframes blip { 0%, 100% { opacity: .2; transform: scale(.6); } 15% { opacity: 1; transform: scale(1.3); } }
.rd-list { display: flex; flex-direction: column; gap: 1.2cqw; font-size: 1.5cqw; color: var(--muted); }
.rd-list span { display: flex; align-items: center; gap: .8cqw; }
.rd-list i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: var(--accent); }
.rd-list span:nth-child(2) i { background: #2f86ff; } .rd-list span:nth-child(3) i { background: var(--green); }

.desk-status { position: absolute; top: .9rem; left: .9rem; display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem; border-radius: 999px;
  background: rgba(5, 5, 5, .7); border: 1px solid var(--line); backdrop-filter: blur(8px); font: 500 .72rem var(--font-display); color: var(--muted); max-width: calc(100% - 4.5rem); }
.desk-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }
.is-working .desk-status { color: var(--accent-light); }
.is-working .desk-status i { background: var(--accent); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.pick { position: absolute; top: .8rem; right: .8rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(5, 5, 5, .7); border: 1px solid var(--line-2); color: var(--text); backdrop-filter: blur(8px); transition: background .25s, border-color .25s, transform .25s var(--ease); }
.pick:hover { transform: scale(1.08); }
.pick svg { width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.picked .pick { background: var(--accent-grad); border-color: transparent; }

.plate { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .45rem; border-top: 1px solid var(--line); }
.plate-top { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.plate h3 { font-size: 1.35rem; }
.plate h3 small { font: italic 400 1rem var(--font-serif); color: var(--accent-light); margin-left: .35rem; letter-spacing: 0; }
.plate .reports-count { font: 500 .72rem var(--font-display); color: var(--dim); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.plate p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.plate .open { margin-top: .4rem; font: 600 .78rem var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--text); display: inline-flex; align-items: center; gap: .45rem; }
.plate .open svg { width: .8rem; height: .8rem; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .4s var(--ease); }
.desk:hover .open { color: var(--accent); }
.desk:hover .open svg { transform: translate(3px, -3px); }


/* ---------- App shell: left sidebar ---------- */
.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
body.locked { overflow: hidden; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.6rem; padding: 1.4rem 1rem 1rem;
  background: linear-gradient(180deg, rgba(14, 14, 16, .92), rgba(8, 8, 9, .96)); border-right: 1px solid var(--line); backdrop-filter: blur(18px); z-index: 20; }
.side-brand { display: flex; align-items: center; gap: .75rem; padding: 0 .55rem; }
.side-brand b { display: block; font: 600 1.15rem/1.05 var(--font-display); letter-spacing: -.01em; }
.side-brand small { display: block; font: 500 .64rem var(--font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: .25rem; }
.side-nav a { position: relative; display: flex; align-items: center; gap: .85rem; padding: .78rem .9rem; border-radius: .9rem; color: var(--muted);
  font: 500 .95rem var(--font-display); transition: background .25s, color .25s; }
.side-nav a svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-nav a:hover { color: var(--text); background: var(--surface); }
.side-nav a.on { color: var(--text); background: linear-gradient(90deg, rgba(255, 102, 0, .16), rgba(255, 102, 0, .03)); box-shadow: inset 0 0 0 1px rgba(255, 102, 0, .2); }
.side-nav a.on svg { color: var(--accent); }
.side-nav a.on::before { content: ""; position: absolute; left: -1rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-grad); box-shadow: 0 0 12px var(--accent); }
.badge { margin-left: auto; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: 99px; display: grid; place-items: center; font: 600 .72rem var(--font-display); color: #fff; background: var(--accent-grad); box-shadow: 0 0 14px rgba(255, 102, 0, .5); }
.badge.live { min-width: .55rem; width: .55rem; height: .55rem; padding: 0; animation: blink 1.2s infinite; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .8rem; }
.worker-card { display: flex; align-items: center; gap: .75rem; padding: .85rem; border-radius: 1rem; border: 1px solid var(--line); background: var(--surface); }
.worker-card b { display: block; font: 600 .88rem var(--font-display); }
.worker-card small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.wc-ico { position: relative; width: 2.3rem; height: 2.3rem; border-radius: .75rem; display: grid; place-items: center; background: rgba(255, 90, 90, .12); color: var(--red); flex: none; }
.wc-ico svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; }
.wc-ico.on { background: rgba(61, 220, 132, .12); color: var(--green); }
.wc-ico.on::after { content: ""; position: absolute; inset: -3px; border-radius: .9rem; border: 1px solid rgba(61, 220, 132, .5); animation: ping 2s ease-out infinite; }
@keyframes ping { to { transform: scale(1.25); opacity: 0; } }
.me { display: flex; align-items: center; gap: .7rem; padding: .4rem .3rem; }
.me-avatar { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); font: 600 .85rem var(--font-display); color: #fff; flex: none; }
.me-name { flex: 1; min-width: 0; }
.me-name b { display: block; font: 600 .88rem var(--font-display); overflow: hidden; text-overflow: ellipsis; }
.me-name small { color: var(--dim); font-size: .72rem; }
.icon-btn { width: 2.3rem; height: 2.3rem; border-radius: .75rem; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: color .2s, background .2s; flex: none; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.scrim { display: none; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; padding: 1.1rem clamp(1rem, 3vw, 2.5rem);
  background: rgba(5, 5, 5, .7); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.1; margin-top: .2rem; }
.topbar-actions { display: flex; align-items: center; gap: .8rem; }
.menu-btn { display: none; }
.page { padding: clamp(1.2rem, 3vw, 2.5rem); max-width: 1500px; animation: fade .45s var(--ease); }
.page-intro { margin: 0 0 1.6rem; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.page-actions p { margin: 0; }
.label { display: block; font: 500 .8rem var(--font-display); color: var(--muted); margin: 1rem 0 .55rem; letter-spacing: .02em; }
.loading { display: grid; place-items: center; padding: 5rem 0; }
.spinner { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 1s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); margin: 0; font-size: .92rem; }
.big-empty { grid-column: 1 / -1; padding: 3rem; }
.note { margin: 1.2rem 0 0; }
.avatar { width: 1.9rem; height: 1.9rem; border-radius: 50%; overflow: hidden; background: #1a1a1e; flex: none; display: block; }
.avatar svg { width: 100%; height: 100%; display: block; }
.status-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .5rem .95rem; border: 1px solid var(--line-2); border-radius: 999px; font: 500 .8rem var(--font-display); color: var(--muted); white-space: nowrap; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status-chip.off i { background: var(--red); }
.status-chip.on i { background: var(--green); box-shadow: 0 0 0 4px rgba(61, 220, 132, .15); }

/* ---------- Panels, KPIs ---------- */
.panel { background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015)); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.panel-head h3 { font-size: 1.2rem; margin-top: .35rem; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.4rem; }
.kpi { position: relative; padding: 1.1rem 1.15rem; border-radius: 1.2rem; overflow: hidden; display: flex; flex-direction: column; }
.kpi::after { content: ""; position: absolute; right: -30%; top: -60%; width: 90%; height: 120%; background: radial-gradient(circle, rgba(255, 102, 0, .12), transparent 65%); pointer-events: none; }
.kpi i { width: 2.2rem; height: 2.2rem; border-radius: .7rem; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: .9rem; }
.kpi i svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kpi b { font: 600 1.85rem/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi span { margin-top: .45rem; font: 500 .82rem var(--font-display); }
.kpi small { color: var(--dim); font-size: .74rem; }
.kpi.hot { border-color: rgba(255, 102, 0, .45); box-shadow: 0 0 40px -15px rgba(255, 102, 0, .6); }
.kpi.hot b { background: var(--accent-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Dashboard ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.h-hello { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.02; }
.hello .lead { margin-top: .7rem; }
.dash-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.2rem; }
.live-panel { grid-column: 1 / -1; position: relative; overflow: hidden; }
.live-panel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 90% at 50% 0%, rgba(255, 102, 0, .1), transparent 70%); pointer-events: none; }
.live-sub { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: 1.2rem; font-size: .9rem; color: var(--muted); }
.live-sub b { color: var(--text); }
.quiet { text-align: center; padding: 1rem 0 .4rem; }
.quiet-faces { display: flex; justify-content: center; margin-bottom: 1rem; }
.quiet-faces .avatar { width: 2.6rem; height: 2.6rem; margin: 0 -.35rem; box-shadow: 0 0 0 3px var(--bg-2); animation: bob 3s ease-in-out infinite; }
.quiet-faces .avatar:nth-child(odd) { animation-delay: -1.5s; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.quiet p { max-width: 30rem; margin: 0 auto 1.2rem; }
.card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.office-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.office-list li { display: flex; align-items: center; gap: .75rem; padding: .5rem .55rem; border-radius: .8rem; }
.office-list li.working { background: linear-gradient(90deg, rgba(255, 102, 0, .12), transparent); }
.office-list .avatar { width: 2.1rem; height: 2.1rem; }
.office-list li.working .avatar { box-shadow: 0 0 0 2px var(--accent), 0 0 14px rgba(255, 102, 0, .6); }
.office-list span { flex: 1; min-width: 0; }
.office-list b { display: block; font: 600 .9rem var(--font-display); }
.office-list small { color: var(--dim); font-size: .76rem; }
.office-list em { font-style: normal; font-size: .76rem; color: var(--muted); text-align: right; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.office-list li.working em { color: var(--accent-light); }
.office-list li.idle em::before { content: "● "; color: var(--green); }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: grid; grid-template-columns: .6rem 1fr auto; align-items: baseline; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.feed li:last-child { border-bottom: 0; }
.feed li b { color: var(--text); font-weight: 500; }
.feed li i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--dim); }
.feed li i.review { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.feed li i.ok { background: var(--green); } .feed li i.bad { background: var(--red); } .feed li i.loop { background: var(--blue); }
.feed small { color: var(--dim); font-size: .76rem; white-space: nowrap; }

/* ---------- Relay track ---------- */
.relay { position: relative; display: flex; align-items: flex-start; overflow-x: auto; padding: .6rem .2rem 1rem; scrollbar-width: thin; }
.rt-node { flex: none; width: 5.6rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; }
.rt-face { position: relative; width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; transition: transform .4s var(--ease); }
.rt-face .avatar { width: 100%; height: 100%; box-shadow: 0 0 0 2px var(--line-2); }
.rt-node b { font: 600 .82rem var(--font-display); }
.rt-node small { font-size: .7rem; color: var(--dim); line-height: 1.2; }
.rt-node.st-done .rt-face .avatar { box-shadow: 0 0 0 2px var(--green); }
.rt-node.st-done .rt-face::after { content: "✓"; position: absolute; right: -.15rem; bottom: -.15rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; display: grid; place-items: center; font-size: .62rem; font-weight: 700; color: #04120a; background: var(--green); }
.rt-node.st-done small { color: var(--green); }
.rt-node.st-failed .rt-face .avatar { box-shadow: 0 0 0 2px var(--red); }
.rt-node.st-running .rt-face { transform: scale(1.12); }
.rt-node.st-running .rt-face .avatar { box-shadow: 0 0 0 2px var(--accent), 0 0 22px rgba(255, 102, 0, .7); }
.rt-node.st-running .rt-face::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); border-right-color: rgba(255, 176, 136, .6); animation: spin 1.1s linear infinite; }
.rt-node.st-running small { color: var(--accent-light); }
.rt-node.st-waiting { opacity: .55; }
.rt-node.you.st-running .rt-face .avatar { box-shadow: 0 0 0 2px var(--accent), 0 0 26px rgba(255, 102, 0, .8); }
.rt-link { flex: 1 0 1.6rem; position: relative; height: 2px; margin-top: 1.5rem; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.rt-link i { position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: var(--green); transition: transform .8s var(--ease); }
.rt-link.done i { transform: none; }
.rt-link.active i { transform: none; background: linear-gradient(90deg, transparent, #ff6600 40%, #ffb088 60%, transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: baton 1.2s linear infinite; }
.rt-link.active { background: rgba(255, 102, 0, .25); box-shadow: 0 0 10px rgba(255, 102, 0, .5); }
@keyframes baton { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.relay.big .rt-node { width: 6.6rem; }
.relay.big .rt-face { width: 3.8rem; height: 3.8rem; }
.relay.big .rt-link { margin-top: 1.9rem; }
.me-face { display: grid !important; place-items: center; background: var(--accent-grad) !important; color: #fff; font: 600 .9rem var(--font-display); }
.avatar.bp { display: grid; place-items: center; background: #1a120c; box-shadow: inset 0 0 0 1px rgba(255, 102, 0, .4); }
.avatar.bp img { width: 62%; height: 62%; }

/* Quality-loop chips */
.loop-chips { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.lc { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .65rem; border-radius: 99px; font: 600 .74rem var(--font-display); background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.lc.done { color: var(--text); }
.lc.review.done { color: var(--accent-light); border-color: rgba(255, 102, 0, .35); }
.lc.pass { color: var(--green); border-color: rgba(61, 220, 132, .4); background: rgba(61, 220, 132, .08); }
.lc.running { color: #fff; background: var(--accent-grad); border-color: transparent; box-shadow: 0 0 16px rgba(255, 102, 0, .5); }
.lc .spin { width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite; }
.lc-arrow { width: .8rem; height: 1px; background: var(--line-2); }
.loop-panel { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1rem; padding: .9rem 1.1rem; border-radius: 1rem; margin: .4rem 0 .6rem; }
.loop-panel .eyebrow { gap: .5rem; } .loop-panel .eyebrow::before { display: none; }
.loop-panel .eyebrow svg { width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 2; }
.loop-panel details { flex-basis: 100%; }
.loop-panel summary { cursor: pointer; font: 500 .82rem var(--font-display); color: var(--muted); }
.loop-panel ul { margin: .3rem 0 .4rem; padding-left: 1.2rem; color: var(--muted); }
.loop-panel p { margin: .6rem 0 0; color: var(--muted); }

/* ---------- Task cards and board ---------- */
.tcard { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 1rem 1.05rem; display: flex; flex-direction: column; gap: .8rem; border-radius: 1.1rem;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; }
.tcard:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .9); }
.tc-top { display: flex; align-items: center; gap: .75rem; }
.tc-name { flex: 1; min-width: 0; }
.tc-name b { display: block; font: 600 1rem var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-name small { color: var(--dim); font-size: .78rem; }
.mono { width: 2.3rem; height: 2.3rem; border-radius: .75rem; display: grid; place-items: center; flex: none; font: 600 .82rem var(--font-display); color: #fff;
  background: linear-gradient(135deg, #2a2a30, #17171b); box-shadow: inset 0 0 0 1px var(--line-2); }
.mono.big { width: 3rem; height: 3rem; border-radius: .95rem; font-size: 1rem; background: var(--accent-grad); box-shadow: 0 10px 30px -10px rgba(255, 102, 0, .6); }
.chain { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem; }
.chain .avatar { width: 1.75rem; height: 1.75rem; }
.chev { width: .55rem; height: .55rem; border-top: 1.5px solid var(--dim); border-right: 1.5px solid var(--dim); transform: rotate(45deg); margin: 0 .2rem 0 .05rem; }
.chain .more { font-size: .78rem; color: var(--muted); margin-left: .3rem; }
.tc-meta { display: flex; gap: .9rem; font-size: .76rem; color: var(--dim); flex-wrap: wrap; }
.tc-meta .qa { color: var(--accent-light); }
.bar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent-grad); transition: width .6s var(--ease); box-shadow: 0 0 8px var(--accent); }
.status { font: 600 .68rem var(--font-display); letter-spacing: .06em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 999px; white-space: nowrap; flex: none; }
.status.queued { background: rgba(255, 255, 255, .06); color: var(--muted); }
.status.running { background: var(--accent-soft); color: var(--accent-light); }
.status.review { background: var(--accent-grad); color: #fff; box-shadow: 0 0 16px rgba(255, 102, 0, .45); }
.status.approved { background: rgba(61, 220, 132, .12); color: var(--green); }
.status.failed, .status.cancelled { background: rgba(255, 90, 90, .12); color: var(--red); }

.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 1rem; align-items: start; overflow-x: auto; padding-bottom: .5rem; }
.col { border-radius: var(--r); background: rgba(255, 255, 255, .02); border: 1px solid var(--line); min-height: 60vh; }
.col header { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); font-family: var(--font-display); }
.col header .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--dim); }
.col-running header .dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 1.2s infinite; }
.col-review header .dot { background: var(--accent-light); }
.col-approved header .dot { background: var(--green); }
.col header .count { margin-left: auto; font-size: .8rem; color: var(--muted); background: var(--surface-2); padding: .1rem .55rem; border-radius: 99px; }
.col-review { border-color: rgba(255, 102, 0, .3); background: linear-gradient(180deg, rgba(255, 102, 0, .06), transparent 40%); }
.col-body { display: flex; flex-direction: column; gap: .7rem; padding: .8rem; }
.col-body .tc-top .status { display: none; }
.col-queued .col-body .tc-top .status.failed, .col-queued .col-body .tc-top .status.cancelled { display: inline-block; }

/* ---------- Clients ---------- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.client { padding: 1.3rem; display: flex; flex-direction: column; gap: 1rem; transition: border-color .3s, transform .4s var(--ease); }
.client:hover { border-color: var(--line-2); transform: translateY(-2px); }
.client header { display: flex; align-items: center; gap: .9rem; }
.client h3 { font-size: 1.2rem; }
.client header small { color: var(--muted); font-size: .82rem; }
.client dl { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 0; }
.client dl div { padding: .6rem .75rem; border-radius: .8rem; background: var(--surface); }
.client dt { font-size: .7rem; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.client dd { margin: .15rem 0 0; font: 500 .9rem var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-tasks { display: flex; flex-direction: column; gap: .35rem; }
.mini-task { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .7rem; border-radius: .7rem; border: 1px solid var(--line); background: transparent; color: var(--text); font: 500 .85rem var(--font-display); cursor: pointer; text-align: left; }
.mini-task:hover { background: var(--surface); }
.mini-task span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }

/* ---------- Usage ---------- */
.usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.span-all { grid-column: 1 / -1; }
.days { display: flex; align-items: flex-end; gap: .4rem; height: 200px; padding-top: 1rem; }
.day { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .4rem; }
.day span { width: 100%; max-width: 28px; border-radius: .45rem .45rem .15rem .15rem; background: linear-gradient(180deg, #ff8533, rgba(255, 102, 0, .2)); box-shadow: 0 0 18px -6px rgba(255, 102, 0, .6); animation: rise-bar .9s var(--ease) both; transform-origin: bottom; }
@keyframes rise-bar { from { transform: scaleY(0); } }
.day small { font-size: .68rem; color: var(--dim); }
.legend { display: flex; align-items: center; gap: .4rem; font-size: .74rem; color: var(--muted); }
.legend i { width: .65rem; height: .65rem; border-radius: 3px; margin-left: .4rem; }
.k-draft { background: var(--accent); } .k-review { background: var(--blue); } .k-refine { background: var(--accent-light); }
.agent-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.agent-bars li { display: grid; grid-template-columns: 1.9rem 4.8rem 1fr 3.5rem; align-items: center; gap: .7rem; }
.agent-bars .avatar { width: 1.9rem; height: 1.9rem; }
.ab-name { font: 500 .85rem var(--font-display); }
.ab-bar { display: flex; height: .6rem; width: var(--w); border-radius: 99px; overflow: hidden; background: var(--surface-2); animation: grow-w .9s var(--ease) both; transform-origin: left; }
@keyframes grow-w { from { transform: scaleX(0); } }
.agent-bars b { font: 600 .85rem var(--font-display); text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font: 500 .74rem var(--font-display); color: var(--dim); letter-spacing: .1em; text-transform: uppercase; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.table td { padding: .8rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table tbody tr { cursor: pointer; transition: background .2s; }
.table tbody tr:hover { background: var(--surface); }

/* ---------- Settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 1.2rem; align-items: start; }
.settings-grid .panel { display: flex; flex-direction: column; gap: .8rem; }
.settings-grid .panel .panel-head { margin-bottom: .2rem; }
.settings-grid .panel p { margin: 0; }
.choices { display: flex; flex-direction: column; gap: .5rem; }
.choice { flex-direction: row; align-items: center; gap: .85rem; padding: .85rem 1rem; border-radius: .9rem; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s; }
.choice:has(input:checked) { border-color: rgba(255, 102, 0, .55); background: rgba(255, 102, 0, .08); }
.choice input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); flex: none; }
.choice b { display: block; color: var(--text); font-size: .95rem; }
.choice small { color: var(--muted); font: 400 .8rem var(--font-body); }
.seg { display: inline-flex; padding: .3rem; gap: .3rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.seg button { min-width: 3.2rem; padding: .5rem .9rem; border-radius: 99px; border: 0; background: transparent; color: var(--muted); font: 600 .88rem var(--font-display); cursor: pointer; }
.seg button.on { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 20px -6px rgba(255, 102, 0, .7); }
input[type=range] { padding: 0; accent-color: var(--accent); background: transparent; border: 0; }
.cmd { display: block; padding: .8rem 1rem; border-radius: .8rem; background: #000; border: 1px solid var(--line); font: .82rem ui-monospace, Menlo, monospace; color: var(--accent-light); overflow-x: auto; white-space: nowrap; }
.settings-grid .btn { align-self: flex-start; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1.2rem; background: rgba(0, 0, 0, .62); backdrop-filter: blur(10px); animation: fade .3s var(--ease); }
.modal-card { width: min(720px, 100%); max-height: calc(100vh - 2.4rem); overflow: auto; border-radius: 1.6rem; background: #0d0d10; box-shadow: 0 50px 120px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); }
.modal-card.wide { width: min(1080px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.4rem 1.6rem 1.1rem; background: rgba(13, 13, 16, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.8rem; margin-top: .3rem; }
.modal-body { padding: 1.4rem 1.6rem; }
.modal-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.6rem 1.3rem; background: rgba(13, 13, 16, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-card > .error { padding: 0 1.6rem; }
.btn-text.danger { color: var(--red); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.span-2 { grid-column: span 2; }
.row-input { display: flex; gap: .5rem; }
.row-input select { flex: 1; }
.task-builder { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.6rem; }
.tb-left { display: flex; flex-direction: column; gap: 1rem; }
.tb-left .label, .tb-right .label { margin-top: 0; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.preset { text-align: left; padding: .7rem .85rem; border-radius: .85rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; }
.preset:hover { border-color: rgba(255, 102, 0, .5); background: rgba(255, 102, 0, .06); }
.preset b { display: block; font: 600 .86rem var(--font-display); }
.preset small { color: var(--dim); font-size: .74rem; }
.palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pal { position: relative; display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: .9rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; transition: border-color .2s, background .2s, transform .2s; }
.pal:hover { border-color: var(--line-2); transform: translateY(-1px); }
.pal .avatar { width: 2.1rem; height: 2.1rem; }
.pal b { display: block; font: 600 .86rem var(--font-display); }
.pal small { display: block; color: var(--dim); font-size: .7rem; line-height: 1.2; }
.pal.in { border-color: rgba(255, 102, 0, .6); background: rgba(255, 102, 0, .1); }
.pal em { position: absolute; top: -.45rem; right: -.45rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center; font: 600 .72rem var(--font-display); font-style: normal; color: #fff; background: var(--accent-grad); box-shadow: 0 0 12px rgba(255, 102, 0, .6); }
.relay-build { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .2rem; margin-top: 1rem; padding: 1rem; border-radius: 1rem; border: 1px dashed var(--line-2); background: rgba(0, 0, 0, .25); min-height: 6rem; }
.rb-node { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .5rem .45rem .35rem; border-radius: .8rem; background: var(--surface-2); min-width: 4.6rem; animation: fade .3s var(--ease); }
.rb-node .avatar { width: 2.1rem; height: 2.1rem; }
.rb-node b { font: 600 .74rem var(--font-display); white-space: nowrap; }
.rb-node.you { background: transparent; }
.rb-tools { display: flex; gap: .15rem; }
.rb-tools button { width: 1.3rem; height: 1.3rem; border-radius: .4rem; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .9rem; line-height: 1; }
.rb-tools button:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.rb-tools button:disabled { opacity: .25; cursor: default; }
.rb-arrow { width: 1.2rem; height: 2px; background: linear-gradient(90deg, var(--line-2), var(--accent)); border-radius: 2px; }
.rb-empty { margin: 0; width: 100%; text-align: center; color: var(--dim); font-size: .88rem; }

/* ---------- Overlays: agent room, task detail ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; overflow: auto; background: var(--bg); animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
#viewer { z-index: 40; }
.overlay-inner { width: min(1320px, 100% - clamp(2rem, 6vw, 6rem)); margin: 0 auto; padding-bottom: 4rem; }
.overlay-inner.narrow { width: min(1040px, 100% - 2rem); }
#viewer.has-review .overlay-inner { padding-bottom: 12rem; }
.overlay-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 1rem; padding: 1rem 0; background: rgba(5, 5, 5, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.room { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: 2.5rem 0 2rem; }
.room-scene .scene { border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; }
.room-stats { display: flex; gap: .8rem; margin-top: 1.4rem; flex-wrap: wrap; }
.room-stats span { display: flex; flex-direction: column; padding: .7rem 1rem; border-radius: .9rem; background: var(--surface); border: 1px solid var(--line); font-size: .74rem; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.room-stats b { font: 600 1.4rem var(--font-display); color: var(--text); letter-spacing: -.02em; text-transform: none; }
.room-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.room-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; }
.card-pad { padding: 1.6rem; }
.deliver { margin: 1.1rem 0 0; padding: 0; list-style: none; counter-reset: d; display: flex; flex-direction: column; gap: .7rem; }
.deliver li { counter-increment: d; display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; color: var(--text); font-size: .95rem; }
.deliver li::before { content: counter(d, decimal-leading-zero); font: 600 .8rem/1.9 var(--font-display); color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.tag { font: 500 .78rem var(--font-display); padding: .35rem .75rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.mt { margin-top: 1.6rem; }
.plain-list { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; color: var(--muted); font-size: .92rem; }
.plain-list li::before { content: "→"; color: var(--accent); margin-right: .55rem; }
.room-reports { margin-top: 2.5rem; }
.room-reports .card-list { margin-top: 1.1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

.viewer-title { flex: 1; min-width: 10rem; display: flex; align-items: center; gap: .8rem; }
.viewer-title h2 { font-size: 1.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-actions { display: flex; gap: .5rem; position: relative; flex-wrap: wrap; }
.menu { position: absolute; right: 0; top: calc(100% + .5rem); padding: .4rem; display: flex; flex-direction: column; min-width: 13rem; border-radius: 1rem; background: #111113; box-shadow: 0 30px 60px rgba(0, 0, 0, .6); z-index: 5; }
.menu button { font: 500 .88rem var(--font-display); color: var(--text); background: none; border: 0; text-align: left; padding: .65rem .9rem; border-radius: .6rem; cursor: pointer; }
.menu button:hover { background: var(--surface-2); }
.menu .danger { color: var(--red); }
#vRelay { margin-top: 1.2rem; padding: 1rem 1.2rem .4rem; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 102, 0, .05), transparent); }
.banner { display: flex; align-items: center; gap: .8rem; margin-top: .8rem; padding: .85rem 1.1rem; border-radius: 1rem; background: rgba(47, 134, 255, .08); border: 1px solid rgba(47, 134, 255, .3); font-size: .92rem; color: #cfe0ff; }
.banner svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.banner.ok { background: rgba(61, 220, 132, .08); border-color: rgba(61, 220, 132, .35); color: #c9f5dc; }
.banner.bad { background: rgba(255, 90, 90, .08); border-color: rgba(255, 90, 90, .35); color: #ffd0d0; }
.tabs { display: flex; gap: .5rem; overflow-x: auto; padding: 1.1rem 0 .5rem; scrollbar-width: thin; }
.tab { font: 500 .85rem var(--font-display); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .85rem .3rem .3rem;
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: .55rem; transition: background .2s, color .2s; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: #fff; background: var(--accent-grad); border-color: transparent; }
.tab .avatar { width: 1.7rem; height: 1.7rem; }
.tab .score { font-style: normal; font: 600 .7rem var(--font-display); padding: .12rem .45rem; border-radius: 99px; background: rgba(61, 220, 132, .14); color: var(--green); }
.tab[aria-selected="true"] .score { background: rgba(0, 0, 0, .25); color: #fff; }
.tab .dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--dim); }
.tab[aria-selected="true"] .dot { background: rgba(255, 255, 255, .6); }
.tab .dot.st-done { background: var(--green); }
.tab .dot.st-running { background: var(--accent); animation: blink 1.2s ease-in-out infinite; }
.tab .dot.st-failed { background: var(--red); }
.brief-box { margin: .6rem 0 .3rem; border-radius: 1rem; padding: .9rem 1.2rem; }
.brief-box summary { cursor: pointer; font: 600 .9rem var(--font-display); }
.brief-box dl { display: grid; grid-template-columns: 11rem 1fr; gap: .45rem 1rem; margin: 1rem 0 .3rem; font-size: .9rem; }
.brief-box dt { color: var(--muted); }
.brief-box dd { margin: 0; white-space: pre-wrap; }
.byline { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 0; font: 500 .78rem var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.byline .avatar { width: 2rem; height: 2rem; }

.report { padding-top: .4rem; font-size: 1rem; line-height: 1.75; color: #dcdcd8; }
.report h1, .report h2, .report h3 { line-height: 1.25; margin: 1.8em 0 .6em; color: var(--text); }
.report h1 { font-size: 2rem; }
.report h2 { font-size: 1.5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.report .byline + h2 { margin-top: .8em; }
.report h3 { font-size: 1.15rem; color: var(--accent-light); }
.report a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }
.report strong { color: var(--text); font-weight: 600; }
.report blockquote { margin: 1.2em 0; padding: .9rem 1.2rem; border-left: 2px solid var(--accent); background: var(--surface); border-radius: 0 .8rem .8rem 0; }
.report code { background: var(--surface-2); padding: .1rem .4rem; border-radius: .35rem; font-size: .9em; }
.report table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .9rem; display: block; overflow-x: auto; }
.report th, .report td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.report th { background: var(--surface-2); color: var(--accent-light); font: 600 .82rem var(--font-display); letter-spacing: .02em; }
.report hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.report li { margin: .3em 0; }
.report li::marker { color: var(--accent); }
.waiting { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.waiting .scene { max-width: 520px; margin: 0 auto 1.5rem; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; }

/* Review bar */
.review-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 1rem; pointer-events: none; animation: slideup .5s var(--ease); }
@keyframes slideup { from { transform: translateY(100%); } }
.review-inner { pointer-events: auto; width: min(1040px, 100%); margin: 0 auto; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding: 1rem 1.2rem;
  border-radius: 1.4rem; background: rgba(18, 14, 12, .92); backdrop-filter: blur(16px); border: 1px solid rgba(255, 102, 0, .45);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 60px -20px rgba(255, 102, 0, .6); }
.review-copy { flex: 1; min-width: 14rem; }
.review-copy p { margin: .3rem 0 0; font-size: .9rem; color: var(--muted); }
.review-form { flex-basis: 100%; order: 3; }
.review-actions { display: flex; gap: .6rem; }
.btn.approve { --bg-btn: linear-gradient(135deg, #3ddc84, #1fae62); }
.btn.approve:hover { box-shadow: 0 0 40px rgba(61, 220, 132, .35), 0 14px 40px -12px rgba(61, 220, 132, .5); }

.confetti { position: fixed; left: 50%; top: 70%; z-index: 80; pointer-events: none; }
.confetti i { position: absolute; width: .55rem; height: .9rem; border-radius: 2px; animation: burst 1.5s cubic-bezier(.2, .7, .3, 1) var(--d) both; }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 60vh)) rotate(var(--r)); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; z-index: 90;
  background: #151517; border: 1px solid var(--line-2); padding: .7rem 1.2rem; border-radius: 999px; font: 500 .9rem var(--font-display); transition: opacity .3s, transform .3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.print-area { display: none; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .floor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-102%); transition: transform .45s var(--ease); }
  body.nav-open .side { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, .6); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); }
  .menu-btn { display: grid; }
  .dash-grid, .usage-grid, .room, .room-grid, .task-builder { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(4, minmax(260px, 82vw)); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; min-height: 40vh; }
}
@media (max-width: 720px) {
  .topbar { padding: .8rem 1rem; }
  .topbar .status-chip { display: none; }
  .topbar .btn span { display: none; }
  .topbar .btn { padding-left: .4rem; }
  .kpis { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .kpi b { font-size: 1.5rem; }
  .floor { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .desk { border-radius: 1.1rem; }
  .desk-status { top: .45rem; left: .45rem; padding: .3rem; }
  .desk-status span, .plate p, .plate .open, .plate .reports-count { display: none; }
  .plate { padding: .7rem .8rem .85rem; gap: 0; }
  .plate h3 { font-size: 1.05rem; }
  .plate h3 small { display: block; margin: .1rem 0 0; font-size: .8rem; line-height: 1.25; }
  .form-grid, .presets { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .palette { grid-template-columns: 1fr 1fr; }
  .brief-box dl { grid-template-columns: 1fr; }
  .viewer-actions { width: 100%; }
  .viewer-actions .btn-pill { flex: 1; }
  .modal { padding: 0; place-items: end stretch; }
  .modal-card, .modal-card.wide { width: 100%; max-height: 92vh; border-radius: 1.4rem 1.4rem 0 0; }
  .modal-head, .modal-body, .modal-foot { padding-left: 1.1rem; padding-right: 1.1rem; }
  .agent-bars li { grid-template-columns: 1.9rem 1fr 3.2rem; }
  .ab-name { display: none; }
  .review-actions { width: 100%; } .review-actions .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Print: branded report only */
@media print {
  @page { margin: 14mm; }
  body { background: var(--bg) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .backdrop, #auth, #app, .overlay, .modal, .review-bar, .toast { display: none !important; }
  .print-area { display: block; color: var(--text); }
  .print-cover { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--accent); margin-bottom: .5rem; }
  .print-cover h1 { font-size: 1.8rem; }
  .print-cover p { margin: .2rem 0 0; color: var(--muted); font-size: .85rem; }
  .print-section { break-before: page; }
  .print-section:first-of-type { break-before: auto; }
  .report table { display: table; }
  .report h2, .report h3 { break-after: avoid; }
  .report tr, .report blockquote { break-inside: avoid; }
  .print-foot { margin-top: 2rem; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .7rem; }
}
.banner .btn-pill { margin-left: auto; }
.tc-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
