/* SydCom V17 — military terminal style */
:root {
  --bg:        #0a0d0e;
  --panel:    #11181c;
  --panel-2: #19232a;
  --line:    #1f2d36;
  --text:    #c5d3d8;
  --muted:   #6f8693;
  --accent:  #6dd58c;       /* phosphor green */
  --warn:    #ffc857;
  --flash:   #ff5d6c;
  --ok:      #6dd58c;
  --info:    #7d9eff;
  --mono:    "JetBrains Mono","Fira Code","SF Mono",ui-monospace,monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.err   { color: var(--flash); }

button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  text-transform: uppercase;
}
button:hover { border-color: var(--accent); color: var(--accent); }
button.primary { background: var(--accent); color: #062014; border-color: var(--accent); }
button.primary:hover { background: #8be1a3; }
button.warn    { background: var(--warn); color: #2a1f00; border-color: var(--warn); }
button.warn:hover { background: #ffd68a; }
button.ghost   { background: transparent; }

input, select, textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 6px 8px;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

.dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:#444; margin-right:8px; vertical-align: baseline; }
.dot.ok   { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.dot.warn { background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.dot.flash { background: var(--flash); box-shadow: 0 0 6px var(--flash); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.brand { display:flex; align-items: center; gap: 12px; }
.logo { font-weight: 600; letter-spacing: 0.18em; color: var(--accent); }
.status { display: flex; align-items: center; gap: 12px; }

/* ---------- Channel grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px 16px;
}
.chip {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px 10px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
}
.chip:hover { border-color: var(--accent); }
.chip.active { border-color: var(--accent); background: var(--panel-2); }
.chip .id { font-weight: 600; letter-spacing: 0.12em; }
.chip .label { font-size: 11px; color: var(--muted); }
.chip .count { font-size: 11px; color: var(--muted); }

/* ---------- Transcript ---------- */
.transcript-wrap { padding: 4px 16px 16px; }
.transcript-head { display:flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.transcript-head h2 { margin: 0; font-size: 13px; letter-spacing: 0.18em; color: var(--accent); font-weight: 600; }
.transcript {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 36vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
}
.transcript li {
  padding: 8px 12px;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  line-height: 1.45;
}
.transcript li.flash    { background: rgba(255,93,108,0.08); }
.transcript li.immediate { background: rgba(255,200,87,0.06); }
.transcript .meta { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.transcript .from { color: var(--info); font-weight: 600; }
.transcript .to   { color: var(--accent); }
.transcript .id   { color: var(--muted); }

/* ---------- Compose ---------- */
.compose {
  position: sticky; bottom: 0; z-index: 40;
  padding: 10px 16px 14px;
  background: linear-gradient(0deg, var(--panel) 0%, var(--bg) 100%);
  border-top: 1px solid var(--line);
}
.compose-row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-bottom: 8px; }
.compose-row.right { justify-content: flex-end; }
.compose label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); letter-spacing: 0.12em; flex: 1 1 120px; }
.compose label.check { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px; }
.compose textarea { resize: vertical; min-height: 70px; }

/* ---------- Login ---------- */
body.login { display:flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: var(--panel); border: 1px solid var(--line); padding: 28px 28px 18px; max-width: 380px; width: 100%; }
.login-card h1 { margin: 0 0 6px; letter-spacing: 0.2em; color: var(--accent); font-weight: 600; }
.login-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); letter-spacing: 0.14em; }
.login-card .footer { margin-top: 12px; font-size: 11px; color: var(--muted); text-align: right; letter-spacing: 0.1em; }
