@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --ink: #0A0D12;
  --panel: #12161D;
  --panel-raised: #191F29;
  --hairline: #262C36;
  --blue: #3E7BFA;
  --blue-bright: #6C9EFF;
  --blue-dim: #1E3A66;
  --text: #EDEFF3;
  --text-muted: #8992A3;
  --ok: #4FAE7D;
  --ok-bg: rgba(79, 174, 125, 0.12);
  --warn: #D6B15A;
  --warn-bg: rgba(214, 177, 90, 0.12);
  --danger: #D06A63;
  --danger-bg: rgba(208, 106, 99, 0.12);

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, Segoe UI, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
  text-transform: uppercase;
}

.case-ref {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: none;
}

/* ---------- Landing / login split screen ---------- */
.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  min-height: 100vh;
}

.split-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0D1420 0%, #080B10 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px;
}

.split-visual .slideshow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.split-visual .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.split-visual .slide.active {
  opacity: 1;
}

.split-visual .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8,11,16,0.96) 0%, rgba(8,11,16,0.55) 45%, rgba(8,11,16,0.15) 100%);
}

.split-visual .content {
  position: relative;
  z-index: 2;
}

.split-visual .kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue-bright);
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.split-visual h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  line-height: 1.05;
  color: var(--text);
  max-width: 13ch;
  text-transform: none;
}

.split-visual p.lede {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 44ch;
  margin-top: 18px;
}

.split-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: var(--ink);
}

.form-shell {
  width: 100%;
  max-width: 380px;
}

.badge {
  width: 68px;
  height: 68px;
  border: 1.5px solid var(--blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--blue-bright);
  overflow: hidden;
}

.badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.form-shell h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.form-shell .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-discord {
  background: #4956C4;
  color: #fff;
}
.btn-discord:hover { background: #5865F2; }

.btn-brass {
  background: var(--blue);
  color: #fff;
}
.btn-brass:hover { background: var(--blue-bright); }

.btn-outline {
  background: transparent;
  border-color: var(--hairline);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--blue); }

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

.note-box {
  margin-top: 28px;
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--blue);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.note-box .note-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue-bright);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.note-box p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.error-banner {
  background: var(--danger-bg);
  border: 1px solid rgba(208,106,99,0.4);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.footer-credit {
  position: fixed;
  bottom: 18px;
  right: 40px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-visual { display: none; }
  .footer-credit { display: none; }
}

/* ---------- App shell (form / status / admin) ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--hairline);
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
}

.topbar .brand .dot {
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--blue);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.user-chip img {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
}

.user-chip a { color: var(--text-muted); text-decoration: none; border-bottom: 1px dotted var(--hairline); }
.user-chip a:hover { color: var(--text); }

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 100px;
}

.page-head {
  margin-bottom: 36px;
}

.page-head .case-ref { display: block; margin-bottom: 10px; }
.page-head h1 { font-size: 2.3rem; }
.page-head p { color: var(--text-muted); margin-top: 10px; max-width: 60ch; text-transform: none; }

/* Sectioned dossier form */
.dossier {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.dossier-section {
  padding: 32px 36px;
  border-bottom: 1px solid var(--hairline);
}
.dossier-section:last-child { border-bottom: none; }

.dossier-section .step-marker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.dossier-section .step-marker .num {
  font-family: var(--font-mono);
  color: var(--blue-bright);
  font-size: 0.85rem;
  border: 1px solid var(--hairline);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.dossier-section .step-marker h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.field {
  margin-bottom: 20px;
}
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field .hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.75;
  margin-top: 6px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

input[type="text"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  transition: border-color 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
}

textarea { resize: vertical; min-height: 100px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--ink);
}
.checkbox-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--blue); }
.checkbox-row label { font-size: 0.88rem; color: var(--text); margin: 0; }

.form-actions {
  padding: 28px 36px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.form-actions .btn { width: auto; padding: 13px 28px; }

/* Status stamp */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1.5px solid;
}
.stamp.pending { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.stamp.approved { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }
.stamp.denied { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }

.summary-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 28px 32px;
  margin-top: 28px;
}
.summary-card dl { margin: 0; }
.summary-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
.summary-row:last-child { border-bottom: none; }
.summary-row dt { color: var(--text-muted); font-size: 0.86rem; }
.summary-row dd { margin: 0; white-space: pre-wrap; }

/* Admin table */
.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.filter-chip {
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--panel);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.filter-chip.active { border-color: var(--blue); color: var(--blue-bright); }

table.app-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
table.app-table th {
  text-align: left;
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: 12px 16px;
  background: var(--panel-raised);
  border-bottom: 1px solid var(--hairline);
}
table.app-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.9rem;
}
table.app-table tr:last-child td { border-bottom: none; }
table.app-table tr.row-link { cursor: pointer; }
table.app-table tr.row-link:hover { background: var(--panel-raised); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.login-card {
  max-width: 340px;
  margin: 12vh auto;
  padding: 36px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
}
.login-card h2 { text-align: center; margin-bottom: 24px; font-size: 1.5rem; }