* { box-sizing: border-box; }
:root {
  --bg: #07152c;
  --bg-deeper: #031024;
  --card: rgba(5, 20, 45, 0.88);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #e8edf8;
  --muted: #c5d0e8;
  --accent: #d11f48;
  --accent-dark: #a91739;
  --blue: #2f67df;
  --blue-dark: #2657be;
}
body {
  margin: 0;
  background: linear-gradient(180deg, #08152b 0%, #04101f 100%);
  color: var(--text);
  font-family: Arial, sans-serif;
  min-height: 100vh;
}
a { color: #b9ceff; text-decoration: none; }
.container { width: min(1320px, calc(100% - 44px)); margin: 0 auto; }
.main-modern { padding: 28px 0 48px; }
.site-header-modern {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
}
.brand-modern {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  min-width: 0;
}
.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand-text {
  font-size: 1.5rem;
  line-height: 1;
  white-space: nowrap;
}
.header-nav-scroll {
  min-width: 0;
  overflow-x: visible;
  overflow-y: visible;
  padding: 4px 0;
  display: flex;
  justify-content: center;
}
.main-nav-single-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}
.nav-link-pill,
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #f3f7ff;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}
.nav-link-pill:hover,
.nav-dropdown-toggle:hover {
  background: rgba(255,255,255,0.06);
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  width: auto;
  margin: 0;
  cursor: pointer;
}
.nav-chevron {
  font-size: 0.78rem;
  opacity: 0.9;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: none;
  min-width: 220px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu-right {
  right: 0;
  left: auto;
}
.nav-dropdown-menu a {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text);
}
.nav-dropdown-menu a:hover {
  background: rgba(255,255,255,0.12);
}
.header-user {
  justify-self: end;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.9rem;
}
.user-chip-muted {
  background: rgba(255,255,255,0.05);
}
.card, .glass-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
h1, h2, h3 { margin-top: 0; color: #fff; }
label { display: block; font-weight: 700; margin-bottom: 8px; }
input, select, button, textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  margin-bottom: 16px;
}
textarea { min-height: 110px; resize: vertical; }
button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border: none;
  font-weight: 700;
}
button:hover { filter: brightness(1.05); }
.button-danger { background: linear-gradient(135deg, #ef2a2a, #bf1414); }
.button-secondary { background: linear-gradient(135deg, #4b5b77, #314055); }
.alert {
  padding: 15px 18px;
  border-radius: 16px;
  margin-bottom: 22px;
  font-weight: 700;
}
.alert-success { background: rgba(17, 98, 52, 0.88); color: #dcfce7; }
.alert-error { background: rgba(148, 25, 25, 0.9); color: #fee2e2; }
.small-text { color: var(--muted); font-size: 0.95rem; }
.badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  font-size: 0.9rem;
}
.inline-form { display: inline-block; margin-right: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.page-home {
  background:
    linear-gradient(180deg, rgba(88, 9, 30, 0.34) 0%, rgba(72, 8, 24, 0.48) 45%, rgba(54, 6, 18, 0.58) 100%),
    url('/assets/images/home-hero-background.png') center top / cover no-repeat fixed;
}
.page-home .main-modern {
  padding-top: 34px;
}
.landing-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  margin-bottom: 26px;
  background: transparent;
}
.landing-hero-overlay {
  display: none;
}
.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.landing-hero-content-centered {
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 42px 34px;
  backdrop-filter: none;
  box-shadow: none;
}
.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(85, 85, 85, 0.28);
  border: 1px solid rgba(160, 160, 160, 0.34);
  color: #ededed;
  font-weight: 700;
}
.landing-kicker-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: inline-block;
}
.landing-hero h1 {
  font-size: clamp(2.9rem, 5vw, 4.8rem);
  line-height: 1.03;
  margin-bottom: 20px;
}
.landing-hero p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: #e6eefc;
  max-width: 640px;
}
.landing-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.landing-actions-centered {
  justify-content: center;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 15px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #4b5563, #2f3640);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(15,23,42,0.28);
}
.cta-button-secondary {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: none;
}
.landing-panels {
  margin-bottom: 24px;
}
.landing-panel h2 {
  margin-bottom: 12px;
}
.landing-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.panel-step {
  display: inline-flex;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffb8c8;
}
@media (max-width: 1180px) {
  .site-header-inner {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
  }
  .header-user {
    justify-self: start;
  }
  .header-nav-scroll {
    overflow-x: auto;
    overflow-y: visible;
  }
}
@media (max-width: 740px) {
  .container { width: min(100% - 24px, 1320px); }
  .landing-hero { min-height: 420px; padding: 22px; }
  .landing-hero-content-centered { padding: 28px 22px; }
  .landing-hero h1 { font-size: 2.35rem; }
  .brand-text { font-size: 1.45rem; }
}


.page-auth {
  background:
    radial-gradient(circle at top, rgba(255, 110, 150, 0.16), transparent 26%),
    linear-gradient(180deg, #5b0b21 0%, #3a0716 38%, #21040c 72%, #120208 100%);
}

.page-auth .main-modern {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-auth .auth-card {
  width: min(560px, 100%);
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.96), rgba(14, 14, 14, 0.98));
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 24px 60px rgba(0,0,0,0.42);
}


.admin-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-order-save {
  flex: 0 0 auto;
}

.admin-order-save button {
  margin-bottom: 0;
}

.station-groups {
  display: grid;
  gap: 18px;
}

.station-group {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  padding: 18px;
}

.station-group.is-dragging,
.station-unit-item.is-dragging {
  opacity: 0.55;
}

.station-group-header {
  margin-bottom: 16px;
}

.station-group-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.station-group-title-wrap h3 {
  margin-bottom: 4px;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  user-select: none;
  cursor: grab;
  flex: 0 0 auto;
}

.drag-handle--station {
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
}

.drag-handle--unit {
  width: 38px;
  height: 38px;
  font-size: 1rem;
}

.station-unit-list {
  display: grid;
  gap: 14px;
}

.station-unit-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(0,0,0,0.16);
  padding: 16px;
}

.station-unit-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.station-unit-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.station-unit-body {
  display: grid;
  gap: 12px;
}

.station-unit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.station-unit-grid label {
  margin-bottom: 6px;
}

.station-unit-grid input,
.station-unit-grid select {
  margin-bottom: 0;
}

.station-unit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
}

.station-unit-toggle input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.station-unit-toggle input[type="hidden"] {
  display: none;
}

.station-unit-actions,
.station-unit-delete {
  display: flex;
  justify-content: flex-end;
}

.station-unit-actions button,
.station-unit-delete button {
  width: auto;
  min-width: 140px;
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .admin-section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .station-unit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .station-unit-grid {
    grid-template-columns: 1fr;
  }

  .station-unit-actions,
  .station-unit-delete {
    justify-content: stretch;
  }

  .station-unit-actions button,
  .station-unit-delete button {
    width: 100%;
  }
}


.station-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.station-group-title-block {
  min-width: 0;
}

.station-group-title-block h3 {
  margin-bottom: 4px;
}

.station-collapse-toggle {
  width: auto;
  min-width: 136px;
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
}

.station-collapse-icon {
  font-size: 0.9rem;
  transition: transform 0.18s ease;
}

.station-group-content {
  margin-top: 16px;
}

.station-group.is-collapsed .station-group-content {
  display: none;
}

.station-group.is-collapsed .station-collapse-icon {
  transform: rotate(-90deg);
}

@media (max-width: 980px) {
  .station-group-header {
    flex-direction: column;
    align-items: stretch;
  }

  .station-collapse-toggle {
    width: 100%;
  }
}


body.page-admin,
.page-admin {
  background:
    linear-gradient(180deg, #707070 0%, #5f5f5f 100%) !important;
}

.page-admin .card,
.page-admin .glass-card {
  background: linear-gradient(180deg, rgba(8, 8, 8, 0.96), rgba(18, 18, 18, 0.98));
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.page-admin .station-group {
  border-width: 1px;
  border-style: solid;
  color: #fff;
}

.page-admin .station-group[data-service="fire"] {
  background: linear-gradient(180deg, rgba(138, 20, 44, 0.92), rgba(105, 14, 33, 0.96));
  border-color: rgba(255,255,255,0.10);
}

.page-admin .station-group[data-service="ambulance"] {
  background: linear-gradient(180deg, rgba(22, 108, 58, 0.92), rgba(16, 83, 44, 0.96));
  border-color: rgba(255,255,255,0.10);
}

.page-admin .station-group[data-service="police"] {
  background: linear-gradient(180deg, rgba(24, 66, 152, 0.92), rgba(17, 49, 116, 0.96));
  border-color: rgba(255,255,255,0.10);
}

.page-admin .station-group[data-service=""] {
  background: linear-gradient(180deg, rgba(58, 58, 58, 0.92), rgba(42, 42, 42, 0.96));
}

.page-admin .station-group-title-wrap .small-text,
.page-admin .station-group-title-block .small-text {
  color: rgba(255,255,255,0.82);
}

.page-admin .drag-handle {
  background: rgba(0,0,0,0.26);
  border-color: rgba(255,255,255,0.16);
}

.page-admin .station-unit-item {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88), rgba(14, 14, 14, 0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.page-admin .station-unit-item .badge {
  background: rgba(255,255,255,0.10);
}

.page-admin .station-unit-item input,
.page-admin .station-unit-item select,
.page-admin .station-unit-item textarea,
.page-admin .station-unit-form input,
.page-admin .station-unit-form select,
.page-admin .station-unit-form textarea {
  background: rgba(255,255,255,0.04);
}

.page-admin .station-collapse-toggle.button-secondary {
  background: linear-gradient(135deg, #3f4653, #262d38);
}


body.page-application,
.page-application {
  background:
    radial-gradient(circle at top, rgba(255, 120, 150, 0.16), transparent 26%),
    linear-gradient(180deg, #5b0b21 0%, #3a0716 38%, #21040c 72%, #120208 100%) !important;
}

.page-application .application-card {
  max-width: 760px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.96), rgba(14, 14, 14, 0.98));
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 24px 60px rgba(0,0,0,0.42);
}

.page-application .application-card .small-text {
  color: #d3d3d3;
}

.page-application .application-card input,
.page-application .application-card select,
.page-application .application-card textarea {
  background: rgba(255,255,255,0.05);
}

.page-application .application-card button {
  margin-bottom: 0;
}


/* Application form select cleanup */
.page-application .application-card select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: rgba(14, 14, 14, 0.96);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.12);
  padding-right: 48px;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 16px center;
  background-size: auto, 14px;
}

.page-application .application-card select:focus {
  outline: none;
  border-color: rgba(209, 31, 72, 0.72);
  box-shadow: 0 0 0 3px rgba(209, 31, 72, 0.18);
}

.page-application .application-card select option {
  background: #111111;
  color: #ffffff;
}

.page-application .application-card select option[value=""] {
  color: #bfc5d3;
}

.page-application .application-card select::-ms-expand {
  display: none;
}


/* Council application action dropdowns */
.application-review-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255,255,255,0.08);
}

.application-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
}

.application-status-interview-pending { background: rgba(47, 103, 223, 0.34); }
.application-status-on-hold { background: rgba(234, 179, 8, 0.28); }
.application-status-waiting-list { background: rgba(168, 85, 247, 0.28); }
.application-status-accepted { background: rgba(22, 163, 74, 0.34); }
.application-status-denied,
.application-status-declined { background: rgba(220, 38, 38, 0.34); }

.application-action-form {
  margin: 0;
}

.application-action-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.application-action-row .application-action-select,
.application-action-row .application-action-button {
  margin-bottom: 0;
}

.application-action-button {
  width: auto;
  min-width: 132px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .application-action-row {
    grid-template-columns: 1fr;
  }

  .application-action-button {
    width: 100%;
  }
}

/* Council Applications action dropdown readability fix */
.application-action-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: rgba(14, 14, 14, 0.96) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  padding-right: 48px;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 16px center;
  background-size: auto, 14px;
}

.application-action-select:focus {
  outline: none;
  border-color: rgba(47, 103, 223, 0.82) !important;
  box-shadow: 0 0 0 3px rgba(47, 103, 223, 0.20);
}

.application-action-select option {
  background: #111111 !important;
  color: #ffffff !important;
}

.application-action-select option:checked {
  background: #2f67df !important;
  color: #ffffff !important;
}

.application-action-select option[value=""] {
  color: #c5d0e8 !important;
}

.application-action-select::-ms-expand {
  display: none;
}
