:root {
  --bg: #07131f;
  --bg-soft: #102033;
  --surface: rgba(10, 24, 41, 0.9);
  --surface-strong: rgba(9, 28, 47, 0.98);
  --surface-soft: rgba(255, 255, 255, 0.03);
  --line: rgba(126, 196, 255, 0.18);
  --line-strong: rgba(126, 196, 255, 0.48);
  --text: #edf6ff;
  --muted: #9fb7ce;
  --brand: #83d0ff;
  --brand-strong: #d0edff;
  --brand-soft: rgba(131, 208, 255, 0.12);
  --brand-glow: rgba(131, 208, 255, 0.24);
  --accent: #f0c07b;
  --warning: #ffc96f;
  --danger: #ff8080;
  --success: #7addaa;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.18);
  --shadow-raise: 0 24px 54px rgba(0, 0, 0, 0.28);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --font-body: "Roboto", "Segoe UI", sans-serif;
  --font-display: "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-mono: "Roboto Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(circle at top, rgba(131, 208, 255, 0.16), transparent 30%),
    radial-gradient(circle at 86% 14%, rgba(240, 192, 123, 0.1), transparent 18%),
    linear-gradient(180deg, #122133 0%, #09131f 38%, #040912 100%);
  letter-spacing: 0;
}

body::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.86), transparent 94%);
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::after {
  background: linear-gradient(180deg, rgba(131, 208, 255, 0.035), transparent 22%, transparent 78%, rgba(240, 192, 123, 0.03)), repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px), radial-gradient(circle at 10% 20%, rgba(131, 208, 255, 0.09), transparent 22%), radial-gradient(circle at 90% 8%, rgba(240, 192, 123, 0.06), transparent 18%);
  animation: atmosphere 16s ease-in-out infinite alternate;
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

a, button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.shell {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 72px;
  overflow-x: clip;
}

.shell::before {
  inset: 18px;
  border: 1px solid rgba(131, 208, 255, 0.08);
  clip-path: polygon(0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px));
  opacity: 0.7;
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.shell::after {
  inset: 34px 28px auto 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(131, 208, 255, 0.42), transparent);
  box-shadow: 0 0 18px rgba(131, 208, 255, 0.2);
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.topbar, .hero, .overview, .filters, .summary, .section-card, .section, .sidebar-card, .note-card, .closing-note, .empty-state {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-strong));
  box-shadow: var(--shadow);
  isolation: isolate;
  transform: translateZ(0);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), border-color 240ms ease, box-shadow 320ms ease, background 320ms ease;
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; border-radius: 20px; backdrop-filter: blur(14px); }
.topbar:hover { border-color: rgba(208, 237, 255, 0.22); box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28); }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: linear-gradient(140deg, var(--brand), #2c78bd); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 26px rgba(131, 208, 255, 0.24); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand-copy span, .eyebrow, .mini-label { display: block; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.69rem; color: var(--brand-strong); }
.brand-copy strong { display: block; font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }

.topbar-nav, .hero-actions, .chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.topbar-nav a, .hero-actions a, .chip, .jump-link, .section-link, .anchor-list a {
  display: inline-flex; align-items: center; gap: 10px; position: relative; overflow: hidden;
  text-decoration: none; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, background 180ms ease, box-shadow 220ms ease, color 180ms ease;
  cursor: pointer;
}
.nav-icon, .action-icon { font-size: 0.92em; color: var(--brand-strong); flex: 0 0 auto; }

.topbar-nav a::after, .hero-actions a::after, .chip::after, .jump-link::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 12%, rgba(255, 255, 255, 0.16), transparent 42%);
  transform: translateX(-140%); transition: transform 400ms ease;
}

.topbar-nav a:hover, .hero-actions a:hover, .chip:hover, .jump-link:hover, .chip.is-active {
  transform: translateY(-3px); border-color: var(--line-strong); background: rgba(131, 208, 255, 0.12);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(208, 237, 255, 0.08);
}
.topbar-nav a:hover::after, .hero-actions a:hover::after, .chip:hover::after, .jump-link:hover::after, .chip.is-active::after { transform: translateX(140%); }
.topbar-nav a:focus-visible, .hero-actions a:focus-visible, .chip:focus-visible, .jump-link:focus-visible, .search-box:focus-within {
  outline: none; border-color: rgba(208, 237, 255, 0.64); box-shadow: 0 0 0 4px rgba(131, 208, 255, 0.12), 0 14px 30px rgba(0, 0, 0, 0.2);
}

.user-menu { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 0.9rem; font-weight: 500; }
.logout-btn { color: var(--danger); }
.logout-btn:hover { border-color: rgba(255,128,128,0.3); background: rgba(255,128,128,0.1); }

.hero, .summary, .overview, .section-card, .section, .sidebar-card, .note-card, .closing-note, .empty-state { border-radius: var(--radius-lg); }
.hero { margin-top: 24px; padding: 42px; border-radius: var(--radius-xl); background: linear-gradient(180deg, rgba(6, 18, 30, 0.72), rgba(6, 18, 30, 0.88)), url("/assets/img/banner.png") center/cover no-repeat; }
.hero::after { content: ""; position: absolute; right: -70px; bottom: -90px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(131, 208, 255, 0.18), transparent 70%); animation: pulseGlow 8s ease-in-out infinite; }
.hero:hover { transform: translateY(-4px); box-shadow: 0 36px 90px rgba(0, 0, 0, 0.38); border-color: rgba(208, 237, 255, 0.18); }

.hero-grid, .overview-grid, .summary-grid, .content-grid, .layout { position: relative; z-index: 1; display: grid; }
.hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr); gap: 28px; align-items: end; }
.hero h1, .section-card h2, .section h2 { font-family: var(--font-display); font-weight: 700; }
.hero h1 { margin: 12px 0 14px; font-size: clamp(2.8rem, 4vw, 5.2rem); line-height: 0.98; letter-spacing: 0.01em; text-wrap: balance; text-shadow: 0 0 22px rgba(131, 208, 255, 0.1); text-transform: uppercase; }
.hero p, .summary-card p, .overview-card p, .section-intro { color: var(--muted); font-size: 1rem; line-height: 1.68; }
.hero-copy { max-width: 760px; }
.hero-actions { margin-top: 24px; }
.hero-actions .primary { border-color: rgba(208, 237, 255, 0.52); background: linear-gradient(135deg, rgba(131, 208, 255, 0.26), rgba(131, 208, 255, 0.08)); }
.hero-panel, .sidebar { display: grid; gap: 14px; }

.stat-card, .overview-card, .summary-card, .rule-card, .mini-panel {
  padding: 20px; border-radius: 22px; border: 1px solid rgba(126, 196, 255, 0.14);
  background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); box-shadow: var(--shadow-soft);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, box-shadow 280ms ease, background 280ms ease;
}
.stat-card:hover, .overview-card:hover, .summary-card:hover, .sidebar-card:hover, .section-card:hover, .note-card:hover { transform: translateY(-5px); border-color: rgba(208, 237, 255, 0.22); box-shadow: var(--shadow-raise), 0 0 0 1px rgba(208, 237, 255, 0.05); }
.stat-card strong, .overview-card strong, .summary-card strong, .mini-panel strong { display: block; margin-bottom: 8px; font-size: 1.03rem; font-weight: 700; letter-spacing: 0.01em; }

.overview, .summary { margin-top: 24px; padding: 26px; }
.overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.content-grid, .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 24px; align-items: start; min-width: 0; }
.content, .sidebar { min-width: 0; }
.sidebar { position: sticky; top: 22px; align-self: start; gap: 18px; }

.section-card, .section, .sidebar-card, .note-card, .closing-note { padding: 28px; }
.section-card h2, .section h2, .closing-note h2 { margin: 0 0 10px; font-size: 1.58rem; line-height: 1.08; letter-spacing: 0.01em; text-transform: uppercase; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; margin-bottom: 18px; }
.section-intro { margin: 0; max-width: 72ch; }

.table-shell { overflow: visible; border-radius: 18px; border: 1px solid rgba(126, 196, 255, 0.12); background: var(--surface); transition: border-color 220ms ease, box-shadow 260ms ease; }
.table-shell:hover { border-color: rgba(208, 237, 255, 0.2); box-shadow: 0 20px 42px rgba(0, 0, 0, 0.2); }
.table-meta { padding: 14px 16px; background: rgba(255, 255, 255, 0.03); font-size: 0.68rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand-strong); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid rgba(159, 183, 206, 0.12); text-align: left; vertical-align: middle; font-size: 0.92rem; line-height: 1.45; white-space: nowrap; }
th { background: rgba(255,255,255,0.03); color: var(--brand-strong); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
tbody tr { transition: background 180ms ease; }
tbody tr:hover { background: rgba(131,208,255,0.06); }
tbody tr:last-child td { border-bottom: 0; }
td { min-width: 0; }
td:first-child { white-space: nowrap; }
.table-applicant { display: flex; align-items: center; gap: 10px; }
.table-applicant img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); flex-shrink: 0; }
.table-applicant-name { font-weight: 600; font-size: 0.92rem; }
.table-applicant-id { font-size: 0.72rem; color: var(--muted); font-family: var(--font-mono); }

.sidebar-card h3 { margin: 0 0 12px; font-size: 1.18rem; letter-spacing: 0.01em; text-transform: uppercase; }
.sidebar-card ul, .note-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.sidebar-card li { position: relative; margin: 0; padding: 0 0 0 18px; font-size: 0.98rem; line-height: 1.6; color: var(--muted); }
.sidebar-card li::before { content: ""; position: absolute; left: 0; top: 0.58em; width: 8px; height: 8px; border-radius: 2px; background: linear-gradient(135deg, var(--brand), rgba(131, 208, 255, 0.2)); box-shadow: 0 0 10px rgba(131, 208, 255, 0.22); }

.note-card { border-color: rgba(122, 221, 170, 0.18); background: linear-gradient(180deg, rgba(122, 221, 170, 0.06), rgba(9, 28, 47, 0.98)); }
.note-card h2 { color: var(--success); }

.anchor-list { display: grid; gap: 10px; }
.anchor-list a { display: block; border-radius: 14px; font-weight: 500; }
.jump-link { font-size: 0.9rem; }

.empty-state { display: none; margin-top: 22px; text-align: center; }
.empty-state.is-visible { display: block; }
.empty-inline { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px; color: var(--muted); text-align: center; }
.empty-inline i { font-size: 2.5rem; color: var(--brand); opacity: 0.5; }

footer { margin-top: 28px; padding-top: 24px; text-align: center; border-top: 1px solid rgba(159, 183, 206, 0.14); color: var(--muted); }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-strong); transition: color 200ms; }
.footer-links a:hover { color: var(--text); }

/* Alerts */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: 14px; margin-top: 18px; border: 1px solid; font-size: 0.95rem; }
.alert i { flex: 0 0 auto; margin-top: 2px; }
.alert--error { background: rgba(255, 128, 128, 0.08); border-color: rgba(255, 128, 128, 0.3); color: #ffb0b0; }
.alert--success { background: rgba(122, 221, 170, 0.08); border-color: rgba(122, 221, 170, 0.3); color: #b0ffd0; }
.alert--warning { background: rgba(255, 201, 111, 0.08); border-color: rgba(255, 201, 111, 0.3); color: #ffe0a0; }
.alert--info { background: rgba(131, 208, 255, 0.08); border-color: rgba(131, 208, 255, 0.3); color: var(--brand-strong); }

/* Status */
.status-banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; border: 1px solid; }
.status-banner--pending { background: rgba(255, 201, 111, 0.08); border-color: rgba(255, 201, 111, 0.3); }
.status-banner--under_review { background: rgba(131, 208, 255, 0.08); border-color: rgba(131, 208, 255, 0.3); }
.status-banner--approved { background: rgba(122, 221, 170, 0.08); border-color: rgba(122, 221, 170, 0.3); }
.status-banner--rejected { background: rgba(255, 128, 128, 0.08); border-color: rgba(255, 128, 128, 0.3); }
.status-icon i { font-size: 1.8rem; }
.status-banner--pending .status-icon i { color: var(--warning); }
.status-banner--under_review .status-icon i { color: var(--brand); }
.status-banner--approved .status-icon i { color: var(--success); }
.status-banner--rejected .status-icon i { color: var(--danger); }
.status-info strong { display: block; font-size: 1.05rem; }
.status-info p { margin: 4px 0 0; font-size: 0.9rem; }
.status-text { font-weight: 600; }
.status-text--pending { color: var(--warning); }
.status-text--under_review { color: var(--brand); }
.status-text--approved { color: var(--success); }
.status-text--rejected { color: var(--danger); }

.status-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; font-family: var(--font-mono); text-transform: uppercase; }
.status-chip--pending { background: rgba(255,201,111,0.15); color: var(--warning); }
.status-chip--under_review { background: rgba(131,208,255,0.15); color: var(--brand); }
.status-chip--approved { background: rgba(122,221,170,0.15); color: var(--success); }
.status-chip--rejected { background: rgba(255,128,128,0.15); color: var(--danger); }
.status-chip--review { background: rgba(131,208,255,0.15); color: var(--brand); }

.status-badge { display: inline-flex; padding: 10px 20px; border-radius: 16px; border: 1px solid; }
.status-badge--pending { background: rgba(255,201,111,0.08); border-color: rgba(255,201,111,0.3); }
.status-badge--approved { background: rgba(122,221,170,0.08); border-color: rgba(122,221,170,0.3); }
.status-badge--rejected { background: rgba(255,128,128,0.08); border-color: rgba(255,128,128,0.3); }
.status-badge--under_review { background: rgba(131,208,255,0.08); border-color: rgba(131,208,255,0.3); }
.status-label { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.status-badge--pending .status-label { color: var(--warning); }
.status-badge--approved .status-label { color: var(--success); }
.status-badge--rejected .status-label { color: var(--danger); }
.status-badge--under_review .status-label { color: var(--brand); }

/* Buttons */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; border: 1px solid rgba(208,237,255,0.52); background: linear-gradient(135deg, rgba(131,208,255,0.26), rgba(131,208,255,0.08)); color: var(--text); font-weight: 600; cursor: pointer; transition: transform 220ms, border-color 180ms, background 180ms, box-shadow 220ms; }
.btn-primary:hover { transform: translateY(-3px); border-color: rgba(208,237,255,0.7); background: linear-gradient(135deg, rgba(131,208,255,0.35), rgba(131,208,255,0.15)); box-shadow: 0 14px 30px rgba(0,0,0,0.22); }
.btn-primary.btn-large { padding: 14px 28px; font-size: 1.05rem; }

.btn-small { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--brand-strong); font-size: 0.85rem; font-weight: 500; transition: all 200ms; }
.btn-small:hover { background: rgba(131,208,255,0.12); border-color: var(--line-strong); transform: translateY(-2px); }
.btn-small--brand { border-color: rgba(131,208,255,0.4); background: rgba(131,208,255,0.08); }

.btn-action { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid; font-weight: 600; cursor: pointer; transition: all 220ms; font-size: 0.95rem; }
.btn-action--approve { background: rgba(122,221,170,0.1); border-color: rgba(122,221,170,0.3); color: var(--success); }
.btn-action--approve:hover { background: rgba(122,221,170,0.2); border-color: rgba(122,221,170,0.5); transform: translateY(-2px); }
.btn-action--reject { background: rgba(255,128,128,0.1); border-color: rgba(255,128,128,0.3); color: var(--danger); }
.btn-action--reject:hover { background: rgba(255,128,128,0.2); border-color: rgba(255,128,128,0.5); transform: translateY(-2px); }
.btn-action--review { background: rgba(131,208,255,0.1); border-color: rgba(131,208,255,0.3); color: var(--brand); }
.btn-action--review:hover { background: rgba(131,208,255,0.2); border-color: rgba(131,208,255,0.5); transform: translateY(-2px); }
.btn-action--release { background: rgba(240,192,123,0.1); border-color: rgba(240,192,123,0.3); color: var(--accent); }
.btn-action--release:hover { background: rgba(240,192,123,0.2); transform: translateY(-2px); }

.action-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* Form */
.application-form { margin-top: 24px; display: grid; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-weight: 600; font-size: 0.95rem; }
.form-group label .required { color: var(--danger); margin-left: 4px; }
.form-group input, .form-group textarea, .form-group select { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--text); font-family: var(--font-body); font-size: 0.95rem; transition: border-color 200ms, background 200ms, box-shadow 200ms; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: rgba(131,208,255,0.6); background: rgba(131,208,255,0.05); box-shadow: 0 0 0 4px rgba(131,208,255,0.1); }
.form-group input::placeholder, .form-group textarea::placeholder { color: #5a7080; }
.form-group.has-error input, .form-group.has-error textarea { border-color: rgba(255,128,128,0.5); }
.form-hint { font-size: 0.85rem; color: var(--muted); margin: 0; }
.form-error { font-size: 0.85rem; color: var(--danger); margin: 0; font-weight: 500; }

.form-actions { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--surface-strong)); }
.form-notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; background: rgba(131,208,255,0.06); border: 1px solid rgba(131,208,255,0.15); }
.form-notice i { color: var(--brand); flex: 0 0 auto; margin-top: 2px; }
.form-notice p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.action-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.action-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--text); font-family: var(--font-body); resize: vertical; }
.action-form textarea:focus { outline: none; border-color: rgba(131,208,255,0.5); }

/* Scenarios */
.scenario-section { display: flex; flex-direction: column; gap: 20px; }
.scenario-card { padding: 20px; border-radius: 16px; border: 1px solid rgba(126,196,255,0.12); background: rgba(255,255,255,0.02); display: flex; flex-direction: column; gap: 12px; transition: border-color 220ms, box-shadow 220ms; }
.scenario-card:hover { border-color: rgba(208,237,255,0.2); box-shadow: var(--shadow-soft); }
.scenario-card.has-error { border-color: rgba(255,128,128,0.3); }
.scenario-header { display: flex; align-items: center; gap: 12px; }
.scenario-number { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #2c78bd); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; flex: 0 0 auto; }
.scenario-header h3 { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; }
.scenario-description { color: var(--muted); font-size: 0.92rem; line-height: 1.6; margin: 0; padding: 12px; border-radius: 10px; background: rgba(255,255,255,0.02); border: 1px solid rgba(126,196,255,0.08); }
.scenario-card textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--text); font-family: var(--font-body); font-size: 0.95rem; resize: vertical; transition: border-color 200ms; }
.scenario-card textarea:focus { outline: none; border-color: rgba(131,208,255,0.5); box-shadow: 0 0 0 3px rgba(131,208,255,0.08); }
.scenario-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); }
.char-count { transition: color 200ms; }
.char-count.is-valid { color: var(--success); }
.char-count.is-warning { color: var(--warning); }
.char-count.is-error { color: var(--danger); }

/* Answer display */
.answer-block { padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,0.02); border: 1px solid rgba(126,196,255,0.08); margin-bottom: 14px; }
.answer-block:last-child { margin-bottom: 0; }
.answer-block h4 { margin: 0 0 8px; font-size: 0.85rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-strong); }
.answer-block p { margin: 0; color: var(--text); font-size: 0.95rem; line-height: 1.7; white-space: pre-wrap; }
.scenario-answer { padding: 14px; border-radius: 10px; background: rgba(131,208,255,0.04); border: 1px solid rgba(131,208,255,0.1); }
.scenario-answer h4 { margin: 0 0 8px; font-size: 0.8rem; color: var(--accent); font-family: var(--font-mono); text-transform: uppercase; }
.scenario-answer p { margin: 0; color: var(--text); line-height: 1.7; white-space: pre-wrap; }

.reason-cell { max-width: 200px; font-size: 0.85rem; color: var(--muted); }

.applicant-cell { display: flex; align-items: center; gap: 8px; }
.applicant-name { font-weight: 600; }

.reviewer-info { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }

.sidebar-actions { display: flex; flex-direction: column; gap: 12px; }

/* Error pages */
.error-page { display: grid; place-items: center; min-height: 60vh; text-align: center; }
.error-content { max-width: 480px; }
.error-content h1 { font-family: var(--font-display); font-size: clamp(3rem, 6vw, 6rem); text-transform: uppercase; margin: 10px 0; }
.error-content p { color: var(--muted); margin-bottom: 24px; }
.error-content .btn-primary { margin: 0 auto; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px) scale(0.982); transition: opacity 820ms cubic-bezier(0.22, 1, 0.36, 1), transform 820ms cubic-bezier(0.22, 1, 0.36, 1), filter 820ms ease; filter: blur(6px); }
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
body.is-ready .reveal.is-visible, body.is-ready .reveal.is-instant { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--muted); font-size: 0.9rem; transition: all 200ms; }
.pagination a:hover { background: rgba(131,208,255,0.1); border-color: rgba(131,208,255,0.3); color: var(--brand-strong); }
.pagination .active { background: rgba(131,208,255,0.15); border-color: rgba(131,208,255,0.4); color: var(--brand-strong); font-weight: 600; }

/* Profile Hover Card */
.profile-hover-card {
  position: fixed;
  z-index: 9999;
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(131,208,255,0.12);
  background: #0a1520;
  color: #edf6ff;
  border: 1px solid rgba(131,208,255,0.15);
  display: none;
  pointer-events: none;
  transform: translate(16px, 16px);
  opacity: 0;
  transition: opacity .15s ease;
  isolation: isolate;
}
.profile-hover-card.show { display: block; opacity: 1; }
.phc-banner {
  height: 100px;
  background: linear-gradient(135deg, #0a1825, #14243a);
  background-size: cover;
  background-position: center;
}
.phc-avatar-wrap { position: relative; height: 0; }
.phc-avatar {
  position: absolute;
  top: -40px;
  left: 14px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #0a1520;
  background: #0a1825;
  object-fit: cover;
}
.phc-name {
  margin: 44px 14px 6px 14px;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.phc-meta {
  margin: 0 14px 12px 14px;
  font-size: 0.78rem;
  color: #7fb3cc;
  font-family: var(--font-mono);
}
.phc-roles {
  margin: 0 14px 14px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.phc-role-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(131,208,255,0.12);
  color: var(--brand);
  border: 1px solid rgba(131,208,255,0.2);
}

/* Stat cards in admin */
.stat-number { font-size: 1.8rem; font-weight: 800; font-family: var(--font-display); color: var(--brand-strong); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

/* Admin layout */
.main-col { min-width: 0; }
.main-col .section-card { padding: 24px; }
.td-mono { font-family: var(--font-mono); }

/* Admin cards on index */
.admin-quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.admin-quick-link { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); text-align: center; transition: all 220ms; display: block; text-decoration: none; color: inherit; }
.admin-quick-link:hover { background: rgba(131,208,255,0.08); border-color: rgba(131,208,255,0.2); transform: translateY(-3px); }
.admin-quick-link i { font-size: 1.5rem; color: var(--brand); display: block; margin-bottom: 8px; }
.admin-quick-link strong { display: block; font-size: 0.9rem; }
.admin-quick-link span { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 4px; }
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(122,221,170,0.1);
  color: var(--success);
  border: 1px solid rgba(122,221,170,0.25);
}
.role-badge--admin {
  background: rgba(255,128,128,0.1);
  color: var(--danger);
  border-color: rgba(255,128,128,0.25);
}
.role-badge--applicant {
  background: rgba(240,192,123,0.1);
  color: var(--accent);
  border-color: rgba(240,192,123,0.25);
}

/* Status timeline */
.timeline { display: grid; gap: 14px; }
.timeline-item { display: flex; gap: 12px; }
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; margin-top: 6px;
  background: var(--brand); box-shadow: 0 0 8px rgba(131,208,255,0.4);
}
.timeline-dot--success { background: var(--success); box-shadow: 0 0 8px rgba(122,221,170,0.4); }
.timeline-dot--danger { background: var(--danger); box-shadow: 0 0 8px rgba(255,128,128,0.4); }
.timeline-dot--warning { background: var(--warning); box-shadow: 0 0 8px rgba(255,201,111,0.4); }
.timeline-content { flex: 1; }
.timeline-content strong { display: block; font-size: 0.9rem; }
.timeline-content p { margin: 2px 0 0; font-size: 0.8rem; color: var(--muted); }
.timeline-content time { font-size: 0.75rem; color: var(--muted); font-family: var(--font-mono); }

/* Search bar */
.search-box { display: flex; gap: 8px; margin-bottom: 18px; }
.search-box input {
  flex: 1; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.03); color: var(--text); font-size: 0.9rem;
  transition: border-color 200ms;
}
.search-box input:focus { outline: none; border-color: rgba(131,208,255,0.5); }
.search-box input::placeholder { color: #5a7080; }
.search-box button { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(131,208,255,0.08); color: var(--brand-strong); cursor: pointer; transition: all 200ms; }
.search-box button:hover { background: rgba(131,208,255,0.18); border-color: rgba(131,208,255,0.3); }

/* Filter chips */
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); font-size: 0.85rem; cursor: pointer; transition: all 200ms; text-decoration: none; color: var(--muted); }
.chip:hover { background: rgba(131,208,255,0.08); border-color: rgba(131,208,255,0.2); color: var(--brand-strong); }
.chip.is-active { background: rgba(131,208,255,0.15); border-color: rgba(131,208,255,0.4); color: var(--brand-strong); font-weight: 600; }
.chip .chip-count { background: rgba(255,255,255,0.1); padding: 1px 6px; border-radius: 999px; font-size: 0.75rem; }
.chip.is-active .chip-count { background: rgba(131,208,255,0.2); }

/* Profile Dropdown */
.profile-dropdown {
  position: fixed;
  z-index: 9999;
  width: 280px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(131,208,255,0.12);
  background: #0a1520;
  color: #edf6ff;
  border: 1px solid rgba(131,208,255,0.15);
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .15s ease, transform .15s ease;
}
.profile-dropdown.show { display: block; opacity: 1; transform: translateY(0); }
.pd-banner { height: 80px; background: linear-gradient(135deg, #0a1825, #14243a); background-size: cover; background-position: center; }
.pd-body { padding: 0 0 8px; }
.pd-avatar-row { display: flex; align-items: center; gap: 12px; padding: 0 14px 12px; margin-top: -28px; }
.pd-avatar { width: 52px; height: 52px; border-radius: 50%; border: 3px solid #0a1520; background: #0a1825; object-fit: cover; }
.pd-user-info { flex: 1; min-width: 0; margin-top: 24px; }
.pd-user-info strong { display: block; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-role { font-size: 0.72rem; font-family: var(--font-mono); padding: 2px 8px; border-radius: 999px; background: rgba(131,208,255,0.12); color: var(--brand); border: 1px solid rgba(131,208,255,0.2); }
.pd-links { border-top: 1px solid rgba(255,255,255,0.06); padding: 6px 0; }
.pd-links a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text); text-decoration: none; font-size: 0.9rem; transition: background 150ms; }
.pd-links a:hover { background: rgba(131,208,255,0.08); color: var(--brand-strong); }
.pd-links a i { width: 16px; text-align: center; color: var(--muted); }
.pd-footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 6px 0; }
.pd-logout { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--danger); text-decoration: none; font-size: 0.9rem; transition: background 150ms; }
.pd-logout:hover { background: rgba(255,128,128,0.08); }

/* Role badge variants */
.role-badge--admin { background: rgba(255,128,128,0.1); color: var(--danger); border-color: rgba(255,128,128,0.25); }
.role-badge--highauth { background: rgba(200,180,255,0.1); color: #c8b4ff; border-color: rgba(200,180,255,0.25); }
.role-badge--whitelisted { background: rgba(122,221,170,0.1); color: var(--success); border-color: rgba(122,221,170,0.25); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; font-size: 0.85rem; font-family: var(--font-mono); text-decoration: none; border: 1px solid var(--line); background: rgba(255,255,255,0.02); color: var(--muted); transition: all 180ms; }
.pagination a:hover { background: rgba(131,208,255,0.1); border-color: rgba(131,208,255,0.3); color: var(--brand-strong); }
.pagination .active { background: rgba(131,208,255,0.15); border-color: rgba(131,208,255,0.4); color: var(--brand-strong); font-weight: 700; }

/* Action group (inline buttons) */
.action-group { display: flex; gap: 6px; align-items: center; }

@keyframes atmosphere {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  100% { transform: translate3d(0, 12px, 0) scale(1.04); opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

@media (max-width: 1100px) {
  .hero-grid, .overview-grid, .summary-grid, .content-grid, .layout, .form-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 20px, 1320px); padding-top: 14px; }
  .topbar, .hero, .overview, .summary, .section-card, .section, .sidebar-card, .note-card, .closing-note { border-radius: 20px; }
  .topbar { padding: 14px; flex-wrap: wrap; }
  .hero, .overview, .summary, .section-card, .section, .sidebar-card, .note-card { padding: 20px; }
  .topbar-nav, .hero-actions { width: 100%; }
  .topbar-nav a, .hero-actions a, .chip, .jump-link, .section-link { width: 100%; text-align: center; justify-content: center; }
  .hero h1 { font-size: clamp(2.2rem, 11vw, 3.6rem); }
  .shell::before, .shell::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
