/* ARC Dashboard — dark cyan/teal HUD, mobile-first. No frameworks. */

:root {
  --bg: #04141a;
  --bg-2: #072029;
  --panel: #06222c;
  --panel-2: #083038;
  --line: #0e4a59;
  --cyan: #22d3ee;
  --cyan-dim: #0e7490;
  --cyan-glow: rgba(34, 211, 238, 0.35);
  --text: #d7f3f8;
  --muted: #7fa8b3;
  --amber: #fbbf24;
  --orange: #fb923c;
  --red: #f87171;
  --green: #34d399;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(34, 211, 238, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 48, 56, 0.6), transparent);
}

.reactor { width: 72px; height: 72px; flex: 0 0 auto; filter: drop-shadow(0 0 10px var(--cyan-glow)); }
.reactor svg { width: 100%; height: 100%; display: block; }

.header-text h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 18px var(--cyan-glow);
}
.header-text h1 span { color: var(--text); font-weight: 300; }

.subtitle { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.06em; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.25rem; vertical-align: baseline; }
.dot-idle { background: var(--muted); }
.dot-ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot-bad { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------- layout ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  #panel-chat { grid-column: 1 / -1; }
}

.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  min-width: 0;
  box-shadow: inset 0 0 40px rgba(14, 116, 144, 0.06);
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  background: var(--cyan-dim);
  color: #e8fbff;
  font-size: 0.72rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.empty { color: var(--muted); font-size: 0.9rem; }

/* ---------- alerts / activity feeds ---------- */

.feed-list { display: flex; flex-direction: column; gap: 0.6rem; max-height: 420px; overflow-y: auto; }

.alert-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  background: rgba(8, 48, 56, 0.45);
}

.alert-card .alert-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.alert-card .alert-title { font-weight: 600; font-size: 0.95rem; }
.alert-card .alert-msg { margin: 0.35rem 0 0; font-size: 0.88rem; color: var(--text); white-space: pre-wrap; }
.alert-card .alert-time { font-size: 0.72rem; color: var(--muted); font-family: var(--mono); margin-top: 0.35rem; display: block; }

.prio {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 0.12rem 0.5rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid currentColor;
}
.prio-0, .prio-1 { color: var(--muted); }
.prio-2 { color: var(--cyan); }
.prio-3 { color: var(--amber); }
.prio-4 { color: var(--orange); }
.prio-5 { color: var(--red); box-shadow: 0 0 10px rgba(248, 113, 113, 0.4); }

.activity-item {
  display: flex; gap: 0.6rem; align-items: baseline;
  font-size: 0.88rem;
  border-bottom: 1px dashed rgba(14, 74, 89, 0.6);
  padding-bottom: 0.45rem;
}
.activity-item .kind {
  font-family: var(--mono); font-size: 0.68rem; color: var(--cyan);
  border: 1px solid var(--line); border-radius: 4px; padding: 0.1rem 0.4rem; white-space: nowrap;
}
.activity-item .when { margin-left: auto; color: var(--muted); font-size: 0.72rem; font-family: var(--mono); white-space: nowrap; }

/* ---------- status ---------- */

.status-block { margin-bottom: 1rem; }
.status-block:last-child { margin-bottom: 0; }
.status-block h3 {
  margin: 0 0 0.5rem; font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.status-line { font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; margin: 0.25rem 0; }
.note { font-size: 0.75rem; color: var(--muted); margin: 0.25rem 0 0; }
.model-id { font-family: var(--mono); font-size: 0.78rem; color: var(--text); }

.provider-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem;
}
.provider-chip {
  border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.6rem;
  background: rgba(8, 48, 56, 0.45); font-size: 0.82rem;
  display: flex; justify-content: space-between; align-items: center; gap: 0.4rem;
}
.provider-chip .tier { font-size: 0.68rem; color: var(--green); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- chat ---------- */

.chat-log {
  display: flex; flex-direction: column; gap: 0.6rem;
  max-height: 380px; overflow-y: auto; margin-bottom: 0.75rem;
}
.chat-msg { max-width: 88%; padding: 0.6rem 0.8rem; border-radius: 10px; font-size: 0.92rem; white-space: pre-wrap; }
.chat-msg.user { align-self: flex-end; background: var(--cyan-dim); color: #f0fdff; border-bottom-right-radius: 2px; }
.chat-msg.assistant { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 2px; }
.chat-msg .model-tag { display: block; font-family: var(--mono); font-size: 0.65rem; color: var(--muted); margin-top: 0.4rem; }
.chat-msg.typing { color: var(--muted); font-style: italic; }

.chat-form { display: flex; gap: 0.5rem; }
.chat-form input {
  flex: 1; min-width: 0;
  background: #032029; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 0.65rem 0.8rem; font-size: 0.95rem;
}
.chat-form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan-glow); }
.chat-form button {
  background: var(--cyan-dim); color: #f0fdff; border: 1px solid var(--cyan);
  border-radius: 8px; padding: 0 1.1rem; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.06em;
  cursor: pointer;
}
.chat-form button:disabled { opacity: 0.5; cursor: default; }
.chat-form button:not(:disabled):hover { background: var(--cyan); color: #032029; }

/* ---------- footer ---------- */

.site-footer { text-align: center; padding: 1rem; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; }
