/* AEGNYX Control Center — iQs design system */
:root {
  --page: #0B0F1C; --card: #141A2B; --raised: #1A2238; --rule: #262D48; --border: #33405F;
  --lazuli: #2438E8; --l1: #456BF2; --l2: #5A85F6; --l3: #8FA9F8; --l4: #B9CBFC; --accent: #38B6FF;
  --crit: #F5222D; --high: #FF9A00; --med: #FFF44F; --low: #5A85F6; --unk: #7C84A0; --ok: #2FD27A;
  --fg: #E8ECF8; --muted: #8C95B3; --dim: #5D6686;
  --radius: 14px; --sidebar: 248px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--page); color: var(--fg);
  font: 14px/1.55 Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
::selection { background: rgba(36, 56, 232, .55); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; border: 2px solid var(--page); }
.hero-accent { color: var(--accent); }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12px; } .mono { font-family: var(--mono); }
.error { color: #FF6B73; white-space: pre-wrap; }
[hidden] { display: none !important; }

/* ---------- buttons & inputs ---------- */
button, .btn { font: inherit; font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--raised); color: var(--fg); text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px; transition: border-color .15s, background .15s, transform .05s; white-space: nowrap; }
button:hover:not(:disabled), .btn:hover { border-color: var(--l2); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--lazuli); border-color: var(--lazuli); color: #fff; }
button.primary:hover:not(:disabled) { background: var(--l1); border-color: var(--l1); }
button.danger, .btn.danger { color: #FF6B73; border-color: rgba(245, 34, 45, .35); background: rgba(245, 34, 45, .08); }
button.danger:hover:not(:disabled) { border-color: var(--crit); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover:not(:disabled) { color: var(--fg); background: var(--raised); border-color: var(--border); }
button.icon { padding: 7px; border-radius: 9px; }
button svg, .btn svg { width: 16px; height: 16px; flex: none; }
input, select, textarea { font: inherit; color: var(--fg); background: var(--page); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--l2); box-shadow: 0 0 0 3px rgba(36, 56, 232, .25); }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--lazuli); }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
label.inline { flex-direction: row; align-items: center; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; } .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; }
.sidebar { background: linear-gradient(180deg, #0E1426 0%, var(--page) 100%); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.brand img { height: 34px; }
.brand .title { font-weight: 700; font-size: 13px; line-height: 1.2; letter-spacing: .02em; }
.brand .title span { display: block; color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; justify-content: flex-start; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav:hover:not(:disabled) { color: var(--fg); background: var(--card); border-color: transparent; }
.nav.active { color: #fff; background: radial-gradient(120% 140% at 0% 0%, rgba(36, 56, 232, .45), rgba(36, 56, 232, .12)); border-color: rgba(90, 133, 246, .35); }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--rule); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--rule); background: rgba(11, 15, 28, .85); }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.chips { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--card); border: 1px solid var(--rule); color: var(--muted); }
.chip b { color: var(--fg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--unk); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 210, 122, .18); }
.dot.warn { background: var(--high); box-shadow: 0 0 0 3px rgba(255, 154, 0, .18); animation: pulse 1.6s infinite; }
.dot.bad { background: var(--crit); box-shadow: 0 0 0 3px rgba(245, 34, 45, .18); }
@keyframes pulse { 50% { opacity: .45; } }
.content { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px 28px; }
.content.fill { overflow: hidden; }
.page { max-width: 1400px; margin: 0 auto; }

/* ---------- cards ---------- */
.card { position: relative; background:
    radial-gradient(120% 90% at 0% 0%, rgba(36, 56, 232, .20) 0%, rgba(36, 56, 232, .05) 38%, transparent 62%),
    radial-gradient(80% 60% at 100% 100%, rgba(69, 107, 242, .07) 0%, transparent 60%), var(--card);
  border: 1px solid rgba(90, 133, 246, .22); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(143, 169, 248, .08), 0 10px 30px -18px rgba(36, 56, 232, .45); min-width: 0; }
.card h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 10px; font-weight: 700; }
.card .card { background: none; border-color: transparent; box-shadow: none; padding: 0; }
.grid { display: grid; gap: 16px; }
.grid.g4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.g2 { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }
.section-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 4px; }
.section-sub { color: var(--muted); margin: 0 0 18px; }

/* metrics */
.metric { display: flex; flex-direction: column; gap: 8px; }
.metric .k { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; display: flex; justify-content: space-between; gap: 8px; }
.metric .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.metric .v small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.bar { height: 8px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--lazuli), var(--accent)); transition: width .6s ease; }
.bar.hot > i { background: linear-gradient(90deg, var(--high), var(--crit)); }
.spark { width: 100%; height: 42px; display: block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.badge.ok, .PASS { color: var(--ok); border-color: rgba(47, 210, 122, .35); }
.badge.run { color: var(--accent); border-color: rgba(56, 182, 255, .4); }
.badge.warn { color: var(--high); border-color: rgba(255, 154, 0, .4); }
.badge.bad, .FAIL { color: #FF6B73; border-color: rgba(245, 34, 45, .4); }
.UNVERIFIED { color: var(--high); }
.logs { margin: 0; max-height: 420px; overflow: auto; font: 12px/1.5 var(--mono); background: var(--page); border: 1px solid var(--rule);
  border-radius: 10px; padding: 12px; white-space: pre-wrap; color: #C5CCE4; }
.banner { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; margin: 0 auto 12px; max-width: 980px;
  background: rgba(255, 154, 0, .08); border: 1px solid rgba(255, 154, 0, .35); }
.banner.bad { background: rgba(245, 34, 45, .08); border-color: rgba(245, 34, 45, .35); }
.banner.ok { background: rgba(47, 210, 122, .07); border-color: rgba(47, 210, 122, .3); }
.banner .bar { flex: 1; min-width: 160px; max-width: 360px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; padding: 12px 16px; border-radius: 12px; background: var(--raised);
  border: 1px solid var(--border); box-shadow: 0 20px 40px -20px #000; max-width: 460px; font-weight: 600; transition: opacity .3s; }
.toast.err { border-color: rgba(245, 34, 45, .6); }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-columns: 290px 1fr; gap: 16px; height: 100%; min-height: 0; }
.conv-list { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px; }
.conv-list ul { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.conv-list li { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; }
.conv-list li .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-list li:hover { background: var(--raised); color: var(--fg); }
.conv-list li.active { background: rgba(36, 56, 232, .22); color: #fff; }
.conv-list li button { opacity: 0; padding: 3px 7px; }
.conv-list li:hover button { opacity: 1; }
.conv { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.conv-head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.conv-head input { flex: 1; background: transparent; border-color: transparent; font-weight: 700; font-size: 15px; }
.conv-head input:hover { border-color: var(--rule); }
.sys-panel { padding: 12px 16px; border-bottom: 1px solid var(--rule); background: rgba(11, 15, 28, .4); }
.messages { flex: 1; overflow-y: auto; padding: 18px 0 10px; }
.msg { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 12px 26px; max-width: 980px; margin: 0 auto; }
.avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.avatar.user { background: var(--raised); border: 1px solid var(--border); color: var(--l3); }
.avatar.assistant { background: #0E1430; border: 1px solid rgba(90, 133, 246, .35); }
.avatar.assistant img { width: 24px; height: 24px; }
.msg .who { font-weight: 700; font-size: 13px; margin-bottom: 4px; display: flex; gap: 10px; align-items: center; }
.msg .body { overflow-wrap: anywhere; }
.msg .body p { margin: 0 0 10px; } .msg .body p:last-child { margin-bottom: 0; }
.msg .body h1, .msg .body h2, .msg .body h3, .msg .body h4 { font-size: 15px; margin: 14px 0 8px; }
.msg .body ul, .msg .body ol { margin: 6px 0 10px; padding-left: 22px; }
.msg .body code { font: 12.5px var(--mono); background: var(--raised); border: 1px solid var(--rule); padding: 1px 5px; border-radius: 6px; }
.msg .body pre { position: relative; background: #080B16; border: 1px solid var(--rule); border-radius: 10px; padding: 14px; overflow-x: auto; }
.msg .body pre code { background: none; border: 0; padding: 0; }
.msg .body pre .copy { position: absolute; top: 6px; right: 6px; padding: 3px 8px; font-size: 11px; }
.msg .body blockquote { margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--lazuli); color: var(--muted); }
.msg .body table { border-collapse: collapse; margin: 8px 0; } .msg .body td, .msg .body th { border: 1px solid var(--rule); padding: 5px 9px; }
.msg.user .body { white-space: pre-wrap; }
.msg .meta { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 12px; color: var(--dim); }
.msg .meta button { padding: 3px 8px; font-size: 12px; }
.msg details { margin-bottom: 10px; border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; background: rgba(26, 34, 56, .5); }
.msg details summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12px; }
.msg details pre { white-space: pre-wrap; font: 12px/1.5 var(--mono); color: var(--muted); max-height: 300px; overflow: auto; margin: 8px 0 0; }
.msg .err-box { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(245, 34, 45, .08); border: 1px solid rgba(245, 34, 45, .35); color: #FF9AA0; font-size: 13px; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--l2); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.empty { display: grid; place-items: center; min-height: 100%; text-align: center; padding: 30px; }
.empty img { width: 72px; }
.empty h2 { font-size: 28px; margin: 18px 0 6px; font-weight: 800; letter-spacing: -.02em; }
.composer { padding: 12px 22px 16px; border-top: 1px solid var(--rule); }
.composer .box { max-width: 980px; margin: 0 auto; background: var(--page); border: 1px solid var(--border); border-radius: 16px; padding: 10px; transition: border-color .15s, box-shadow .15s; }
.composer .box:focus-within { border-color: var(--l2); box-shadow: 0 0 0 3px rgba(36, 56, 232, .22); }
.composer textarea { border: 0; background: transparent; resize: none; max-height: 260px; padding: 6px 8px; box-shadow: none !important; }
.composer .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.composer .tools label { flex-direction: row; align-items: center; gap: 6px; }
.composer .tools input { width: 86px; padding: 5px 8px; font-size: 12px; }
.composer .hint { max-width: 980px; margin: 8px auto 0; font-size: 11.5px; color: var(--dim); text-align: center; }

/* ---------- collections / settings ---------- */
.split { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.list li { padding: 11px 12px; border-radius: 11px; border: 1px solid var(--rule); background: rgba(11, 15, 28, .5); cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.list li:hover { border-color: var(--border); }
.list li.active { border-color: var(--l2); background: rgba(36, 56, 232, .14); }
.list li .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-weight: 600; }
.slot { border: 1px solid var(--rule); border-radius: 12px; padding: 12px; margin: 10px 0; background: rgba(11, 15, 28, .45); }
.slot-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.slot-n { display: grid; place-items: center; min-width: 30px; height: 28px; border-radius: 8px; background: rgba(36, 56, 232, .25); color: var(--l4); font-size: 12px; padding: 0 6px; }
.slot-head .slot-remove { margin-left: auto; }
.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.params input, .params select { width: 100%; }
.params label.inline { flex-direction: row; }
.check { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; padding: 3px 0; }
.check b { min-width: 92px; font-size: 11px; letter-spacing: .06em; }
.traj { border: 1px solid var(--rule); border-radius: 12px; padding: 12px; margin: 10px 0; background: rgba(11, 15, 28, .45); }
.traj pre { white-space: pre-wrap; background: var(--page); padding: 10px; border-radius: 8px; border: 1px solid var(--rule); font: 12px/1.5 var(--mono); max-height: 260px; overflow: auto; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; background: rgba(11, 15, 28, .45); }
.stat .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.stat .v { font-size: 20px; font-weight: 800; }

/* ---------- login ---------- */
body.login { display: grid; place-items: center; min-height: 100vh; background:
  radial-gradient(60% 60% at 20% 10%, rgba(36, 56, 232, .28), transparent 60%),
  radial-gradient(50% 50% at 90% 90%, rgba(56, 182, 255, .12), transparent 60%), var(--page); }
.login-box { width: min(420px, 92vw); display: flex; flex-direction: column; gap: 18px; padding: 34px; }
.login-box img { height: 56px; align-self: flex-start; }
.login-box h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.login-box input { width: 100%; padding: 12px 14px; font-size: 15px; }
.login-box button { justify-content: center; padding: 12px; font-size: 15px; }

@media (max-width: 1100px) { .chat { grid-template-columns: 1fr; } .conv-list { display: none; } .split { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .shell { grid-template-columns: 1fr; } .sidebar { display: none; } .grid.g2 { grid-template-columns: 1fr; } }

/* ===================== MLC Dashboard grammar (AEGIS Nexus Command Dashboard tokens) ===================== */
:root {
  --page: #04060c; --card: #0b1020; --raised: #0e1526; --rule: #1a2740; --border: #243559;
  --lazuli: #0946fe; --l1: #4d6ff2; --l2: #4d6ff2; --l3: #7aa0f9; --l4: #B9CBFC;
  --fg: #eaf0f9; --muted: #aebbd4; --dim: #6f7f9c; --ok: #29c281; --high: #e6ad3c; --crit: #e75d72;
  --shadow: 0 20px 60px -24px rgba(0, 0, 0, .7);
}
body { font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif; background: radial-gradient(90% 60% at 50% -10%, rgba(9, 70, 254, .14), transparent 60%), var(--page); }
.shell.top-layout { display: flex; flex-direction: column; height: 100vh; }
.top { flex: none; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, rgba(14, 21, 38, .96), rgba(4, 6, 12, .96)); position: relative; z-index: 5; }
.topin { display: flex; align-items: center; gap: 14px; padding: 10px 22px; }
.lockup { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; margin-right: 10px; }
.lockup-iqs { width: 44px; height: 44px; border-radius: 11px; display: block; }
.grid9 { display: grid; grid-template-columns: repeat(3, 9px); grid-template-rows: repeat(3, 9px); gap: 4px; }
.grid9 i { width: 9px; height: 9px; border-radius: 50%; display: block; animation: grid9-blink 1.8s ease-in-out infinite; }
.grid9 i:nth-child(1) { background: #a9c0f9; animation-delay: 0s; }
.grid9 i:nth-child(2) { background: #90b0f7; animation-delay: .15s; }
.grid9 i:nth-child(3) { background: #7ea2f5; animation-delay: .3s; }
.grid9 i:nth-child(4) { background: #5d82f2; animation-delay: .15s; }
.grid9 i:nth-child(5) { background: #4257ff; animation-delay: .3s; }
.grid9 i:nth-child(6) { background: #3a5bef; animation-delay: .45s; }
.grid9 i:nth-child(7) { background: #2a44c9; animation-delay: .3s; }
.grid9 i:nth-child(8) { background: #223aae; animation-delay: .45s; }
.grid9 i:nth-child(9) { background: #1a2f96; animation-delay: .6s; }
@keyframes grid9-blink { 0%, 100% { opacity: 1; } 50% { opacity: .18; } }
@media (prefers-reduced-motion: reduce) { .grid9 i { animation: none; } }
.lockup-word { font-family: "Century Gothic", Jost, Futura, "Segoe UI", sans-serif; font-size: 21px; font-weight: 700; letter-spacing: .2px; color: #fff; white-space: nowrap; line-height: 1; }
.lockup-word b { font-weight: 400; }
.tabsbar { display: flex; gap: 4px; padding: 3px; border-radius: 11px; background: rgba(4, 6, 12, .7); border: 1px solid var(--rule); }
.tabsbar .nav { width: auto; padding: 8px 14px; font-size: 13px; border-radius: 9px; gap: 8px; }
.tabsbar .nav svg { width: 16px; height: 16px; }
.tabsbar .nav.active { background: var(--lazuli); border-color: var(--lazuli); color: #fff; box-shadow: 0 6px 18px -8px rgba(9, 70, 254, .9); }
.live { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #c9d4e6; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--rule); background: rgba(11, 16, 32, .8); white-space: nowrap; }
.main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.subhead { display: flex; align-items: center; gap: 14px; padding: 16px 24px 4px; }
.subhead h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.content { padding: 14px 24px 18px; }
.card { background: linear-gradient(160deg, #0e1220, #0b0e18); border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 4px 14px rgba(0, 0, 0, .42); overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--lazuli), var(--l3)); opacity: .9; }
.card .card::before, .conv::before, .conv-list::before { display: none; }
.conv { overflow: hidden; }
.metric .v { font-size: 22px; }
button.primary, .btn.primary { background: var(--lazuli); border-color: var(--lazuli); }
button.primary:hover:not(:disabled) { background: #2a5bff; border-color: #2a5bff; }
.statusbar { flex: none; display: flex; gap: 18px; align-items: center; padding: 7px 22px; font-size: 11.5px; color: var(--dim); border-top: 1px solid var(--rule); background: rgba(4, 6, 12, .95); }
.statusbar b { color: var(--ok); font-weight: 700; }
.shell.top-layout + .statusbar, body > .statusbar { position: fixed; left: 0; right: 0; bottom: 0; }
.shell.top-layout { height: calc(100vh - 31px); }
.avatar.assistant { background: #060a1a; border-color: rgba(9, 70, 254, .5); }
.msg.user .avatar { color: var(--l3); }
@media (max-width: 1180px) { .chips { display: none; } }
@media (max-width: 820px) { .tabsbar .nav { padding: 7px 9px; font-size: 0; gap: 0; } .lockup-word { font-size: 17px; } .live { display: none; } }

/* ===================== MLC top bar (exact grammar of the Command Dashboard) ===================== */
.top.mlc { background: #04060c; border-bottom: 1px solid #0f1830; }
.top.mlc .topin { gap: 26px; padding: 12px 30px; min-height: 76px; }
.iqs img { height: 34px; display: block; }
.brandpill { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-radius: 14px; text-decoration: none;
  border: 1px solid #141c33; background: linear-gradient(180deg, #080d1a, #05080f); }
.brandpill .grid9 { grid-template-columns: repeat(3, 8px); grid-template-rows: repeat(3, 8px); gap: 4px; }
.brandpill .grid9 i { width: 8px; height: 8px; }
.bp-word { font-family: "Century Gothic", Jost, Futura, "Segoe UI", sans-serif; font-weight: 700; font-size: 19px; color: #fff; letter-spacing: .2px; }
.bp-sep { width: 1px; height: 16px; background: #2a3555; margin: 0 2px 0 6px; }
.bp-sub { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: #8ea6ff; }
.online { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 14px; letter-spacing: .03em; color: #fff; text-transform: uppercase; }
.now { display: flex; align-items: center; gap: 9px; color: #dfe6f5; font-size: 14px; font-weight: 600; }
.caret { width: 10px; height: 6px; color: #8c95b3; }
.srch svg { width: 18px; height: 18px; }
.kpis { display: flex; gap: 22px; align-items: flex-end; }
.kpi-t { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 40px; }
.kpi-t b { font-size: 16px; font-weight: 800; color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-t b.g { color: #29c281; } .kpi-t b.r { color: #e75d72; } .kpi-t b.a { color: #e6ad3c; }
.kpi-t span { font-size: 9px; letter-spacing: .1em; color: #6f7f9c; font-weight: 700; }
.menu { position: relative; }
.menu-btn { background: transparent; border: 0; color: #fff; font-weight: 700; font-size: 14px; gap: 9px; padding: 6px 4px; }
.menu-btn:hover:not(:disabled) { border: 0; color: #cfe0ff; }
.menu-pop { position: absolute; top: calc(100% + 10px); left: 0; min-width: 240px; z-index: 40; padding: 10px; border-radius: 12px;
  background: #0b1020; border: 1px solid #243559; box-shadow: 0 24px 48px -16px #000; display: flex; flex-direction: column; gap: 4px; }
.menu-pop.right { left: auto; right: 0; }
.menu-pop .nav { width: 100%; padding: 9px 10px; font-size: 13px; }
.menu-pop .nav.active { background: rgba(9, 70, 254, .25); border-color: rgba(77, 111, 242, .5); }
.mp-h { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #6f7f9c; font-weight: 700; padding: 2px 4px 6px; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; padding: 0; justify-content: center; background: #2438E8; border-color: #4d6ff2;
  color: #fff; font-weight: 800; font-size: 13px; }
.crumbs { font-size: 12px; letter-spacing: .18em; color: #4d6ff2; font-weight: 700; margin-bottom: 4px; }
.crumbs b { color: #4d6ff2; }
.subhead { flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 30px 6px; }
.subhead h1 { font-size: 28px; }
.content { padding: 12px 30px 18px; }
body.role-user .admin-only { display: none !important; }
@media (max-width: 1400px) { .kpis { display: none; } }
@media (max-width: 1000px) { .now, .srch, .bp-sub, .bp-sep { display: none; } }

/* ===================== Super-Admin · engines ===================== */
.eng-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); gap: 16px; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .06em; }
.switch input { appearance: none; width: 54px; height: 28px; border-radius: 99px; background: #243559; position: relative; cursor: pointer; transition: background .2s; border: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch input:checked { background: #29c281; } .switch input:checked::after { left: 29px; }
.estop { background: #e75d72 !important; border-color: #e75d72 !important; color: #fff !important; font-weight: 800; letter-spacing: .06em; }
.jobs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.jobs-table th { text-align: left; color: #6f7f9c; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid #1a2740; }
.jobs-table td { padding: 8px; border-bottom: 1px solid #111a2e; vertical-align: top; }
.jobs-table tr.sel td { background: rgba(9, 70, 254, .12); }
.jobs-table tr { cursor: pointer; }
.assume { margin: 6px 0 0; padding-left: 18px; color: #aebbd4; font-size: 12.5px; }


/* ===================== ChatGPT-style workspace: collapsible sidebar + large centre pane ===================== */
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 272px 1fr; transition: grid-template-columns .22s ease; }
body.sb-collapsed .workspace { grid-template-columns: 0 1fr; }
.sb { min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 12px;
  background: #070b16; border-right: 1px solid #111a2e; }
body.sb-collapsed .sb { padding: 0; border: 0; }
.sb-head { display: flex; align-items: center; gap: 6px; padding: 2px 2px 8px; }
.sb-head button svg { width: 20px; height: 20px; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-item { width: 100%; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; background: transparent;
  border: 1px solid transparent; color: #c9d4e6; font-weight: 600; font-size: 14px; }
.sb-item svg { width: 18px; height: 18px; flex: none; color: #8ea6ff; }
.sb-item:hover:not(:disabled) { background: #0e1526; border-color: transparent; }
.sb-item.active { background: #101a33; color: #fff; border-color: #1d2c55; }
.sb-sec { margin: 14px 8px 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #6f7f9c; font-weight: 700; }
.sb-search { margin: 2px 4px 6px; background: #04060c; border-color: #1a2740; font-size: 13px; padding: 7px 10px; }
.sb-convs { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.sb-convs li { padding: 8px 10px; border-radius: 9px; cursor: pointer; display: flex; align-items: center; gap: 8px; color: #aebbd4; font-size: 13.5px; }
.sb-convs li .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-convs li:hover { background: #0e1526; color: #fff; }
.sb-convs li.active { background: #101a33; color: #fff; }
.sb-convs li button { opacity: 0; padding: 2px 6px; }
.sb-convs li:hover button { opacity: 1; }
.sb-foot { padding: 8px; border-top: 1px solid #111a2e; }
.sb-open { display: none; position: absolute; left: 14px; top: 14px; }
body.sb-collapsed .sb-open { display: inline-flex; }
.main { position: relative; }
body.sb-collapsed .subhead { padding-left: 64px; }
.tabpane.fill .chat, #tab-chat .chat { grid-template-columns: 1fr; }
#tab-chat .conv { border-radius: 16px; }
@media (max-width: 900px) { .workspace { grid-template-columns: 0 1fr; } body.sb-open-mobile .workspace { grid-template-columns: 272px 1fr; } }
.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box p { margin: 0; }
.login-box button.ghost.small { align-self: center; padding: 6px 10px; font-size: 13px; }
