:root {
  color-scheme: light;
  --navy-950: #10243b;
  --navy-900: #173451;
  --navy-800: #21496d;
  --navy-700: #285a82;
  --saffron-700: #a94f00;
  --saffron-500: #d97912;
  --saffron-100: #fff2df;
  --ink: #1d2935;
  --muted: #4e5b68;
  --surface: #ffffff;
  --page: #f2f5f8;
  --border: #c6d0da;
  --danger: #8d1f1f;
  --danger-bg: #fff0ee;
  --focus: #bd5d00;
  --content-width: 68rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

a {
  color: var(--navy-800);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--navy-950);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 0.9rem;
  transform: translateY(-180%);
  border-radius: 0.25rem;
  background: var(--surface);
  color: var(--navy-950);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.header {
  background: var(--navy-950);
  color: var(--surface);
}

.header-inner {
  display: flex;
  max-width: var(--content-width);
  min-height: 6rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header .brand h1,
.brand h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.25;
}

.header .sub {
  margin-top: 0.25rem;
  color: #e0eaf3;
  font-size: 0.9rem;
}

.site-nav,
.footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0.6rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.25rem;
}

.site-nav a:hover {
  color: #ffd7a3;
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 0.16em;
  text-underline-offset: 0.35em;
  color: #ffffff;
}

.band {
  height: 0.4rem;
  background: var(--saffron-500);
}

.container {
  width: min(calc(100% - 2rem), var(--content-width));
  min-height: 18rem;
  margin: 2rem auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: 0 0.2rem 0.9rem rgb(16 36 59 / 8%);
}

h1,
h2,
h3,
h4 {
  color: var(--navy-950);
  line-height: 1.3;
}

h2 {
  margin-top: 0;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

h3 {
  font-size: 1.3rem;
}

p,
li {
  max-width: 75ch;
}

.btn,
button.btn {
  display: inline-flex;
  min-height: 3rem;
  padding: 0.65rem 1.25rem;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--navy-900);
  border-radius: 0.35rem;
  background: var(--navy-900);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
button.btn:hover {
  border-color: var(--navy-950);
  background: var(--navy-950);
  color: #ffffff;
}

.btn:disabled,
button.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

label {
  display: block;
  margin: 1rem 0 0.35rem;
  color: var(--navy-950);
  font-size: 1rem;
  font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  max-width: 28rem;
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #667788;
  border-radius: 0.25rem;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.45rem;
  accent-color: var(--navy-800);
  vertical-align: middle;
}

input[type="file"] {
  padding: 0.4rem;
}

.flash {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #bd5a50;
  border-left: 0.35rem solid var(--danger);
  border-radius: 0.25rem;
  background: var(--danger-bg);
  color: #681616;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.steps {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border-left: 0.35rem solid var(--saffron-500);
  border-radius: 0.35rem;
  background: var(--saffron-100);
  color: var(--navy-950);
  font-size: 0.95rem;
}

.steps strong,
.steps b {
  display: block;
  color: var(--navy-950);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.steps ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: application-step;
}

.steps ol li {
  display: flex;
  min-height: 2.75rem;
  padding: 0.45rem 0.65rem;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: break-word;
  counter-increment: application-step;
}

.steps ol li::before {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 1.5rem;
  place-items: center;
  border-radius: 50%;
  background: #eaf0f5;
  color: var(--navy-950);
  content: counter(application-step);
  font-weight: 700;
  font-size: 0.8rem;
}

.steps ol li[aria-current="step"] {
  border: 2px solid var(--navy-800);
  background: #ffffff;
  color: var(--navy-950);
  font-weight: 700;
}

.steps ol li[aria-current="step"]::before {
  background: var(--navy-900);
  color: #ffffff;
}

.steps ol li.is-complete {
  border-color: #d7a15f;
  color: var(--navy-950);
}

.steps ol li.is-complete::before {
  background: var(--saffron-100);
  color: var(--saffron-700);
  content: "\2713";
}

.home-page {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 3.25rem);
  border-radius: 0.5rem;
  background: var(--navy-950);
  color: #ffffff;
}

.home-hero::after {
  position: absolute;
  top: -3.5rem;
  right: -3.5rem;
  width: 10rem;
  height: 10rem;
  border: 1.25rem solid rgb(217 121 18 / 20%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.home-hero h2 {
  max-width: 18ch;
  margin: 0.25rem 0 0.75rem;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

.home-eyebrow {
  margin: 0;
  color: var(--saffron-700);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-hero .home-eyebrow {
  color: #ffd7a3;
}

.home-lead {
  max-width: 52ch;
  color: #e5edf4;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.home-hero .btn {
  position: relative;
  z-index: 1;
  border-color: #ffffff;
  background: #ffffff;
  color: var(--navy-950);
}

.home-hero .btn:hover {
  background: #eaf0f5;
  color: var(--navy-950);
}

.home-hero .home-secondary-action {
  border-color: #b9cad9;
  background: transparent;
  color: #ffffff;
}

.home-hero .home-secondary-action:hover {
  background: rgb(255 255 255 / 12%);
  color: #ffffff;
}

.home-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(15rem, 0.7fr);
  gap: 1rem;
}

.home-panel,
.home-deadline {
  padding: clamp(1.15rem, 3vw, 1.6rem);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
}

.home-scheme {
  background: #ffffff;
}

.home-panel h3,
.home-deadline h3,
.home-section-heading h3 {
  margin: 0.3rem 0 0.65rem;
}

.home-benefit {
  padding: 0.75rem 0.9rem;
  border-left: 0.25rem solid var(--saffron-500);
  background: var(--saffron-100);
}

.home-deadline {
  border-color: #d7a15f;
  border-left: 0.35rem solid var(--saffron-700);
  background: var(--saffron-100);
}

.home-deadline p:last-child {
  margin-bottom: 0;
}

.home-section-heading {
  max-width: 62ch;
  margin-bottom: 1.25rem;
}

.home-section-heading .home-eyebrow {
  margin-bottom: 0.25rem;
}

.home-step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: home-step;
}

.home-step-list li {
  position: relative;
  min-height: 6rem;
  padding: 0.9rem 1rem 0.9rem 3.5rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  background: #f8fafc;
  counter-increment: home-step;
}

.home-step-list li::before {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-900);
  color: #ffffff;
  content: counter(home-step);
  font-weight: 700;
}

.home-step-list strong,
.home-step-list span {
  display: block;
}

.home-step-list strong {
  margin-bottom: 0.2rem;
  color: var(--navy-950);
}

.home-step-list span {
  color: var(--muted);
  font-size: 0.93rem;
}

.home-help {
  margin: 1rem 0 0;
}

.page-intro {
  max-width: 66ch;
  margin-bottom: 1.5rem;
}

.page-intro h2 {
  margin-bottom: 0.5rem;
}

.readable-list {
  padding-left: 1.5rem;
}

.readable-list li + li,
.home-checklist li + li {
  margin-top: 0.45rem;
}

.home-preparation {
  padding: clamp(1.15rem, 3vw, 1.6rem);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: #f8fafc;
}

.home-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.5rem;
  margin: 0;
  padding-left: 1.4rem;
}

.home-rule-note {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1rem;
  border-left: 0.3rem solid var(--saffron-700);
  background: var(--saffron-100);
}

.text-action {
  display: inline-flex;
  min-height: 3rem;
  padding: 0.55rem 0.75rem;
  align-items: center;
  color: var(--navy-800);
  font-weight: 700;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.form-navigation {
  margin-top: 0.75rem;
}

.success-panel,
.status-panel {
  margin: 1rem 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border);
  border-left: 0.35rem solid var(--navy-800);
  border-radius: 0.35rem;
  background: #f8fafc;
}

.success-panel {
  border-left-color: #287044;
}

.confirmation-table {
  max-width: 34rem;
}

.confirmation-table td {
  font-size: 1.15rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.btn-danger,
button.btn-danger,
.btn.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover,
button.btn-danger:hover,
.btn.btn-danger:hover {
  border-color: #681616;
  background: #681616;
  color: #ffffff;
}

.btn-secondary {
  border-color: #4e5b68;
  background: #4e5b68;
}

.btn-secondary:hover {
  border-color: #34404b;
  background: #34404b;
}

.short-input {
  max-width: 12rem;
}

input.short-input {
  max-width: 12rem;
}

.required-indicator {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.note-inline {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.notice-test {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid #a94f00;
  border-left: 0.35rem solid #a94f00;
  border-radius: 0.3rem;
  background: var(--saffron-100);
  color: var(--ink);
}

.inline-form {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
}

.tbl th,
.tbl td {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.tbl th {
  background: #eaf0f5;
  color: var(--navy-950);
  font-weight: 700;
}

.tbl tr:nth-child(even) td {
  background: #f8fafc;
}

.footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.footer nav {
  justify-content: center;
  margin-bottom: 0.5rem;
}

.footer a {
  color: var(--navy-800);
}

/* ==========================================================================
   Phase C: Officer Dashboard and Administration UI Components
   ========================================================================== */

.admin-top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.admin-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--navy-800);
  text-decoration: none;
}

.admin-breadcrumb:hover {
  color: var(--navy-950);
  text-decoration: underline;
}

.officer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: #f8fafc;
  color: var(--navy-900);
  font-size: 0.85rem;
  font-weight: 700;
}

/* Officer Login */
.officer-login-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.officer-login-card {
  width: 100%;
  max-width: 28rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-top: 0.35rem solid var(--navy-900);
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: 0 0.25rem 1rem rgb(16 36 59 / 7%);
}

.officer-login-card h2 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1.5rem;
}

.officer-login-card .login-subtitle {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.officer-login-card form {
  display: flex;
  flex-direction: column;
}

.officer-login-card input[type="text"],
.officer-login-card input[type="password"] {
  max-width: 100%;
}

.officer-login-card .btn {
  width: 100%;
  margin-top: 1.25rem;
}

.officer-login-notice {
  margin-top: 1.5rem;
  padding: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 0.3rem;
  background: #f8fafc;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.officer-login-notice a {
  font-weight: 700;
}

/* Dashboard KPI Cards */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

.admin-kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 8rem;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-top: 0.35rem solid var(--navy-800);
  border-radius: 0.45rem;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.admin-kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--navy-700);
  box-shadow: 0 0.35rem 0.9rem rgb(16 36 59 / 10%);
  text-decoration: none;
}

.admin-kpi-card--pending {
  border-top-color: var(--saffron-500);
}

.admin-kpi-card--approved {
  border-top-color: #287044;
}

.admin-kpi-card--rejected {
  border-top-color: var(--danger);
}

.admin-kpi-card--deemed {
  border-top-color: #173451;
}

.admin-kpi-card--withdrawn {
  border-top-color: var(--muted);
}

.admin-kpi-card--tokens {
  border-top-color: var(--navy-900);
  background: #fcfdfe;
}

.admin-kpi-title {
  display: block;
  color: var(--navy-950);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-kpi-metric {
  display: block;
  margin: 0.4rem 0;
  color: var(--navy-950);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.admin-kpi-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--navy-800);
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-kpi-card:hover .admin-kpi-action {
  color: var(--navy-950);
  text-decoration: underline;
}

/* SLA Breach Alert Banner */
.admin-sla-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--saffron-700);
  border-left: 0.45rem solid var(--saffron-700);
  border-radius: 0.4rem;
  background: var(--saffron-100);
  color: var(--navy-950);
}

.admin-sla-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-sla-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-sla-desc {
  font-size: 0.95rem;
  color: #552800;
}

.admin-sla-action {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
  background: var(--navy-900);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.admin-sla-action:hover {
  background: var(--navy-950);
  color: #ffffff;
}

/* Block Workload Distribution */
.workload-bar-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.workload-bar-track {
  flex: 1;
  height: 0.6rem;
  max-width: 12rem;
  border-radius: 0.3rem;
  background: #e2e8f0;
  overflow: hidden;
}

.workload-bar-fill {
  height: 100%;
  border-radius: 0.3rem;
  background: var(--navy-800);
}

.workload-number {
  min-width: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.status-badge--pending {
  background: #fff3cd;
  color: #684600;
  border: 1px solid #ffeeba;
}

.status-badge--approved {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.status-badge--rejected {
  background: #f8d7da;
  color: #7a171e;
  border: 1px solid #f5c2c7;
}

.status-badge--deemed,
.status-badge--deemed_approved,
.status-badge--deemed-approved {
  background: #cfe2ff;
  color: #084298;
  border: 1px solid #b6d4fe;
}

.status-badge--withdrawn {
  background: #e2e3e5;
  color: #31373d;
  border: 1px solid #d3d6d8;
}

/* Application Queue & Filters */
.queue-filter-card {
  margin: 1.25rem 0 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: #f8fafc;
}

.queue-filter-card legend {
  padding: 0 0.5rem;
  font-weight: 700;
  color: var(--navy-950);
  font-size: 1.05rem;
}

.queue-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  align-items: end;
}

.queue-filter-field {
  display: flex;
  flex-direction: column;
}

.queue-filter-field label {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.queue-filter-field input,
.queue-filter-field select {
  max-width: 100%;
}

.queue-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.mono-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  font-weight: 600;
}

.btn-sm {
  min-height: 2.2rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.88rem;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pagination-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pagination-pill {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background: #f8fafc;
  color: var(--navy-950);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Application View Layout & Decision Panels */
.app-view-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-left: 0.35rem solid var(--navy-800);
  border-radius: 0.4rem;
  background: #f8fafc;
}

.app-view-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.detail-section-card {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: var(--surface);
}

.detail-section-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
}

.decision-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.decision-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: var(--surface);
}

.decision-card--approve {
  border-top: 0.35rem solid #287044;
  background: #fafdfa;
}

.decision-card--reject {
  border-top: 0.35rem solid var(--danger);
  background: #fdfafa;
}

.decision-card h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.decision-card p.note {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.decision-card input[type="text"],
.decision-card textarea {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
}

.decision-card textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.btn-approve,
button.btn-approve,
.btn.btn-approve {
  background: #287044;
  border-color: #287044;
  color: #ffffff;
}

.btn-approve:hover,
button.btn-approve:hover,
.btn.btn-approve:hover {
  background: #1e5634;
  border-color: #1e5634;
  color: #ffffff;
}

/* Audit Timeline */
.audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1rem 0;
  padding-left: 0.5rem;
  position: relative;
}

.audit-timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 1.1rem;
  width: 2px;
  background: var(--border);
}

.audit-timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1.25rem;
}

.audit-timeline-item:last-child {
  padding-bottom: 0;
}

.audit-dot {
  position: relative;
  z-index: 1;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--navy-800);
  background: var(--surface);
  margin-top: 0.2rem;
}

.audit-content {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  background: #f8fafc;
}

.audit-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.audit-action-tag {
  display: inline-block;
  font-weight: 700;
  color: var(--navy-950);
}

.audit-note {
  margin-top: 0.25rem;
  font-size: 0.92rem;
  color: var(--ink);
}

@media (max-width: 700px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .site-nav {
    width: 100%;
    gap: 0.25rem 1rem;
  }

  .container {
    width: min(calc(100% - 1rem), var(--content-width));
    margin: 0.75rem auto;
    padding: 1.15rem;
  }

  .home-overview,
  .home-step-list,
  .home-checklist,
  .app-view-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .steps ol li {
    min-height: 2.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    gap: 0.4rem;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .steps ol li::before {
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
    font-size: 0.75rem;
  }

  .home-hero::after {
    top: -2rem;
    right: -2rem;
    width: 6.5rem;
    height: 6.5rem;
    border-width: 0.8rem;
    opacity: 0.35;
  }

  .home-hero .btn {
    width: 100%;
  }

  .home-step-list li {
    min-height: auto;
  }

  .tbl {
    display: table;
    table-layout: fixed;
    white-space: normal;
  }

  .connections-table {
    min-width: 38rem;
    table-layout: auto;
    white-space: normal;
  }

  .table-scroll {
    width: 100%;
    overflow-x: auto;
  }

  .tbl th,
  .tbl td {
    padding: 0.55rem;
  }

  .footer {
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .admin-kpi-card {
    transition: none;
  }
}

@media (forced-colors: active) {
  .btn {
    border: 1px solid ButtonText;
  }

  .flash,
  .steps,
  .status-badge,
  .officer-badge,
  .admin-kpi-card,
  .audit-content,
  .officer-login-card {
    border: 1px solid CanvasText;
  }
}

body.has-demo-toolbar {
  padding-bottom: 5.25rem;
}

.demo-toolbar {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.55rem;
  border: 1px dashed #667386;
  border-radius: 0.45rem;
  background: #e5e9ef;
  color: #263446;
  font-size: 0.75rem;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgb(16 36 59 / 18%);
}

.demo-toolbar-badge {
  color: #34445b;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.demo-toolbar-link {
  display: inline-block;
  padding: 0.35rem 0.5rem;
  border-radius: 0.25rem;
  background: #34445b;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.demo-toolbar-link:hover {
  background: #1d2935;
  text-decoration: underline;
}

.demo-toolbar-link:focus-visible {
  outline: 3px solid #a94f00;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  body.has-demo-toolbar {
    padding-bottom: 4.5rem;
  }

  .demo-toolbar {
    right: 0.65rem;
    bottom: 0.65rem;
    gap: 0.4rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.7rem;
  }

  .demo-toolbar-link {
    padding: 0.3rem 0.45rem;
  }
}
.demo-phone {
  max-width: 28rem;
  margin: 1.5rem auto;
  padding: 1.25rem;
  border: 1px solid #68758a;
  border-radius: 1.25rem;
  background: #f2f5f9;
  color: #172337;
  box-shadow: 0 0.4rem 1.4rem rgb(20 35 55 / 14%);
}

.demo-messages {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.demo-messages li {
  padding: 0.9rem 1rem;
  border: 1px solid #c5cfdb;
  border-radius: 1rem 1rem 1rem 0.25rem;
  background: #fff;
  overflow-wrap: anywhere;
}

.demo-messages p { margin: 0 0 0.5rem; }
.demo-messages time { color: #34445b; font-size: 0.85rem; }
.demo-messages .demo-empty { color: #34445b; }
