:root {
  --bg: #090b0e;
  --panel: #11151a;
  --panel-2: #171c22;
  --line: #252c34;
  --text: #f5f7f9;
  --muted: #929ca7;
  --green: #5ee3a1;
  --blue: #75a7ff;
  --orange: #ffb454;
  --red: #ff6b74;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body { margin: 0; min-height: 100vh; background:
  radial-gradient(circle at 20% 0%, rgba(64, 99, 132, .16), transparent 30rem),
  var(--bg); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: calc(100vh - 48px); padding: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 11px; font-weight: 760; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 28px; }
h2 { margin-bottom: 4px; font-size: 20px; }
h3 { margin-bottom: 8px; font-size: 16px; }
.muted { color: var(--muted); }
.error { min-height: 20px; color: var(--red); }
.auth-card { width: min(420px, calc(100vw - 32px)); margin: 10vh auto; padding: 34px; border: 1px solid var(--line); border-radius: 26px; background: rgba(17, 21, 26, .92); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 24px; border: 1px solid #3c4855; border-radius: 13px; color: #07110c; background: var(--green); font-weight: 900; }
form label { display: block; margin: 22px 0 8px; color: #d7dce1; font-size: 13px; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--text); background: #0c0f13; padding: 13px 14px; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(117,167,255,.12); }
button { border: 0; border-radius: 11px; padding: 11px 15px; color: #07110c; background: var(--green); font-weight: 730; }
form button { width: 100%; margin-top: 14px; }
button:hover { filter: brightness(1.06); }
button:disabled { opacity: .45; cursor: not-allowed; }
.ghost, .secondary, .icon-button { color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.topbar { display: flex; align-items: center; justify-content: space-between; max-width: 1600px; margin: 0 auto 20px; }
.status-cluster { display: flex; align-items: center; gap: 12px; }
.status-dot { color: var(--muted); font-size: 13px; }
.status-dot.online { color: var(--green); }
.status-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.banner { max-width: 1600px; margin: 0 auto 16px; padding: 12px 16px; border: 1px solid rgba(255,180,84,.45); border-radius: 12px; color: var(--orange); background: rgba(255,180,84,.08); }
.layout { max-width: 1600px; margin: 0 auto; display: grid; grid-template-columns: 310px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.panel { min-height: 240px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17,21,26,.92); overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; }
.icon-button { width: 38px; height: 38px; padding: 0; }
.task-list, .approval-list { padding: 8px; max-height: calc(100vh - 180px); overflow: auto; }
.task-card { width: 100%; padding: 14px; border: 0; text-align: left; color: var(--text); background: transparent; }
.task-card:hover, .task-card.selected { background: var(--panel-2); }
.task-card.selected { box-shadow: inset 3px 0 var(--green); }
.task-card strong { display: block; margin-bottom: 5px; }
.task-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.workspace { min-height: calc(100vh - 130px); }
.empty-state { display: grid; min-height: 420px; place-content: center; padding: 40px; text-align: center; }
.task-title-row { display: flex; justify-content: space-between; gap: 24px; padding: 24px; border-bottom: 1px solid var(--line); }
.pill { align-self: flex-start; padding: 6px 9px; border-radius: 999px; color: var(--green); background: rgba(94,227,161,.1); font-size: 11px; }
.command-list { padding: 20px; display: grid; gap: 12px; }
.command-card, .approval-card, .admin-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.command-card header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.command-card pre, .approval-card pre { margin: 10px 0 0; white-space: pre-wrap; word-break: break-word; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d8dee5; }
.state { color: var(--blue); font-size: 11px; }
.execute { margin-top: 12px; }
.composer { margin: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #0c0f13; }
.composer label { margin-top: 0; }
.composer textarea { resize: vertical; min-height: 110px; border: 0; padding: 4px 0; background: transparent; }
.composer textarea:focus { box-shadow: none; }
.file-picker { display: inline-block; margin: 12px 0 6px; color: var(--blue); cursor: pointer; }
#command-images { width: auto; max-width: 100%; padding: 8px; font-size: 12px; }
#image-summary { margin: 6px 0; font-size: 12px; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
.composer-footer button { width: auto; margin: 0; }
.side-panel { padding-bottom: 8px; }
.approval-list { max-height: 420px; }
.approval-actions { display: flex; gap: 8px; margin-top: 12px; }
.approval-actions button { flex: 1; }
.approval-actions .deny { color: var(--red); background: rgba(255,107,116,.08); border: 1px solid rgba(255,107,116,.25); }
.admin-card { margin: 8px; }
.admin-card output { display: block; margin-top: 10px; color: var(--green); font: 700 20px ui-monospace, monospace; letter-spacing: .1em; word-break: break-all; }
footer { padding: 12px 24px 24px; text-align: center; color: #626d78; font-size: 12px; }
footer a { color: #8797a7; }

@media (max-width: 1120px) {
  .layout { grid-template-columns: 280px minmax(0, 1fr); }
  .side-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .side-panel .panel-heading { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .shell { padding: 14px; }
  .topbar { align-items: flex-start; }
  .layout { display: block; }
  .panel { margin-bottom: 12px; }
  .task-list { max-height: 260px; }
  .workspace { min-height: 480px; }
  .side-panel { display: block; }
  .task-title-row, .composer-footer { align-items: flex-start; flex-direction: column; }
  .composer-footer button { width: 100%; }
}
