/* SFRS design tokens — institutional charcoal + signal red */
:root {
  --bg: #0c0e10;
  --bg-elevated: #14181c;
  --surface: #1a2026;
  --surface-2: #232b33;
  --border: rgba(232, 234, 237, 0.08);
  --border-strong: rgba(232, 234, 237, 0.16);
  --text: #e8eaed;
  --text-muted: #8b939c;
  --text-faint: #5c656e;
  --accent: #e11d2e;
  --accent-hover: #ff2d40;
  --accent-soft: rgba(225, 29, 46, 0.14);
  --success: #2f9e44;
  --warning: #f08c00;
  --danger: #c92a2a;
  --info: #1c7ed6;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --nav-width: 240px;
  --header-height: 64px;
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(225, 29, 46, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(28, 126, 214, 0.08), transparent 50%),
    var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); text-transform: uppercase; }
h2 { font-size: 1.45rem; text-transform: uppercase; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; color: var(--text-muted); }

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data th,
table.data td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.data th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-active, .badge-scheduled, .badge-pending { background: var(--accent-soft); color: #ff8a95; }
.badge-closed, .badge-completed, .badge-approved { background: rgba(47, 158, 68, 0.18); color: #69db7c; }
.badge-cancelled, .badge-rejected { background: rgba(201, 42, 42, 0.18); color: #ff8787; }
.badge-archived { background: rgba(139, 147, 156, 0.2); color: #adb5bd; }

.flash {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.flash-ok { background: rgba(47, 158, 68, 0.12); border-color: rgba(47, 158, 68, 0.35); }
.flash-err { background: rgba(201, 42, 42, 0.12); border-color: rgba(201, 42, 42, 0.35); }

.empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.01);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
}

.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.grow { flex: 1; }
