/*
 * Profix Consulting — Technical Assistance Centre (demo)
 *
 * Design tokens lifted verbatim from tac.zenoa.nz's globals.css so the demo
 * reads as the same product: same near-black ground, same blue accent, same
 * Space Grotesk / Plus Jakarta Sans pairing, same radial-glow-over-42px-grid
 * body treatment. Only the brand name and copy change.
 *
 * Hand-written CSS rather than the real app's Tailwind build: this is a
 * presentation asset that has to be reliable in front of a customer, so it
 * carries no build step and no runtime that can fall over mid-demo.
 */

:root {
  --bg: #050810;
  --surface: #0b1220;
  --surface-raised: #0f1729;
  --border: rgba(240, 244, 248, 0.08);
  --border-strong: rgba(240, 244, 248, 0.16);
  --text: #f0f4f8;
  --muted: #8b98a8;
  --accent: #3b82f6;
  --purple: #2563eb;
  --purple-light: #60a5fa;
  --green: #10b981;
  --green-light: #34d399;
  --rose: #fb7185;
  --amber: #fbbf24;
  --violet: #8b5cf6;
  --amber-warm: #d97706;

  /* Profix brand, sampled from the real logo. The wordmark is white with a
     teal flash and was drawn for dark grounds, so it needs no alteration to
     sit on TAC's near-black. The teal is registered here as a secondary
     accent and used for brand moments only -- TAC's blue stays primary, so
     the demo still reads as the same product. */
  --brand-teal: #2ab7c9;
  --brand-navy: #062050;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius: 14px;
  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.1), transparent 55%),
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

/* ---------------------------------------------------------------- shell -- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: 22px; padding-right: 22px; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 8, 16, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .inner { display: flex; align-items: center; gap: 18px; height: 62px; }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.brand .logo {
  height: 26px; width: auto; display: block; flex: none;
  /* The asset is 128x36; held near 1:1 so it stays crisp rather than scaled up. */
}
.brand .rule { width: 1px; height: 22px; background: var(--border-strong); flex: none; }
.brand .unit { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; line-height: 1.15; }
.brand .unit small {
  display: block; font-family: var(--font-sans); font-weight: 500;
  font-size: 10.5px; color: var(--brand-teal); letter-spacing: .08em; text-transform: uppercase;
}

.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  padding: 7px 13px; border-radius: 9px; font-size: 13.5px; color: var(--muted);
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav a.on { background: rgba(59,130,246,.14); color: var(--purple-light); }

/* ----------------------------------------------------------------- bits -- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card.raised { background: var(--surface-raised); }

.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--purple-light);
}
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; font-family: var(--font-mono);
  letter-spacing: .02em; white-space: nowrap;
}
.pill.blue  { background: rgba(59,130,246,.14);  color: var(--purple-light); }
.pill.green { background: rgba(16,185,129,.14);  color: var(--green-light); }
.pill.amber { background: rgba(251,191,36,.14);  color: var(--amber); }
.pill.rose  { background: rgba(251,113,133,.14); color: var(--rose); }
.pill.violet{ background: rgba(139,92,246,.16);  color: #a78bfa; }
.pill.grey  { background: rgba(255,255,255,.07); color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.dot.live { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  font-family: var(--font-sans); border: 1px solid transparent; transition: all .15s;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff; box-shadow: 0 6px 22px rgba(37,99,235,.32);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(37,99,235,.42); }
.btn.ghost { background: rgba(255,255,255,.04); border-color: var(--border-strong); color: var(--text); }
.btn.ghost:hover { background: rgba(255,255,255,.08); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- tables -- */
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 660px; font-size: 14px; }
th, td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  background: rgba(255,255,255,.02);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255,255,255,.025); }

/* ---------------------------------------------------------------- stats -- */
.stat .n { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 7px; }

/* -------------------------------------------------------------- section -- */
.section { padding-block: 54px; }
.section h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 8px; }
.section .lede { color: var(--muted); max-width: 66ch; }

.page-head { padding-block: 30px 22px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 6px; }

footer.site {
  border-top: 1px solid var(--border); margin-top: 60px; padding-block: 26px 40px;
  color: var(--muted); font-size: 13px;
}

.demo-flag {
  background: rgba(251,191,36,.1); border-bottom: 1px solid rgba(251,191,36,.25);
  color: var(--amber); font-size: 12.5px; text-align: center; padding: 7px 14px;
  font-family: var(--font-mono); letter-spacing: .02em;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Additions for the interactive demo: workspace, console, chat, auth,
   richer dashboard treatment, report showcase, admin.
   ========================================================================== */

/* ---------------------------------------------------------------- toast -- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: var(--surface-raised); border: 1px solid var(--border-strong);
  color: var(--text); padding: 11px 18px; border-radius: 11px; font-size: 13.5px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5); opacity: 0; z-index: 200;
  transition: opacity .25s, transform .25s; max-width: 90vw;
}
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { border-color: rgba(251,191,36,.5); color: var(--amber); }

/* ------------------------------------------------------------ workspace -- */
.ws { display: grid; grid-template-columns: 400px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .ws { grid-template-columns: 1fr; } }

.pane {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden;
}
.pane-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02);
}
.pane-head h3 { font-size: 14.5px; }
.pane-body { padding: 16px; }

/* chat */
.chat-log { height: 420px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 13px; }
.msg { max-width: 92%; }
.msg .meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }
.msg .body {
  background: var(--surface-raised); border: 1px solid var(--border);
  padding: 10px 13px; border-radius: 12px 12px 12px 4px; font-size: 13.8px; line-height: 1.5;
}
.msg.mine { margin-left: auto; }
.msg.mine .meta { text-align: right; }
.msg.mine .body { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.35); border-radius: 12px 12px 4px 12px; }
.chat-compose { display: flex; gap: 9px; padding: 13px 14px; border-top: 1px solid var(--border); }
.chat-compose textarea {
  flex: 1; resize: none; height: 40px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 9px; padding: 10px 12px;
  font-family: var(--font-sans); font-size: 13.5px;
}
.chat-compose textarea:focus { outline: 2px solid rgba(59,130,246,.5); outline-offset: -1px; }

/* console */
.console-out {
  height: 400px; overflow-y: auto; padding: 14px 16px; background: #01040a;
  font-family: var(--font-mono); font-size: 12.8px; line-height: 1.65; white-space: pre-wrap;
  color: #b9c6d4;
}
.console-out .cmd { color: var(--green-light); }
.console-out .err { color: var(--rose); }
.console-out .note { color: var(--muted); font-style: italic; }
.console-in { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-top: 1px solid var(--border); background: #01040a; }
.console-in span { font-family: var(--font-mono); font-size: 12.8px; color: var(--green-light); white-space: nowrap; }
.console-in input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--text); font-family: var(--font-mono); font-size: 12.8px;
}
.rec-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px;
  background: rgba(251,113,133,.14); color: var(--rose);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
}
.rec-badge .d { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); animation: pulse 1.3s ease-in-out infinite; }
.timer { font-family: var(--font-mono); font-size: 13px; color: var(--amber); font-variant-numeric: tabular-nums; }

.warnstrip {
  background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3);
  color: var(--amber); border-radius: 10px; padding: 10px 14px; font-size: 13px;
  display: flex; align-items: center; gap: 9px;
}

/* --------------------------------------------------------------- auth -- */
.auth-wrap { min-height: 74vh; display: grid; place-items: center; padding-block: 40px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; padding: 32px;
  box-shadow: 0 30px 70px rgba(0,0,0,.45);
}
.auth-card h1 { font-size: 23px; margin-bottom: 6px; }
.field { margin-top: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 11px 13px; color: var(--text);
  font-family: var(--font-sans); font-size: 14.5px;
}
.field input:focus { outline: 2px solid rgba(59,130,246,.5); outline-offset: -1px; }
.otp { display: flex; gap: 9px; justify-content: space-between; }
.otp input {
  width: 100%; text-align: center; font-family: var(--font-mono); font-size: 22px;
  padding: 12px 0; letter-spacing: .05em;
}

/* ---------------------------------------------------- colourful dashboard */
.tile {
  position: relative; border-radius: var(--radius); padding: 18px 20px; overflow: hidden;
  border: 1px solid transparent; color: #fff;
}
.tile .n { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1; }
.tile .l { font-size: 13px; opacity: .92; margin-top: 7px; }
.tile .sub { font-size: 11.5px; opacity: .78; margin-top: 3px; font-family: var(--font-mono); }
.tile.blue   { background: linear-gradient(140deg, #1d4ed8, #3b82f6); box-shadow: 0 10px 30px rgba(37,99,235,.3); }
.tile.green  { background: linear-gradient(140deg, #047857, #10b981); box-shadow: 0 10px 30px rgba(16,185,129,.26); }
.tile.violet { background: linear-gradient(140deg, #6d28d9, #8b5cf6); box-shadow: 0 10px 30px rgba(139,92,246,.28); }
.tile.amber  { background: linear-gradient(140deg, #b45309, #f59e0b); box-shadow: 0 10px 30px rgba(217,119,6,.26); }
.tile.rose   { background: linear-gradient(140deg, #9f1239, #fb7185); box-shadow: 0 10px 30px rgba(251,113,133,.24); }
.tile.teal   { background: linear-gradient(140deg, #0e7490, #22d3ee); box-shadow: 0 10px 30px rgba(34,211,238,.24); }

h2.bar, h3.bar {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 15px;
  border-radius: 999px; font-size: 14px; letter-spacing: 0;
  background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(139,92,246,.22));
  border: 1px solid rgba(96,165,250,.32); color: #dbeafe;
}

.meter { height: 7px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--violet)); }
.meter.green i { background: linear-gradient(90deg, var(--green), var(--green-light)); }
.meter.amber i { background: linear-gradient(90deg, var(--amber-warm), var(--amber)); }
.meter.rose  i { background: linear-gradient(90deg, #9f1239, var(--rose)); }

/* --------------------------------------------------------------- report */
.report-hero {
  border-radius: 18px; padding: 28px; color: #fff;
  background: linear-gradient(135deg, #0b1220 0%, #12306b 55%, #0e7490 100%);
  border: 1px solid rgba(96,165,250,.28);
}
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.kv .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.kv .v { font-size: 15px; font-weight: 600; margin-top: 3px; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--border-strong); }
.timeline .ev { position: relative; padding-bottom: 16px; }
.timeline .ev::before {
  content: ''; position: absolute; left: -23px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
.timeline .ev.green::before { background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.timeline .ev.amber::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(251,191,36,.18); }
.timeline .ev.rose::before  { background: var(--rose);  box-shadow: 0 0 0 3px rgba(251,113,133,.18); }
.timeline .t { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

/* --------------------------------------------------- per-ticket colour -- */
/* Each ticket carries a category colour so a queue is scannable by type,
   not just by status. The stripe is on the row's leading cell. */
.tk { border-left: 3px solid var(--border-strong); }
.tk-design  { border-left-color: #a78bfa; }
.tk-integr  { border-left-color: #22d3ee; }
.tk-perf    { border-left-color: #fbbf24; }
.tk-infra   { border-left-color: #fb7185; }
.tk-sec     { border-left-color: #34d399; }
.tk-patch   { border-left-color: #60a5fa; }

.cat { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
       font-family: var(--font-mono); padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.cat-design { background: rgba(167,139,250,.16); color: #c4b5fd; }
.cat-integr { background: rgba(34,211,238,.14);  color: #67e8f9; }
.cat-perf   { background: rgba(251,191,36,.14);  color: #fcd34d; }
.cat-infra  { background: rgba(251,113,133,.14); color: #fda4af; }
.cat-sec    { background: rgba(52,211,153,.14);  color: #6ee7b7; }
.cat-patch  { background: rgba(96,165,250,.14);  color: #93c5fd; }

/* login animation */
.auth-card { animation: authin .6s cubic-bezier(.2,.75,.3,1) both; }
@keyframes authin { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.shield {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center;
  font-size: 25px; background: linear-gradient(140deg, var(--accent), var(--violet));
  box-shadow: 0 0 0 0 rgba(59,130,246,.5); animation: shieldpulse 2.6s ease-out infinite;
}
@keyframes shieldpulse {
  0%   { box-shadow: 0 0 0 0 rgba(59,130,246,.45); }
  70%  { box-shadow: 0 0 0 18px rgba(59,130,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}
.seclist { display: grid; gap: 8px; margin-top: 18px; }
.seclist div { display: flex; align-items: center; gap: 9px; font-size: 12.8px; color: var(--muted);
               animation: rise .5s cubic-bezier(.2,.7,.3,1) both; }
.seclist div:nth-child(1) { animation-delay: .25s; }
.seclist div:nth-child(2) { animation-delay: .38s; }
.seclist div:nth-child(3) { animation-delay: .51s; }
.seclist div:nth-child(4) { animation-delay: .64s; }
.seclist .ok { color: var(--green-light); font-weight: 700; }
.otp input { animation: rise .4s cubic-bezier(.2,.7,.3,1) both; }
.otp input:nth-child(1){animation-delay:.05s} .otp input:nth-child(2){animation-delay:.10s}
.otp input:nth-child(3){animation-delay:.15s} .otp input:nth-child(4){animation-delay:.20s}
.otp input:nth-child(5){animation-delay:.25s} .otp input:nth-child(6){animation-delay:.30s}

/* ==========================================================================
   Scripted resolution sequence: console → fix → comment → customer view →
   email → acknowledgement. Plays over the workspace as full-screen scenes.
   ========================================================================== */

.scene-layer {
  position: fixed; inset: 0; z-index: 300; background: rgba(2,4,10,.86);
  backdrop-filter: blur(6px); overflow-y: auto; padding: 26px 20px 40px;
  animation: sceneIn .5s cubic-bezier(.2,.75,.3,1) both;
}
@keyframes sceneIn { from { opacity: 0; } to { opacity: 1; } }
.scene { max-width: 900px; margin: 0 auto; animation: rise .55s cubic-bezier(.2,.75,.3,1) both; }
.scene-cap {
  text-align: center; margin-bottom: 18px; font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--purple-light);
}
.scene-close {
  position: fixed; top: 18px; right: 20px; z-index: 310;
  background: rgba(255,255,255,.08); border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-size: 13px;
}
.scene-close:hover { background: rgba(255,255,255,.15); }

/* ------------------------------------------------------------- outlook -- */
/* A recognisable mail client, not a pixel copy — enough that a customer
   immediately reads it as "this arrives in my inbox". */
.outlook {
  background: #f3f4f6; color: #1f2937; border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); font-family: 'Segoe UI', var(--font-sans), sans-serif;
}
.ol-bar {
  background: #0f6cbd; color: #fff; padding: 9px 16px; display: flex; align-items: center; gap: 11px;
  font-size: 13.5px; font-weight: 600;
}
.ol-bar .dots { display: flex; gap: 6px; margin-left: auto; }
.ol-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.45); display: block; }
.ol-cols { display: grid; grid-template-columns: 210px 1fr; min-height: 380px; }
@media (max-width: 720px) { .ol-cols { grid-template-columns: 1fr; } }
.ol-side { background: #e8eaed; border-right: 1px solid #d5d8dc; padding: 12px 0; font-size: 13px; }
.ol-side div { padding: 7px 16px; color: #374151; display: flex; gap: 9px; align-items: center; }
.ol-side div.on { background: #d6e4f5; font-weight: 600; color: #0f6cbd; border-left: 3px solid #0f6cbd; }
.ol-side .cnt { margin-left: auto; font-size: 11.5px; color: #6b7280; }
.ol-main { background: #fff; padding: 0; }
.ol-msghead { padding: 16px 20px; border-bottom: 1px solid #e5e7eb; }
.ol-subj { font-size: 17px; font-weight: 600; color: #111827; margin-bottom: 7px; }
.ol-from { font-size: 12.5px; color: #4b5563; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.ol-avatar { width: 30px; height: 30px; border-radius: 50%; background: #0f6cbd; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ol-body { padding: 20px; font-size: 13.8px; line-height: 1.6; color: #1f2937; }
.ol-actions { padding: 12px 20px 18px; display: flex; gap: 9px; flex-wrap: wrap; border-top: 1px solid #e5e7eb; }
.ol-btn {
  border: 1px solid #c9ced6; background: #fff; color: #1f2937; border-radius: 6px;
  padding: 8px 16px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.ol-btn.primary { background: #0f6cbd; border-color: #0f6cbd; color: #fff; }
.ol-btn:hover { filter: brightness(.96); }

/* the report, rendered inside the email in the portal's own visual language */
.mailreport { border: 1px solid #dfe3e8; border-radius: 10px; overflow: hidden; margin-top: 14px; }
.mailreport .hd { background: linear-gradient(135deg,#0b1220,#12306b 60%,#0e7490); color: #fff; padding: 16px 18px; }
.mailreport .hd h3 { font-size: 16px; margin: 0 0 4px; font-family: 'Segoe UI', sans-serif; }
.mailreport .hd p { font-size: 12.5px; opacity: .85; margin: 0; }
.mailreport .bd { padding: 16px 18px; background: #fff; }
.mrkv { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px,1fr)); gap: 12px; margin-bottom: 14px; }
.mrkv .k { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: #6b7280; }
.mrkv .v { font-size: 13.5px; font-weight: 600; color: #111827; margin-top: 2px; }
.mrlist { margin: 0; padding-left: 18px; font-size: 13.2px; color: #374151; }
.mrlist li { margin: 5px 0; }
.mrfiles { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 11px 13px; margin-top: 12px; }
.mrfiles code { font-size: 12px; color: #0f6cbd; display: block; padding: 2px 0; }

/* windows-style toast prompt outside the client */
.wintoast {
  position: fixed; right: 22px; bottom: 22px; z-index: 320; width: min(360px, 92vw);
  background: #202124; color: #e8eaed; border: 1px solid #3c4043; border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,.65); padding: 15px 17px;
  animation: rise .5s cubic-bezier(.2,.75,.3,1) both; font-family: 'Segoe UI', var(--font-sans), sans-serif;
}
.wintoast h4 { font-size: 14px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.wintoast p { font-size: 12.8px; color: #bdc1c6; margin: 0 0 12px; line-height: 1.5; }
.wintoast .row { display: flex; gap: 8px; }
.wintoast button { flex: 1; border-radius: 7px; padding: 8px 10px; font-size: 12.5px; cursor: pointer; border: 1px solid #5f6368; background: #303134; color: #e8eaed; font-weight: 600; }
.wintoast button.primary { background: #0f6cbd; border-color: #0f6cbd; color: #fff; }

/* typing caret in the console during the scripted run */
.typing::after { content: '▋'; color: var(--green-light); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------ change history -- */
.verrow {
  display: grid; grid-template-columns: 116px 1fr auto; gap: 14px; align-items: center;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  background: var(--surface); margin-bottom: 10px; transition: border-color .15s;
}
.verrow:hover { border-color: var(--border-strong); }
.verrow.restorable { border-left: 3px solid var(--violet); }
.verrow .when { font-family: var(--font-mono); font-size: 12px; color: var(--purple-light); line-height: 1.5; }
.verrow .what strong { font-size: 14.5px; }
.verrow .what .s { color: var(--muted); font-size: 12.8px; margin-top: 3px; }
.verrow .files { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.approval {
  border: 1px solid rgba(139,92,246,.35); background: rgba(139,92,246,.08);
  border-radius: 12px; padding: 16px 18px;
}
.approval .who { display: flex; align-items: center; gap: 11px; }
.approval .av {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--violet), var(--accent)); font-weight: 700; color: #fff; font-size: 14px;
}

/* ==========================================================================
   Visual polish pass: one unified navigation treatment, and colour on every
   card and table so no surface is plain grey.
   ========================================================================== */

/* ------------------------------------------------------------- nav ------ */
/* Every nav item is the SAME colour deliberately — a navigation bar where each
   item is a different hue reads as decoration rather than structure. They are
   solid, raised and uniform; only the active state differs, and only in
   brightness. */
.nav { gap: 6px; align-items: center; }
/* Compact solid boxes -- roughly half the bulk of the first pass, which sat
   too heavy against the brand bar. Still one colour for all of them: a nav
   where every item is a different hue reads as decoration, not structure. */
.nav a {
  padding: 5px 12px; border-radius: 8px; font-size: 12.2px; font-weight: 600;
  color: #e0ecff; letter-spacing: .01em; line-height: 1.5;
  background: linear-gradient(140deg, #1d4ed8, #3b82f6);
  border: 1px solid rgba(147,197,253,.5);
  box-shadow: 0 2px 8px rgba(37,99,235,.3), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .14s, box-shadow .14s, filter .14s;
}
.nav a:hover {
  color: #fff; filter: brightness(1.16);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37,99,235,.42), inset 0 1px 0 rgba(255,255,255,.18);
  background: linear-gradient(140deg, #1e3a8a, #2563eb);
}
.nav a.on {
  color: #fff;
  background: linear-gradient(140deg, #2563eb, #60a5fa);
  border-color: rgba(147,197,253,.75);
  box-shadow: 0 0 0 1px rgba(147,197,253,.35), 0 6px 20px rgba(59,130,246,.48);
}
@media (max-width: 860px) {
  .topbar .inner { height: auto; padding-block: 10px; flex-wrap: wrap; }
  .nav { width: 100%; }
  .nav a { flex: 1 1 auto; text-align: center; padding: 6px 9px; font-size: 11.6px; }
}

/* ------------------------------------------------------------ cards ----- */
/* A tinted top edge and a faint inner glow, so a card reads as a surface
   rather than a grey rectangle. Colour comes from a single --tint variable
   so a whole page can be recoloured by setting it on a parent. */
.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(59,130,246,.055), transparent 120px),
    var(--surface);
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet), transparent 75%);
  opacity: .85;
}
.card.t-green::before  { background: linear-gradient(90deg, var(--green), var(--green-light), transparent 75%); }
.card.t-amber::before  { background: linear-gradient(90deg, var(--amber-warm), var(--amber), transparent 75%); }
.card.t-rose::before   { background: linear-gradient(90deg, #9f1239, var(--rose), transparent 75%); }
.card.t-violet::before { background: linear-gradient(90deg, var(--violet), #c4b5fd, transparent 75%); }
.card.t-teal::before   { background: linear-gradient(90deg, #0e7490, #22d3ee, transparent 75%); }
.card:hover { border-color: rgba(96,165,250,.28); }

/* node rows get a touch of depth too */
.node { background: linear-gradient(140deg, rgba(15,23,41,.9), rgba(5,8,16,.7)); }

/* ----------------------------------------------------------- tables ----- */
.tablewrap {
  background:
    linear-gradient(180deg, rgba(59,130,246,.05), transparent 90px),
    var(--surface);
  position: relative; overflow-x: auto;
}
.tablewrap::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; z-index: 1;
  background: linear-gradient(90deg, var(--accent), var(--violet), transparent 75%);
}
th {
  background: linear-gradient(180deg, rgba(37,99,235,.20), rgba(37,99,235,.07));
  color: #bfdbfe; border-bottom: 1px solid rgba(96,165,250,.3);
}
tbody tr:nth-child(even) { background: rgba(255,255,255,.018); }
tbody tr:hover { background: rgba(59,130,246,.09); }

/* page headings get a coloured rule */
.page-head { border-bottom: 0; position: relative; padding-bottom: 22px; }
.page-head::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet), rgba(34,211,238,.6), transparent);
}

/* --------------------------------------------------- lifecycle strip ---- */
.lc { text-align: center; opacity: .3; transition: opacity .45s, transform .45s; transform: translateY(5px); }
.lc.on { opacity: 1; transform: none; }
.lcdot {
  width: 100%; height: 5px; border-radius: 99px; margin-bottom: 9px;
  background: rgba(255,255,255,.12);
}
.lc.on .lcdot {
  background: linear-gradient(90deg, var(--accent), var(--violet));
  box-shadow: 0 0 12px rgba(59,130,246,.55);
}
.lct { font-size: 12.5px; font-weight: 600; }
.lcs { font-size: 10.5px; color: var(--muted); margin-top: 2px; font-family: var(--font-mono); }
@media (max-width: 900px) { #lifecycle { grid-template-columns: repeat(4, 1fr) !important; row-gap: 16px !important; } }
@media (max-width: 520px) { #lifecycle { grid-template-columns: repeat(2, 1fr) !important; } }

/* --------------------------------------------------------- misc fixes --- */
/* Buttons inside node rows were inheriting the flex stretch and looking odd. */
.node .btn { flex: none; }
/* Long monospace paths were forcing horizontal scroll on narrow screens. */
code { overflow-wrap: anywhere; }
/* Give the body a floor so short pages still fill the viewport. */
main.wrap { min-height: 52vh; }


/* ------------------------------------- walkthrough controls, colourised -- */
/* These three are allowed to differ from each other: they are a transport
   control, not navigation, so distinct colours help a presenter find the one
   they want without looking. */
.controls .ctl { color: #fff; border: 0; font-weight: 700; }
.controls #prev {
  background: linear-gradient(140deg, #6d28d9, #8b5cf6);
  box-shadow: 0 3px 12px rgba(139,92,246,.4), inset 0 1px 0 rgba(255,255,255,.2);
}
.controls #play {
  background: linear-gradient(140deg, #1d4ed8, #3b82f6);
  box-shadow: 0 3px 12px rgba(59,130,246,.45), inset 0 1px 0 rgba(255,255,255,.2);
}
.controls #next {
  background: linear-gradient(140deg, #047857, #10b981);
  box-shadow: 0 3px 12px rgba(16,185,129,.4), inset 0 1px 0 rgba(255,255,255,.2);
}
.controls .ctl:hover { filter: brightness(1.15); transform: translateY(-1px); }
.controls .ctl[disabled] { filter: grayscale(.7); opacity: .45; transform: none; }
