/* MCC Sovereign Core obsidian theme - core */
:root {
  --bg0: #0a0c14; --bg1: #0e1117; --bg2: #131722; --bg3: #1a1f2e;
  --line: rgba(255, 255, 255, 0.08);
  --txt: #e4e4e7; --mut: #8b8fa3; --dim: #5b5f73;
  --cyan: #00f3ff; --cyan-d: #06b6d4; --violet: #8b5cf6; --amber: #f59e0b; --green: #10b981; --red: #f43f5e;
  --r: 14px; --font: 'Geist', system-ui, -apple-system, sans-serif; --mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); background: var(--bg0); color: var(--txt); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg1); }
::-webkit-scrollbar-thumb { background: #2a2f42; border-radius: 4px; }
a { color: var(--cyan); }
#boot { position: fixed; inset: 0; background: var(--bg0); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; }
#boot.hide { display: none; }
.ring { width: 46px; height: 46px; border: 3px solid transparent; border-top-color: var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shell { display: flex; min-height: 100vh; }
.side { width: 264px; min-width: 264px; border-right: 1px solid var(--line); background: rgba(14, 17, 23, 0.94); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 12px; align-items: center; padding: 18px; border-bottom: 1px solid var(--line); }
.mark { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--cyan), var(--violet)); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #06080f; font-size: 20px; }
.brand h1 { font-size: 15px; margin: 0; }
.brand p { margin: 2px 0 0; font-size: 11px; color: var(--mut); }
.nav { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; color: var(--mut); padding: 10px 12px; border-radius: 12px; font-size: 13.5px; cursor: pointer; font-family: var(--font); }
.nav button:hover { background: rgba(255, 255, 255, 0.04); color: var(--txt); }
.nav button.on { background: rgba(0, 243, 255, 0.1); border-color: rgba(0, 243, 255, 0.25); color: var(--cyan); }
.nav button .ico { width: 22px; text-align: center; }
.vitals { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mut); }
.vitals .row { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); }
.main { flex: 1; min-width: 0; padding: 28px; max-width: 1200px; }
.view { display: none; }
.view.on { display: block; animation: up 0.25s ease-out; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hd { margin-bottom: 20px; }
.hd h2 { margin: 0; font-size: 26px; }
.hd p { margin: 6px 0 0; color: var(--mut); font-size: 13.5px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .side { display: none; } .main { padding: 16px; } }
.card { background: rgba(19, 23, 34, 0.85); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.lead { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.3); font-size: 12.5px; margin-bottom: 16px; }
.lead b { color: var(--violet); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; font-weight: 600; font-size: 13px; cursor: pointer; border: 1px solid transparent; font-family: var(--font); }
.btn-p { background: var(--cyan); color: #06080f; }
.btn-s { background: #22283a; color: var(--txt); border-color: #313852; }
.btn-g { background: transparent; color: var(--mut); }
.btn-d { background: rgba(244, 63, 94, 0.12); color: #fda4af; border-color: rgba(244, 63, 94, 0.3); }
.inp, .sel, .ta { width: 100%; padding: 10px 14px; border-radius: 12px; background: rgba(9, 10, 15, 0.6); border: 1px solid #2a3048; color: var(--txt); font-size: 13.5px; font-family: var(--font); }
.inp:focus, .sel:focus, .ta:focus { outline: none; border-color: var(--cyan); }
.ta { min-height: 90px; resize: vertical; font-family: var(--mono); font-size: 12.5px; }
.lbl { display: block; font-size: 12px; color: var(--mut); margin: 12px 0 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill.ok { background: rgba(16, 185, 129, 0.15); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.35); }
.pill.bad { background: rgba(244, 63, 94, 0.12); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.35); }
.pill.warn { background: rgba(245, 158, 11, 0.12); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.35); }
.pill.info { background: rgba(0, 243, 255, 0.1); color: var(--cyan); border: 1px solid rgba(0, 243, 255, 0.3); }
.kpi .v { font-size: 26px; font-weight: 800; margin: 4px 0; }
.kpi .l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mut); }
.bar { height: 6px; background: #22283a; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.chatlog { display: flex; flex-direction: column; gap: 12px; max-height: 52vh; overflow-y: auto; padding: 6px 2px; }
.msg { max-width: 78%; padding: 12px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.msg.u { align-self: flex-end; background: rgba(0, 243, 255, 0.12); border: 1px solid rgba(0, 243, 255, 0.25); border-bottom-right-radius: 6px; }
.msg.a { align-self: flex-start; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg img.prev { max-width: 100%; border-radius: 10px; margin-top: 8px; cursor: zoom-in; border: 1px solid var(--line); }
.cmdbar { position: sticky; bottom: 12px; display: flex; gap: 10px; align-items: center; background: rgba(13, 17, 23, 0.95); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; margin-top: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { font-size: 11.5px; background: rgba(0, 243, 255, 0.1); border: 1px solid rgba(0, 243, 255, 0.3); color: var(--cyan); padding: 4px 10px; border-radius: 999px; }
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal.on { display: flex; }
.modal img { max-width: 100%; border-radius: 12px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.rowitem { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.rowitem .grow { flex: 1; min-width: 0; }
.rowitem .t { font-weight: 600; font-size: 13.5px; }
.rowitem .s { font-size: 12px; color: var(--mut); margin-top: 2px; }
.av { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(139, 92, 246, 0.4); color: var(--violet); flex-shrink: 0; }
.toast { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast div { background: rgba(13, 17, 23, 0.95); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
pre.code { background: #080a10; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 12px; overflow-x: auto; font-family: var(--mono); }
.mut { color: var(--mut); } .sm { font-size: 12px; } .mono { font-family: var(--mono); }
.mt { margin-top: 12px; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
