:root {
  --bg: #06090f;
  --surface: #101826;
  --surface-2: #151f31;
  --text: #ecf1f7;
  --muted: #aeb8c6;
  --accent: #319eff;
  --accent-strong: #7ac8ff;
  --accent-soft: rgba(49, 158, 255, 0.2);
  --accent-soft-2: rgba(49, 158, 255, 0.34);
  --line: #264970;
  --ok: #2ea043;
  --deny: #da3633;
  --pending: #2f80ed;
  --dept-glow: rgba(49, 158, 255, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #050a13 0%, #04070f 62%, #03050a 100%);
  min-height: 100vh;
}

.bg-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 0%, var(--accent-soft), transparent 34%),
    radial-gradient(circle at 90% 8%, var(--accent-soft-2), transparent 40%),
    linear-gradient(transparent 96%, var(--accent-soft) 100%);
  background-size:
    auto,
    auto,
    100% 34px;
}

.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  margin-top: 0.9rem;
  padding: 0.68rem 0.78rem;
  position: relative;
  z-index: 40;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(6, 12, 22, 0.96),
    rgba(4, 9, 18, 0.96)
  );
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 28px -24px rgba(0, 0, 0, 0.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.74rem;
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  top: 0;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  opacity: 0.78;
}

.site-header > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.56rem;
  text-decoration: none;
  color: inherit;
  padding: 0.28rem 0.4rem;
  border-radius: 7px;
  border: 1px solid rgba(65, 103, 151, 0.46);
  background: rgba(7, 14, 26, 0.86);
}

.brand-mark {
  width: 2.42rem;
  height: 1.54rem;
  border-radius: 4px;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  font-size: 0;
  color: transparent;
  line-height: 0;
  background: url("/Pictures/ODY%20Leo.webp") center / contain no-repeat;
  box-shadow: none;
}

.brand-text {
  font-size: 0.88rem;
  letter-spacing: 0.015em;
  line-height: 1.2;
  color: #deebfb;
}

.header-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.auth-btn {
  border: 1px solid rgba(68, 121, 183, 0.7);
  background: rgba(9, 16, 29, 0.96);
  color: #dfeaff;
  border-radius: 9px;
  padding: 0.56rem 0.8rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.015em;
  cursor: pointer;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
}

.auth-btn:hover {
  border-color: rgba(72, 167, 255, 0.9);
  background: rgba(11, 20, 36, 0.98);
  transform: none;
}

.auth-btn-alt {
  border-color: rgba(255, 54, 95, 0.5);
  background: rgba(24, 8, 15, 0.7);
  color: #ffc8d4;
  font-size: 0.77rem;
}

.nav-group {
  position: relative;
  min-width: 146px;
}

.nav-group summary {
  list-style: none;
  color: #d9e9fd;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.52rem 0.76rem;
  border-radius: 8px;
  border: 1px solid rgba(67, 107, 158, 0.62);
  background: rgba(8, 15, 27, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.62rem;
  cursor: pointer;
  box-shadow: none;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "\25BE";
  color: var(--accent);
  font-size: 0.65rem;
  transform: translateY(-1px);
}

.nav-group summary:hover {
  border-color: var(--accent);
  background: rgba(10, 19, 33, 0.98);
  box-shadow: inset 0 -2px 0 var(--accent-soft-2);
}

.nav-group[open] summary {
  border-color: var(--accent);
  background: rgba(12, 20, 35, 0.98);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 0.34rem);
  left: 0;
  min-width: max(100%, 210px);
  border-radius: 8px;
  border: 1px solid rgba(68, 111, 164, 0.74);
  background: rgba(5, 11, 21, 0.98);
  box-shadow: 0 18px 30px -24px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(7px);
  overflow: hidden;
  z-index: 80;
}

.dropdown-panel a {
  display: block;
  color: #bccfe8;
  text-decoration: none;
  font-size: 0.84rem;
  padding: 0.56rem 0.74rem;
  border-bottom: 1px solid rgba(35, 55, 84, 0.86);
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.dropdown-panel a:last-child {
  border-bottom: none;
}

.dropdown-panel a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

body[data-department-code="LSPD"] {
  --surface: #101a28;
  --surface-2: #172334;
  --accent: #0b5394;
  --accent-strong: #d8e8fb;
  --accent-soft: rgba(11, 83, 148, 0.18);
  --accent-soft-2: rgba(11, 83, 148, 0.32);
  --line: #325476;
  --dept-glow: rgba(11, 83, 148, 0.24);
}

body[data-department-code="BCSO"] {
  --surface: #181d20;
  --surface-2: #22282c;
  --accent: #4d8f6f;
  --accent-strong: #d9f0e3;
  --accent-soft: rgba(77, 143, 111, 0.2);
  --accent-soft-2: rgba(77, 143, 111, 0.34);
  --line: #586a61;
  --dept-glow: rgba(77, 143, 111, 0.24);
}

body[data-department-code="SAHP"] {
  --surface: #121922;
  --surface-2: #1a2230;
  --accent: #c89f5a;
  --accent-strong: #f6e3bc;
  --accent-soft: rgba(200, 159, 90, 0.2);
  --accent-soft-2: rgba(200, 159, 90, 0.36);
  --line: #796745;
  --dept-glow: rgba(200, 159, 90, 0.24);
}

main {
  display: grid;
  gap: 0.92rem;
  padding: 0.9rem 0 0.35rem;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(92, 119, 153, 0.48);
  background:
    linear-gradient(145deg, rgba(13, 20, 32, 0.97), rgba(9, 14, 24, 0.95)),
    radial-gradient(
      circle at right top,
      var(--dept-glow, rgba(49, 158, 255, 0.2)),
      transparent 50%
    );
  box-shadow: 0 18px 36px -30px rgba(0, 0, 0, 0.9);
}

.hero::after {
  content: "";
  position: absolute;
  right: -5rem;
  top: -5rem;
  width: 14rem;
  height: 14rem;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent-soft-2), transparent 66%);
  pointer-events: none;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  line-height: 1.05;
}

h1 {
  margin-top: 0.4rem;
  font-size: clamp(2.1rem, 8vw, 3.5rem);
  text-transform: uppercase;
}

.hero p {
  margin-top: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.stats-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(89, 113, 144, 0.54);
  border-radius: 12px;
  background: linear-gradient(
    160deg,
    rgba(22, 31, 45, 0.94),
    rgba(13, 19, 30, 0.94)
  );
  padding: 0.95rem;
  box-shadow: 0 14px 28px -24px rgba(0, 0, 0, 0.82);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--accent-soft-2), transparent 42%),
    linear-gradient(transparent 80%, var(--accent-soft));
  opacity: 0.55;
  pointer-events: none;
}

.stat-card strong {
  display: block;
  color: var(--accent-strong);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.72rem;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  margin-top: 0;
  border: 1px solid rgba(55, 93, 143, 0.62);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.95), rgba(5, 10, 18, 0.96)),
    radial-gradient(circle at 0% 0%, rgba(49, 158, 255, 0.1), transparent 52%);
  padding: 1.1rem;
  box-shadow: 0 18px 34px -30px rgba(0, 0, 0, 0.86);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  border: 1px solid var(--line);
  background: var(--accent);
  color: #f3f8ff;
  border-radius: 12px;
  padding: 0.56rem 0.86rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px -20px var(--accent-soft-2);
}

.btn-alt {
  background: rgba(8, 15, 27, 0.95);
  color: #d8e8ff;
  border-color: rgba(68, 111, 164, 0.74);
}

.btn-danger {
  background: rgba(163, 45, 45, 0.95);
  color: #ffe6e6;
  border-color: rgba(226, 103, 103, 0.72);
}

.btn-danger:hover {
  box-shadow: 0 16px 26px -20px rgba(218, 54, 51, 0.7);
}

.feedback {
  margin: 0.7rem 0 0;
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.feedback.error {
  color: #ffd2d2;
  background: rgba(167, 45, 45, 0.2);
  border-color: rgba(218, 54, 51, 0.45);
}

.feedback.success {
  color: #d8f3de;
  background: rgba(46, 160, 67, 0.2);
  border-color: rgba(46, 160, 67, 0.48);
}

.feedback.info {
  color: #d9e8ff;
  background: rgba(47, 128, 237, 0.2);
  border-color: rgba(47, 128, 237, 0.48);
}

.hidden {
  display: none !important;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 18, 28, 0.84);
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.app-table th,
.app-table td {
  padding: 0.6rem 0.66rem;
  text-align: left;
  border-bottom: 1px solid rgba(44, 57, 79, 0.7);
  font-size: 0.9rem;
  vertical-align: top;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.applicant-cell {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.applicant-name {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-weight: 600;
}

.applicant-name-prior-firing::before {
  content: "!";
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 148, 166, 0.74);
  color: #ffdbe3;
  background: rgba(94, 32, 44, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
}

.app-firing-warning {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem;
  border: 1px dashed rgba(224, 126, 146, 0.56);
  background: rgba(56, 18, 27, 0.4);
  border-radius: 999px;
  padding: 0.14rem 0.34rem 0.14rem 0.18rem;
  width: fit-content;
}

.app-firing-warning-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(226, 109, 130, 0.62);
  background: rgba(78, 24, 35, 0.74);
  color: #ffd9e0;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.14rem 0.46rem;
}

.app-firing-warning-meta {
  font-size: 0.72rem;
  color: #f2c8d1;
}

.table-actions .btn {
  padding: 0.4rem 0.68rem;
  font-size: 0.8rem;
  border-radius: 10px;
  min-width: 86px;
}

.table-actions .btn-open-app {
  border-color: rgba(100, 161, 236, 0.72);
  background: linear-gradient(
    180deg,
    rgba(20, 43, 75, 0.92),
    rgba(14, 32, 56, 0.94)
  );
  color: #e7f3ff;
}

.table-actions .btn-open-app:hover {
  border-color: rgba(123, 184, 255, 0.88);
  background: linear-gradient(
    180deg,
    rgba(23, 49, 84, 0.95),
    rgba(16, 38, 66, 0.96)
  );
}

.table-actions .btn-view-firing {
  border-color: rgba(220, 117, 136, 0.64);
  background: linear-gradient(
    180deg,
    rgba(96, 33, 47, 0.86),
    rgba(70, 22, 32, 0.9)
  );
  color: #ffdce3;
}

.table-actions .btn-view-firing:hover {
  border-color: rgba(236, 146, 163, 0.85);
  background: rgba(94, 31, 43, 0.84);
}

.table-actions .btn-view-firing-muted {
  border-color: rgba(119, 143, 178, 0.55);
  background: linear-gradient(
    180deg,
    rgba(29, 43, 64, 0.86),
    rgba(20, 32, 49, 0.9)
  );
  color: #d5e4f9;
}

.table-actions .btn-view-firing-muted:hover {
  border-color: rgba(149, 178, 219, 0.72);
  background: linear-gradient(
    180deg,
    rgba(36, 53, 79, 0.9),
    rgba(25, 39, 60, 0.92)
  );
}

.app-row-prior-firing td:first-child {
  box-shadow: inset 3px 0 0 rgba(236, 134, 154, 0.66);
}

.app-table th {
  color: var(--accent-strong);
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
  background: rgba(12, 19, 30, 0.98);
  position: sticky;
  top: 0;
  z-index: 2;
}

.app-table tbody tr:last-child td {
  border-bottom: none;
}

.app-row-unresponded td {
  background: rgba(47, 128, 237, 0.14);
}

.app-row-denied td {
  background: rgba(218, 54, 51, 0.16);
}

.app-row-accepted td {
  background: rgba(46, 160, 67, 0.16);
}

.app-row-hired td {
  background: rgba(35, 145, 94, 0.2);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.24rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-chip.unresponded {
  background: rgba(47, 128, 237, 0.25);
  color: #b7d7ff;
  border: 1px solid rgba(47, 128, 237, 0.48);
}

.status-chip.denied {
  background: rgba(218, 54, 51, 0.25);
  color: #ffc9c9;
  border: 1px solid rgba(218, 54, 51, 0.48);
}

.status-chip.accepted {
  background: rgba(46, 160, 67, 0.25);
  color: #c8ffd4;
  border: 1px solid rgba(46, 160, 67, 0.48);
}

.status-chip.hired {
  background: rgba(35, 145, 94, 0.3);
  color: #cbffe2;
  border: 1px solid rgba(35, 145, 94, 0.58);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 10, 0.72);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 120;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  width: min(1180px, calc(100% - 0.5rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid rgba(68, 111, 164, 0.74);
  background: linear-gradient(
    180deg,
    rgba(13, 20, 32, 0.98),
    rgba(9, 14, 24, 0.98)
  );
  box-shadow: 0 35px 70px -42px rgba(0, 0, 0, 0.85);
  padding: 1rem;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 0.7rem;
}

.modal-title-wrap p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.answer-card {
  border: 1px solid rgba(52, 67, 92, 0.76);
  border-radius: 10px;
  background: rgba(14, 21, 34, 0.9);
  padding: 0.65rem;
}

.answer-card h3 {
  font-size: 1.04rem;
  color: var(--accent-strong);
  margin-bottom: 0.35rem;
}

.answer-card p {
  margin: 0;
  color: #dde5f2;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.decision-shell {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(52, 67, 92, 0.65);
}

.decision-shell textarea {
  width: 100%;
  min-height: 88px;
  border-radius: 10px;
  border: 1px solid rgba(95, 113, 141, 0.72);
  background: rgba(14, 21, 34, 0.92);
  color: var(--text);
  font: inherit;
  padding: 0.62rem;
  resize: vertical;
}

.interview-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.interview-field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.interview-field span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.interview-field input,
.interview-field select,
.interview-notes-grid textarea,
.interview-table textarea,
.interview-table input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(95, 113, 141, 0.72);
  background: rgba(14, 21, 34, 0.92);
  color: var(--text);
  font: inherit;
  padding: 0.56rem;
}

.interview-table-wrap {
  margin-top: 0.7rem;
}

.interview-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.interview-table th,
.interview-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.interview-table th:nth-child(1),
.interview-table td:nth-child(1) {
  width: 28%;
}

.interview-table th:nth-child(2),
.interview-table td:nth-child(2) {
  width: 26%;
}

.interview-table th:nth-child(3),
.interview-table td:nth-child(3) {
  width: 26%;
}

.interview-table th:nth-child(4),
.interview-table td:nth-child(4),
.interview-table th:nth-child(5),
.interview-table td:nth-child(5) {
  width: 10%;
  text-align: center;
}

.interview-question {
  font-weight: 600;
  color: var(--accent-strong);
}

.interview-guidance {
  min-height: 80px;
  border-radius: 10px;
  border: 1px solid rgba(95, 113, 141, 0.48);
  background: rgba(11, 17, 28, 0.9);
  color: var(--muted);
  line-height: 1.5;
  padding: 0.56rem;
}

.interview-table textarea {
  min-height: 80px;
  resize: vertical;
}

.interview-table input[type="number"] {
  width: 72px;
  text-align: center;
}

.interview-score-notes-only {
  color: var(--muted);
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding-top: 0.35rem;
}

.interview-notes-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.interview-notes-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.interview-hire-row {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
}

.interview-hire-row .section-copy {
  margin-top: 0;
}

.interview-recommendation-row {
  margin-top: 0.6rem;
}

.decision-actions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer {
  color: #92a0b2;
  font-size: 0.86rem;
  padding: 1.5rem 0 2rem;
}

@media (max-width: 960px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .answer-grid {
    grid-template-columns: 1fr;
  }

  .interview-meta-grid,
  .interview-notes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand {
    width: 100%;
  }

  .site-nav {
    width: 100%;
    justify-content: stretch;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar {
    width: 100%;
  }
}
