/*
 * M.I.A.I Engineering Control Centre
 * Approved dark operations design, August 2026.
 */
:root {
  --cc-bg: #0b1220;
  --cc-bg-deep: #08111f;
  --cc-panel: #111827;
  --cc-panel-2: #151f31;
  --cc-panel-3: #0f1a2a;
  --cc-border: #243047;
  --cc-border-soft: #1c2940;
  --cc-text: #f8fafc;
  --cc-muted: #9ca3af;
  --cc-blue: #22c5fe;
  --cc-blue-strong: #1685d6;
  --cc-green: #22c55e;
  --cc-amber: #f59e0b;
  --cc-red: #ef4444;
  --cc-purple: #8b5cf6;
  --cc-sidebar: 178px;
  --cc-radius: 9px;
  --cc-shadow: 0 14px 34px rgba(0,0,0,.24);
}

html { background: var(--cc-bg); }
body:not(.public-site) {
  margin: 0;
  color: var(--cc-text);
  background:
    radial-gradient(circle at 78% -10%, rgba(34,197,254,.055), transparent 32rem),
    linear-gradient(145deg, var(--cc-bg) 0%, #0a1423 58%, var(--cc-bg-deep) 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
body:not(.public-site) *,
body:not(.public-site) *::before,
body:not(.public-site) *::after { box-sizing: border-box; }
body:not(.public-site) :focus-visible {
  outline: 2px solid var(--cc-blue);
  outline-offset: 2px;
}
body:not(.public-site) a { color: var(--cc-blue); text-underline-offset: 3px; }

/* Fixed control-centre frame */
body:not(.public-site) .shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--cc-sidebar) minmax(0,1fr);
  background: transparent;
}
body:not(.public-site) .sidebar {
  position: sticky;
  top: 0;
  width: auto;
  height: 100vh;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  color: var(--cc-text);
  background:
    linear-gradient(180deg, rgba(18,31,49,.98), rgba(10,22,37,.99));
  border-right: 1px solid var(--cc-border-soft);
  box-shadow: 8px 0 28px rgba(0,0,0,.16);
  z-index: 40;
}
body:not(.public-site) .sidebar .logo {
  min-height: 57px;
  margin: 0 12px 11px;
  padding: 2px 0 12px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--cc-border);
}
body:not(.public-site) .sidebar .logo img {
  width: 116px;
  height: auto;
  filter: none;
}
body:not(.public-site) .sidebar nav {
  flex: 1;
  margin: 0;
  padding: 0 0 14px;
  overflow-y: auto;
  scrollbar-color: #33435b transparent;
  scrollbar-width: thin;
}
body:not(.public-site) .nav-heading {
  margin: 17px 17px 6px;
  color: #607089;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
body:not(.public-site) .nav-heading:first-child { margin-top: 5px; }
body:not(.public-site) .nav-link {
  min-height: 38px;
  margin: 1px 0;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  color: #d7deea;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: .15s ease;
}
body:not(.public-site) .nav-link > span {
  width: 17px;
  display: inline-grid;
  place-items: center;
  color: #99a8bc;
  font-size: 13px;
}
body:not(.public-site) .nav-link:hover {
  color: #fff;
  background: rgba(34,197,254,.075);
}
body:not(.public-site) .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(22,133,214,.58), rgba(22,133,214,.20));
  border-left-color: var(--cc-blue);
  box-shadow: none;
}
body:not(.public-site) .nav-link.active > span { color: #fff; }

body:not(.public-site) .user-box {
  min-height: 72px;
  margin: 8px 12px 0;
  padding: 10px;
  display: grid;
  grid-template-columns: 31px minmax(0,1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  color: var(--cc-text);
  background: rgba(17,24,39,.78);
}
body:not(.public-site) .user-box .avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139,92,246,.65);
  border-radius: 50%;
  color: #fff;
  background: rgba(139,92,246,.22);
  font-size: 11px;
  font-weight: 800;
}
body:not(.public-site) .user-box strong,
body:not(.public-site) .user-box span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body:not(.public-site) .user-box strong { color:#fff; font-size:10px; }
body:not(.public-site) .user-box span { margin-top:2px; color:var(--cc-muted); font-size:8px; }
body:not(.public-site) .user-actions {
  grid-column: 1 / -1;
  display:flex;
  gap:10px;
  padding-top:7px;
  border-top:1px solid var(--cc-border);
}
body:not(.public-site) .user-actions a { color:#7f90a8; font-size:8px; text-decoration:none; }
body:not(.public-site) .user-actions a:hover { color:var(--cc-blue); }

/* Top command bar */
body:not(.public-site) .main {
  min-width:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background:transparent;
}
body:not(.public-site) .topbar {
  position:sticky;
  top:0;
  min-height:53px;
  padding:0 22px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  border-bottom:1px solid var(--cc-border-soft);
  color:var(--cc-text);
  background:rgba(8,17,31,.92);
  backdrop-filter:blur(14px);
  z-index:30;
}
body:not(.public-site) .topbar h1 {
  margin:0;
  overflow:hidden;
  color:#fff;
  font-size:11px;
  font-weight:700;
  letter-spacing:0;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body:not(.public-site) .topbar-account {
  padding:6px 10px;
  border:1px solid var(--cc-border);
  border-radius:999px;
  color:#d7deea;
  background:rgba(17,24,39,.82);
  font-size:9px;
  font-weight:650;
  text-decoration:none;
}
body:not(.public-site) .menu-button {
  width:34px;
  height:34px;
  display:none;
  place-items:center;
  border:1px solid var(--cc-border);
  border-radius:7px;
  color:#fff;
  background:var(--cc-panel);
}
body:not(.public-site) .content {
  width:100%;
  max-width:1600px;
  margin:0 auto;
  padding:20px;
  flex:1;
}
body:not(.public-site) .main > footer {
  padding:14px 22px 20px;
  color:#53637a;
  font-size:8px;
  text-align:right;
}

/* Typography and reusable surfaces */
body:not(.public-site) h1,
body:not(.public-site) h2,
body:not(.public-site) h3,
body:not(.public-site) h4 { color:var(--cc-text); letter-spacing:-.012em; }
body:not(.public-site) p { color:#c6cfdd; line-height:1.52; }
body:not(.public-site) .eyebrow {
  color:var(--cc-blue);
  font-size:8px;
  font-weight:800;
  letter-spacing:.13em;
  text-transform:uppercase;
}
body:not(.public-site) .admin-page-header {
  margin:0 0 16px;
  padding:0;
}
body:not(.public-site) .admin-page-header h1 {
  margin:4px 0 4px;
  color:#fff;
  font-size:24px;
}
body:not(.public-site) .admin-page-header p { max-width:760px; margin:0; color:var(--cc-muted); font-size:11px; }
body:not(.public-site) .admin-breadcrumbs,
body:not(.public-site) .breadcrumbs { color:#77869c; font-size:8px; }
body:not(.public-site) .admin-breadcrumbs a,
body:not(.public-site) .breadcrumbs a { color:#8da0ba; }

body:not(.public-site) .admin-card,
body:not(.public-site) .card,
body:not(.public-site) .panel,
body:not(.public-site) .build-card {
  border:1px solid var(--cc-border);
  border-radius:var(--cc-radius);
  color:var(--cc-text);
  background:linear-gradient(145deg, rgba(21,31,49,.98), rgba(15,26,42,.98));
  box-shadow:var(--cc-shadow);
}
body:not(.public-site) .admin-card:hover { border-color:#34445e; }
body:not(.public-site) .flash-stack { margin-bottom:12px; }
body:not(.public-site) .flash {
  padding:10px 12px;
  border:1px solid rgba(34,197,254,.38);
  border-radius:7px;
  color:#c8eeff;
  background:rgba(22,133,214,.13);
  font-size:10px;
}
body:not(.public-site) .build-muted,
body:not(.public-site) .muted { color:var(--cc-muted); }

/* Forms */
body:not(.public-site) label { color:#b8c2d1; }
body:not(.public-site) input,
body:not(.public-site) select,
body:not(.public-site) textarea {
  border:1px solid var(--cc-border);
  border-radius:7px;
  color:var(--cc-text);
  background:#0c1626;
  font:inherit;
}
body:not(.public-site) input::placeholder,
body:not(.public-site) textarea::placeholder { color:#66758b; }
body:not(.public-site) input:focus,
body:not(.public-site) select:focus,
body:not(.public-site) textarea:focus {
  border-color:var(--cc-blue-strong);
  box-shadow:0 0 0 2px rgba(34,197,254,.12);
  outline:0;
}
body:not(.public-site) option { background:#0c1626; color:#fff; }
body:not(.public-site) button,
body:not(.public-site) .admin-button { border-radius:7px; font-weight:700; }
body:not(.public-site) .admin-button--primary,
body:not(.public-site) .builder-primary-action,
body:not(.public-site) .build-approve {
  border-color:var(--cc-purple);
  color:#fff;
  background:linear-gradient(135deg, #7c3aed, var(--cc-purple));
  box-shadow:0 7px 17px rgba(139,92,246,.22);
}
body:not(.public-site) .admin-button--primary:hover,
body:not(.public-site) .builder-primary-action:hover,
body:not(.public-site) .build-approve:hover { background:#7c3aed; }
body:not(.public-site) .admin-button--quiet,
body:not(.public-site) .build-reject {
  border:1px solid var(--cc-border);
  color:#d5deea;
  background:#152033;
}

/* Status language */
body:not(.public-site) .admin-status,
body:not(.public-site) .build-status,
body:not(.public-site) [class*="status-badge"] {
  border:1px solid rgba(34,197,254,.32);
  color:#73d9ff;
  background:rgba(34,197,254,.10);
}
body:not(.public-site) [data-tone="success"],
body:not(.public-site) .admin-status--success { border-color:rgba(34,197,94,.35); color:#5ee48d; background:rgba(34,197,94,.10); }
body:not(.public-site) [data-tone="warning"],
body:not(.public-site) .admin-status--warning { border-color:rgba(245,158,11,.38); color:#fbbf45; background:rgba(245,158,11,.11); }
body:not(.public-site) [data-tone="danger"],
body:not(.public-site) .admin-status--danger { border-color:rgba(239,68,68,.45); color:#ff7d7d; background:rgba(239,68,68,.12); }

/* Data tables */
body:not(.public-site) table {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--cc-border);
  border-radius:var(--cc-radius);
  color:var(--cc-text);
  background:var(--cc-panel-3);
}
body:not(.public-site) th {
  padding:9px 11px;
  border-bottom:1px solid var(--cc-border);
  color:#8999af;
  background:#111d2f;
  font-size:8px;
  letter-spacing:.09em;
  text-align:left;
  text-transform:uppercase;
}
body:not(.public-site) td {
  padding:10px 11px;
  border-bottom:1px solid var(--cc-border-soft);
  color:#d3dbe7;
  font-size:10px;
}
body:not(.public-site) tr:last-child td { border-bottom:0; }
body:not(.public-site) tbody tr:hover td { background:rgba(34,197,254,.035); }

/* Dashboard becomes an operational start screen */
body:not(.public-site) .ai-home { max-width:1280px; margin:0 auto 20px; }
body:not(.public-site) .ai-welcome {
  padding:28px;
  overflow:hidden;
  border:1px solid var(--cc-border);
  border-radius:var(--cc-radius);
  color:var(--cc-text);
  background:
    radial-gradient(circle at 88% 0%, rgba(34,197,254,.12), transparent 27rem),
    linear-gradient(145deg, #111c2d, #0e1929);
  box-shadow:var(--cc-shadow);
}
body:not(.public-site) .ai-welcome .eyebrow { color:var(--cc-blue); }
body:not(.public-site) .ai-welcome h2 {
  margin:6px 0;
  color:#fff;
  font-size:28px;
}
body:not(.public-site) .ai-welcome p { color:#aeb9ca !important; font-size:11px !important; font-weight:500 !important; }
body:not(.public-site) .ai-prompt {
  margin-top:20px;
  padding:6px;
  border:1px solid var(--cc-border);
  border-radius:8px;
  background:#0a1423;
  box-shadow:none;
}
body:not(.public-site) .ai-prompt input { border:0; color:#fff; background:transparent; box-shadow:none; }
body:not(.public-site) .ai-prompt button { border:0; background:var(--cc-blue-strong); }
body:not(.public-site) .ai-actions { gap:12px; margin-top:12px; }
body:not(.public-site) .ai-action-card {
  padding:17px;
  border-color:var(--cc-border);
  border-radius:var(--cc-radius);
  color:var(--cc-text);
  background:var(--cc-panel-2);
  box-shadow:none;
}
body:not(.public-site) .ai-action-card:hover { border-color:#375477; background:#17243a; box-shadow:var(--cc-shadow); }
body:not(.public-site) .ai-action-icon { color:var(--cc-blue); background:rgba(34,197,254,.10); }
body:not(.public-site) .ai-action-card h3 { color:#fff; }
body:not(.public-site) .ai-action-card p { color:var(--cc-muted); font-size:10px; }
body:not(.public-site) .ai-action-meta { color:var(--cc-blue); }

/* Builder conversation control centre */
body:not(.public-site) .builder-workspace,
body:not(.public-site) .build-detail { max-width:1400px; }
body:not(.public-site) .builder-panel { border-color:var(--cc-border); box-shadow:var(--cc-shadow); }
body:not(.public-site) .builder-chat { padding:0; overflow:hidden; }
body:not(.public-site) .builder-chat-shell { gap:0; min-height:400px; }
body:not(.public-site) .builder-chat-sidebar {
  padding:16px 13px;
  border:0;
  border-right:1px solid var(--cc-border);
  background:#0d1828;
}
body:not(.public-site) .builder-chat-sidebar__header h2 { color:#fff; font-size:10px; }
body:not(.public-site) .builder-chat-sidebar__new {
  border:1px solid rgba(139,92,246,.4);
  color:#d8c7ff;
  background:rgba(139,92,246,.14);
}
body:not(.public-site) .builder-chat-sidebar__item {
  border:1px solid transparent;
  color:#d4dce8;
  background:transparent;
}
body:not(.public-site) .builder-chat-sidebar__item:hover {
  border-color:var(--cc-border);
  background:#152136;
}
body:not(.public-site) .builder-chat-sidebar__title { color:#eaf0f7; font-size:10px; }
body:not(.public-site) .builder-chat-sidebar__meta { color:#718198; font-size:8px; }
body:not(.public-site) .builder-chat-main {
  padding:18px;
  display:flex;
  flex-direction:column;
  background:#101a2a;
}
body:not(.public-site) .builder-chat__log { flex:1; max-height:360px; padding:2px; }
body:not(.public-site) .builder-chat__message { border-radius:8px; font-size:10px; }
body:not(.public-site) .builder-chat__message--user { color:#fff; background:#126ea8; }
body:not(.public-site) .builder-chat__message--builder {
  border:1px solid var(--cc-border);
  color:#d5deea;
  background:#151f31;
}
body:not(.public-site) .builder-chat__composer {
  padding-top:13px;
  border-top:1px solid var(--cc-border);
}
body:not(.public-site) .builder-chat__composer label {
  min-width:170px;
  color:#8695aa;
  font-size:8px;
  font-weight:700;
}
body:not(.public-site) .builder-chat__composer select { width:100%; min-height:39px; margin-top:4px; padding:0 9px; }
body:not(.public-site) .builder-chat__composer textarea { min-height:70px; }
body:not(.public-site) .builder-primary-action { min-width:96px; }
body:not(.public-site) .builder-overview__heading,
body:not(.public-site) .builder-section__header h2 { color:#fff; }
body:not(.public-site) .builder-section__count { color:#b8c3d2; background:#202c40; }
body:not(.public-site) .build-card {
  border-color:var(--cc-border);
  color:var(--cc-text);
  background:linear-gradient(145deg,#151f31,#101b2c);
  box-shadow:none;
}
body:not(.public-site) .build-card:hover { border-color:#38516f; box-shadow:var(--cc-shadow); }
body:not(.public-site) .build-card__eyebrow,
body:not(.public-site) .build-card__meta { color:#7f8ea4; }
body:not(.public-site) .build-card__title { color:#f3f6fa; }
body:not(.public-site) .build-card__open { color:var(--cc-blue); }
body:not(.public-site) .builder-empty {
  color:#738399;
  border-color:var(--cc-border);
  background:#0e1929;
}
body:not(.public-site) .builder-info { border-color:var(--cc-border); }
body:not(.public-site) .builder-info summary { color:#8392a7; }
body:not(.public-site) .builder-info__item { color:#8190a5; background:#121e30; }
body:not(.public-site) .builder-info__item strong { color:#fff; }

/* Build detail: match approved Engineering Control Centre */
body:not(.public-site) .build-detail > .build-card {
  padding:17px;
  border-radius:var(--cc-radius);
}
body:not(.public-site) .build-request { color:#edf2f8; font-size:14px; }
body:not(.public-site) .build-risk--low { color:#61e68d; background:rgba(34,197,94,.10); }
body:not(.public-site) .build-risk--medium { color:#fbbf45; background:rgba(245,158,11,.11); }
body:not(.public-site) .build-risk--high { color:#ff7777; background:rgba(239,68,68,.12); }
body:not(.public-site) .build-file { border-color:var(--cc-border); }
body:not(.public-site) code { color:#bfe9ff; background:#0a1423; }
body:not(.public-site) .build-confirm {
  border-color:var(--cc-purple);
  background:rgba(139,92,246,.08);
}
body:not(.public-site) .build-result { color:#d7dfeb; background:#0d1828; }
body:not(.public-site) #miai-live-progress {
  --build-accent:var(--cc-blue);
  --build-accent-soft:#101d2f;
  --build-state:var(--cc-amber);
  border-color:var(--cc-border);
  border-radius:var(--cc-radius);
  background:var(--cc-panel-3);
  box-shadow:var(--cc-shadow);
}
body:not(.public-site) #miai-live-progress.build-live--complete { --build-state:var(--cc-green); --build-accent-soft:#10261f; }
body:not(.public-site) #miai-live-progress.build-live--failed { --build-state:var(--cc-red); --build-accent-soft:#311518; }
body:not(.public-site) .build-live__header {
  border-color:var(--cc-border);
  background:linear-gradient(135deg,#121f32 35%,var(--build-accent-soft));
}
body:not(.public-site) .build-live__header h2,
body:not(.public-site) .build-live__stage strong { color:#fff; }
body:not(.public-site) .build-live__eyebrow,
body:not(.public-site) .build-live__label { color:#7f8fa5; }
body:not(.public-site) .build-live__state { border-color:currentColor; color:var(--build-state); background:#0b1524; }
body:not(.public-site) #miai-live-progress progress,
body:not(.public-site) #miai-live-progress progress::-webkit-progress-bar { background:#394252; }
body:not(.public-site) .build-live__operation,
body:not(.public-site) .build-live__activity {
  border-color:var(--cc-border);
  color:#d2dbe7;
  background:#0d1828;
}
body:not(.public-site) .build-live__activity h3 { color:#f1f5f9; }

/* Assistant */
body:not(.public-site) .miai-assistant-trigger {
  right:16px;
  bottom:16px;
  min-height:39px;
  padding:7px 11px 7px 7px;
  border:1px solid rgba(139,92,246,.5);
  border-radius:999px;
  color:#e4d9ff;
  background:#151f31;
  box-shadow:0 10px 28px rgba(0,0,0,.34);
}
body:not(.public-site) .miai-assistant-trigger img { width:25px; height:25px; filter:brightness(1.25); }
body:not(.public-site) .miai-assistant {
  border-left:1px solid var(--cc-border);
  color:var(--cc-text);
  background:var(--cc-bg-deep);
  box-shadow:-18px 0 48px rgba(0,0,0,.42);
}
body:not(.public-site) .miai-assistant header,
body:not(.public-site) .assistant-form { border-color:var(--cc-border); background:#101b2c; }
body:not(.public-site) .assistant-messages { background:#0b1524; }
body:not(.public-site) .assistant-welcome { color:var(--cc-muted); }

/* Responsive */
@media (max-width:1050px) {
  body:not(.public-site) .shell { grid-template-columns:1fr; }
  body:not(.public-site) .sidebar {
    position:fixed;
    inset:0 auto 0 0;
    width:min(270px,88vw);
    transform:translateX(-105%);
    transition:transform .2s ease;
  }
  body.menu-open:not(.public-site) .sidebar { transform:translateX(0); }
  body:not(.public-site) .menu-button { display:grid; }
  body:not(.public-site) .topbar { padding:0 15px; }
  body:not(.public-site) .content { padding:16px; }
  body:not(.public-site) .builder-chat__composer { flex-wrap:wrap; }
  body:not(.public-site) .builder-chat__composer label { width:100%; }
}
@media (max-width:700px) {
  body:not(.public-site) .topbar-account { max-width:100px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body:not(.public-site) .content { padding:13px 10px 34px; }
  body:not(.public-site) .ai-welcome { padding:20px 15px; }
  body:not(.public-site) .ai-welcome h2 { font-size:23px; }
  body:not(.public-site) .ai-prompt { display:grid; }
  body:not(.public-site) .ai-prompt button { width:100%; }
  body:not(.public-site) .builder-chat-main { padding:14px 10px; }
  body:not(.public-site) .builder-chat-sidebar { border-right:0; border-bottom:1px solid var(--cc-border); }
  body:not(.public-site) .builder-chat__composer { flex-direction:column; }
  body:not(.public-site) .miai-assistant-trigger span { display:none; }
  body:not(.public-site) .miai-assistant-trigger { padding:6px; }
}


/*
 * Authoritative Control Centre cascade
 * Legacy templates contain later light-theme !important declarations.
 * These selectors deliberately combine higher specificity with !important
 * so the approved operations design remains consistent on every admin page.
 */
html body:not(.public-site),
html body:not(.public-site) .shell,
html body:not(.public-site) .main,
html body:not(.public-site) .content {
  color: var(--cc-text) !important;
  background-color: var(--cc-bg) !important;
  background-image: none !important;
}
html body:not(.public-site) .sidebar {
  color: var(--cc-text) !important;
  background: linear-gradient(180deg, #121f31, #0a1625) !important;
  border-right-color: var(--cc-border-soft) !important;
}
html body:not(.public-site) .sidebar .logo {
  background: transparent !important;
  border-color: var(--cc-border) !important;
}
html body:not(.public-site) .sidebar .logo img { filter: none !important; }
html body:not(.public-site) .nav-heading { color: #718198 !important; }
html body:not(.public-site) .nav-link {
  color: #d7deea !important;
  background: transparent !important;
  border-color: transparent !important;
}
html body:not(.public-site) .nav-link:hover {
  color: #fff !important;
  background: rgba(34,197,254,.075) !important;
}
html body:not(.public-site) .nav-link.active {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(22,133,214,.58), rgba(22,133,214,.20)) !important;
  border-left-color: var(--cc-blue) !important;
}
html body:not(.public-site) .user-box,
html body:not(.public-site) .topbar {
  color: var(--cc-text) !important;
  background: rgba(8,17,31,.96) !important;
  border-color: var(--cc-border) !important;
}
html body:not(.public-site) .topbar h1,
html body:not(.public-site) .topbar strong,
html body:not(.public-site) .user-box strong { color: #fff !important; }
html body:not(.public-site) .topbar-account {
  color: #d7deea !important;
  background: var(--cc-panel) !important;
  border-color: var(--cc-border) !important;
}

/* Universal readable surfaces */
html body:not(.public-site) .card,
html body:not(.public-site) .panel,
html body:not(.public-site) .admin-card,
html body:not(.public-site) .content-card,
html body:not(.public-site) .quick-card,
html body:not(.public-site) .build-card,
html body:not(.public-site) .builder-panel,
html body:not(.public-site) .builder-info,
html body:not(.public-site) .builder-chat-shell,
html body:not(.public-site) .builder-chat-sidebar,
html body:not(.public-site) .builder-chat-main {
  color: var(--cc-text) !important;
  background: linear-gradient(145deg, #151f31, #0f1a2a) !important;
  border-color: var(--cc-border) !important;
  box-shadow: var(--cc-shadow) !important;
}
html body:not(.public-site) h1,
html body:not(.public-site) h2,
html body:not(.public-site) h3,
html body:not(.public-site) h4,
html body:not(.public-site) h5,
html body:not(.public-site) h6,
html body:not(.public-site) strong,
html body:not(.public-site) th,
html body:not(.public-site) label,
html body:not(.public-site) .build-card__title,
html body:not(.public-site) .builder-overview__heading {
  color: var(--cc-text) !important;
}
html body:not(.public-site) p,
html body:not(.public-site) td,
html body:not(.public-site) small,
html body:not(.public-site) .muted,
html body:not(.public-site) .build-card__meta,
html body:not(.public-site) .build-card__eyebrow,
html body:not(.public-site) .ai-action-meta {
  color: #aeb9c9 !important;
}
html body:not(.public-site) a { color: var(--cc-blue) !important; }
html body:not(.public-site) hr { border-color: var(--cc-border) !important; }

/* Dashboard */
html body:not(.public-site) .dashboard,
html body:not(.public-site) .ai-home {
  color: var(--cc-text) !important;
  background: transparent !important;
}
html body:not(.public-site) .dashboard .ai-welcome {
  color: var(--cc-text) !important;
  background: linear-gradient(135deg, #101a2d, #0d1727) !important;
  border: 1px solid #26354e !important;
  box-shadow: var(--cc-shadow) !important;
}
html body:not(.public-site) .dashboard .ai-welcome h1,
html body:not(.public-site) .dashboard .ai-welcome h2,
html body:not(.public-site) .dashboard .ai-welcome p,
html body:not(.public-site) .dashboard .ai-welcome .eyebrow {
  color: var(--cc-text) !important;
}
html body:not(.public-site) .dashboard .ai-welcome .eyebrow { color: var(--cc-blue) !important; }
html body:not(.public-site) .dashboard .ai-prompt,
html body:not(.public-site) .dashboard .ai-action-card,
html body:not(.public-site) .dashboard .ai-memory,
html body:not(.public-site) .dashboard .quick-card,
html body:not(.public-site) .dashboard .kpi,
html body:not(.public-site) .dashboard .panel,
html body:not(.public-site) .dashboard .content-card {
  color: var(--cc-text) !important;
  background: #111b2c !important;
  border-color: var(--cc-border) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.18) !important;
}
html body:not(.public-site) .dashboard .ai-action-card:hover,
html body:not(.public-site) .dashboard .quick-card:hover {
  background: #162338 !important;
  border-color: #35506f !important;
}
html body:not(.public-site) .dashboard .ai-action-icon,
html body:not(.public-site) .dashboard .kpi-icon {
  color: var(--cc-blue) !important;
  background: rgba(34,197,254,.10) !important;
  border-color: rgba(34,197,254,.28) !important;
}
html body:not(.public-site) .dashboard table,
html body:not(.public-site) .dashboard thead,
html body:not(.public-site) .dashboard tbody,
html body:not(.public-site) .dashboard tr,
html body:not(.public-site) .dashboard th,
html body:not(.public-site) .dashboard td {
  color: #d9e1ec !important;
  background: transparent !important;
  border-color: var(--cc-border) !important;
}
html body:not(.public-site) .dashboard th {
  color: #8494aa !important;
  background: #0e1828 !important;
}
html body:not(.public-site) .dashboard tbody tr:hover td { background: rgba(34,197,254,.04) !important; }

/* Builder */
html body:not(.public-site) .builder-workspace,
html body:not(.public-site) .builder-overview,
html body:not(.public-site) .builder-section,
html body:not(.public-site) .build-list {
  color: var(--cc-text) !important;
  background: transparent !important;
}
html body:not(.public-site) .builder-chat__log,
html body:not(.public-site) .builder-chat__message,
html body:not(.public-site) .builder-empty,
html body:not(.public-site) .builder-info__item {
  color: #d9e1ec !important;
  background: #0e1828 !important;
  border-color: var(--cc-border) !important;
}
html body:not(.public-site) .builder-chat__message--builder {
  background: rgba(22,133,214,.13) !important;
  border-color: rgba(34,197,254,.30) !important;
}
html body:not(.public-site) .build-card,
html body:not(.public-site) .build-card *,
html body:not(.public-site) .builder-section * { opacity: 1 !important; }
html body:not(.public-site) .build-card__aside {
  background: #0c1625 !important;
  border-color: var(--cc-border) !important;
}
html body:not(.public-site) .build-card__open {
  color: var(--cc-blue) !important;
  background: transparent !important;
}
html body:not(.public-site) .builder-section--attention .build-card {
  border-left: 3px solid var(--cc-amber) !important;
}

/* Controls */
html body:not(.public-site) input,
html body:not(.public-site) select,
html body:not(.public-site) textarea {
  color: #f8fafc !important;
  caret-color: var(--cc-blue) !important;
  background: #0b1524 !important;
  border-color: #31415a !important;
}
html body:not(.public-site) input::placeholder,
html body:not(.public-site) textarea::placeholder { color: #75859c !important; opacity: 1 !important; }
html body:not(.public-site) button,
html body:not(.public-site) .button,
html body:not(.public-site) .admin-button {
  color: #eaf1fa !important;
  background: #18263a !important;
  border-color: #34445e !important;
}
html body:not(.public-site) button:hover,
html body:not(.public-site) .button:hover,
html body:not(.public-site) .admin-button:hover { background: #21334b !important; }
html body:not(.public-site) .button.primary,
html body:not(.public-site) .admin-button--primary,
html body:not(.public-site) .builder-primary-action {
  color: #fff !important;
  background: linear-gradient(135deg, #1685d6, #2765c4) !important;
  border-color: #329dde !important;
}
html body:not(.public-site) .status,
html body:not(.public-site) [class*="status-"] {
  color: #d9e1ec !important;
  background: #172337 !important;
  border-color: #34445e !important;
}
html body:not(.public-site) .status.success,
html body:not(.public-site) .status.completed { color:#76e5a0 !important; background:rgba(34,197,94,.12) !important; border-color:rgba(34,197,94,.35) !important; }
html body:not(.public-site) .status.warning,
html body:not(.public-site) .status.pending { color:#ffc85c !important; background:rgba(245,158,11,.12) !important; border-color:rgba(245,158,11,.35) !important; }
html body:not(.public-site) .status.error,
html body:not(.public-site) .status.failed { color:#ff8585 !important; background:rgba(239,68,68,.12) !important; border-color:rgba(239,68,68,.35) !important; }


/* Dashboard presentation — isolated through base shell_class. */
body:not(.public-site) .shell.dashboard-shell .content{color:#e7edf5!important}
body:not(.public-site) .shell.dashboard-shell .ai-welcome{background:linear-gradient(135deg,#17243b,#101a2d)!important;border:1px solid #344761!important}
body:not(.public-site) .shell.dashboard-shell .ai-welcome h2{color:#fff!important;font-size:30px!important}
body:not(.public-site) .shell.dashboard-shell .ai-welcome p{color:#d7e0eb!important;font-size:15px!important}
body:not(.public-site) .shell.dashboard-shell .ai-prompt{background:#0b1626!important;border:1px solid #3b4f6b!important}
body:not(.public-site) .shell.dashboard-shell .ai-action-card{color:#eef4fb!important;background:#152137!important;border:1px solid #344761!important}
body:not(.public-site) .shell.dashboard-shell .ai-action-card h3{color:#fff!important;font-size:17px!important}
body:not(.public-site) .shell.dashboard-shell .ai-action-card p{color:#c8d3e1!important;font-size:14px!important}
body:not(.public-site) .shell.dashboard-shell .ai-memory{color:#eef4fb!important;background:#152137!important;border-color:#344761!important}
body:not(.public-site) .shell.dashboard-shell .ai-memory strong{color:#fff!important}
body:not(.public-site) .shell.dashboard-shell .ai-memory span{color:#c8d3e1!important;font-size:13px!important}
body:not(.public-site) .shell.dashboard-shell .kpi{color:#e7edf5!important;background:#152137!important;border-color:#344761!important;box-shadow:none!important}
body:not(.public-site) .shell.dashboard-shell .kpi small{color:#c0cad8!important;font-size:12px!important}
body:not(.public-site) .shell.dashboard-shell .kpi strong{color:#fff!important;font-size:25px!important}
body:not(.public-site) .shell.dashboard-shell .kpi div>span{color:#aeb9c9!important;font-size:12px!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid>.panel{overflow:hidden!important;color:#e7edf5!important;background:#152137!important;border-color:#344761!important;box-shadow:none!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid .panel-header{color:#e7edf5!important;background:#101b2d!important;border-bottom:1px solid #344761!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid .panel-header>div{background:transparent!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid .panel-header h2{color:#fff!important;font-size:17px!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid .panel-header .eyebrow{color:#48c8ff!important;background:transparent!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid .table-wrap{background:#101b2d!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid table{color:#d7e0eb!important;background:#101b2d!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid thead,
body:not(.public-site) .shell.dashboard-shell .dashboard-grid thead tr,
body:not(.public-site) .shell.dashboard-shell .dashboard-grid th{color:#fff!important;background:#0b1626!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid tbody,
body:not(.public-site) .shell.dashboard-shell .dashboard-grid tbody tr,
body:not(.public-site) .shell.dashboard-shell .dashboard-grid td{color:#cbd5e1!important;background:#121e31!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid th,
body:not(.public-site) .shell.dashboard-shell .dashboard-grid td{border-color:#2d3d56!important;font-size:12px!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid tbody tr:nth-child(even) td{background:#101b2d!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid .quick-grid{background:#152137!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid .quick-card{color:#e7edf5!important;background:#101b2d!important;border-color:#344761!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid .quick-card strong{color:#fff!important;background:transparent!important}
body:not(.public-site) .shell.dashboard-shell .dashboard-grid .quick-card small{color:#b6c1d1!important;background:transparent!important}


/* =====================================================================
   ALL AUTHENTICATED PAGES — PRESENTATION ONLY
   Retains legacy layout mechanics; replaces only colour, type and surfaces.
   ===================================================================== */
body:not(.public-site) .shell.admin-control-centre{
  --page-surface:#152137;
  --page-surface-2:#101b2d;
  --page-surface-3:#0b1626;
  --page-border:#34445e;
  --page-border-soft:#283851;
  --page-text:#f5f7fb;
  --page-body:#d4dce7;
  --page-muted:#aab6c7;
  --page-blue:#48c8ff;
}
body:not(.public-site) .shell.admin-control-centre .content{color:var(--page-body)!important}
body:not(.public-site) .shell.admin-control-centre .content h1,
body:not(.public-site) .shell.admin-control-centre .content h2,
body:not(.public-site) .shell.admin-control-centre .content h3,
body:not(.public-site) .shell.admin-control-centre .content h4,
body:not(.public-site) .shell.admin-control-centre .content h5,
body:not(.public-site) .shell.admin-control-centre .content h6{color:var(--page-text)!important;text-shadow:none!important}
body:not(.public-site) .shell.admin-control-centre .content h1{font-size:27px!important}
body:not(.public-site) .shell.admin-control-centre .content h2{font-size:19px!important}
body:not(.public-site) .shell.admin-control-centre .content h3{font-size:16px!important}
body:not(.public-site) .shell.admin-control-centre .content p,
body:not(.public-site) .shell.admin-control-centre .content li,
body:not(.public-site) .shell.admin-control-centre .content dt,
body:not(.public-site) .shell.admin-control-centre .content dd,
body:not(.public-site) .shell.admin-control-centre .content label{color:var(--page-body)!important;font-size:14px!important;line-height:1.55!important}
body:not(.public-site) .shell.admin-control-centre .content small,
body:not(.public-site) .shell.admin-control-centre .content .muted,
body:not(.public-site) .shell.admin-control-centre .content .secondary-text,
body:not(.public-site) .shell.admin-control-centre .content .help-text{color:var(--page-muted)!important;font-size:12px!important}
body:not(.public-site) .shell.admin-control-centre .content a{color:var(--page-blue)!important;text-decoration-color:rgba(72,200,255,.42)!important}
body:not(.public-site) .shell.admin-control-centre .content .eyebrow{color:var(--page-blue)!important;background:transparent!important;font-size:11px!important}
body:not(.public-site) .shell.admin-control-centre .content .breadcrumbs,
body:not(.public-site) .shell.admin-control-centre .content .admin-breadcrumbs{color:var(--page-muted)!important;font-size:12px!important}

/* Shared cards and panels */
body:not(.public-site) .shell.admin-control-centre .content .card,
body:not(.public-site) .shell.admin-control-centre .content .panel,
body:not(.public-site) .shell.admin-control-centre .content .admin-card,
body:not(.public-site) .shell.admin-control-centre .content .section-card,
body:not(.public-site) .shell.admin-control-centre .content .content-card,
body:not(.public-site) .shell.admin-control-centre .content .dashboard-card,
body:not(.public-site) .shell.admin-control-centre .content .workspace-card,
body:not(.public-site) .shell.admin-control-centre .content .platform-card,
body:not(.public-site) .shell.admin-control-centre .content .project-card,
body:not(.public-site) .shell.admin-control-centre .content .organisation-card,
body:not(.public-site) .shell.admin-control-centre .content .user-card,
body:not(.public-site) .shell.admin-control-centre .content .settings-card,
body:not(.public-site) .shell.admin-control-centre .content .feature-card,
body:not(.public-site) .shell.admin-control-centre .content .table-card,
body:not(.public-site) .shell.admin-control-centre .content .form-card,
body:not(.public-site) .shell.admin-control-centre .content .info-card,
body:not(.public-site) .shell.admin-control-centre .content .detail-card,
body:not(.public-site) .shell.admin-control-centre .content .review-card,
body:not(.public-site) .shell.admin-control-centre .content .activity-card,
body:not(.public-site) .shell.admin-control-centre .content .security-card,
body:not(.public-site) .shell.admin-control-centre .content .summary-card,
body:not(.public-site) .shell.admin-control-centre .content .metric-card,
body:not(.public-site) .shell.admin-control-centre .content .stat-card{
  color:var(--page-body)!important;
  background-color:var(--page-surface)!important;
  background-image:none!important;
  border-color:var(--page-border)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.14)!important;
}
body:not(.public-site) .shell.admin-control-centre .content .admin-card__header,
body:not(.public-site) .shell.admin-control-centre .content .admin-card__body,
body:not(.public-site) .shell.admin-control-centre .content .section-header,
body:not(.public-site) .shell.admin-control-centre .content .card-header,
body:not(.public-site) .shell.admin-control-centre .content .card-body{
  color:var(--page-body)!important;
  background-color:transparent!important;
  border-color:var(--page-border-soft)!important;
}
body:not(.public-site) .shell.admin-control-centre .content .list-row,
body:not(.public-site) .shell.admin-control-centre .content .data-row,
body:not(.public-site) .shell.admin-control-centre .content .result-row,
body:not(.public-site) .shell.admin-control-centre .content .activity-row,
body:not(.public-site) .shell.admin-control-centre .content .user-row,
body:not(.public-site) .shell.admin-control-centre .content .project-row,
body:not(.public-site) .shell.admin-control-centre .content .source-row,
body:not(.public-site) .shell.admin-control-centre .content .evidence-row,
body:not(.public-site) .shell.admin-control-centre .content .review-row,
body:not(.public-site) .shell.admin-control-centre .content .empty-state{
  color:var(--page-body)!important;
  background-color:var(--page-surface-2)!important;
  border-color:var(--page-border)!important;
}

/* Forms on projects, discovery, learning, reviews, intelligence and settings */
body:not(.public-site) .shell.admin-control-centre .content input,
body:not(.public-site) .shell.admin-control-centre .content select,
body:not(.public-site) .shell.admin-control-centre .content textarea{
  color:#fff!important;
  background-color:var(--page-surface-3)!important;
  border-color:#3b4f6b!important;
  box-shadow:none!important;
  font-size:14px!important;
}
body:not(.public-site) .shell.admin-control-centre .content input::placeholder,
body:not(.public-site) .shell.admin-control-centre .content textarea::placeholder{color:#8d9bb0!important;opacity:1!important}
body:not(.public-site) .shell.admin-control-centre .content input:focus,
body:not(.public-site) .shell.admin-control-centre .content select:focus,
body:not(.public-site) .shell.admin-control-centre .content textarea:focus{border-color:var(--page-blue)!important;outline:2px solid rgba(72,200,255,.18)!important}
body:not(.public-site) .shell.admin-control-centre .content fieldset{border-color:var(--page-border)!important}
body:not(.public-site) .shell.admin-control-centre .content legend{color:#fff!important}

/* Tables, including Build History and review queues */
body:not(.public-site) .shell.admin-control-centre .content .table-wrap{background-color:var(--page-surface)!important}
body:not(.public-site) .shell.admin-control-centre .content table{color:var(--page-body)!important;background-color:var(--page-surface)!important}
body:not(.public-site) .shell.admin-control-centre .content thead,
body:not(.public-site) .shell.admin-control-centre .content thead tr,
body:not(.public-site) .shell.admin-control-centre .content th{color:#fff!important;background-color:var(--page-surface-3)!important}
body:not(.public-site) .shell.admin-control-centre .content tbody,
body:not(.public-site) .shell.admin-control-centre .content tbody tr,
body:not(.public-site) .shell.admin-control-centre .content td{color:#ced7e3!important;background-color:var(--page-surface-2)!important}
body:not(.public-site) .shell.admin-control-centre .content th,
body:not(.public-site) .shell.admin-control-centre .content td{border-color:var(--page-border-soft)!important;font-size:13px!important;line-height:1.45!important}
body:not(.public-site) .shell.admin-control-centre .content th{font-size:11px!important;font-weight:800!important}
body:not(.public-site) .shell.admin-control-centre .content tbody tr:nth-child(even) td{background-color:#111e31!important}
body:not(.public-site) .shell.admin-control-centre .content tbody tr:hover td{background-color:#17273e!important}
body:not(.public-site) .shell.admin-control-centre .content td p,
body:not(.public-site) .shell.admin-control-centre .content td div{color:inherit!important;background-color:transparent!important;font-size:inherit!important}

/* Buttons and statuses */
body:not(.public-site) .shell.admin-control-centre .content button,
body:not(.public-site) .shell.admin-control-centre .content .button,
body:not(.public-site) .shell.admin-control-centre .content .btn,
body:not(.public-site) .shell.admin-control-centre .content .admin-button{color:#eef4fb!important;background-color:#1b2a40!important;border-color:#40536e!important;font-size:13px!important}
body:not(.public-site) .shell.admin-control-centre .content .primary,
body:not(.public-site) .shell.admin-control-centre .content .button-primary,
body:not(.public-site) .shell.admin-control-centre .content .btn-primary,
body:not(.public-site) .shell.admin-control-centre .content .admin-button--primary,
body:not(.public-site) .shell.admin-control-centre .content .primary-button,
body:not(.public-site) .shell.admin-control-centre .content .action-primary{color:#fff!important;background:linear-gradient(135deg,#1685d6,#2563b9)!important;border-color:#38a9e8!important}
body:not(.public-site) .shell.admin-control-centre .content .status,
body:not(.public-site) .shell.admin-control-centre .content .badge,
body:not(.public-site) .shell.admin-control-centre .content [class*="status-"],
body:not(.public-site) .shell.admin-control-centre .content [class*="badge-"]{color:#dce6f2!important;background-color:#1b2a40!important;border-color:#40536e!important;font-size:11px!important}
body:not(.public-site) .shell.admin-control-centre .content .status-success,
body:not(.public-site) .shell.admin-control-centre .content .badge-success{color:#82e6a8!important;background-color:rgba(34,197,94,.12)!important;border-color:rgba(34,197,94,.38)!important}
body:not(.public-site) .shell.admin-control-centre .content .status-warning,
body:not(.public-site) .shell.admin-control-centre .content .badge-warning{color:#ffd06b!important;background-color:rgba(245,158,11,.12)!important;border-color:rgba(245,158,11,.4)!important}
body:not(.public-site) .shell.admin-control-centre .content .status-error,
body:not(.public-site) .shell.admin-control-centre .content .badge-error,
body:not(.public-site) .shell.admin-control-centre .content .status-danger,
body:not(.public-site) .shell.admin-control-centre .content .badge-danger{color:#ff9797!important;background-color:rgba(239,68,68,.12)!important;border-color:rgba(239,68,68,.4)!important}

/* Technical and diagnostic content */
body:not(.public-site) .shell.admin-control-centre .content pre,
body:not(.public-site) .shell.admin-control-centre .content code{color:#cdeeff!important;background-color:#071321!important;border-color:var(--page-border)!important;font-size:13px!important}
body:not(.public-site) .shell.admin-control-centre .content .flash,
body:not(.public-site) .shell.admin-control-centre .content .alert,
body:not(.public-site) .shell.admin-control-centre .content .notice{color:#d6f2ff!important;background-color:#10283b!important;border-color:#2e7ba4!important}


/* Shared shell corrections: footer and signed-in account area. */
body:not(.public-site) .shell.admin-control-centre .sidebar .user-box{
  color:#e7edf5!important;
  background:#101c2e!important;
  border:1px solid #34445e!important;
  box-shadow:none!important;
}
body:not(.public-site) .shell.admin-control-centre .sidebar .user-box strong{color:#fff!important}
body:not(.public-site) .shell.admin-control-centre .sidebar .user-box span,
body:not(.public-site) .shell.admin-control-centre .sidebar .user-actions,
body:not(.public-site) .shell.admin-control-centre .sidebar .user-actions a{color:#aeb9c9!important;background:transparent!important}
body:not(.public-site) .shell.admin-control-centre .main>footer{
  color:#7f8da3!important;
  background:#0b1220!important;
  border-top:1px solid #243047!important;
}

/* Discovery request */
body:not(.public-site) .shell.page-discovery .form-panel{
  color:#d7e0eb!important;background:#152137!important;border-color:#34445e!important;box-shadow:none!important;
}
body:not(.public-site) .shell.page-discovery .form-panel .panel-header{
  color:#d7e0eb!important;background:#101b2d!important;border-color:#34445e!important;
}
body:not(.public-site) .shell.page-discovery .form-panel .panel-header>div{background:transparent!important}
body:not(.public-site) .shell.page-discovery .form-panel h1,
body:not(.public-site) .shell.page-discovery .form-panel h2,
body:not(.public-site) .shell.page-discovery .form-panel h3{color:#fff!important;background:transparent!important}
body:not(.public-site) .shell.page-discovery .form-panel input,
body:not(.public-site) .shell.page-discovery .form-panel select,
body:not(.public-site) .shell.page-discovery .form-panel textarea{color:#fff!important;background:#0b1626!important;border-color:#3b4f6b!important}

/* Discovery Jobs and job views */
body:not(.public-site) .shell.page-jobs .panel,
body:not(.public-site) .shell.page-job_detail .panel,
body:not(.public-site) .shell.page-job_progress .panel{color:#d7e0eb!important;background:#152137!important;border-color:#34445e!important}
body:not(.public-site) .shell.page-jobs .panel-header,
body:not(.public-site) .shell.page-job_detail .panel-header,
body:not(.public-site) .shell.page-job_progress .panel-header{color:#d7e0eb!important;background:#101b2d!important;border-color:#34445e!important}
body:not(.public-site) .shell.page-jobs .panel-header>div,
body:not(.public-site) .shell.page-job_detail .panel-header>div,
body:not(.public-site) .shell.page-job_progress .panel-header>div{background:transparent!important}

/* Ask M.I.A.I */
body:not(.public-site) .shell.page-platform_ask_miai .admin-page-header{color:#d7e0eb!important;background:transparent!important}
body:not(.public-site) .shell.page-platform_ask_miai .ask-miai-page-card{color:#d7e0eb!important;background:#152137!important;border-color:#34445e!important}
body:not(.public-site) .shell.page-platform_ask_miai .ask-miai-page-card .admin-card__header,
body:not(.public-site) .shell.page-platform_ask_miai .ask-miai-page-card .admin-card__body{color:#d7e0eb!important;background:#152137!important;border-color:#34445e!important}
body:not(.public-site) .shell.page-platform_ask_miai .ask-miai-conversation{background:#0b1626!important;border-color:#34445e!important}
body:not(.public-site) .shell.page-platform_ask_miai .ask-miai-message{color:#d7e0eb!important;background:#18273e!important}
body:not(.public-site) .shell.page-platform_ask_miai .ask-miai-message.user{color:#fff!important;background:#285f9c!important}
body:not(.public-site) .shell.page-platform_ask_miai .ask-miai-form{background:#101b2d!important;border-color:#34445e!important}

/* Entity Intelligence */
body:not(.public-site) .shell.page-entity_ai_portal-index .entity-hero{
  color:#eef4fb!important;background:linear-gradient(145deg,#14243a,#0b1626)!important;border-color:#344b65!important;
}
body:not(.public-site) .shell.page-entity_ai_portal-index .entity-hero h1,
body:not(.public-site) .shell.page-entity_ai_portal-index .entity-hero h2{color:#fff!important}
body:not(.public-site) .shell.page-entity_ai_portal-index .entity-hero p{color:#d3dce8!important}
body:not(.public-site) .shell.page-entity_ai_portal-index .entity-hero-stats>div{color:#eef4fb!important;background:#0b1626!important;border-color:#344b65!important}
body:not(.public-site) .shell.page-entity_ai_portal-index .entity-panel{color:#d7e0eb!important;background:#152137!important;border-color:#344b65!important}
body:not(.public-site) .shell.page-entity_ai_portal-index .entity-panel .panel-header{color:#d7e0eb!important;background:#101b2d!important;border-color:#344b65!important}
body:not(.public-site) .shell.page-entity_ai_portal-index .entity-panel .panel-header>div{background:transparent!important}

/* Teach M.I.A.I — legacy template uses inline light styles. */
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content>div{color:#d7e0eb!important}
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content div[style*="background:white"],
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content div[style*="background: white"]{
  color:#d7e0eb!important;background:#152137!important;border-color:#34445e!important;box-shadow:none!important;
}
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content div[style*="background:#f8fafc"],
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content div[style*="background: #f8fafc"]{
  color:#d7e0eb!important;background:#101b2d!important;border-color:#34445e!important;
}
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content p[style],
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content span[style]{color:#c3cedc!important}
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content input,
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content select,
body:not(.public-site) .shell.page-miai_teaching-teach_miai .content textarea{color:#fff!important;background:#0b1626!important;border-color:#3b4f6b!important}

/* M.I.A.I Intelligence dashboard, registries and platform detail. */
body:not(.public-site) .shell.page-platform_intelligence-dashboard .admin-page-header,
body:not(.public-site) .shell.page-platform_intelligence-platform_detail .admin-page-header,
body:not(.public-site) .shell.page-platform_intelligence-application_types .admin-page-header,
body:not(.public-site) .shell.page-platform_intelligence-delivery_methods .admin-page-header,
body:not(.public-site) .shell.page-platform_intelligence-capabilities .admin-page-header{
  color:#d7e0eb!important;background:transparent!important;border-color:transparent!important;box-shadow:none!important;
}
body:not(.public-site) .shell.page-platform_intelligence-dashboard .admin-page-header *,
body:not(.public-site) .shell.page-platform_intelligence-platform_detail .admin-page-header *,
body:not(.public-site) .shell.page-platform_intelligence-application_types .admin-page-header *,
body:not(.public-site) .shell.page-platform_intelligence-delivery_methods .admin-page-header *,
body:not(.public-site) .shell.page-platform_intelligence-capabilities .admin-page-header *{background:transparent!important}
body:not(.public-site) .shell.page-platform_intelligence-dashboard .pi-stat,
body:not(.public-site) .shell.page-platform_intelligence-dashboard .pi-link .admin-card,
body:not(.public-site) .shell.page-platform_intelligence-platform_detail .admin-card,
body:not(.public-site) .shell.page-platform_intelligence-application_types .admin-card,
body:not(.public-site) .shell.page-platform_intelligence-delivery_methods .admin-card,
body:not(.public-site) .shell.page-platform_intelligence-capabilities .admin-card{
  color:#d7e0eb!important;background:#152137!important;border-color:#34445e!important;box-shadow:none!important;
}
body:not(.public-site) .shell.page-platform_intelligence-dashboard .pi-stat *,
body:not(.public-site) .shell.page-platform_intelligence-dashboard .pi-link .admin-card *{background-color:transparent!important}
body:not(.public-site) .shell.page-platform_intelligence-dashboard .pi-muted{color:#aeb9c9!important}
body:not(.public-site) .shell.page-platform_intelligence-dashboard .pi-progress{background:#2a3951!important}
body:not(.public-site) .shell.page-platform_intelligence-dashboard .pi-progress span{background:#38bdf8!important}


/* Builder workspace: retain saved-conversation feature in code, hide its duplicate UI. */
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat-sidebar{
  display:none!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat-shell{
  grid-template-columns:minmax(0,1fr)!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat-main{
  width:100%!important;
  max-width:none!important;
}


/* Builder workspace: hide duplicate conversation/output prompt, retain in code. */
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__log{
  display:none!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__form{
  margin:0!important;
}


/* Builder primary request composer. */
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat{
  min-height:0!important;
  padding:22px!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat-shell,
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat-main,
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__form{
  min-height:0!important;
  height:auto!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__composer{
  display:grid!important;
  grid-template-columns:minmax(220px,260px) minmax(0,1fr) 112px!important;
  gap:12px!important;
  align-items:end!important;
  padding:0!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__composer label{
  display:grid!important;
  gap:7px!important;
  color:#cbd5e1!important;
  font-size:13px!important;
  font-weight:750!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__composer select{
  width:100%!important;
  min-height:50px!important;
  padding:0 13px!important;
  color:#f4f7fb!important;
  background:#0b1626!important;
  border:1px solid #3b4f6b!important;
  border-radius:9px!important;
  font-size:14px!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__composer textarea{
  width:100%!important;
  min-height:132px!important;
  max-height:320px!important;
  padding:16px!important;
  color:#fff!important;
  background:#0b1626!important;
  border:1px solid #3b4f6b!important;
  border-radius:10px!important;
  font-size:15px!important;
  line-height:1.55!important;
  resize:vertical!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__composer textarea:focus,
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__composer select:focus{
  border-color:#48c8ff!important;
  outline:2px solid rgba(72,200,255,.18)!important;
}
body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-primary-action{
  width:112px!important;
  min-height:50px!important;
  margin:0!important;
  align-self:end!important;
}
@media(max-width:820px){
  body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-chat__composer{grid-template-columns:1fr!important}
  body:not(.public-site) .shell.admin-control-centre .builder-workspace .builder-primary-action{width:100%!important}
}


/* =====================================================================
   BUILD REQUEST — ENGINEERING OPERATIONS CENTRE
   Presentation only. All lifecycle data, controls and live refresh remain.
   ===================================================================== */
body:not(.public-site) .shell.build-request-shell .build-detail{max-width:1380px!important;color:#d7e0eb!important}
body:not(.public-site) .shell.build-request-shell .admin-page-header{margin-bottom:18px!important;background:transparent!important}
body:not(.public-site) .shell.build-request-shell .admin-page-header *{background-color:transparent!important}
body:not(.public-site) .shell.build-request-shell .admin-page-header h2{color:#fff!important;font-size:26px!important}
body:not(.public-site) .shell.build-request-shell .admin-page-header p{max-width:1050px!important;color:#b8c4d3!important;font-size:14px!important}
body:not(.public-site) .shell.build-request-shell .build-card{
  color:#d7e0eb!important;
  background:#152137!important;
  border:1px solid #34445e!important;
  border-radius:10px!important;
  box-shadow:0 10px 26px rgba(0,0,0,.16)!important;
}
body:not(.public-site) .shell.build-request-shell .build-card h1,
body:not(.public-site) .shell.build-request-shell .build-card h2,
body:not(.public-site) .shell.build-request-shell .build-card h3{color:#fff!important}
body:not(.public-site) .shell.build-request-shell .build-card p,
body:not(.public-site) .shell.build-request-shell .build-card li,
body:not(.public-site) .shell.build-request-shell .build-card dd{color:#d0d9e5!important}
body:not(.public-site) .shell.build-request-shell .build-muted{color:#aeb9c9!important;font-size:13px!important}
body:not(.public-site) .shell.build-request-shell .build-request{color:#eef4fb!important}
body:not(.public-site) .shell.build-request-shell .build-request summary{color:#48c8ff!important}
body:not(.public-site) .shell.build-request-shell .build-file{border-color:#2d3d56!important}
body:not(.public-site) .shell.build-request-shell .build-file code,
body:not(.public-site) .shell.build-request-shell code{color:#bcecff!important;background:#0b1626!important;border-color:#34445e!important}

/* Live progress: primary operational surface */
body:not(.public-site) .shell.build-request-shell #miai-live-progress{
  --build-state:#38bdf8!important;
  --build-accent:#38bdf8!important;
  margin-bottom:20px!important;
  overflow:hidden!important;
  padding:0!important;
  color:#eaf1f8!important;
  background:linear-gradient(145deg,#15243a,#0c1728)!important;
  border:1px solid #3a5875!important;
  border-left:5px solid var(--build-state)!important;
  box-shadow:0 16px 38px rgba(0,0,0,.24)!important;
}
body:not(.public-site) .shell.build-request-shell #miai-live-progress.build-live--complete{--build-state:#22c55e!important}
body:not(.public-site) .shell.build-request-shell #miai-live-progress.build-live--failed{--build-state:#ef4444!important}
body:not(.public-site) .shell.build-request-shell #miai-live-progress::before{display:none!important}
body:not(.public-site) .shell.build-request-shell #miai-live-progress>h2{
  margin:0!important;
  padding:19px 22px!important;
  color:#fff!important;
  background:#101b2d!important;
  border-bottom:1px solid #34445e!important;
  font-size:20px!important;
}
body:not(.public-site) .shell.build-request-shell #miai-live-progress>p,
body:not(.public-site) .shell.build-request-shell #miai-live-progress>progress,
body:not(.public-site) .shell.build-request-shell #miai-live-progress>dl,
body:not(.public-site) .shell.build-request-shell #miai-live-progress>h3,
body:not(.public-site) .shell.build-request-shell #miai-live-progress>ul{margin-left:22px!important;margin-right:22px!important}
body:not(.public-site) .shell.build-request-shell #miai-live-progress>p:first-of-type{
  display:flex!important;
  justify-content:space-between!important;
  gap:20px!important;
  margin-top:20px!important;
  color:#fff!important;
  font-size:19px!important;
}
body:not(.public-site) .shell.build-request-shell #miai-live-progress>p:first-of-type strong{color:#fff!important;background:transparent!important}
body:not(.public-site) .shell.build-request-shell #miai-live-progress progress{
  display:block!important;
  width:calc(100% - 44px)!important;
  height:14px!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:999px!important;
  background:#27364c!important;
  appearance:none!important;
}
body:not(.public-site) .shell.build-request-shell #miai-live-progress progress::-webkit-progress-bar{background:#27364c!important}
body:not(.public-site) .shell.build-request-shell #miai-live-progress progress::-webkit-progress-value{background:var(--build-state)!important;border-radius:999px!important}
body:not(.public-site) .shell.build-request-shell #miai-live-progress progress::-moz-progress-bar{background:var(--build-state)!important;border-radius:999px!important}
body:not(.public-site) .shell.build-request-shell #miai-live-progress>p:nth-of-type(2){
  margin-top:18px!important;
  padding:14px 15px!important;
  color:#e2e9f2!important;
  background:#0b1626!important;
  border:1px solid #34445e!important;
  border-radius:8px!important;
  font-size:14px!important;
}
body:not(.public-site) .shell.build-request-shell #miai-live-progress>p:last-of-type{margin-bottom:18px!important;color:#aeb9c9!important}

/* Enhanced live console created by existing JavaScript */
body:not(.public-site) .shell.build-request-shell .build-live__header{color:#eaf1f8!important;background:#101b2d!important;border-color:#34445e!important}
body:not(.public-site) .shell.build-request-shell .build-live__header h2{color:#fff!important}
body:not(.public-site) .shell.build-request-shell .build-live__eyebrow,
body:not(.public-site) .shell.build-request-shell .build-live__label{color:#8fa3ba!important}
body:not(.public-site) .shell.build-request-shell .build-live__state{color:var(--build-state)!important;background:#0b1626!important;border-color:#3b5875!important}
body:not(.public-site) .shell.build-request-shell .build-live__body{background:transparent!important}
body:not(.public-site) .shell.build-request-shell .build-live__stage strong{color:#fff!important}
body:not(.public-site) .shell.build-request-shell .build-live__percent{color:var(--build-state)!important}
body:not(.public-site) .shell.build-request-shell .build-live__operation{color:#e2e9f2!important;background:#0b1626!important;border-color:#34445e!important}
body:not(.public-site) .shell.build-request-shell .build-live__activity{color:#d7e0eb!important;background:#101b2d!important;border-color:#34445e!important}
body:not(.public-site) .shell.build-request-shell .build-live__activity h3{color:#fff!important}
body:not(.public-site) .shell.build-request-shell .build-live__activity li{color:#d7e0eb!important;background:#0b1626!important;border-color:#2d3d56!important}
body:not(.public-site) .shell.build-request-shell .build-live__item-main code,
body:not(.public-site) .shell.build-request-shell .build-live__item-main strong{color:#eef4fb!important;background:transparent!important}
body:not(.public-site) .shell.build-request-shell .build-live__item-operation{color:#9fadc0!important}

/* Evidence and lifecycle sections */
body:not(.public-site) .shell.build-request-shell .build-live__evidence{
  margin-top:18px!important;
  padding:15px!important;
  background:#101b2d!important;
  border:1px solid #34445e!important;
  border-radius:8px!important;
}
body:not(.public-site) .shell.build-request-shell .build-live__evidence dt{color:#9fadc0!important}
body:not(.public-site) .shell.build-request-shell .build-live__evidence dd{color:#eef4fb!important}
body:not(.public-site) .shell.build-request-shell .build-result{color:#e2e9f2!important;background:#0b1626!important;border:1px solid #34445e!important}
body:not(.public-site) .shell.build-request-shell .build-risk--low{color:#82e6a8!important;background:rgba(34,197,94,.12)!important}
body:not(.public-site) .shell.build-request-shell .build-risk--medium{color:#ffd06b!important;background:rgba(245,158,11,.13)!important}
body:not(.public-site) .shell.build-request-shell .build-risk--high{color:#ff9797!important;background:rgba(239,68,68,.13)!important}

/* Approval and recovery */
body:not(.public-site) .shell.build-request-shell .build-confirm{
  color:#eaf1f8!important;
  background:#17243a!important;
  border:1px solid #506683!important;
  border-left:4px solid #f59e0b!important;
}
body:not(.public-site) .shell.build-request-shell .build-confirm-question{color:#fff!important}
body:not(.public-site) .shell.build-request-shell .build-approve{color:#fff!important;background:#1685d6!important;border-color:#38a9e8!important}
body:not(.public-site) .shell.build-request-shell .build-reject{color:#eef4fb!important;background:#1b2a40!important;border-color:#40536e!important}
body:not(.public-site) .shell.build-request-shell .build-feedback{color:#fff!important;background:#0b1626!important;border-color:#3b4f6b!important}

/* Diagnostic state */
body:not(.public-site) .shell.build-request-shell .build-diagnostic{color:#f3dada!important;background:#24171b!important;border-color:#754047!important;border-left-color:#ef4444!important}
body:not(.public-site) .shell.build-request-shell .build-diagnostic__header{color:#ffdada!important;background:#321a20!important;border-color:#754047!important}
body:not(.public-site) .shell.build-request-shell .build-diagnostic__eyebrow{color:#ff9c9c!important}
body:not(.public-site) .shell.build-request-shell .build-diagnostic__header h2{color:#fff!important}
body:not(.public-site) .shell.build-request-shell .build-diagnostic__section{border-color:#58343a!important}
body:not(.public-site) .shell.build-request-shell .build-diagnostic__section h3{color:#fff!important}
body:not(.public-site) .shell.build-request-shell .build-diagnostic__path,
body:not(.public-site) .shell.build-request-shell .build-diagnostic__flag,
body:not(.public-site) .shell.build-request-shell .build-diagnostic__technical{color:#f0dfe2!important;background:#1d1418!important;border-color:#674047!important}
body:not(.public-site) .shell.build-request-shell .build-diagnostic__technical summary{color:#ffdada!important}

/* Durable Builder Chat on request page */
body:not(.public-site) .shell.build-request-shell #miai-builder-chat{color:#d7e0eb!important;background:#152137!important;border-color:#34445e!important}
body:not(.public-site) .shell.build-request-shell #miai-builder-chat .builder-chat__log{display:grid!important;color:#d7e0eb!important;background:#0b1626!important;border-color:#34445e!important}
body:not(.public-site) .shell.build-request-shell #miai-builder-chat .builder-chat__message--builder{color:#d7e0eb!important;background:#18273e!important;border-color:#34445e!important}
body:not(.public-site) .shell.build-request-shell #miai-builder-chat .builder-chat__message--user{color:#fff!important;background:#285f9c!important}
body:not(.public-site) .shell.build-request-shell #miai-builder-chat .builder-chat__mode label{color:#cbd5e1!important}
body:not(.public-site) .shell.build-request-shell #miai-builder-chat textarea{color:#fff!important;background:#0b1626!important;border-color:#3b4f6b!important}
