/* AIOS Genome Console — Control Surface Stylesheet
   AINLP aesthetic: biological-architecture · dark console · green accent
   Zero framework. Intentionally minimal. */

:root {
  --bg:         #050508;
  --surface:    #0d0d16;
  --border:     #1a1a2e;
  --border-mid: #252540;
  --text:       #c8d8e4;
  --dim:        #5a6a7a;
  --accent:     #00cc88;
  --accent-dim: #009966;
  --warn:       #ffaa00;
  --urgent:     #ff6600;
  --critical:   #ff2244;
  --expired:    #cc0033;
  --unknown:    #5a6a7a;
  --font-mono:  "Cascadia Code", "JetBrains Mono", "Fira Mono", "Consolas", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--border);
  color: var(--accent);
  padding: 0 4px;
  border-radius: 2px;
  font-family: var(--font-mono);
}

/* ── Severity colours ────────────────────────────────────────────────────── */
.severity-healthy  { color: var(--accent); }
.severity-advisory { color: #88ccff; }
.severity-warning  { color: var(--warn); }
.severity-urgent   { color: var(--urgent); }
.severity-critical { color: var(--critical); font-weight: bold; }
.severity-expired  { color: var(--expired); font-weight: bold; }
.severity-unknown  { color: var(--unknown); }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.dim   { color: var(--dim); }
.small { font-size: 11px; }

/* ── Login shell ─────────────────────────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.genome-sigil {
  font-size: 48px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
  display: block;
}

.genome-sigil-small {
  font-size: 18px;
  color: var(--accent);
  margin-right: 8px;
}

.console-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 4px;
}

.console-subtitle {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.08em;
  margin-bottom: 32px;
}

.login-footer {
  margin-top: 24px;
  font-size: 11px;
  color: var(--dim);
}

/* ── Alert ───────────────────────────────────────────────────────────────── */
.alert {
  border-radius: 3px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 12px;
  text-align: left;
}

.alert-error {
  background: rgba(255, 34, 68, 0.1);
  border: 1px solid rgba(255, 34, 68, 0.35);
  color: #ff6688;
}

/* ── Form elements ───────────────────────────────────────────────────────── */
.field-group { margin-bottom: 16px; text-align: left; }

.field-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
}

.field-input:focus { border-color: var(--accent); }
.field-input::placeholder { color: var(--dim); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) { background: var(--accent-dim); }

.btn-ghost {
  background: transparent;
  color: var(--dim);
  border-color: var(--border-mid);
}

.btn-ghost:hover { color: var(--text); border-color: var(--border-mid); }

.btn-full { width: 100%; margin-top: 8px; }

/* ── Console shell ───────────────────────────────────────────────────────── */
.console-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border-mid);
  padding: 12px 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.header-meta {
  font-size: 11px;
  color: var(--dim);
}

/* ── Grid ────────────────────────────────────────────────────────────────── */
.console-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 24px;
  flex: 1;
}

@media (max-width: 860px) {
  .console-grid { grid-template-columns: 1fr; }
}

/* ── Panel ───────────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--dim);
}

.panel-badge {
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid currentColor;
}

.panel-body {
  padding: 16px;
  flex: 1;
}

/* ── Data table ──────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table tr { border-bottom: 1px solid var(--border); }
.data-table tr:last-child { border-bottom: none; }

.data-table td {
  padding: 8px 4px;
  vertical-align: top;
}

.data-table .label {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  width: 130px;
  padding-right: 12px;
}

/* ── Divider + sections ──────────────────────────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--dim);
  font-weight: 700;
  margin-bottom: 10px;
}

/* ── Rotation section ────────────────────────────────────────────────────── */
.rotation-section { }

.hint {
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 6px;
  line-height: 1.5;
}

.rotate-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.rotate-row .field-input { flex: 1; }

.rotate-result {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.5;
}

.result-ok {
  background: rgba(0, 204, 136, 0.08);
  border: 1px solid rgba(0, 204, 136, 0.3);
  color: var(--accent);
}

.result-error {
  background: rgba(255, 34, 68, 0.08);
  border: 1px solid rgba(255, 34, 68, 0.3);
  color: #ff6688;
}

/* ── Data missing ────────────────────────────────────────────────────────── */
.data-missing {
  color: var(--dim);
  font-size: 12px;
  padding: 16px 0;
  text-align: center;
}

/* ── Full-width panel (spans all grid columns) ───────────────────────────── */
.panel-full {
  grid-column: 1 / -1;
}

/* ── Horizontal panel body (for multi-column content within a panel) ─────── */
.panel-body-row {
  display: flex;
  gap: 0;
}

.panel-col {
  flex: 1;
  min-width: 0;
}

.panel-col-divider {
  width: 1px;
  background: var(--border);
  margin: 0 20px;
  flex-shrink: 0;
}

/* ── Repo tag (inline label for repo list) ───────────────────────────────── */
.repo-tag {
  display: inline-block;
  font-size: 10px;
  border: 1px solid var(--border-mid);
  border-radius: 2px;
  padding: 1px 5px;
  margin-bottom: 2px;
}

/* ── Per-repo rotation progress list ────────────────────────────────────── */
.repo-list {
  list-style: none;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.repo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.repo-item:last-child {
  border-bottom: none;
}

.repo-indicator {
  font-size: 8px;
  color: var(--dim);
  flex-shrink: 0;
}

.repo-name {
  flex: 1;
  color: var(--text);
  font-size: 11px;
}

.repo-status {
  font-size: 11px;
  text-align: right;
}
