/* =====================================================================
   Elisity Partner Lab Portal — CCC theme
   Single source of truth for the visual theme. Emulates the live Elisity
   CCC UI (insights-demo.idp01.elisity.io): MUI / Inter / navy rail / light
   canvas / teal accents / pill chips / stat-card row.

   Tokens below were extracted live from the CCC app (see task input/theme.json).
   To white-label: override the :root custom properties + swap public/brand/*.
   ===================================================================== */

/* ---- Self-hosted Inter (no runtime CDN; works behind partner proxies) ---- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/public/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/public/fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/public/fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/public/fonts/inter-latin-700-normal.woff2") format("woff2");
}

:root {
  /* Surfaces */
  --ccc-canvas: #EBECF3;         /* page background — light blue-gray */
  --ccc-surface: #FCFCFD;        /* cards / topbar */
  --ccc-surface-alt: #F5F6FA;    /* table row stripe, hover */
  --ccc-hairline: rgba(0, 21, 128, 0.08);

  /* Sidebar (drawer) */
  --ccc-rail-bg: #042638;        /* deep navy */
  --ccc-rail-fg: #FFFFFF;
  --ccc-rail-fg-dim: rgba(255, 255, 255, 0.72);
  --ccc-rail-active: rgba(126, 198, 253, 0.18);  /* selected item bg */
  --ccc-rail-active-bar: #7EC6FD;                /* left accent bar */
  --ccc-rail-width: 240px;
  --ccc-rail-width-collapsed: 64px;

  /* Topbar */
  --ccc-topbar-height: 56px;
  --ccc-topbar-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.08), 0 4px 5px rgba(0, 0, 0, 0.06);

  /* Text */
  --ccc-text: rgba(0, 6, 38, 0.9);
  --ccc-text-secondary: rgba(0, 7, 43, 0.72);
  --ccc-text-muted: rgba(0, 13, 77, 0.45);
  --ccc-text-on-dark: #FFFFFF;

  /* Brand / accents — derived from extracted frequencies */
  --ccc-primary: #065986;         /* primary action / link */
  --ccc-primary-hover: #044a72;
  --ccc-primary-deep: #01579B;
  --ccc-accent: #7EC6FD;          /* chart bars, pill highlights */
  --ccc-accent-soft: #DFECFD;     /* light accent surfaces */
  --ccc-cta: #A4D65E;             /* spring-green evaluation CTA (Hands-On Lab) */
  --ccc-cta-hover: #B5E075;

  /* Chip palette (extracted from .MuiChip-root) */
  --ccc-chip-bg: rgba(3, 169, 244, 0.12);
  --ccc-chip-fg: #01579B;
  --ccc-chip-radius: 64px;

  /* Status colors */
  --ccc-success: #1B5E20;
  --ccc-success-bg: rgba(27, 94, 32, 0.10);
  --ccc-warning: #B26A00;
  --ccc-warning-bg: rgba(255, 167, 38, 0.12);
  --ccc-danger: #C62828;
  --ccc-danger-bg: rgba(244, 67, 54, 0.10);

  /* Typography — Inter (matches CCC) */
  --ccc-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ccc-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ccc-fs-base: 14px;
  --ccc-fs-h1: 22px;
  --ccc-fs-h2: 18px;
  --ccc-fw-h1: 600;
  --ccc-fw-h2: 600;
  --ccc-lh-base: 1.5;

  /* Shape */
  --ccc-radius-sm: 6px;
  --ccc-radius-md: 10px;
  --ccc-radius-lg: 16px;
  --ccc-radius-pill: 999px;
  --ccc-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --ccc-shadow-elev: 0 4px 12px rgba(0, 0, 0, 0.08);

  /* Spacing scale (4px base) */
  --ccc-space-1: 4px; --ccc-space-2: 8px; --ccc-space-3: 12px;
  --ccc-space-4: 16px; --ccc-space-5: 24px; --ccc-space-6: 32px; --ccc-space-8: 48px;

  /* Back-compat aliases — legacy class names map onto CCC tokens so existing
     markup themes correctly without per-page rewrites. */
  --primary: var(--ccc-primary);
  --primary-dark: var(--ccc-primary-hover);
  --ink: var(--ccc-text);
  --muted: var(--ccc-text-secondary);
  --line: var(--ccc-hairline);
  --bg: var(--ccc-canvas);
  --card: var(--ccc-surface);
  --ok: var(--ccc-success);
  --warn: var(--ccc-warning);
  --danger: var(--ccc-danger);
  --radius: var(--ccc-radius-md);
  --shadow: var(--ccc-shadow-card);

  /* FullCalendar v6 var overrides → CCC tokens */
  --fc-border-color: var(--ccc-hairline);
  --fc-today-bg-color: var(--ccc-accent-soft);
  --fc-neutral-bg-color: var(--ccc-surface-alt);
  --fc-page-bg-color: var(--ccc-surface);
  --fc-button-bg-color: var(--ccc-primary);
  --fc-button-border-color: var(--ccc-primary);
  --fc-button-hover-bg-color: var(--ccc-primary-hover);
  --fc-button-hover-border-color: var(--ccc-primary-hover);
  --fc-button-active-bg-color: var(--ccc-primary-hover);
  --fc-button-active-border-color: var(--ccc-primary-hover);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ccc-font-sans);
  font-size: var(--ccc-fs-base);
  color: var(--ccc-text);
  background: var(--ccc-canvas);
  line-height: var(--ccc-lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1 { font-size: var(--ccc-fs-h1); font-weight: var(--ccc-fw-h1); color: var(--ccc-text); line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: var(--ccc-fs-h2); font-weight: var(--ccc-fw-h2); color: var(--ccc-text); line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 600; color: var(--ccc-text); margin: 0 0 8px; }

a { color: var(--ccc-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--ccc-surface-alt);
  padding: 1px 6px; border-radius: var(--ccc-radius-sm);
  font-family: var(--ccc-font-mono); font-size: 0.88em;
  color: var(--ccc-text);
}
code.break { word-break: break-all; white-space: normal; }

.muted { color: var(--ccc-text-secondary); }
.small { font-size: 13px; }
.back { display: inline-block; margin-bottom: 12px; font-size: 13px; font-weight: 500; }

/* =====================================================================
   App shell — navy rail + white topbar + light content (authenticated)
   ===================================================================== */
body.app { min-height: 100vh; background: var(--ccc-canvas); }

.ccc-rail {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--ccc-rail-width);
  background: var(--ccc-rail-bg);
  color: var(--ccc-rail-fg);
  display: flex; flex-direction: column;
  z-index: 30;
}
.ccc-rail__logo { padding: 24px 16px 16px; display: flex; align-items: center; }
.ccc-rail__logo-full { width: 140px; height: auto; display: block; }
.ccc-rail__logo-glyph { width: 32px; height: 32px; display: none; margin: 0 auto; }

.ccc-rail__nav { flex: 1 1 auto; padding: 8px 0; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.ccc-rail__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 21px;
  color: var(--ccc-rail-fg-dim);
  font-size: 14px; font-weight: 500;
  border-left: 3px solid transparent;
  white-space: nowrap;
}
.ccc-rail__item:hover { background: rgba(255, 255, 255, 0.06); color: var(--ccc-rail-fg); text-decoration: none; }
.ccc-rail__item.is-active { background: var(--ccc-rail-active); color: var(--ccc-rail-fg); border-left-color: var(--ccc-rail-active-bar); }
.ccc-rail__item svg { width: 20px; height: 20px; flex: 0 0 20px; }

.ccc-rail__foot { padding: 16px 16px 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.ccc-rail__foot img { height: 18px; width: auto; opacity: 0.9; display: block; }

.ccc-shell { margin-left: var(--ccc-rail-width); display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

.ccc-topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--ccc-topbar-height);
  background: var(--ccc-surface);
  box-shadow: var(--ccc-topbar-shadow);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
}
.ccc-topbar__title { font-size: 18px; font-weight: 600; color: var(--ccc-text); margin: 0; }
.ccc-topbar__spacer { flex: 1 1 auto; }
.ccc-topbar__user { display: flex; align-items: center; gap: 12px; }
.ccc-topbar__who { color: var(--ccc-text-secondary); font-size: 13px; text-decoration: none; }
a.ccc-topbar__who:hover { color: var(--ccc-text-primary); text-decoration: underline; }
.ccc-topbar__badge {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 2px 8px; border-radius: var(--ccc-radius-pill);
  background: var(--ccc-accent-soft); color: var(--ccc-primary-deep);
}
.ccc-topbar__icon { color: var(--ccc-text-secondary); display: inline-flex; }
.ccc-topbar__icon svg { width: 20px; height: 20px; }

.ccc-content { flex: 1 1 auto; padding: 32px; max-width: 1320px; width: 100%; }

/* Public shell (landing / error when signed out) */
body.public { min-height: 100vh; background: var(--ccc-canvas); display: flex; flex-direction: column; }
.ccc-public__bar {
  height: var(--ccc-topbar-height); background: var(--ccc-surface);
  box-shadow: var(--ccc-topbar-shadow); display: flex; align-items: center;
  padding: 0 24px; gap: 10px;
}
.ccc-public__bar img { height: 24px; width: auto; }
.ccc-public__main { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; padding: 48px 24px; }

/* Collapsed rail (<960px): icon-only 64px */
@media (max-width: 960px) {
  .ccc-rail { width: var(--ccc-rail-width-collapsed); }
  .ccc-shell { margin-left: var(--ccc-rail-width-collapsed); }
  .ccc-rail__logo-full { display: none; }
  .ccc-rail__logo-glyph { display: block; }
  .ccc-rail__logo { padding: 20px 8px 12px; }
  .ccc-rail__label { display: none; }
  .ccc-rail__item { justify-content: center; padding: 12px 0; gap: 0; border-left-width: 3px; }
  .ccc-rail__foot { display: flex; justify-content: center; }
  .ccc-content { padding: 20px; }
}

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; background: var(--ccc-surface);
  color: var(--ccc-text);
  padding: 8px 16px; border-radius: var(--ccc-radius-sm);
  font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2;
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.btn { border-color: rgba(0, 0, 0, 0.16); }
.btn:hover { text-decoration: none; background: var(--ccc-surface-alt); border-color: rgba(0, 0, 0, 0.28); }
.btn-primary { background: var(--ccc-primary); border-color: var(--ccc-primary); color: #fff; }
.btn-primary:hover { background: var(--ccc-primary-hover); border-color: var(--ccc-primary-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ccc-primary); }
.btn-ghost:hover { background: var(--ccc-accent-soft); border-color: transparent; }
.btn-danger { background: var(--ccc-danger); border-color: var(--ccc-danger); color: #fff; }
.btn-danger:hover { background: #a91f1f; border-color: #a91f1f; color: #fff; }
/* Hard-delete: deliberately distinct from Deactivate (.btn-danger) — deep maroon,
   bold uppercase — so an irreversible destructive action never blends in with the
   reversible one sitting next to it in the same row. */
.btn-delete { background: #7a1212; border-color: #5e0d0d; color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.btn-delete:hover { background: #5e0d0d; border-color: #4a0a0a; color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-lg { padding: 11px 22px; font-size: 16px; }
/* Phase 4: Schedule-Now accent action (deep navy on light accent). */
.btn-accent { background: var(--ccc-primary-deep); border-color: var(--ccc-primary-deep); color: #fff; font-weight: 600; }
.btn-accent:hover { background: var(--ccc-primary-hover); border-color: var(--ccc-primary-hover); color: #fff; }
.btn-ms { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.inline-form { display: inline; }

/* =====================================================================
   Cards
   ===================================================================== */
.card {
  background: var(--ccc-surface);
  border: 1px solid var(--ccc-hairline);
  border-radius: var(--ccc-radius-md);
  box-shadow: var(--ccc-shadow-card);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.card-narrow { max-width: 560px; }
.card h2:first-child, .card h1:first-child { margin-top: 0; }

/* Staff operating guide: compact visual walkthroughs that remain readable on
   narrow laptop screens without depending on external screenshots. */
.help-journeys { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 24px; }
.help-journey { background: var(--ccc-surface); border: 1px solid var(--ccc-hairline); border-radius: var(--ccc-radius-md); box-shadow: var(--ccc-shadow-card); padding: 18px; }
.help-journey h2 { margin: 4px 0 12px; font-size: 18px; }
.help-journey__eyebrow { color: var(--ccc-primary); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.help-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.help-flow span { background: var(--ccc-chip-bg); border-radius: var(--ccc-radius-pill); color: var(--ccc-chip-fg); font-size: 13px; padding: 5px 10px; }
.help-flow b { color: var(--ccc-primary); }
.help-example { background: var(--ccc-surface-alt); border: 1px solid var(--ccc-hairline); border-radius: var(--ccc-radius-sm); margin: 12px 0 16px; padding: 14px; }
.help-example--warning { border-left: 4px solid var(--ccc-warning, #bd7800); }
.help-example__row { display: grid; grid-template-columns: 95px minmax(100px, 1fr) 100px minmax(150px, 2fr); align-items: center; gap: 8px; margin-top: 9px; font-size: 13px; }
.help-example code { overflow-wrap: anywhere; }
.help-demo__heading { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; }
.help-demo__heading h2 { margin-bottom: 6px; }
.help-demo__heading p { margin-top: 0; }
.help-demo__animation, .help-demo__video { border: 1px solid var(--ccc-hairline); border-radius: var(--ccc-radius-sm); display: block; height: auto; margin: 16px 0; max-width: 100%; width: 100%; }
.help-demo__chapters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.help-demo__chapters button { background: var(--ccc-accent-soft); border: 1px solid var(--ccc-primary); border-radius: 999px; color: var(--ccc-primary-deep); cursor: pointer; font: inherit; padding: 6px 10px; }
.help-demo__chapters button:hover { background: var(--ccc-primary); color: #fff; }
.help-scenario-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.help-scenario-grid article { border: 1px solid var(--ccc-hairline); border-radius: var(--ccc-radius-sm); padding: 18px; }
.help-scenario-grid h3 { margin: 10px 0 6px; }
@media (max-width: 760px) { .help-scenario-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .help-example__row { grid-template-columns: 1fr; gap: 3px; } }
@media (max-width: 560px) { .help-demo__heading { display: block; } .help-demo__heading .chip { display: inline-block; margin-top: 8px; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.lab-card { display: flex; flex-direction: column; transition: box-shadow 0.12s, border-color 0.12s; }
.lab-card:hover { text-decoration: none; border-color: var(--ccc-accent); box-shadow: var(--ccc-shadow-elev); }
.lab-card h3 { color: var(--ccc-text); }
.lab-card .meta { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lab-card .meta li {
  background: var(--ccc-chip-bg); color: var(--ccc-chip-fg);
  border-radius: var(--ccc-radius-pill); padding: 3px 10px; font-size: 12px; font-weight: 500;
}
.lab-card-cta { margin-top: auto; padding-top: 8px; color: var(--ccc-primary); font-weight: 600; font-size: 14px; }

/* =====================================================================
   Stat cards — the metric tile row from the CCC dashboard
   ===================================================================== */
.ccc-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.ccc-stat {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  background: var(--ccc-surface); border: 1px solid var(--ccc-hairline);
  border-radius: var(--ccc-radius-md); box-shadow: var(--ccc-shadow-card);
  padding: 16px 18px; min-height: 92px;
}
a.ccc-stat:hover { text-decoration: none; border-color: var(--ccc-accent); box-shadow: var(--ccc-shadow-elev); }
.ccc-stat__label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ccc-text-secondary); }
.ccc-stat__value { font-size: 30px; font-weight: 600; line-height: 1.1; color: var(--ccc-text); }
.ccc-stat__icon {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: var(--ccc-radius-sm);
  background: var(--ccc-accent-soft); color: var(--ccc-primary);
  display: flex; align-items: center; justify-content: center;
}
.ccc-stat__icon svg { width: 18px; height: 18px; }

/* Legacy analytics stat tiles → CCC stat-card look (label on top, big number below) */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 0 0 24px; }
.stat { display: flex; flex-direction: column-reverse; gap: 6px; align-items: flex-start; min-height: 88px; }
.stat .muted { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ccc-text-secondary); }
.stat-num { font-size: 30px; font-weight: 600; color: var(--ccc-text); line-height: 1.1; }

/* =====================================================================
   Pill tabs — filter row look from the CCC dashboard
   ===================================================================== */
.ccc-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ccc-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: var(--ccc-radius-pill);
  border: 1px solid var(--ccc-hairline); background: transparent;
  color: var(--ccc-text-secondary); font-size: 13px; font-weight: 500;
}
.ccc-pill:hover { text-decoration: none; background: var(--ccc-surface-alt); }
.ccc-pill--active { background: var(--ccc-accent-soft); border-color: transparent; color: var(--ccc-primary-deep); }
.ccc-pill--active::before { content: "✓"; font-weight: 700; }

/* =====================================================================
   Alerts
   ===================================================================== */
.alert { padding: 10px 14px; border-radius: var(--ccc-radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert-ok { background: var(--ccc-success-bg); color: var(--ccc-success); border-color: rgba(27, 94, 32, 0.18); }
.alert-info { background: var(--ccc-accent-soft); color: var(--ccc-primary-deep); border-color: rgba(1, 87, 155, 0.16); }
.alert-warn { background: var(--ccc-warning-bg); color: var(--ccc-warning); border-color: rgba(178, 106, 0, 0.2); }
.alert-error, .alert-danger { background: var(--ccc-danger-bg); color: var(--ccc-danger); border-color: rgba(198, 40, 40, 0.2); }

/* =====================================================================
   Forms
   ===================================================================== */
label { display: block; margin-bottom: 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ccc-text-secondary); }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 8px 10px; height: 36px;
  border: 1px solid rgba(0, 0, 0, 0.16); border-radius: var(--ccc-radius-sm);
  font-size: 14px; font-family: inherit; color: var(--ccc-text); background: #fff;
  text-transform: none; letter-spacing: normal; font-weight: 400;
}
textarea { height: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ccc-primary); outline-offset: 2px; border-color: var(--ccc-primary); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; align-items: end; }
.form-actions { grid-column: 1 / -1; margin-top: 4px; }

/* =====================================================================
   Tables — MUI DataGrid feel
   ===================================================================== */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--ccc-hairline); vertical-align: middle; }
.table thead th { color: var(--ccc-text-secondary); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; background: var(--ccc-surface-alt); }
.table tbody tr:hover { background: var(--ccc-surface-alt); }
.table tbody tr:last-child td { border-bottom: none; }
.table th:last-child, .table td:last-child { text-align: right; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.kv { width: 100%; }
.kv th { text-align: left; color: var(--ccc-text-secondary); font-weight: 500; width: 170px; padding: 8px 0; vertical-align: top; text-transform: none; letter-spacing: normal; font-size: 14px; }
.kv td { padding: 8px 0; }

/* =====================================================================
   Status chips — mapped onto the CCC semantic palette
   ===================================================================== */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px; border-radius: var(--ccc-chip-radius);
  font-size: 12px; font-weight: 600; height: 24px;
  background: var(--ccc-surface-alt); color: var(--ccc-text-secondary);
}
.status-scheduled, .status-active-degraded { background: var(--ccc-accent-soft); color: var(--ccc-primary-deep); }
.status-provisioning, .status-ending { background: var(--ccc-warning-bg); color: var(--ccc-warning); }
.status-active { background: var(--ccc-success-bg); color: var(--ccc-success); }
.status-torn_down, .status-cancelled, .status-revoked, .status-expired, .status-exhausted { background: var(--ccc-surface-alt); color: var(--ccc-text-muted); }
.status-failed { background: var(--ccc-danger-bg); color: var(--ccc-danger); }
.status-multi, .status-singleton, .status-active { background: var(--ccc-success-bg); color: var(--ccc-success); }
.status-unknown { background: var(--ccc-warning-bg); color: var(--ccc-warning); }

/* =====================================================================
   Hands-On Lab landing (slide-framed marketing layout)
   ===================================================================== */
.lab-landing { width: 100%; max-width: 1180px; }
.lab-landing__head { margin: 0 0 22px; }
.lab-landing__head h1 { font-size: 30px; line-height: 1.15; margin: 0 0 8px; color: var(--ccc-primary-deep); }
.lab-landing__subtitle { font-size: 18px; color: var(--ccc-text-secondary); margin: 0; }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ccc-primary); margin: 0 0 8px; }
.eyebrow--accent { color: var(--ccc-accent); }

.eval-banner { background: var(--ccc-accent-soft); border-radius: var(--ccc-radius-lg); padding: 22px 26px; margin: 0 0 26px; }
.eval-banner__body { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ccc-text); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0 0 26px; }
.pillar { background: var(--ccc-surface); border: 1px solid var(--ccc-hairline); border-radius: var(--ccc-radius-lg); box-shadow: var(--ccc-shadow-card); padding: 26px 24px; }
.pillar__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--ccc-radius-md); background: var(--ccc-accent-soft); color: var(--ccc-primary); margin-bottom: 16px; }
.pillar__icon svg { width: 24px; height: 24px; }
.pillar h2 { font-size: 18px; margin: 0 0 10px; color: var(--ccc-text); }
.pillar p { margin: 0; color: var(--ccc-text-secondary); font-size: 14px; line-height: 1.55; }

.lab-cta-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 22px; align-items: stretch; }
.lab-do { padding: 26px 28px; }
.lab-do__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lab-do__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--ccc-radius-md); background: var(--ccc-accent-soft); color: var(--ccc-primary); flex: 0 0 auto; }
.lab-do__icon svg { width: 22px; height: 22px; }
.lab-do h2 { margin: 0; font-size: 18px; }
.lab-do ul { margin: 0; padding-left: 20px; color: var(--ccc-text-secondary); }
.lab-do li { margin-bottom: 10px; line-height: 1.5; }
.lab-do li:last-child { margin-bottom: 0; }

.eval-cta { display: flex; flex-direction: column; background: var(--ccc-rail-bg); color: var(--ccc-text-on-dark); border-radius: var(--ccc-radius-lg); padding: 26px 28px; }
.eval-cta__lead { font-size: 17px; line-height: 1.45; margin: 0 0 20px; }
.eval-cta .btn-cta { align-self: flex-start; }
.eval-cta__note { font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.72); margin: 16px 0 0; }
.eval-cta__note + .eval-cta__note { margin-top: 8px; }

/* Spring-green evaluation CTA — high contrast on the navy panel, brand accent. */
.btn-cta { background: var(--ccc-cta); border-color: var(--ccc-cta); color: #0a2912; font-weight: 700; }
.btn-cta:hover { background: var(--ccc-cta-hover); border-color: var(--ccc-cta-hover); color: #0a2912; }

@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr; }
  .lab-cta-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Lab detail layout
   ===================================================================== */
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr; } }
#calendar { min-height: 360px; }

.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

/* =====================================================================
   Env page: resizable lab-guide sidebar
   ===================================================================== */
.env-layout { display: flex; align-items: stretch; gap: 0; min-height: 70vh; }
.env-main { flex: 1 1 auto; min-width: 0; padding-right: 18px; }
.resize-handle {
  flex: 0 0 6px; cursor: col-resize; background: var(--ccc-hairline); border-radius: var(--ccc-radius-pill);
  margin: 0 6px; position: relative; transition: background 0.15s;
}
.resize-handle:hover, .resize-handle.dragging { background: var(--ccc-primary); }
.lab-guide {
  flex: 0 0 var(--guide-width, 420px); width: var(--guide-width, 420px);
  background: var(--ccc-surface); border: 1px solid var(--ccc-hairline); border-radius: var(--ccc-radius-md);
  box-shadow: var(--ccc-shadow-elev); display: flex; flex-direction: column; max-height: 82vh; overflow: hidden;
}
.lab-guide.hidden { display: none; }
.lab-guide-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--ccc-hairline); }
.lab-guide-header h2 { margin: 0; font-size: 16px; }
.lab-guide-body { padding: 16px 18px; overflow-y: auto; }
.env-actions { display: flex; gap: 10px; margin-top: 12px; }

/* Phase 4: Schedule-Now block under the booking form. */
.schedule-now { margin-top: 18px; }
.schedule-now-divider { display: flex; align-items: center; text-align: center; color: var(--ccc-text-muted); font-size: 13px; margin: 8px 0 12px; }
.schedule-now-divider::before, .schedule-now-divider::after { content: ""; flex: 1; height: 1px; background: var(--ccc-hairline); }
.schedule-now-divider span { padding: 0 12px; }

/* Phase 4: sandboxed scenario-guide iframe fills the guide pane (no inner padding). */
.lab-guide-body:has(.lab-guide-frame) { padding: 0; }
.lab-guide-frame { display: block; width: 100%; height: 100%; min-height: 62vh; border: 0; background: #fff; }
.lab-guide-placeholder { padding: 6px 2px; }
.lab-guide-placeholder h3 { margin-top: 0; }

/* Phase 4: Open-CCC-Console CTA + build progress bar on the env page. */
.env-cta { margin: 14px 0 4px; }
.build-progress {
  height: 8px; border-radius: var(--ccc-radius-pill); background: var(--ccc-accent-soft);
  overflow: hidden; margin: 12px 0 6px;
}
.build-progress-bar {
  height: 100%; background: var(--ccc-primary); border-radius: var(--ccc-radius-pill);
  transition: width 0.4s ease;
}
@media (max-width: 960px) {
  .env-layout { flex-direction: column; }
  .resize-handle { display: none; }
  .lab-guide { flex-basis: auto; width: 100%; }
}

/* =====================================================================
   Markdown body (lab guide)
   ===================================================================== */
.markdown-body h1 { font-size: 22px; } .markdown-body h2 { font-size: 18px; } .markdown-body h3 { font-size: 16px; }
.markdown-body pre { background: #0b1f2e; color: #e6edf3; padding: 14px 16px; border-radius: var(--ccc-radius-sm); overflow-x: auto; position: relative; }
.markdown-body pre code { background: transparent; color: inherit; padding: 0; }
.markdown-body code { font-size: 0.88em; }
.markdown-body table { border-collapse: collapse; width: 100%; }
.markdown-body th, .markdown-body td { border: 1px solid var(--ccc-hairline); padding: 6px 10px; }
.markdown-body th { background: var(--ccc-surface-alt); }

/* Copy-to-clipboard button on code blocks */
.code-copy-btn {
  position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, 0.12); color: #e6edf3;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: var(--ccc-radius-sm); font-size: 12px; padding: 3px 10px; cursor: pointer;
  font-family: inherit;
}
.code-copy-btn:hover { background: rgba(255, 255, 255, 0.22); }
.code-copy-btn.copied { background: var(--ccc-success); border-color: var(--ccc-success); color: #fff; }

/* Copy button inside credential cells on the env page — chip styling, light surface */
.creds-card .kv td .code-copy-btn.cred-copy-btn {
  position: static; margin-left: 8px; vertical-align: middle;
  background: var(--ccc-accent-soft); color: var(--ccc-primary-deep);
  border: 1px solid transparent; border-radius: var(--ccc-radius-pill); padding: 2px 12px; font-weight: 500;
}
.creds-card .kv td .code-copy-btn.cred-copy-btn:hover { background: #cfe3fb; }
.creds-card .kv td .code-copy-btn.cred-copy-btn.copied { background: var(--ccc-success); color: #fff; border-color: var(--ccc-success); }

/* =====================================================================
   Empty / error state
   ===================================================================== */
.empty-state { text-align: center; padding: 40px 24px; }
.empty-state img { width: 64px; height: 64px; margin: 0 auto 16px; display: block; opacity: 0.9; }

/* =====================================================================
   Public site footer
   ===================================================================== */
.sitefooter { display: flex; justify-content: space-between; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--ccc-hairline); color: var(--ccc-text-secondary); font-size: 13px; background: var(--ccc-surface); flex-wrap: wrap; }

/* =====================================================================
   FullCalendar theming touch-ups (vars set in :root)
   ===================================================================== */
.fc { font-family: var(--ccc-font-sans); font-size: 13px; }
.fc .fc-toolbar-title { font-size: 18px; font-weight: 600; color: var(--ccc-text); }
.fc .fc-button { border-radius: var(--ccc-radius-sm); font-weight: 500; text-transform: none; box-shadow: none; }
.fc .fc-col-header-cell-cushion { color: var(--ccc-text-secondary); font-weight: 600; text-decoration: none; }
.fc .fc-daygrid-day-number { color: var(--ccc-text); text-decoration: none; }

/* =====================================================================
   Phase 5 — verify gate, health badges, self-troubleshoot, fullscreen guide
   ===================================================================== */
.status-verifying { background: var(--ccc-warning-bg); color: var(--ccc-warning); }
.status-assigning { background: var(--ccc-accent-soft); color: var(--ccc-primary-deep); }

/* Health indicator badges */
.health-card .health-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.health-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: var(--ccc-chip-radius); font-size: 13px; font-weight: 500;
  background: var(--ccc-surface-alt); color: var(--ccc-text-secondary); border: 1px solid var(--ccc-hairline);
}
.health-badge .health-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ccc-text-muted); flex: 0 0 auto; }
.health-ok       { background: var(--ccc-success-bg); color: var(--ccc-success); }
.health-ok .health-dot { background: var(--ccc-success); }
.health-warn     { background: var(--ccc-warning-bg); color: var(--ccc-warning); }
.health-warn .health-dot { background: var(--ccc-warning); }
.health-critical { background: var(--ccc-danger-bg); color: var(--ccc-danger); }
.health-critical .health-dot { background: var(--ccc-danger); }
.health-unknown  { background: var(--ccc-surface-alt); color: var(--ccc-text-muted); }

/* Verifying card + spinner */
.verifying-body { display: flex; align-items: center; gap: 14px; margin: 6px 0 8px; }
.spinner {
  width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%;
  border: 3px solid var(--ccc-accent-soft); border-top-color: var(--ccc-primary);
  animation: plp-spin 0.9s linear infinite;
}
@keyframes plp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Tri-state health: degraded is its own amber state, distinct from unhealthy red. */
.health-degraded { background: var(--ccc-warning-bg); color: var(--ccc-warning); }
.health-degraded .health-dot { background: var(--ccc-warning); }
.health-unhealthy { background: var(--ccc-danger-bg); color: var(--ccc-danger); }
.health-unhealthy .health-dot { background: var(--ccc-danger); }
.health-healthy { background: var(--ccc-success-bg); color: var(--ccc-success); }
.health-healthy .health-dot { background: var(--ccc-success); }

/* Health component breakdown */
.health-breakdown { margin-top: 10px; }
.health-breakdown summary { cursor: pointer; font-weight: 600; color: var(--ccc-text-secondary); font-size: 13px; }
.health-components { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.health-component { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 8px; border-radius: var(--ccc-chip-radius); }
.health-component .health-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--ccc-text-muted); }
.health-component.health-ok .health-dot { background: var(--ccc-success); }
.health-component.health-warn .health-dot { background: var(--ccc-warning); }
.health-component.health-critical .health-dot { background: var(--ccc-danger); }
.health-component-label { font-weight: 600; min-width: 110px; }
.health-component-status { color: var(--ccc-text-secondary); }
/* Expected-by-design exercise component: neutral/informational, never alarming red. */
.health-component.health-expected { background: var(--ccc-surface-alt); color: var(--ccc-text-muted); }
.health-component.health-expected .health-dot { background: var(--ccc-text-muted); }
.health-component.health-expected .health-component-status { color: var(--ccc-text-muted); font-style: italic; }
/* Demoted reachability + exercise framing notes — quiet, secondary context. */
.health-reach-note, .health-exercise-note { margin: 8px 0 0; }

/* Self-service recovery panel */
.recovery-card { border-left: 3px solid var(--ccc-primary); }
.recovery-grid { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 4px; }
.recovery-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--ccc-hairline); border-radius: var(--ccc-chip-radius); background: var(--ccc-surface-alt);
}
.recovery-row-label { display: flex; flex-direction: column; gap: 2px; }
.recovery-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.recovery-nuclear { margin-top: 14px; border-top: 1px solid var(--ccc-hairline); padding-top: 12px; }
.nuclear-details summary { cursor: pointer; font-weight: 700; color: var(--ccc-danger); }
.nuclear-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-top: 8px; }
.nuclear-confirm { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ccc-text-secondary); }

/* Self-service retry — offered ONCE on a failed build, under the failure message. */
.retry-panel {
  margin-top: 14px; border-top: 1px solid var(--ccc-hairline); padding-top: 12px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.retry-panel p { margin: 0; }

/* Self-troubleshoot */
.troubleshoot-card { border-left: 3px solid var(--ccc-warning); }
.troubleshoot-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.more-actions { margin-top: 14px; border-top: 1px solid var(--ccc-hairline); padding-top: 10px; }
.more-actions summary { cursor: pointer; font-weight: 600; color: var(--ccc-text-secondary); }
.ven-actions-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.ven-actions-list li { display: flex; align-items: center; gap: 10px; }

/* Lab-guide header action group + full-screen overlay mode */
.lab-guide-header-actions { display: flex; align-items: center; gap: 4px; }
.env-layout.guide-fullscreen .env-main,
.env-layout.guide-fullscreen .resize-handle { display: none; }
.env-layout.guide-fullscreen .lab-guide {
  position: fixed; inset: 0; z-index: 1000; width: 100vw; max-height: 100vh; height: 100vh;
  border-radius: 0; flex-basis: auto;
}
.env-layout.guide-fullscreen .lab-guide-frame { min-height: calc(100vh - 54px); }

/* Phase 5 — admin instances page */
.slot-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.slot-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.instance-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.status-maintenance { background: var(--ccc-warning-bg); color: var(--ccc-warning); }

/* Phase 6 — auth pages (login/register/forgot/reset) + copyable invite/reset links */
.auth-card { max-width: 460px; margin: 32px auto; }
.auth-card h1 { font-size: 22px; margin: 0 0 6px; color: var(--ccc-primary-deep); }
.auth-sub { margin: 0 0 20px; color: var(--ccc-text-secondary); font-size: 14px; }
.auth-form .btn-primary { width: 100%; margin-top: 6px; }
.auth-links { margin-top: 16px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fixed-email { font-weight: 600; color: var(--ccc-text); }
.copy-row { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.copy-row input { flex: 1; font-family: var(--ccc-mono, monospace); font-size: 12.5px; }
.copy-row .btn { white-space: nowrap; }
.role-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.role-admin { background: var(--ccc-danger-bg); color: var(--ccc-danger); }
.role-internal { background: var(--ccc-accent-soft); color: var(--ccc-primary-deep); }
.role-partner { background: var(--ccc-success-bg); color: var(--ccc-success); }
.status-deactivated { background: var(--ccc-warning-bg); color: var(--ccc-warning); }
[x-cloak] { display: none !important; }
.bulk-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 10px; }
.cal-day { border: 1px solid rgba(0,0,0,0.12); border-radius: var(--ccc-radius-sm); padding: 8px; text-align: center; font-size: 12px; }
.cal-day .cal-date { font-weight: 700; color: var(--ccc-text); }
.cal-day.cal-open { background: var(--ccc-success-bg); }
.cal-day.cal-full { background: var(--ccc-danger-bg); color: var(--ccc-danger); opacity: 0.85; }
.cal-day .cal-avail { display: block; margin-top: 2px; }

/* ===================================================================
   Phase 7 — IAM hardening UI (activation reveal, MFA enroll, sessions,
   impersonation banner, audit viewer). CCC-themed; navy rail + Inter.
   =================================================================== */
.impersonation-banner {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #b00020; color: #fff;
  padding: 8px 18px; font-size: 14px; font-weight: 600;
}
.impersonation-banner .impersonation-end {
  background: rgba(255,255,255,0.16); color: #fff;
  border: 1px solid rgba(255,255,255,0.5); border-radius: 6px;
  padding: 4px 12px; cursor: pointer; font: inherit;
}
.impersonation-banner .impersonation-end:hover { background: rgba(255,255,255,0.28); }

/* One-time activation-credentials reveal card */
.reveal-card { border: 2px solid #1b2a4a; border-radius: 10px; padding: 18px; background: #f7f9fc; }
.reveal-card h2 { margin-top: 0; color: #1b2a4a; }
.reveal-card .reveal-warn { color: #b00020; font-weight: 600; margin: 6px 0 14px; }
.reveal-field { margin: 12px 0; }
.reveal-field label { font-weight: 600; display: block; margin-bottom: 4px; font-size: 13px; }
.mono-block {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #0f1830; color: #e6ecff; padding: 8px 12px; border-radius: 6px;
  letter-spacing: 1px; word-break: break-all;
}

/* MFA enrollment */
.mfa-enroll { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.mfa-qr img { border: 1px solid #d6dded; border-radius: 8px; background: #fff; padding: 6px; }
.mfa-secret { min-width: 220px; }
.recovery-codes { list-style: none; padding: 0; margin: 10px 0; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.recovery-codes li code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.checkbox-row input { width: auto; }

/* Audit viewer filters */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filter-bar label { font-size: 13px; font-weight: 600; }
.filter-bar input, .filter-bar select { display: block; margin-top: 4px; }
.audit-payload { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #44506b; max-width: 420px; word-break: break-all; }

@media print {
  .ccc-rail, .ccc-topbar, .impersonation-banner, .auth-links, form { display: none !important; }
  .recovery-codes { display: block; }
}

/* =====================================================================
   Lab-guide builder — editor workspace (split / full-screen modes),
   rendered-vs-HTML-source preview, inline image drop zone.
   ===================================================================== */
.lab-guide-editor .form-row { margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.lab-guide-editor .form-row label { font-weight: 600; font-size: 14px; }
.lab-guide-editor input[type="text"] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--ccc-hairline); border-radius: 8px; font-size: 14px;
}

.lg-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lg-btn-group { display: flex; gap: 6px; flex-wrap: wrap; }
.lg-mode.is-active { background: var(--ccc-primary); color: var(--ccc-text-on-dark); border-color: var(--ccc-primary); }

.lab-guide-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.lab-guide-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; min-height: 30px; }
.lab-guide-pane-head label { font-weight: 600; font-size: 14px; }
.lab-guide-edit-pane, .lab-guide-preview-pane { display: flex; flex-direction: column; min-height: 0; }
.lg-edit-wrap { position: relative; flex: 1; display: flex; }
.lab-guide-edit-pane textarea {
  width: 100%; min-height: 460px; flex: 1; resize: vertical; padding: 12px 14px;
  border: 1px solid var(--ccc-hairline); border-radius: 8px; box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55;
}
.lg-edit-wrap.is-dragging textarea { border-color: var(--ccc-primary); box-shadow: 0 0 0 3px var(--ccc-accent-soft); }
.lg-drop-hint {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(6, 89, 134, 0.06); border: 2px dashed var(--ccc-primary); border-radius: 8px;
  color: var(--ccc-primary); font-weight: 600; pointer-events: none;
}
.lg-edit-wrap.is-dragging .lg-drop-hint { display: flex; }
.lab-guide-preview-frame, .lab-guide-source-view {
  width: 100%; min-height: 460px; flex: 1; border: 1px solid var(--ccc-hairline);
  border-radius: 8px; background: #fff; box-sizing: border-box; margin: 0;
}
.lab-guide-source-view {
  overflow: auto; padding: 12px 14px; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5;
  color: var(--ccc-text); background: var(--ccc-surface-alt);
}
.lab-guide-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.lg-save-status.is-error { color: var(--ccc-danger, #b3261e); }

/* Full-screen modes: the workspace becomes a fixed overlay; the toolbar stays
   on top so you can switch back to split (Esc also exits). */
.lg-workspace.mode-editor .lab-guide-preview-pane,
.lg-workspace.mode-preview .lab-guide-edit-pane { display: none; }
.lg-workspace.mode-editor .lab-guide-split,
.lg-workspace.mode-preview .lab-guide-split { grid-template-columns: 1fr; }
.lg-workspace.mode-editor, .lg-workspace.mode-preview {
  position: fixed; inset: 0; z-index: 1100; background: var(--ccc-canvas);
  padding: 14px 18px; display: flex; flex-direction: column; gap: 0;
}
.lg-workspace.mode-editor .lab-guide-split,
.lg-workspace.mode-preview .lab-guide-split { flex: 1; min-height: 0; }
.lg-workspace.mode-editor .lab-guide-edit-pane textarea,
.lg-workspace.mode-preview .lab-guide-preview-frame,
.lg-workspace.mode-preview .lab-guide-source-view { min-height: 0; }

@media (max-width: 860px) { .lab-guide-split { grid-template-columns: 1fr; } }

.assignment-progress { display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(7,18,34,.48); align-items: center; justify-content: center; }
.assignment-progress.is-visible { display: flex; }
.assignment-progress__card { min-width: 300px; max-width: 420px; display: grid; gap: 10px; padding: 24px; border-radius: 12px; color: #fff; background: #102a43; box-shadow: 0 12px 40px rgba(0,0,0,.35); text-align: center; }
.assignment-progress__card span:last-child { color: #d9e6f2; font-size: .92rem; }
.assignment-progress__spinner { width: 26px; height: 26px; margin: 0 auto; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: assignment-spin .8s linear infinite; }
@keyframes assignment-spin { to { transform: rotate(360deg); } }
