:root {
  --bg: #09111d;
  --bg-2: #101a2b;
  --panel: rgba(15, 23, 38, 0.9);
  --panel-2: #121c2e;
  --text: #eef4ff;
  --muted: #93a6c7;
  --accent: #69aefc;
  --green: #36d286;
  --yellow: #ffcd6b;
  --red: #ff7b7b;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
}
.shell { max-width: 1540px; margin: 0 auto; padding: 18px; }
.hero, .card, .stat {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  margin-bottom: 16px;
}
.eyebrow { margin: 0 0 8px; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; }
h1 { margin: 0 0 8px; font-size: 32px; }
.sub { margin: 0; max-width: 760px; color: var(--muted); }
.hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.three { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.raw-grid { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.card, .stat { padding: 16px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 30px; font-weight: 800; margin: 8px 0 4px; }
.small, .muted { color: var(--muted); }
.small-inline { margin: 0; }
.pill, .btn, .tab, select, input, textarea {
  border-radius: 12px;
  border: 1px solid var(--border);
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  background: rgba(91, 167, 255, 0.12);
  color: #dcecff;
}
.pill.neutral { background: rgba(255,255,255,0.06); }
.btn, .tab {
  cursor: pointer;
  padding: 10px 13px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  min-height: 42px;
}
.btn:hover, .tab:hover { background: rgba(255,255,255,0.08); }
.btn.primary { background: rgba(54,210,134,0.16); border-color: rgba(54,210,134,0.35); }
.btn.warn { background: rgba(255,205,107,0.14); border-color: rgba(255,205,107,0.30); }
.btn.danger { background: rgba(255,123,123,0.14); border-color: rgba(255,123,123,0.30); }
.tab.active { background: rgba(91,167,255,0.16); border-color: rgba(91,167,255,0.35); }
.toolbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; }
.filters, .toggles, .actions, .toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions.wrap-tight .btn, .toolbar-actions .btn { flex: 1 1 140px; }
.actions.stack-sm { justify-content: flex-start; }
label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; min-width: 0; }
input, select, textarea {
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
textarea { min-height: 140px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #7890b6; }
option { color: #111; }
.card h2, .section-head h2 { margin-top: 0; margin-bottom: 8px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.list, .record-grid { display: grid; gap: 12px; }
.item, .record-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  min-width: 0;
  overflow: hidden;
}
.item p, .record-card p { margin: 6px 0 0; color: var(--muted); word-break: break-word; }
.item strong, .record-card strong { color: white; }
.badge {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
}
.badge.green { background: rgba(54,210,134,0.14); color: #aff4cc; }
.badge.yellow { background: rgba(255,205,107,0.16); color: #ffe5a8; }
.badge.red { background: rgba(255,123,123,0.16); color: #ffc1c1; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
.kv div { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); min-width: 0; word-break: break-word; }
.compact-kv div { padding: 6px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.record-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.record-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.record-card .meta { margin-top: 10px; display: grid; gap: 6px; font-size: 14px; }
.record-card details { margin-top: 12px; }
.record-card summary { cursor: pointer; color: #dcecff; }
.record-card .editor { margin-top: 14px; display: grid; gap: 10px; min-width: 0; }
.record-card .editor .row { display: grid; gap: 10px; }
.record-card .editor .row.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  background: #0b1220;
  color: #d7e6ff;
  padding: 14px;
  border-radius: 14px;
  overflow: auto;
  max-height: 460px;
  border: 1px solid rgba(255,255,255,0.06);
}
.empty { color: var(--muted); font-style: italic; }
.approval-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.approval-headline { min-width: 0; }
.approval-title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.approval-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.summary-chip {
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 12px;
  min-width: 0;
}
.summary-chip.good { border-color: rgba(54,210,134,0.25); }
.summary-chip.warn { border-color: rgba(255,205,107,0.25); }
.summary-chip span, .mini-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.summary-chip strong { display: block; word-break: break-word; }
.approval-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.approval-preview p { margin: 0; }
.compact-editor { padding-top: 12px; }
.compact-meta { padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.compact-field { margin-top: 12px; }
@media (max-width: 980px) {
  .approval-summary-grid,
  .record-card .editor .row.two-col,
  .responsive-two,
  .raw-grid,
  .record-grid { grid-template-columns: 1fr; }
  .toolbar, .section-head, .hero { flex-direction: column; align-items: stretch; }
}
@media (max-width: 720px) {
  .shell { padding: 12px; }
  h1 { font-size: 26px; }
  .filters, .toggles, .toolbar-actions, .actions { width: 100%; }
  .toolbar-actions .btn, .actions.wrap-tight .btn, .actions .btn { flex: 1 1 100%; width: 100%; }
  .approval-title-row { align-items: flex-start; }
  .pill { width: 100%; justify-content: center; }
}
