/* North Kent RPC Command & Control ? Phase 1 styles */

:root {
  --navy: #0b1224;
  --navy-deep: #07101c;
  --navy-mid: #152238;
  --royal: #1d4ed8;
  --royal-bright: #2563eb;
  --pale: #eef2f7;
  --pale-blue: #f3f6fb;
  --white: #ffffff;
  --text: #152033;
  --muted: #5b6b82;
  --border: #d7deea;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --discord: #5865f2;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 4px;
  --header-h: 64px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: #ffffff;
  background-image: none;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--royal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  margin: 0 0 0.5rem;
  line-height: 1.25;
  color: var(--navy);
}

p {
  margin: 0 0 1rem;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--royal);
  font-weight: 700;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.page-narrow {
  padding: 2rem 0 3rem;
  width: min(720px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  min-height: var(--header-h);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
  width: min(1280px, calc(100% - 1.5rem));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  object-fit: cover;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-weight: 700;
  font-size: 0.95rem;
}

.brand__system {
  font-size: 0.72rem;
  opacity: 0.8;
}

.nav-toggle {
  margin-left: auto;
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  border-radius: var(--radius);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.primary-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.primary-nav__link {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav__link:hover,
.primary-nav__link.is-active {
  color: var(--white);
  text-decoration: none;
  border-bottom: 2px solid var(--royal-bright);
}

.primary-nav__group {
  position: relative;
}

.primary-nav__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.primary-nav__caret {
  font-size: 0.68rem;
  opacity: 0.85;
  line-height: 1;
}

.primary-nav__trigger:hover,
.primary-nav__trigger.is-active,
.primary-nav__group:hover .primary-nav__trigger,
.primary-nav__group:focus-within .primary-nav__trigger,
.primary-nav__group.is-open .primary-nav__trigger {
  color: var(--white);
  border-bottom-color: var(--royal-bright);
}

.primary-nav__menu {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 11.5rem;
  background: var(--navy-deep);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 110;
}

.primary-nav__group:hover .primary-nav__menu,
.primary-nav__group:focus-within .primary-nav__menu,
.primary-nav__group.is-open .primary-nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-nav__menu-link {
  display: block;
  padding: 0.45rem 0.85rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.primary-nav__menu-link:hover,
.primary-nav__menu-link:focus-visible,
.primary-nav__menu-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  text-decoration: none;
  outline: none;
}

.primary-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.user-chip {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.btn:hover {
  text-decoration: none;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  border-radius: var(--radius);
}

.btn-lg {
  padding: 0.7rem 1.35rem;
}

.btn-block {
  width: 100%;
  border-radius: var(--radius);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--navy-mid);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
  border-radius: var(--radius);
}

.btn-discord {
  background: var(--discord);
  color: var(--white);
  border-radius: var(--radius);
}

.btn-link {
  background: none;
  border: 0;
  color: var(--royal);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

/* Cards / sections */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.card--warning {
  border-left: 4px solid var(--amber);
  background: #fffbeb;
}

.card__title {
  color: var(--navy);
  font-size: 1.05rem;
}

.card__text {
  color: var(--muted);
  font-size: 0.92rem;
  min-height: 3.2rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

.card-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section {
  padding: 2.5rem 0 3rem;
}

.section__title {
  text-align: center;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.section__lead {
  text-align: center;
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto 1.5rem;
}

/* Landing hero */
.page-landing {
  background: var(--pale-blue);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  overflow: hidden;
  background-image: var(--brand-bg-image);
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 16, 28, 0.72), rgba(11, 18, 36, 0.82));
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 3rem 1.25rem;
  max-width: 48rem;
}

.hero__logo {
  margin: 0 auto 1rem;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.hero__eyebrow {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  opacity: 0.9;
}

.hero__title {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0.35rem 0;
}

.hero__tagline {
  margin: 0 0 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  opacity: 0.9;
}

.hero__lead {
  margin: 0 auto 1.5rem;
  max-width: 34rem;
  opacity: 0.92;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

/* Auth pages */
.page-auth .site-footer {
  margin-top: 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(220px, 34%) 1fr;
  min-height: calc(100vh - var(--header-h));
}

.auth-layout--centred {
  grid-template-columns: 1fr;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-brand-panel {
  background: var(--navy);
  color: var(--white);
  display: grid;
  place-items: center;
  padding: 2rem;
}

.auth-brand-panel__inner {
  text-align: center;
}

.auth-brand-panel img {
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.auth-brand-panel__system {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.auth-brand-panel__name {
  margin: 0.25rem 0;
  font-weight: 700;
}

.auth-brand-panel__sub {
  margin: 0;
  opacity: 0.75;
  font-size: 0.9rem;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    linear-gradient(rgba(243, 246, 251, 0.95), rgba(243, 246, 251, 0.95)),
    var(--brand-bg-image);
  background-size: cover;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.auth-card__header {
  background: var(--navy);
  color: var(--white);
  padding: 0.9rem 1.15rem;
  text-align: center;
}

.auth-card__header h1 {
  color: var(--white);
  font-size: 1.15rem;
  margin: 0;
}

.auth-card__body {
  padding: 1.25rem;
}

.auth-card__footer-text {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.auth-card__note {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  padding: 0.75rem 1rem;
  text-align: center;
}

/* Forms */
.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: var(--royal-bright);
  background: var(--white);
}

.input-with-action {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.input-with-action input {
  flex: 1;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-row--between {
  justify-content: space-between;
  align-items: center;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

/* Alerts */
.alert {
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--red);
}

.alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: var(--green);
}

.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--royal);
}

/* Dashboard */
.dashboard {
  padding: 1.5rem 0 2.5rem;
}

.dashboard-greeting {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.dashboard-greeting__main {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.dashboard-greeting__logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pale);
}

.dashboard-greeting h1 {
  color: var(--royal);
  font-size: 1.35rem;
}

.dashboard-greeting__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.status-pill--active {
  background: #dcfce7;
  color: var(--green);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-card {
  padding: 0;
  overflow: hidden;
}

.dashboard-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.dashboard-card__header h2 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--royal);
}

.dashboard-card .btn-ghost {
  color: var(--navy);
  border-color: var(--border);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.data-table th,
.data-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--white);
}

.empty-row td {
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 1.25rem 1rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.88);
  margin-top: 2rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
}

.site-footer__inner {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  padding: 2rem 0 1.5rem;
}

.site-footer__heading {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links li {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.site-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}

.site-footer__bar p {
  margin: 0;
}

/* Responsive */
@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--navy-deep);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 1rem;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .primary-nav__group {
    width: 100%;
  }

  .primary-nav__trigger {
    width: 100%;
    justify-content: space-between;
    text-align: left;
    padding: 0.15rem 0;
  }

  .primary-nav__menu {
    position: static;
    display: none;
    min-width: 0;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.25rem 0 0.35rem;
    border: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
  }

  .primary-nav__group.is-open .primary-nav__menu {
    display: block;
  }

  .primary-nav__menu-link {
    padding-left: 0.85rem;
  }

  .primary-nav__actions {
    flex-wrap: wrap;
  }

  .card-grid--2,
  .dashboard-grid,
  .site-footer__inner,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 180px;
  }

  .dashboard-greeting {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-greeting__meta {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .user-chip {
    max-width: 100%;
  }
}

/* ?? Public /home (Kent Police?inspired) ?? */
body.page-nk-home {
  background: #fff;
  background-image: none;
  color: #1a1d23;
}

body.page-nk-home .site-footer {
  margin-top: 0;
  background: #0b1f3a;
  color: rgba(255, 255, 255, 0.88);
}

body.page-nk-home .site-footer a {
  color: #fff;
}

.nk-home-hero {
  --nk-home-blue: #003a70;
  --nk-home-blue-deep: #00264d;
  position: relative;
  min-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 1.25rem 2.25rem 0.35rem;
  background:
    linear-gradient(180deg, rgba(0, 30, 58, 0.35) 0%, rgba(0, 30, 58, 0.15) 35%, rgba(0, 30, 58, 0.55) 100%),
    var(--nk-home-banner) center center / cover no-repeat;
  color: #fff;
}

.nk-home-hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 0%, rgba(0, 20, 40, 0.25) 100%);
}

.nk-home-hero__top,
.nk-home-hero__centre {
  position: relative;
  z-index: 1;
}

.nk-home-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.85rem 1rem 0.85rem 0.75rem;
  box-sizing: border-box;
}

.nk-home-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  margin-left: 0;
  justify-self: start;
}

.nk-home-brand:hover {
  text-decoration: none;
  color: #fff;
}

.nk-home-brand img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.nk-home-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.nk-home-brand__name {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  font-style: normal;
}

.nk-home-brand__tag {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.92;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nk-home-hero__auth {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.nk-home-auth-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 30, 58, 0.35);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.nk-home-auth-link:hover {
  background: rgba(0, 30, 58, 0.55);
  color: #fff;
  text-decoration: none;
}

.nk-home-auth-link--solid {
  background: #fff;
  color: var(--nk-home-blue);
  border-color: #fff;
}

.nk-home-auth-link--solid:hover {
  background: #f3f6fb;
  color: var(--nk-home-blue-deep);
}

.nk-home-hero__centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  max-width: 920px;
  width: 100%;
  margin: 3.5rem auto 0.5rem;
}

.nk-home-search {
  display: flex;
  align-items: stretch;
  width: min(100%, 560px);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.nk-home-search input {
  flex: 1;
  border: 0;
  padding: 0.95rem 1.1rem;
  font: inherit;
  font-size: 1rem;
  color: #152033;
  outline: none;
  min-width: 0;
}

.nk-home-search__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  border: 0;
  background: var(--nk-home-blue);
  color: #fff;
  cursor: pointer;
}

.nk-home-search__btn:hover {
  background: var(--nk-home-blue-deep);
}

.nk-home-tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

.nk-home-tiles--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 900px;
}

.nk-home-tiles--seven {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  max-width: 1020px;
}

.nk-home-tile {
  --nk-home-blue: #003a70;
  --nk-home-blue-deep: #00264d;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 0;
  padding: 0.85rem 0.45rem 1.35rem;
  border-radius: 2px;
  background: #003d7d;
  color: #fff;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: background 0.15s ease, transform 0.15s ease;
}

.nk-home-tile:hover {
  background: #002f61;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.nk-home-tile__icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
}

.nk-home-tile__label {
  font-size: clamp(0.72rem, 1.5vw, 0.88rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  padding: 0 0.15rem;
}

.nk-home-tile__chev {
  position: absolute;
  bottom: 0.55rem;
  left: 50%;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: -0.28rem;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  opacity: 0.95;
}

.nk-home-main {
  background: #fff;
}

.nk-home-area {
  padding: 3.5rem 1.25rem 4rem;
}

.nk-home-area__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.nk-home-area__eyebrow {
  margin: 0 0 0.75rem;
  color: var(--nk-home-blue, #003a70);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nk-home-area__title {
  margin: 0 0 0.85rem;
  color: #0b1f3a;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.2;
  text-transform: none;
}

.nk-home-area__lead,
.nk-home-area__intro,
.nk-home-area__note {
  margin: 0 auto 0.85rem;
  max-width: 38rem;
  color: #4a5568;
  line-height: 1.6;
}

.nk-home-area__note {
  color: #1a365d;
  font-weight: 600;
}

.nk-home-find {
  margin: 1.75rem auto 0;
  max-width: 420px;
  text-align: left;
}

.nk-home-find__label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
  color: #0b1f3a;
  font-size: 0.95rem;
}

.nk-home-find__row {
  display: flex;
  align-items: stretch;
  border: 1px solid #c5cdd8;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.nk-home-find__row:focus-within {
  border-color: #003a70;
  box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.15);
}

.nk-home-find input {
  flex: 1;
  border: 0;
  padding: 0.8rem 0.95rem;
  font: inherit;
  outline: none;
  min-width: 0;
}

.nk-home-find__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  border: 0;
  background: #003a70;
  color: #fff;
  cursor: pointer;
}

.nk-home-find__btn:hover {
  background: #00264d;
}

.nk-home-find__hint {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  color: #5b6b82;
}

.nk-home-find__hint a {
  color: #003a70;
  font-weight: 650;
}

/* From North Kent RPC — equal service cards (below home content) */
.nk-home-from {
  --nk-home-blue: #003a70;
  --nk-home-blue-deep: #00264d;
  padding: 0 1.25rem 4.5rem;
  background: #f3f6f9;
  border-top: 1px solid #d7e0ea;
}

.nk-home-from__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 3rem;
}

.nk-home-from__title {
  margin: 0 0 0.45rem;
  color: #0b1f3a;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
}

.nk-home-from__lead {
  margin: 0 auto 1.75rem;
  max-width: 34rem;
  color: #4a5568;
  font-size: 1.02rem;
  line-height: 1.5;
  text-align: center;
}

.nk-home-from__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.nk-home-from-card {
  background: #fff;
  border: 1px solid #d5dee8;
  box-shadow: 0 1px 0 rgba(15, 39, 64, 0.04);
}

.nk-home-from-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.nk-home-from-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #1d4f7a 0%, #0f2740 100%);
}

.nk-home-from-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nk-home-from-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem 1.25rem;
  flex: 1 1 auto;
}

.nk-home-from-card__title {
  margin: 0;
  color: var(--nk-home-blue);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.nk-home-from-card__text {
  margin: 0;
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.55;
  flex: 1 1 auto;
}

.nk-home-from-card__cta {
  margin-top: 0.35rem;
  color: var(--nk-home-blue);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nk-home-from-card__link:hover .nk-home-from-card__title,
.nk-home-from-card__link:hover .nk-home-from-card__cta {
  color: var(--nk-home-blue-deep);
}

.nk-home-from-card__link:focus-visible {
  outline: 3px solid rgba(0, 58, 112, 0.35);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .nk-home-from__grid {
    grid-template-columns: 1fr;
    max-width: 28rem;
    margin: 0 auto;
  }
}

/* ?? About Us page ?? */
body.page-nk-about {
  background-color: #0b1220;
  background-image:
    linear-gradient(180deg, rgba(8, 14, 28, 0.35) 0%, rgba(8, 14, 28, 0.45) 100%),
    url("../branding/nk-about-background.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #fff;
}

body.page-nk-about .site-footer {
  margin-top: 0;
  background: rgba(11, 31, 58, 0.92);
  color: rgba(255, 255, 255, 0.88);
}

body.page-nk-about .site-footer a {
  color: #fff;
}

.nk-about-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(0, 40, 80, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nk-about-top .nk-home-brand {
  text-shadow: none;
}

.nk-about {
  padding: 2.5rem 1.25rem 3.5rem;
}

.nk-about__inner {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(3px);
  padding: 2rem 1.75rem;
  color: #fff;
}

.nk-about__eyebrow {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.85) !important;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 0.85rem;
  font-weight: 600 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nk-about__title {
  margin: 0 0 1.15rem;
  color: #ffffff !important;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.nk-about__body {
  color: rgba(255, 255, 255, 0.92) !important;
  line-height: 1.65;
  font-size: 1rem;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.nk-about__body p {
  margin: 0 0 1rem;
}

.nk-about__image {
  margin: 1.25rem 0 0;
}

.nk-about__image img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.nk-about__video {
  margin: 1.75rem 0 0.5rem;
  text-align: center;
}

.nk-about__video iframe,
.nk-about__video video {
  width: min(100%, 560px);
  max-width: 100%;
  border: 0;
  border-radius: 8px;
  background: #000;
}

.nk-about__video--tiktok iframe {
  width: min(100%, 325px);
  height: 730px;
}

.nk-about__video--youtube iframe,
.nk-about__video--vimeo iframe,
.nk-about__video video {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 240px;
}

.nk-about__video-link {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
}

.nk-about__video-link a {
  color: #fff;
  font-weight: 650;
  text-decoration: underline;
}

.nk-about__note {
  margin: 1rem 0 0;
  color: #ffe08a;
  font-size: 0.9rem;
}

.nk-about__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.75rem;
}

.nk-about__actions .btn-secondary {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.nk-about__actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

@media (max-width: 560px) {
  .nk-about__video iframe {
    height: 620px;
  }
}

@media (max-width: 820px) {
  .nk-home-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 420px;
  }
}

@media (max-width: 560px) {
  .nk-home-hero {
    min-height: auto;
    padding-bottom: 1.75rem;
  }

  .nk-home-hero__centre {
    margin-top: 2.25rem;
  }

  .nk-home-brand__tag {
    display: none;
  }

  .nk-home-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 280px;
  }

  .nk-home-tile:last-child {
    grid-column: auto;
  }
}

/* Phase 2 ? Applications */
.apps-hero {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  background-image: var(--brand-bg-image);
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
}

.apps-hero--compact {
  min-height: 140px;
}

.apps-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 16, 28, 0.72);
}

.apps-hero__content {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem;
}

.apps-hero__content h1 {
  color: var(--white);
  margin: 0.25rem 0;
}

.apps-page {
  padding: 1.5rem 0 2.5rem;
}

.apps-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.apps-toolbar__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.apps-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.chip:hover,
.chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  text-decoration: none;
}

.app-form-card .card__text {
  min-height: 4rem;
}

.app-form-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  border-radius: var(--radius);
}

.section-heading {
  color: var(--royal);
  margin: 1.25rem 0 0.75rem;
}

.info-banner {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #075985;
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.help-text {
  margin: -0.15rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.req {
  color: var(--red);
}

.choice-list {
  display: grid;
  gap: 0.4rem;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.btn-success {
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
}

.btn-success:hover {
  background: #166534;
}

.btn-danger {
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
}

.btn-danger:hover {
  background: #991b1b;
}

.status-pill--info {
  background: #dbeafe;
  color: var(--royal);
}

.status-pill--amber {
  background: #fef3c7;
  color: var(--amber);
}

.status-pill--danger {
  background: #fee2e2;
  color: var(--red);
}

.status-pill--muted {
  background: #e2e8f0;
  color: #475569;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.25rem;
  font-size: 0.92rem;
}

.answer-block {
  border-top: 1px solid var(--border);
  padding: 0.85rem 0;
}

.answer-block p {
  margin: 0.35rem 0 0;
}

.staff-view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.staff-sidebar {
  display: grid;
  gap: 1rem;
}

.stacked-actions .btn {
  margin-bottom: 0.45rem;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.history-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.builder-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  margin-bottom: 1rem;
  background: #f8fafc;
}

.builder-section__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.builder-question {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.5rem;
}

.builder-question__meta {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.builder-question__actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.drag-handle {
  cursor: grab;
  user-select: none;
  color: var(--muted);
}

.builder-question.is-dragging,
.builder-section.is-dragging {
  opacity: 0.7;
  outline: 2px dashed var(--royal);
}

.builder-add-question {
  margin-top: 0.75rem;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
}

.form-inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.form-inline input[type="text"] {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.65rem;
  font: inherit;
}

.table-actions {
  display: flex;
  gap: 0.65rem;
}

.file-list {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.1rem;
}

.alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

@media (max-width: 980px) {
  .staff-view-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Operational dashboard */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.is-hidden[hidden],
.is-hidden {
  display: none !important;
}

.panic-banner {
  background: #7f1d1d;
  color: #fff;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
}

.duty-panel {
  margin-bottom: 1rem;
}

.duty-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.duty-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.duty-btn {
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text);
  border-radius: var(--radius);
}

.duty-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.bookoff-row {
  align-items: end;
}

.bookoff-actions {
  min-width: 120px;
}

.panic-actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.inline-form {
  display: inline;
}

.data-table tr.is-unread td {
  font-weight: 600;
  background: #eff6ff;
}

.notif-bell {
  position: relative;
}

.notif-bell__button {
  position: relative;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  border-radius: var(--radius);
  width: 36px;
  height: 32px;
  cursor: pointer;
}

.notif-bell__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.notif-bell__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(340px, 90vw);
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
}

.notif-bell__header,
.notif-bell__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.8rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.notif-bell__footer {
  display: block;
  text-align: center;
  border-bottom: 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  font-weight: 700;
}

.notif-bell__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
}

.notif-bell__item,
.notif-bell__empty {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.notif-bell__item.is-unread {
  background: #eff6ff;
}

.notif-bell__item p {
  margin: 0.25rem 0;
  color: var(--muted);
}

.notif-bell__item time {
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 980px) {
  .bookoff-row {
    flex-direction: column;
    align-items: stretch;
  }

  .duty-panel__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ?? MDT (Mobile Data Terminal) ?? */
.page-mdt .mdt-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.mdt-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.mdt-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

.mdt-header .eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.mdt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mdt-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.mdt-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.mdt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem 1.25rem;
}

.mdt-grid dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.mdt-grid dd {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

.mdt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.mdt-table th,
.mdt-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.mdt-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #f8fafc;
}

.mdt-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.mdt-table tbody tr:hover td {
  background: #eff6ff;
}

.mdt-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.mdt-badge--critical,
.mdt-badge--danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.mdt-badge--warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.mdt-badge--info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.mdt-badge--success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.mdt-badge--muted {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.mdt-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  align-items: start;
}

.mdt-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
}

.mdt-form-grid label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.mdt-form-grid input,
.mdt-form-grid select,
.mdt-form-grid textarea {
  width: 100%;
}

.mdt-form-grid .span-2 {
  grid-column: span 2;
}

.mdt-photo {
  max-width: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.mdt-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-top: 0.5rem;
}

.mdt-inline-form label {
  font-size: 0.78rem;
  font-weight: 600;
}

.mdt-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
  margin-left: 0.4rem;
}

.mdt-timeline li {
  padding: 0.45rem 0 0.45rem 1rem;
  position: relative;
  font-size: 0.85rem;
}

.mdt-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.mdt-search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-width: 480px;
}

@media (max-width: 900px) {
  .mdt-layout {
    grid-template-columns: 1fr;
  }

  .mdt-form-grid .span-2 {
    grid-column: span 1;
  }
}

/* MDT UI enhancements (intel, forms, search) */
.page-mdt {
  --mdt-radius: 9px;
}

.page-mdt .mdt-shell {
  min-height: calc(100vh - var(--header-h));
}

.page-mdt .mdt-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--royal) 100%);
  color: var(--white);
  border-radius: var(--mdt-radius);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.page-mdt .mdt-header a {
  color: #bfdbfe;
}

.page-mdt .mdt-header a:hover {
  color: var(--white);
}

.page-mdt .mdt-header h1 {
  color: var(--white);
  font-size: 1.55rem;
}

.page-mdt .mdt-header .muted {
  color: rgba(255, 255, 255, 0.78);
}

.page-mdt .mdt-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.page-mdt .mdt-subheader {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.page-mdt .mdt-main {
  padding-bottom: 2rem;
}

.mdt-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  min-width: min(100%, 420px);
}

.mdt-search__input {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--mdt-radius);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 0.92rem;
}

.mdt-search__input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.page-mdt .mdt-card .mdt-search__input,
.mdt-entity-search .mdt-search__input {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}

.page-mdt .mdt-card .mdt-search__input::placeholder,
.mdt-entity-search .mdt-search__input::placeholder {
  color: var(--muted);
}

.mdt-live-results {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--mdt-radius);
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
}

.mdt-entity-search {
  position: relative;
}

.mdt-live-results__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--text);
}

.mdt-live-results__item:hover {
  background: #eff6ff;
}

.page-mdt .mdt-card {
  border-radius: var(--mdt-radius);
}

.mdt-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.mdt-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  text-decoration: none;
}

.mdt-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mdt-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .mdt-grid--2,
  .mdt-grid--3 {
    grid-template-columns: 1fr;
  }
}

.mdt-stat {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: var(--mdt-radius);
  padding: 0.85rem 1rem;
}

.mdt-stat__value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--royal);
  line-height: 1.2;
}

.mdt-stat__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.mdt-section {
  margin-bottom: 1.25rem;
}

.mdt-section__title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--navy);
  border-bottom: 2px solid #dbeafe;
  padding-bottom: 0.4rem;
}

.mdt-kv {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}

.mdt-kv dt {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.mdt-kv dd {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}

.mdt-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.mdt-nav-tabs a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.mdt-nav-tabs a.is-active {
  background: var(--royal);
  border-color: var(--royal);
  color: var(--white);
}

.mdt-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.mdt-table-wrap {
  overflow-x: auto;
}

.mdt-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.mdt-actions--stack form {
  width: 100%;
}

.mdt-prose {
  font-size: 0.95rem;
  line-height: 1.6;
}

.mdt-required {
  color: var(--red);
}

.mdt-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.mdt-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mdt-result-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.mdt-dropdown select {
  min-width: 200px;
}

/* Forms create picker ? replaces native select */
.page-mdt .mdt-header .mdt-create-btn {
  background: #fff;
  color: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.page-mdt .mdt-header .mdt-create-btn:hover {
  background: #eff6ff;
  color: var(--navy);
  border-color: #fff;
}

.mdt-forms-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.35rem 0 0.25rem;
}

.mdt-forms-empty .muted {
  margin: 0;
}

body.mdt-form-picker-open {
  overflow: hidden;
}

.mdt-form-picker {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.mdt-form-picker[hidden] {
  display: none !important;
}

.mdt-form-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 36, 0.55);
}

.mdt-form-picker__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.mdt-form-picker__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.2rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--royal) 100%);
  color: #fff;
}

.mdt-form-picker__eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.mdt-form-picker__head h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #fff;
}

.mdt-form-picker__close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.mdt-form-picker__close:hover,
.mdt-form-picker__close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.mdt-form-picker__body {
  padding: 1.1rem 1.15rem 1.25rem;
  overflow-y: auto;
}

.mdt-form-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mdt-form-type {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem 0.85rem 1.05rem;
  border: 1px solid #d7dde6;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: #0b1224;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.mdt-form-type::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--navy);
}

.mdt-form-type:hover,
.mdt-form-type:focus-visible {
  border-color: color-mix(in srgb, var(--royal) 40%, #d7dde6);
  background: #f5f8ff;
  text-decoration: none;
  color: #0b1224;
  transform: translateY(-1px);
  outline: none;
}

.mdt-form-type__label {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.mdt-form-type__meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: #667085;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .mdt-form-picker__grid {
    grid-template-columns: 1fr;
  }
}

/* MDT form / table consistency (scoped ? does not alter STORM shell layout) */
.page-mdt,
.mdt-shell,
.storm-mdt {
  --mdt-input-border: var(--admin-border-strong, #d0d5dd);
  --mdt-input-radius: var(--admin-radius, 6px);
  --mdt-input-h: var(--admin-input-h, 42px);
  --mdt-field-gap: var(--admin-gap, 1.25rem);
  --mdt-label-gap: 0.4rem;
  --mdt-focus: var(--admin-blue, var(--royal-bright));
}

.mdt-shell .form-grid,
.storm-mdt .form-grid,
.page-mdt .form-grid,
.mdt-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem var(--mdt-field-gap);
  margin-bottom: 0.35rem;
}

.mdt-shell .form-grid .form-group,
.storm-mdt .form-grid .form-group,
.page-mdt .form-grid .form-group,
.mdt-form-fields .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: var(--mdt-label-gap);
  min-width: 0;
}

.mdt-shell .form-grid .form-group > label,
.storm-mdt .form-grid .form-group > label,
.page-mdt .form-grid .form-group > label,
.mdt-form-fields .form-group > label {
  display: block;
  margin-bottom: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.mdt-shell .form-grid .form-group--full,
.storm-mdt .form-grid .form-group--full,
.page-mdt .form-grid .form-group--full,
.mdt-form-fields .form-group--full {
  grid-column: 1 / -1;
}

.mdt-shell .form-grid .form-group--checkbox,
.storm-mdt .form-grid .form-group--checkbox,
.page-mdt .form-grid .form-group--checkbox,
.mdt-form-fields .form-group--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.35rem;
}

.mdt-shell .form-grid .form-group--checkbox > label,
.storm-mdt .form-grid .form-group--checkbox > label,
.page-mdt .form-grid .form-group--checkbox > label,
.mdt-form-fields .form-group--checkbox > label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.mdt-shell .form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.mdt-shell .form-group select,
.mdt-shell .form-group textarea,
.storm-mdt .form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.storm-mdt .form-group select,
.storm-mdt .form-group textarea,
.page-mdt .form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.page-mdt .form-group select,
.page-mdt .form-group textarea,
.mdt-shell .mdt-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.mdt-shell .mdt-form-grid select,
.mdt-shell .mdt-form-grid textarea,
.page-mdt .mdt-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.page-mdt .mdt-form-grid select,
.page-mdt .mdt-form-grid textarea {
  width: 100%;
  min-height: var(--mdt-input-h);
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--mdt-input-border);
  border-radius: var(--mdt-input-radius);
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mdt-shell .form-group textarea,
.storm-mdt .form-group textarea,
.page-mdt .form-group textarea,
.mdt-shell .mdt-form-grid textarea,
.page-mdt .mdt-form-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.mdt-shell .form-group input:focus,
.mdt-shell .form-group select:focus,
.mdt-shell .form-group textarea:focus,
.storm-mdt .form-group input:focus,
.storm-mdt .form-group select:focus,
.storm-mdt .form-group textarea:focus,
.page-mdt .form-group input:focus,
.page-mdt .form-group select:focus,
.page-mdt .form-group textarea:focus,
.mdt-shell .mdt-form-grid input:focus,
.mdt-shell .mdt-form-grid select:focus,
.mdt-shell .mdt-form-grid textarea:focus,
.page-mdt .mdt-form-grid input:focus,
.page-mdt .mdt-form-grid select:focus,
.page-mdt .mdt-form-grid textarea:focus {
  outline: none;
  border-color: var(--mdt-focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
  background: var(--white);
}

.page-mdt .mdt-form-grid {
  gap: 1rem var(--mdt-field-gap);
}

.page-mdt .mdt-form-grid > div {
  display: flex;
  flex-direction: column;
  gap: var(--mdt-label-gap);
  min-width: 0;
}

.page-mdt .mdt-form-grid label {
  margin-bottom: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.mdt-shell .form-actions,
.page-mdt .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.storm-mdt .storm-search-form--lg {
  gap: 0.65rem;
  align-items: stretch;
}

.storm-mdt .storm-search-form--lg .storm-search-input {
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  border: 1px solid var(--mdt-input-border);
  border-radius: var(--mdt-input-radius);
  background: var(--white);
}

.storm-mdt .storm-search-form--lg .storm-search-input:focus {
  outline: none;
  border-color: var(--mdt-focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.storm-mdt .storm-search-form--lg .btn {
  min-height: 48px;
  padding-inline: 1.25rem;
  font-size: 0.95rem;
}

.mdt-shell .data-table tbody tr:nth-child(even) td,
.page-mdt .data-table tbody tr:nth-child(even) td,
.storm-mdt .storm-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.mdt-shell .data-table tbody tr:hover td,
.page-mdt .data-table tbody tr:hover td,
.storm-mdt .storm-table tbody tr:hover td {
  background: #eff6ff;
}

@media (max-width: 720px) {
  .mdt-shell .form-grid,
  .storm-mdt .form-grid,
  .page-mdt .form-grid,
  .mdt-form-fields {
    grid-template-columns: 1fr;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ?? STORM / ROMS-aligned MDT home ?? */
.page-mdt-storm {
  --storm-blue: #2563eb;
  --storm-bar: #1d4ed8;
  --storm-green: #16a34a;
  --storm-amber: #ca8a04;
  --storm-cyan: #0d9488;
  --storm-purple: #7c3aed;
  --storm-grey: #64748b;
  --storm-dark: #1e293b;
  --storm-radius: 8px;
}

.storm-mdt {
  padding-bottom: 2.5rem;
}

.storm-status-bar {
  background: var(--storm-bar);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
}

.storm-mdt__flash {
  width: min(1280px, calc(100% - 1.5rem));
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem;
}

.storm-mdt__flash:empty {
  display: none;
  margin: 0;
}

.storm-mdt__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  width: min(1280px, calc(100% - 1.5rem));
}

/* Flash/toast must never become a grid column beside the sidebar */
.storm-mdt__layout > .alert,
.storm-mdt__layout > .storm-mdt-toast {
  grid-column: 1 / -1;
}

.storm-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: calc(var(--header-h) + 0.75rem);
}

.storm-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--storm-radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 0.95rem 1.05rem;
  margin-bottom: 0.85rem;
}

.storm-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.storm-card__title {
  margin: 0;
  color: var(--storm-blue);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.storm-icon {
  font-size: 0.95rem;
}

.storm-muted,
.storm-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.storm-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.storm-qa {
  display: block;
  text-align: center;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.storm-qa:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  text-decoration: none;
}

.storm-qa--primary {
  background: var(--storm-blue);
  border-color: var(--storm-blue);
  color: #fff;
}

.storm-qa--primary:hover {
  background: #1d4ed8;
  color: #fff;
}

.storm-kv {
  margin: 0 0 0.75rem;
}

.storm-kv > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.storm-kv dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.storm-kv dd {
  margin: 0;
  font-weight: 600;
}

.storm-inline-form,
.storm-search-form,
.storm-remark-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.storm-inline-form input,
.storm-search-input,
.storm-remark-form input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
}

.storm-top-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.storm-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.storm-status-form {
  margin: 0;
}

.mdt-status-btn {
  width: 100%;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 0.5rem;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12);
}

.mdt-status-btn.is-active {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.mdt-status-btn--available { background: var(--storm-green); }
.mdt-status-btn--unavailable { background: var(--storm-grey); }
.mdt-status-btn--enroute { background: var(--storm-amber); }
.mdt-status-btn--onscene { background: #3b82f6; }
.mdt-status-btn--committed { background: var(--storm-cyan); }
.mdt-status-btn--transport { background: var(--storm-purple); }
.mdt-status-btn--panic { background: #dc2626; }
.mdt-status-btn--bookoff { background: var(--storm-dark); }

.storm-status-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.storm-message-list,
.storm-remarks,
.storm-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.storm-message-list li,
.storm-remarks li {
  padding: 0.55rem 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.86rem;
}

.storm-message-list p {
  margin: 0.2rem 0;
  color: var(--text);
}

.storm-message-list time,
.storm-remarks time {
  color: var(--muted);
  font-size: 0.75rem;
}

.storm-remarks li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.storm-remarks li strong {
  display: block;
  color: var(--storm-blue);
  margin-bottom: 0.15rem;
}

.storm-call-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.25rem;
  margin-bottom: 0.85rem;
}

.storm-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.storm-opening-remarks {
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.storm-opening-remarks p {
  margin: 0.25rem 0 0;
  font-weight: 600;
  line-height: 1.45;
}

.storm-grades {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 0.85rem;
}

.storm-cad-pill {
  background: var(--storm-blue);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.storm-cad-pill:hover {
  background: #1d4ed8;
  text-decoration: none;
}

.storm-clear-btn {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: var(--storm-dark);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem;
  cursor: pointer;
}

.storm-clear-btn:hover {
  background: #0f172a;
}

.storm-link {
  color: var(--storm-blue);
  font-weight: 600;
  font-size: 0.86rem;
}

.storm-units {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.storm-unit-bar {
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.storm-unit-bar--onscene { background: #3b82f6; }
.storm-unit-bar--enroute { background: var(--storm-amber); }
.storm-unit-bar--assigned { background: var(--storm-cyan); }
.storm-unit-bar--cleared { background: var(--storm-grey); }

.storm-unit-meta {
  font-weight: 600;
  font-size: 0.8rem;
  opacity: 0.9;
}

.storm-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.storm-panels__wide {
  grid-column: 1 / -1;
}

.storm-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.86rem;
}

.storm-badge {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #eff6ff;
  color: #1d4ed8;
  margin-right: 0.25rem;
}

.storm-badge--danger {
  background: #fef2f2;
  color: #b91c1c;
}

.storm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.storm-table th,
.storm-table td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.storm-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--muted);
}

.storm-remark-form {
  margin-top: 0.75rem;
}

@media (max-width: 980px) {
  .storm-mdt__layout {
    grid-template-columns: 1fr;
  }

  .storm-sidebar {
    position: static;
  }

  .storm-top-row,
  .storm-call-grid,
  .storm-panels {
    grid-template-columns: 1fr;
  }

  .storm-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Dashboard overview layout */
.dash-overview__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dash-overview__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  margin: 0 0 0.25rem;
  color: var(--muted);
}

.dash-overview__title {
  margin: 0;
  font-size: 1.75rem;
  color: var(--navy);
}

.dash-overview__head-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dash-overview__logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow);
}

.dash-welcome {
  margin-bottom: 1rem;
  border-left: 4px solid var(--royal);
}

/* Full-page quick actions dashboard */
body.page-dashboard--tiles {
  background: #ffffff !important;
  background-image: none !important;
}

body.page-dashboard--tiles .dash-home {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  min-height: calc(100vh - 12rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.page-dashboard--tiles .dash-profile__meta {
  display: none !important;
}

.dash-bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(108px, auto);
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.dash-bento--fill {
  flex: 1 1 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(148px, 1fr);
  gap: 0.85rem;
  margin-bottom: 0;
  min-height: min(52vh, 640px);
}

.dash-patrols {
  flex: 0 0 auto;
}

/* NK operational tiles ? white cards, navy accents (not rainbow gradients) */
.dash-tile {
  --tile-accent: #142564;
  --tile-soft: #eef2f8;
  --tile-bg: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1.15rem 1.15rem 1.15rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  color: #0b1224;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  background: var(--tile-bg);
  border: 1px solid color-mix(in srgb, var(--tile-accent) 18%, #d7dde6);
  box-shadow: none;
  min-height: 132px;
  text-align: left;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.dash-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--tile-accent);
}

.dash-tile:hover,
.dash-tile:focus-visible {
  border-color: var(--tile-accent);
  background: color-mix(in srgb, var(--tile-soft) 70%, #fff);
  transform: translateY(-1px);
  outline: none;
  filter: none;
  box-shadow: none;
}

.dash-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: var(--tile-soft);
  color: var(--tile-accent);
  opacity: 1;
}

.dash-tile__icon svg {
  width: 24px;
  height: 24px;
}

.dash-tile__label {
  font-size: 1.05rem;
  line-height: 1.2;
  color: #0b1224;
  font-weight: 700;
}

.dash-tile__meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: #5b6575;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dash-tile--md,
.dash-tile--sm {
  grid-column: span 1;
}

.dash-tile--lg {
  grid-column: span 2;
  grid-row: span 2;
  padding: 1.35rem 1.35rem 1.2rem 1.45rem;
  min-height: 100%;
}

.dash-tile--lg .dash-tile__icon {
  width: 56px;
  height: 56px;
}

.dash-tile--lg .dash-tile__icon svg {
  width: 28px;
  height: 28px;
}

.dash-tile--lg .dash-tile__label {
  font-size: 1.35rem;
  max-width: 12ch;
}

.dash-tile--lg .dash-tile__meta {
  margin-top: auto;
  align-self: stretch;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid #e4e8ef;
  width: 100%;
  text-transform: none;
  font-size: 0.86rem;
  color: #3d4654;
}

.dash-tile--lg .dash-tile__meta::after {
  content: "?";
  font-size: 1.35rem;
  line-height: 1;
  color: var(--tile-accent);
  font-weight: 400;
}

.dash-tile--mdt {
  --tile-accent: #0f766e;
  --tile-soft: #e6f5f3;
  --tile-bg: #f3fbfa;
}

.dash-tile--pnc {
  --tile-accent: #1d4ed8;
  --tile-soft: #e8effc;
  --tile-bg: #f4f7fd;
}

.dash-tile--cad {
  --tile-accent: #0369a1;
  --tile-soft: #e5f3fa;
  --tile-bg: #f2f8fc;
}

.dash-tile--civ {
  --tile-accent: #0e7490;
  --tile-soft: #e4f5f8;
  --tile-bg: #f1fafb;
}

.dash-tile--control {
  --tile-accent: #c2410c;
  --tile-soft: #fcece4;
  --tile-bg: #fdf6f2;
}

.dash-tile--intel {
  --tile-accent: #475569;
  --tile-soft: #eef1f5;
  --tile-bg: #f7f8fa;
}

.dash-tile--tasks {
  --tile-accent: #5b21b6;
  --tile-soft: #f0e9fa;
  --tile-bg: #f7f3fc;
}

.dash-tile--forms {
  --tile-accent: #2563eb;
  --tile-soft: #e8f0fe;
  --tile-bg: #f4f8ff;
}

.dash-tile--fleet {
  --tile-accent: #1e40af;
  --tile-soft: #e8edf9;
  --tile-bg: #f3f6fc;
}

.dash-tile--careers {
  --tile-accent: #0f766e;
  --tile-soft: #e7f4f1;
  --tile-bg: #f3faf8;
}

.dash-tile--apply {
  --tile-accent: #7c3aed;
  --tile-soft: #f1eafc;
  --tile-bg: #f8f4fe;
}

.dash-tile--hr {
  --tile-accent: #be185d;
  --tile-soft: #fce8f1;
  --tile-bg: #fdf4f8;
}

.dash-tile--account {
  --tile-accent: #0b1224;
  --tile-soft: #e8ebf0;
  --tile-bg: #f4f5f7;
}

.dash-tile--ops,
.dash-tile--dispatch {
  --tile-accent: #142564;
  --tile-soft: #eef2f8;
  --tile-bg: #f5f7fb;
}

/* legacy tone aliases */
.dash-tile--teal {
  --tile-accent: #0f766e;
  --tile-soft: #e6f5f3;
  --tile-bg: #f3fbfa;
}

.dash-tile--blue,
.dash-tile--navy {
  --tile-accent: #1e40af;
  --tile-soft: #e8edf9;
  --tile-bg: #f3f6fc;
}

.dash-tile--purple {
  --tile-accent: #5b21b6;
  --tile-soft: #f0e9fa;
  --tile-bg: #f7f3fc;
}

.dash-tile--orange {
  --tile-accent: #c2410c;
  --tile-soft: #fcece4;
  --tile-bg: #fdf6f2;
}

.dash-tile--light {
  --tile-accent: #475569;
  --tile-soft: #eef1f5;
  --tile-bg: #f7f8fa;
}

.dash-bento--fill .dash-tile {
  min-height: 148px;
  padding: 1.2rem 1.2rem 1.2rem 1.3rem;
  border-radius: 4px;
}

.dash-bento--fill .dash-tile__icon svg {
  width: 24px;
  height: 24px;
}

.dash-bento--fill .dash-tile__label {
  font-size: 1.08rem;
}

.dash-bento--fill .dash-tile--lg {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 100%;
  padding: 1.4rem 1.4rem 1.25rem 1.5rem;
}

.dash-bento--fill .dash-tile--lg .dash-tile__label {
  font-size: 1.4rem;
}

.dash-bento--fill .dash-tile--lg .dash-tile__icon {
  width: 56px;
  height: 56px;
}

.dash-bento--fill .dash-tile--lg .dash-tile__icon svg {
  width: 28px;
  height: 28px;
}

.dash-bento--fill .dash-tile--sm {
  min-height: 148px;
}

@media (max-width: 1100px) {
  .dash-bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dash-bento--fill {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 44vh;
  }
}

@media (max-width: 720px) {
  .dash-bento,
  .dash-bento--fill {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(120px, auto);
    min-height: 0;
  }

  .dash-bento--fill .dash-tile,
  .dash-bento--fill .dash-tile--sm {
    min-height: 120px;
  }

  .dash-tile--lg,
  .dash-bento--fill .dash-tile--lg {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 140px;
  }
}

.dash-welcome__body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.dash-welcome__title {
  margin: 0 0 0.35rem;
  color: var(--royal-bright);
  font-size: 1.35rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
}

.dash-welcome__subtitle {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 42rem;
}

.dash-welcome__icon {
  color: var(--royal);
  opacity: 0.85;
  text-decoration: none;
}

.dash-profile {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.dash-profile__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8eef5;
  flex-shrink: 0;
}

.dash-profile__avatar--placeholder {
  border: 1px solid #d0d7e2;
}

.dash-profile__meta {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.dash-profile__quals {
  margin: 0.65rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

body.page-dashboard--overview {
  background: #ffffff !important;
  background-image: none !important;
}

body.page-dashboard--overview .dash-profile__meta {
  display: none !important;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.95rem;
}

.dash-stat-card {
  --stat-accent: #2563eb;
  --stat-label: #2563eb;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--stat-accent);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem 0.8rem;
  box-shadow: var(--shadow);
}

.dash-stat-card__copy {
  min-width: 0;
}

.dash-stat-card__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stat-label);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.dash-stat-card__value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
}

.dash-stat-card--blue {
  --stat-accent: #2563eb;
  --stat-label: #2563eb;
}

.dash-stat-card--green {
  --stat-accent: #16a34a;
  --stat-label: #16a34a;
}

.dash-stat-card--amber,
.dash-stat-card--warn {
  --stat-accent: #d97706;
  --stat-label: #d97706;
}

.dash-stats--records {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 1rem 0.75rem;
}

.dash-stat-card--warn .dash-stat-card__value {
  color: #b45309;
}

.dash-records .dash-empty {
  padding-top: 0;
}

.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.dash-layout__main,
.dash-layout__side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-intel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dash-empty {
  padding: 1rem;
}

.dash-job-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem 1rem;
}

.dash-job-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.dash-job-list li:last-child {
  border-bottom: 0;
}

.dash-job-list a {
  display: block;
  font-weight: 600;
  color: var(--royal);
}

.dash-qa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 0 1rem 0.75rem;
}

.dash-qa {
  display: block;
  text-align: center;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  color: var(--white);
}

.dash-qa--green {
  background: var(--green);
}

.dash-qa--blue {
  background: var(--royal);
}

.dash-qa--teal {
  background: #0f766e;
}

.dash-qa--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dash-duty-compact {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.dash-duty-compact__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.75rem 0 0.35rem;
}

.dash-training-list {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem 1rem;
}

.dash-training-list li + li {
  margin-top: 0.65rem;
}

.dash-training-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.dash-progress {
  height: 6px;
  background: var(--pale);
  border-radius: 999px;
  overflow: hidden;
}

.dash-progress__bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--royal), var(--royal-bright));
  border-radius: 999px;
}

.data-table--compact td,
.data-table--compact th {
  font-size: 0.82rem;
}

.storm-mdt-toast {
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 5;
}

@media (max-width: 1100px) {
  .dash-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dash-layout,
  .dash-intel-grid {
    grid-template-columns: 1fr;
  }

  .dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-overview__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* CAD live remarks / assignment modal */
.storm-remarks {
  max-height: 360px;
  overflow: auto;
  background: #0b1220;
  color: #e8eef7;
  padding: 0.75rem;
  border-radius: 6px;
}
.storm-remark { margin-bottom: 0.65rem; border-left: 3px solid #64748b; padding-left: 0.55rem; }
.storm-remark--control { border-left-color: #38bdf8; }
.storm-remark--police { border-left-color: #60a5fa; }
.storm-remark--supervisor { border-left-color: #fbbf24; }
.storm-remark--system { border-left-color: #94a3b8; font-style: italic; }
.storm-remark__meta { display: block; font-size: 0.72rem; opacity: 0.85; margin-bottom: 0.15rem; }
.storm-remark p { margin: 0; white-space: pre-wrap; }
.storm-unit-bar--panic, .storm-mdt.is-panic .storm-panel { outline: 2px solid #dc2626; }
.cad-modal {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 80;
}
.cad-modal[hidden] { display: none !important; }
.cad-modal__card {
  background: #fff; border-radius: 10px; padding: 1.25rem; max-width: 420px; width: calc(100% - 2rem);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.cad-modal__card h2 { margin-top: 0; color: #b91c1c; }
tr.is-panic td { background: #fee2e2; }
@media (max-width: 900px) {
  .storm-control-grid { grid-template-columns: 1fr !important; }
  .storm-status-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* CAD live remarks / assignment modal */
.storm-remarks {
  max-height: 360px;
  overflow: auto;
  background: #0b1220;
  color: #e8eef7;
  padding: 0.75rem;
  border-radius: 6px;
}
.storm-remark { margin-bottom: 0.65rem; border-left: 3px solid #64748b; padding-left: 0.55rem; }
.storm-remark--control { border-left-color: #38bdf8; }
.storm-remark--police { border-left-color: #60a5fa; }
.storm-remark--supervisor { border-left-color: #fbbf24; }
.storm-remark--system { border-left-color: #94a3b8; font-style: italic; }
.storm-remark__meta { display: block; font-size: 0.72rem; opacity: 0.85; margin-bottom: 0.15rem; }
.storm-remark p { margin: 0; white-space: pre-wrap; }
.storm-unit-bar--panic, .storm-mdt.is-panic .storm-panel { outline: 2px solid #dc2626; }
.cad-modal {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 80;
}
.cad-modal[hidden] { display: none !important; }
.cad-modal__card {
  background: #fff; border-radius: 10px; padding: 1.25rem; max-width: 420px; width: calc(100% - 2rem);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.cad-modal__card h2 { margin-top: 0; color: #b91c1c; }
tr.is-panic td { background: #fee2e2; }
@media (max-width: 900px) {
  .storm-control-grid { grid-template-columns: 1fr !important; }
  .storm-status-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
/* CAD create/edit/search ? align form chrome with portal without changing STORM shell */
.page-mdt-storm .page-narrow,
.page-mdt-storm .container.page-narrow {
  max-width: 1100px;
}
.page-mdt-storm .card {
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.04);
  border: 1px solid #e3e6eb;
  padding: 1.5rem;
}
.page-mdt-storm .form-stack > label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.page-mdt-storm .form-stack input,
.page-mdt-storm .form-stack select,
.page-mdt-storm .form-stack textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font: inherit;
  box-sizing: border-box;
}
.page-mdt-storm .form-stack input:focus,
.page-mdt-storm .form-stack select:focus,
.page-mdt-storm .form-stack textarea:focus {
  outline: none;
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}
.page-mdt-storm .data-table tbody tr:nth-child(even) td { background: #fafbfd; }
.page-mdt-storm .data-table tbody tr:hover td { background: #f0f4ff; }

/* MDT Book On gate */
.storm-mdt--book-on .storm-mdt__layout {
  display: block;
  max-width: 560px;
  margin: 1.5rem auto 2.5rem;
}
.storm-book-on-panel {
  background: #fff;
  border: 1px solid #d4dae3;
  border-radius: 4px;
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: 0 1px 2px rgba(26, 35, 50, 0.06);
}
.storm-book-on-panel__head {
  margin-bottom: 1rem;
}
.storm-book-on-panel__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a2332;
}
.storm-book-on-panel__lede {
  margin: 0;
  color: #5b6b7c;
  font-size: 0.92rem;
  line-height: 1.45;
}
.storm-book-on-panel__officer {
  margin: 0 0 1.1rem;
  padding: 0.75rem 0.85rem;
  background: #f5f7fa;
  border: 1px solid #e4e9f0;
  border-radius: 3px;
}
.storm-book-on-form .form-group {
  margin-bottom: 0.9rem;
}
.storm-book-on-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #1a2332;
}
.storm-book-on-form input[type="text"],
.storm-book-on-form select {
  width: 100%;
  max-width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #b8c2d0;
  border-radius: 3px;
  font-size: 0.95rem;
  background: #fff;
}
.storm-book-on-form input[type="text"]:focus,
.storm-book-on-form select:focus {
  outline: none;
  border-color: #2d6a9f;
  box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.18);
}
.storm-book-on-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.15rem;
}
@media (max-width: 640px) {
  .storm-mdt--book-on .storm-mdt__layout {
    margin: 1rem 0.75rem 2rem;
  }
}

/* ?? North Kent join / apply (Hollowbridge-inspired card style) ?? */
/* Join board: branded vehicle graphic */
body.page-applications.page-nk-join {
  background-color: #0b1220;
  background-image:
    linear-gradient(180deg, rgba(8, 14, 28, 0.5) 0%, rgba(8, 14, 28, 0.68) 40%, rgba(8, 14, 28, 0.86) 100%),
    var(--nk-join-bg-image, url("../branding/nk-apply-background.png"));
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.page-applications.page-nk-join.nk-join-bg--secamb {
  background-image:
    linear-gradient(180deg, rgba(8, 14, 28, 0.35) 0%, rgba(8, 14, 28, 0.55) 45%, rgba(8, 14, 28, 0.78) 100%),
    var(--nk-join-bg-image, url("../branding/nk-apply-secamb-background.png"));
  background-position: center center;
}

body.page-applications.page-nk-join.nk-join-bg--police {
  background-image:
    linear-gradient(180deg, rgba(8, 14, 28, 0.42) 0%, rgba(8, 14, 28, 0.6) 45%, rgba(8, 14, 28, 0.8) 100%),
    var(--nk-join-bg-image, url("../branding/nk-apply-police-background.png"));
}

body.page-applications.page-nk-join.nk-join-bg--fire {
  background-image:
    linear-gradient(180deg, rgba(8, 14, 28, 0.35) 0%, rgba(8, 14, 28, 0.55) 45%, rgba(8, 14, 28, 0.78) 100%),
    var(--nk-join-bg-image, url("../branding/nk-apply-fire-background.png"));
}

body.page-applications.page-nk-join.nk-join-bg--hr {
  background-image:
    linear-gradient(180deg, rgba(8, 14, 28, 0.48) 0%, rgba(8, 14, 28, 0.65) 45%, rgba(8, 14, 28, 0.84) 100%),
    var(--nk-join-bg-image, url("../branding/nk-apply-hr-background.png"));
}

/* Apply form: Hollowbridge light canvas */
body.page-applications.page-nk-apply {
  background: #f4f4f4;
  background-image: none;
}

.nk-join {
  padding: 2rem 0 3rem;
  position: relative;
}

.nk-join--in-shell {
  padding: 0.5rem 0 1.5rem;
}

.nk-join__head {
  text-align: center;
  margin: 0 auto 1.75rem;
  max-width: 720px;
}

.nk-join__title {
  margin: 0 0 0.65rem;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 600 !important;
  color: #ffffff;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.nk-join__lede {
  margin: 0 auto 1rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  font-size: 0.98rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.nk-join__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.nk-join__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin: 0 0 1.5rem;
}

.nk-join__filter {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.nk-join__filter:hover,
.nk-join__filter.is-active {
  background: #142564;
  border-color: #142564;
  color: #fff;
  text-decoration: none;
}

.nk-join__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  max-width: 920px;
  margin: 0 auto;
  align-items: stretch;
}

/* Hollowbridge-style Apply Now card (left navy bar + readable info) */
body.page-applications.page-nk-join .nk-join-card,
.nk-join-card {
  display: flex;
  flex-direction: column;
  background: #ffffff !important;
  border: 1px solid #e0e0e0;
  border-left: 6px solid #1a1c3d;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  min-height: 100%;
  padding: 1.25rem 1.25rem 1.2rem;
  color: #1a1a1a;
}

body.page-applications.page-nk-join .nk-join-card__title,
.nk-join-card__title {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #1a1a1a !important;
  font-weight: 700;
}

body.page-applications.page-nk-join .nk-join-card__text,
.nk-join-card__text {
  margin: 0;
  color: #666666 !important;
  font-size: 0.92rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.nk-join-card__rule {
  display: block;
  width: 100%;
  height: 0;
  border: 0;
  border-top: 1px solid #e0e0e0;
  margin: 0.95rem 0;
  background: transparent;
}

body.page-applications.page-nk-join .nk-join-card__btn,
.nk-join-card__btn {
  display: block;
  width: 100%;
  margin-top: auto;
  text-align: center;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  background: #1a1c3d !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  border: 0;
  box-sizing: border-box;
}

body.page-applications.page-nk-join .nk-join-card__btn:hover,
.nk-join-card__btn:hover {
  background: #25275a !important;
  color: #ffffff !important;
}

.nk-join__empty {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  color: #1a1a1a;
}

/* Keep page heading readable for applicants (dark banner) and staff (white shell) */
.nk-join--in-shell .nk-join__title,
.nk-join--in-shell .nk-join__lede {
  color: #0b1f3a;
  text-shadow: none;
}

.nk-join--in-shell .nk-join__filter {
  border-color: #c5cdd8;
  background: #fff;
  color: #1a1c3d;
  backdrop-filter: none;
}

.nk-join--in-shell .nk-join__filter:hover,
.nk-join--in-shell .nk-join__filter.is-active {
  background: #1a1c3d;
  border-color: #1a1c3d;
  color: #fff;
}

.nk-apply {
  padding: 2rem 0 3.5rem;
  position: relative;
}

.nk-apply-card {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
  padding: 1.75rem 1.75rem 1.85rem;
}

.nk-apply-card__title {
  margin: 0 0 0.55rem;
  color: #1a1d23;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.nk-apply-card__intro {
  margin: 0 0 1rem;
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.55;
}

.nk-apply-logged {
  margin: 0 0 1.35rem;
  color: #1a1d23;
  font-size: 0.95rem;
}

.nk-apply-errors {
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  background: #fde8e8;
  color: #8a1f1f;
  font-size: 0.9rem;
}

.nk-apply-errors ul {
  margin: 0.4rem 0 0 1.1rem;
  padding: 0;
}

.nk-apply-section {
  margin: 0 0 0.35rem;
}

.nk-apply-section__title {
  margin: 0 0 0.75rem;
  color: #1a1d23;
  font-size: 1.05rem;
  font-weight: 700;
}

.nk-apply-section__desc {
  margin: 0 0 0.85rem;
  color: #5b6b7c;
  font-size: 0.88rem;
}

.nk-apply-card .app-question,
.nk-apply-card .form-group {
  margin-bottom: 1.15rem;
}

.nk-apply-card .app-question > label,
.nk-apply-card .form-group > label {
  display: block;
  font-weight: 600;
  color: #1a1d23;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.nk-apply-card .help-text {
  margin: 0 0 0.4rem;
  color: #6b7c90;
  font-size: 0.82rem;
}

.nk-apply-card input[type="text"],
.nk-apply-card input[type="number"],
.nk-apply-card input[type="date"],
.nk-apply-card input[type="email"],
.nk-apply-card select,
.nk-apply-card textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: #1a1d23;
}

.nk-apply-card input:focus,
.nk-apply-card select:focus,
.nk-apply-card textarea:focus {
  outline: none;
  border-color: #86b7fe;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.nk-apply-card textarea {
  min-height: 120px;
  resize: vertical;
}

.nk-apply-confirm {
  margin: 1.25rem 0 1.35rem;
}

.nk-apply-confirm__text {
  margin: 0 0 0.55rem;
  color: #1a1d23;
  font-size: 0.95rem;
  font-weight: 600;
}

.nk-apply-confirm__check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #1a1d23;
  font-size: 0.95rem;
  cursor: pointer;
}

.nk-apply-confirm__check input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: #28a745;
}

.nk-apply-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.nk-apply-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  text-decoration: none !important;
  box-sizing: border-box;
  line-height: 1.4;
}

.nk-apply-btn--submit {
  background: #28a745;
  color: #fff !important;
}

.nk-apply-btn--submit:hover {
  background: #218838;
  color: #fff !important;
}

.nk-apply-btn--cancel {
  background: #6c757d;
  color: #fff !important;
}

.nk-apply-btn--cancel:hover {
  background: #5a6268;
  color: #fff !important;
}

.nk-apply-draft {
  display: block;
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.35rem;
  border: 0;
  background: transparent;
  color: #6c757d;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.nk-apply-draft:hover {
  color: #495057;
}

@media (max-width: 820px) {
  .nk-join__grid {
    grid-template-columns: 1fr;
  }

  .nk-apply-card {
    padding: 1.25rem 1rem 1.4rem;
  }
}


/* ?? Fleet module ?? */
body.page-fleet {
  background: #f4f4f4;
  background-image: none;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.fleet-shell {
  max-width: 1180px;
  margin: 1.25rem auto 2.5rem;
  padding: 0 1rem;
}

.fleet-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.fleet-page-title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: #1a1d23;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.fleet-page-desc {
  margin: 0;
  color: #667085;
  max-width: 44rem;
}

.fleet-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fleet-card {
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  padding: 1.15rem 1.25rem 1.25rem;
  margin-bottom: 1.1rem;
}

.fleet-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.fleet-card__title {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1d23;
}

.fleet-card__head .fleet-card__title {
  margin: 0;
}

.fleet-card__count {
  color: #667085;
  font-size: 0.88rem;
}

.fleet-table-wrap {
  overflow-x: auto;
}

.fleet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.fleet-table th,
.fleet-table td {
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid #eef0f3;
  text-align: left;
  vertical-align: middle;
}

.fleet-table th {
  background: #f5f6f8;
  color: #1a1d23;
  font-weight: 700;
}

.fleet-table tbody tr:nth-child(even) td {
  background: #f7fbf8;
}

.fleet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.fleet-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  border: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
}

.fleet-action--view,
.fleet-action--edit {
  background: #2f6fed;
  color: #fff !important;
}

.fleet-action--delete {
  background: #c92a2a;
  color: #fff !important;
}

.fleet-status {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.fleet-status--in_service {
  background: #e6f6ea;
  color: #1b6b32;
}

.fleet-status--off_service {
  background: #fde8e8;
  color: #8a1f1f;
}

.fleet-empty,
.fleet-hint {
  color: #667085;
}

.fleet-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.fleet-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.fleet-form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fleet-form-grid .form-group--full {
  grid-column: 1 / -1;
}

.fleet-form-actions {
  margin-top: 1.1rem;
}

.fleet-detail {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.fleet-detail__side {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.fleet-plate {
  background: #f5c518;
  border: 3px solid #1a1d23;
  border-radius: 6px;
  padding: 0.85rem 0.65rem 0.7rem;
  text-align: center;
  margin-bottom: 0.35rem;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.fleet-plate__vrm {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #111;
  font-family: "Segoe UI", Arial, sans-serif;
}

.fleet-plate__auth {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  color: #333;
}

.fleet-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.fleet-detail-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.fleet-detail-field__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fleet-detail-field__value {
  background: #f5f6f8;
  border: 1px solid #e3e6eb;
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  color: #1a1d23;
  min-height: 2.4rem;
}

.fleet-detail-field--status-off_service .fleet-detail-field__value {
  color: #c2410c;
  font-weight: 700;
}

.fleet-detail-field--status-in_service .fleet-detail-field__value {
  color: #1b6b32;
  font-weight: 700;
}

.fleet-badge {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #eef0f3;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 700;
}

.fleet-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.fleet-modal__panel {
  width: min(100%, 560px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.fleet-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid #e3e6eb;
}

.fleet-modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.fleet-modal__close {
  font-size: 1.5rem;
  line-height: 1;
  color: #667085;
  text-decoration: none;
}

.fleet-modal__body {
  padding: 1.1rem;
}

.fleet-modal__notice {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 6px;
  background: #e8f0fe;
  color: #1a365d;
  font-size: 0.9rem;
  line-height: 1.45;
}

.fleet-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .fleet-detail,
  .fleet-split,
  .fleet-form-grid,
  .fleet-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* CAD incident view ? MDT navy shell */
.page-cad-incident .cad-incident__header .cad-incident-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-weight: 700;
}
.page-cad-incident .cad-incident__header .cad-incident-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.page-cad-incident .cad-incident__header .cad-incident-btn--primary {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}
.page-cad-incident .cad-incident__header .cad-incident-btn--danger {
  background: #991b1b;
  border-color: #fecaca;
  color: #fff;
}
.cad-incident__close-form { display: inline; margin: 0; }
.cad-incident__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
.cad-incident-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.cad-incident-badge--immediate { background: rgba(185, 28, 28, 0.85); border-color: #fecaca; }
.cad-incident-badge--priority { background: rgba(194, 65, 12, 0.85); border-color: #fed7aa; }
.cad-incident-badge--scheduled { background: rgba(29, 78, 216, 0.85); border-color: #bfdbfe; }
.cad-incident-badge--panic { background: #dc2626; border-color: #fecaca; }
.cad-incident-badge--closed { background: rgba(15, 23, 42, 0.55); }
.cad-incident-panic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.7rem 1rem;
  background: #7f1d1d;
  color: #fff;
  font-weight: 800;
  border-radius: var(--mdt-radius, 8px);
}
.cad-incident__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
}
.cad-incident__side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.cad-incident-card { padding: 0; overflow: hidden; }
.cad-incident-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--royal) 100%);
  color: #fff;
}
.cad-incident-card__head h2 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  border: 0;
  padding: 0;
}
.cad-incident-card__meta {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cad-incident-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0;
  padding: 1rem 1.05rem;
  border-bottom: 1px solid var(--border);
}
.cad-incident-kv dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.cad-incident-kv dd {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.cad-incident-notes,
.cad-incident-unit-actions,
.cad-incident-control {
  padding: 1rem 1.05rem;
  border-bottom: 1px solid var(--border);
}
.cad-incident-control {
  border-bottom: 0;
  background: #f8fafc;
}
.cad-incident-notes h3,
.cad-incident-unit-actions h3,
.cad-incident-control h3 {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.cad-incident-notes p {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.cad-incident-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
.cad-unit-status-btn {
  appearance: none;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #1a2332;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
}
.cad-unit-status-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.cad-unit-status-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.cad-unit-status-btn--panic,
.cad-unit-status-btn.mdt-status-btn--panic {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}
.cad-incident-help {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.cad-incident-control__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-end;
}
.cad-incident-control__label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 180px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.cad-incident-control__label select {
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: #fff;
}
.cad-incident-control__close {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.cad-incident-btn--danger-solid {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
  font-weight: 700;
}
.cad-incident-btn--danger-solid:hover {
  background: #991b1b;
  color: #fff;
}
.cad-incident-units { padding: 0.85rem 1.05rem 1rem; }
.cad-incident-unit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.45rem;
  background: #fff;
}
.cad-incident-unit strong { font-size: 0.9rem; }
.cad-incident-unit span { font-size: 0.78rem; color: var(--muted); }
.cad-incident-unit__status {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  font-weight: 800 !important;
  color: var(--navy) !important;
  text-transform: uppercase;
  font-size: 0.68rem !important;
  letter-spacing: 0.04em;
}
.cad-incident-card--remarks {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}
.cad-incident-remarks {
  flex: 1;
  min-height: 220px;
  max-height: 420px;
  margin: 0;
  border-radius: 0;
}
.cad-incident-remark-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem 1.05rem 1rem;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}
.cad-incident-remark-form textarea {
  flex: 1;
  min-width: 0;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font: inherit;
  resize: vertical;
}
.cad-incident.is-panic .cad-incident-card {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.35);
}
@media (max-width: 960px) {
  .cad-incident__layout { grid-template-columns: 1fr; }
  .cad-incident-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cad-incident-kv { grid-template-columns: 1fr; }
}

/* ?? ANPR ?? */
.anpr-shell .anpr-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}
.anpr-stat {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.anpr-stat__value {
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f2744;
  line-height: 1.1;
}
.anpr-stat__label {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.anpr-alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.anpr-alert {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-left: 5px solid #64748b;
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
}
.anpr-alert:hover { background: #f8fafc; }
.anpr-alert--critical { border-left-color: #b91c1c; background: #fff7f7; }
.anpr-alert--high { border-left-color: #c2410c; background: #fffaf5; }
.anpr-alert--medium { border-left-color: #b45309; }
.anpr-alert--low { border-left-color: #0369a1; }
.anpr-alert--information { border-left-color: #64748b; }
.anpr-alert__plate {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0f2744;
}
.anpr-alert__meta { margin-top: 0.15rem; color: #1e293b; }
.anpr-alert__sub { margin-top: 0.15rem; color: #64748b; font-size: 0.9rem; }
.anpr-notice {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  color: #334155;
  margin: 0 0 1rem;
}
.anpr-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}
.anpr-form-grid label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; color: #0f2744; }
.anpr-form-grid .anpr-check { flex-direction: row; align-items: center; font-weight: 500; }
.anpr-form-grid > div:last-child { grid-column: 1 / -1; }
.anpr-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
}
.anpr-pill--on { background: #dcfce7; color: #166534; }
.anpr-pill--off { background: #fee2e2; color: #991b1b; }
.anpr-marker-list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.anpr-marker {
  border: 1px solid #e2e8f0;
  border-left: 4px solid #64748b;
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  background: #fff;
}
.anpr-marker--critical { border-left-color: #b91c1c; }
.anpr-marker--high { border-left-color: #c2410c; }
.anpr-marker span { display: block; color: #64748b; font-size: 0.85rem; margin-top: 0.1rem; }
.anpr-marker p { margin: 0.35rem 0; color: #334155; }
@media (max-width: 960px) {
  .anpr-shell .anpr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .anpr-form-grid { grid-template-columns: 1fr; }
}
