/*
  Bus Aachooki brand layer on top of Bootstrap 5: the premium minimal palette shared with the agency website.
  White and #F7F9FC surfaces, navy for headings and important text, blue for actions, links and active navigation, orange only for one key
  highlight. No dark page backgrounds or full-page gradients. The blinking eyes are in brand-eyes.css.
*/

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Syncopate";
  src: url("../fonts/Syncopate-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* The same colours as the mobile app. See docs/brand.md. */
:root {
  --brand-navy: #071B35;
  --brand-navy-soft: #10294A;
  --brand-navy-lift: #123A70;
  --brand-blue: #0866F5;
  --brand-blue-dark: #0655CC;
  --brand-orange: #FF8A00;
  --brand-orange-dark: #E67C00;
  --brand-blue-light: #EAF2FF;
  --brand-border: #E8EDF3;
  --brand-secondary-text: #718096;
  --brand-success: #198754;
  --brand-warning: #E6A23C;
  --brand-error: #DC3545;
  --surface: #FFFFFF;
  --surface-muted: #F7F9FC;
  --border-soft: var(--brand-border);
  --border-input: #7E8EA6;
  --text-strong: #071B35;
  /* #718096 is 4.0:1 on white, too faint for small text, so small secondary text stays at this AA-compliant shade. */
  --text-muted: #4F5F78;
  --tint: var(--brand-blue-light);
  --tint-text: #0B4FB8;
  --notice: #FFF1DE;
  --notice-text: #7A4600;
  --radius: 0.75rem;
  --sidebar-width: 15.5rem;
  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --bs-border-color: var(--brand-border);
  --bs-body-bg: var(--surface-muted);
  --bs-body-color: var(--text-strong);
  --bs-link-color: var(--brand-blue);
  --bs-primary: var(--brand-blue);
  --bs-primary-rgb: 8, 102, 245;
  --bs-link-color-rgb: 8, 102, 245;
  --bs-link-hover-color: var(--brand-blue-dark);
  --bs-link-hover-color-rgb: 6, 85, 204;
  --bs-secondary-color: var(--text-muted);
}

html, body { height: 100%; }

.text-secondary { color: var(--text-muted) !important; }
.text-bg-primary { background-color: var(--brand-blue) !important; }

body { display: flex; flex-direction: column; min-height: 100%; }

h1, h2, h3, .h3, .h5, .h6 { color: var(--text-strong); font-weight: 650; letter-spacing: -0.01em; }

/* Orange is too faint to mark focus on a light page, and blue too dark on navy. */
:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; }
.topbar :focus-visible, .hero :focus-visible { outline-color: var(--brand-blue); }

#main-content:focus, .sidebar:focus, .sidebar:focus-visible { outline: none; }

.dropdown-menu { --bs-dropdown-link-active-bg: var(--brand-blue); }

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 2000;
  background: var(--surface);
  color: var(--text-strong);
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
}
.skip-link:focus { top: 0.5rem; }

/* Buttons */
.btn-primary {
  --bs-btn-bg: var(--brand-blue);
  --bs-btn-border-color: var(--brand-blue);
  --bs-btn-hover-bg: var(--brand-blue-dark);
  --bs-btn-hover-border-color: var(--brand-blue-dark);
  --bs-btn-active-bg: var(--brand-blue-dark);
  --bs-btn-active-border-color: var(--brand-blue-dark);
  --bs-btn-disabled-bg: var(--brand-blue);
  --bs-btn-disabled-border-color: var(--brand-blue);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand-blue);
  --bs-btn-border-color: var(--brand-blue);
  --bs-btn-hover-bg: var(--brand-blue);
  --bs-btn-hover-border-color: var(--brand-blue);
  --bs-btn-active-bg: var(--brand-blue-dark);
  --bs-btn-active-border-color: var(--brand-blue-dark);
}
.btn-accent {
  --bs-btn-color: var(--brand-navy);
  --bs-btn-bg: var(--brand-orange);
  --bs-btn-border-color: var(--brand-orange);
  --bs-btn-hover-color: var(--brand-navy);
  --bs-btn-hover-bg: var(--brand-orange-dark);
  --bs-btn-hover-border-color: var(--brand-orange-dark);
  --bs-btn-active-color: var(--brand-navy);
  --bs-btn-active-bg: var(--brand-orange-dark);
  --bs-btn-active-border-color: var(--brand-orange-dark);
  font-weight: 600;
}

/* Top bar: white, with the eyes top-left (brand-eyes.css). Its height puts the eyes exactly their offset from the top and sides:
   12 + 22 + 12 on phones, 16 + 28 + 16 from 768px, plus any safe area. */
.topbar { background: rgba(255, 255, 255, 0.96); color: var(--text-strong); border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 1030; backdrop-filter: saturate(180%) blur(10px); }
.topbar-inner {
  display: flex; align-items: center; gap: 0.75rem;
  height: calc(var(--ba-eye-size) + 2 * var(--ba-eye-offset) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) calc(var(--ba-eye-offset) + env(safe-area-inset-right, 0px)) 0 calc(var(--ba-eye-offset) + env(safe-area-inset-left, 0px));
}
.brand { display: inline-flex; flex: none; align-items: center; text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; min-width: 0; }
.topbar-link { color: var(--text-strong); font-weight: 600; text-decoration: none; padding: 0.375rem 0.5rem; white-space: nowrap; }
.topbar-link:hover { color: var(--brand-blue); }
.topbar-button, .topbar-icon-button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--surface);
  color: var(--text-strong);
  border: 1px solid var(--border-soft);
  border-radius: 0.5rem;
  padding: 0.375rem 0.625rem;
  min-height: 2.5rem;
  max-width: 100%;
}
@media (max-width: 767.98px) { .topbar-button, .topbar-icon-button { min-height: 2.25rem; } }
.topbar-button:hover, .topbar-icon-button:hover, .topbar-button[aria-expanded="true"] { background: var(--surface-muted); border-color: #D6DEE8; }
.topbar-bell { position: relative; text-decoration: none; }
.topbar-bell:hover, .topbar-bell:focus { color: var(--text-strong); }
.topbar-badge { position: absolute; top: -0.375rem; right: -0.375rem; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3125rem; border-radius: 999px; background: var(--brand-orange); color: #0B1B33; font-size: 0.75rem; font-weight: 700; line-height: 1.25rem; text-align: center; }
.notification-unread { border-left: 4px solid var(--brand-blue); padding-left: 0.75rem; }
.notification-preferences th, .notification-preferences td { text-align: center; vertical-align: middle; }
.notification-preferences th:first-child, .notification-preferences td:first-child { text-align: left; }
.topbar-truncate { display: inline-block; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 1.125rem; height: 2px; background: var(--text-strong); }
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }

/* Frame */
.app-frame { display: flex; flex: 1 0 auto; min-width: 0; }
.app-content { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.app-content main { flex: 1 0 auto; }
.app-content .container-xxl { padding-inline: 1rem; }
@media (min-width: 992px) { .app-content .container-xxl { padding-inline: 1.75rem; } }
.app-footer { color: var(--text-muted); border-top: 1px solid var(--border-soft); padding: 1rem 0; font-size: 0.875rem; }

/* Sidebar */
.sidebar { --bs-offcanvas-width: 17.5rem; background: var(--surface); }
.sidebar-heading {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.25rem 0 0.375rem;
  padding: 0 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-list { list-style: none; margin: 0; padding: 0; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--text-strong);
  text-decoration: none;
  min-height: 2.5rem;
}
.sidebar-link:hover { background: var(--surface-muted); color: var(--text-strong); }
.sidebar-link.active { background: var(--tint); color: var(--tint-text); font-weight: 600; }
.sidebar .offcanvas-body { display: block; padding: 1rem 0.75rem; }

@media (min-width: 992px) {
  .sidebar { flex: 0 0 var(--sidebar-width); width: var(--sidebar-width); border-right: 1px solid var(--border-soft); }
  .sidebar .offcanvas-body { position: sticky; top: 3.75rem; max-height: calc(100vh - 3.75rem); overflow-y: auto; }
}

/* Icons */
.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Page furniture */
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.625rem; margin: 0; overflow-wrap: anywhere; }
.page-eyebrow { color: var(--text-muted); font-size: 0.875rem; font-weight: 600; margin: 0 0 0.125rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.625rem; margin-bottom: 0.75rem; }
.role-list { display: flex; flex-wrap: wrap; gap: 0.375rem; list-style: none; margin: 0; padding: 0; }
.role-chip, .status-chip { background: var(--tint); color: var(--tint-text); border-radius: 999px; padding: 0.1875rem 0.75rem; font-size: 0.8125rem; font-weight: 600; }

.panel { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 1.25rem; }

.detail-list { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: 0.5rem 1rem; }
.detail-list dt { color: var(--text-muted); font-weight: 500; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.permission-list { font-size: 0.875rem; color: var(--text-muted); }
@media (max-width: 575.98px) {
  .detail-list { grid-template-columns: 1fr; gap: 0.125rem; }
  .detail-list dd { margin-bottom: 0.625rem; }
}

/* Management screens */
.form-panel { max-width: 44rem; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.filter-grow { flex: 1 1 14rem; min-width: 0; }
.form-select { min-height: 2.75rem; border-color: var(--border-input); }
.row-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border-soft); overflow-wrap: anywhere; }
.row-item:last-child { border-bottom: 0; }
.row-item > div:first-child { flex: 1 1 14rem; min-width: 0; }
.document-review { border-bottom: 1px solid var(--border-soft); }
.document-review:last-child { border-bottom: 0; }
.document-review .row-item { border-bottom: 0; }
.status-forms { display: grid; gap: 1rem; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.panel > form + form { margin-top: 0.75rem; }
.stops-table input { min-width: 6.5rem; }
.stops-table td:first-child input { min-width: 11rem; }

/* Module cards */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 0.875rem; }
.module-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 0.875rem;
  row-gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text-strong);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.module-card:hover { border-color: var(--brand-blue); box-shadow: 0 4px 14px rgba(7, 27, 53, 0.09); color: var(--text-strong); }
.module-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 0.625rem; background: var(--tint); color: var(--tint-text); }
.module-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.module-title { font-weight: 600; }
.module-description { color: var(--text-muted); font-size: 0.875rem; }
.module-badge { grid-column: 2; justify-self: start; background: var(--notice); color: var(--notice-text); border-radius: 999px; padding: 0.0625rem 0.5rem; font-size: 0.75rem; font-weight: 600; }

/* Empty and error states */
.empty-state { background: var(--surface); border: 1px dashed var(--border-input); border-radius: var(--radius); padding: 2.5rem 1.5rem; text-align: center; max-width: 40rem; margin: 2rem auto; }
.empty-state-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--tint); color: var(--tint-text); margin-bottom: 0.75rem; }
.todo-marker { background: var(--notice); color: var(--notice-text); border-radius: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500; }

/* Sign-in forms */
.auth-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 2rem; max-width: 26rem; margin: 2rem auto; box-shadow: 0 8px 28px rgba(7, 27, 53, 0.07); }
.form-control { min-height: 2.75rem; background-color: var(--surface); border-color: var(--border-input); }
.form-control:focus { background-color: var(--surface); border-color: var(--brand-blue); box-shadow: 0 0 0 0.2rem rgba(8, 102, 245, 0.2); }
.validation-summary-valid { display: none; }
.validation-summary-errors ul { list-style: none; margin: 0; padding: 0; }
.input-validation-error { border-color: var(--bs-danger); }

/* Home */
/* A light panel, not a dark block: navy heading, blue eyebrow, muted lead. */
.hero { background: var(--surface); color: var(--text-strong); border: 1px solid var(--border-soft); border-radius: 1rem; padding: 3.5rem 2.5rem; box-shadow: 0 1px 2px rgba(7, 27, 53, 0.04); }
.hero h1 { color: var(--text-strong); font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1rem; }
.hero-text { max-width: 40rem; }
.hero-eyebrow { color: var(--brand-blue); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.5rem; }
.hero-lead { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 1.75rem; }
@media (max-width: 519.98px) {
  .topbar-inner { gap: 0.5rem; padding-inline: 0.75rem; }
  .topbar-truncate { max-width: 8rem; }
  .role-list { width: 100%; }
}
/* The menu button, eyes, agency switcher and account menu only fit side by side if long agency names are cut shorter. */
@media (max-width: 399.98px) {
  .topbar-truncate { max-width: 5rem; }
}
@media (max-width: 575.98px) {
  .hero { padding: 2.25rem 1.5rem; }
  .auth-card { padding: 1.5rem; margin: 0.5rem auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0.01ms !important; }
}

/* Live tracking. Each state has its own words and shape, not just a colour. */
.tracking-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.tracking-pill { display: inline-flex; align-items: center; gap: 0.375rem; border-radius: 999px; padding: 0.1875rem 0.75rem; font-size: 0.875rem; font-weight: 600; border: 2px solid transparent; }
.tracking-pill::before { content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: currentColor; }
.tracking-pill-live { background: #E3F6EA; color: #0B5E2E; }
.tracking-pill-delayed { background: var(--notice); color: var(--notice-text); }
.tracking-pill-stale { background: var(--surface); color: var(--text-muted); border-color: var(--border-input); border-style: dashed; }
.tracking-pill-stale::before { background: transparent; border: 2px dashed currentColor; }
.tracking-pill-unavailable { background: #ECEFF4; color: var(--text-muted); }
.tracking-pill-unavailable::before { border-radius: 0; height: 0.1875rem; }
.tracking-simulated { background: var(--notice); color: var(--notice-text); border: 1px solid var(--brand-orange-dark); border-radius: 0.375rem; padding: 0.125rem 0.5rem; font-size: 0.8125rem; font-weight: 600; }
.tracking-connection { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.tracking-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: 1rem; align-items: start; }
.tracking-map { height: 32rem; min-height: 20rem; border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--surface); }
.tracking-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 1rem; }
.tracking-details dt { font-weight: 600; }
.tracking-details dd { margin: 0; overflow-wrap: anywhere; }
.tracking-stops { padding-left: 1.25rem; }
.tracking-stops li { padding: 0.125rem 0; overflow-wrap: anywhere; }
@media (max-width: 62rem) { .tracking-layout { grid-template-columns: minmax(0, 1fr); } .tracking-map { height: 24rem; } }

/* Seat maps and bookings. A seat is a real checkbox, so it works with a keyboard and without scripts; taken seats are crossed out, not just greyed. */
.seat-decks { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.seat-deck { border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 0.75rem; min-width: 0; }
.seat-deck legend { float: none; width: auto; padding: 0 0.25rem; margin: 0; }
.seat-map { border-collapse: separate; border-spacing: 0.375rem; }
.seat-map td { padding: 0; width: 2.75rem; height: 2.75rem; text-align: center; vertical-align: middle; }
.seat-map .seat-aisle { width: 1.25rem; }
.seat-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seat { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border: 2px solid var(--border-input); border-radius: 0.5rem; background: var(--surface); font-size: 0.8125rem; font-weight: 600; cursor: pointer; user-select: none; }
.seat-sleeper { height: 3.75rem; }
.seat-taken { background: #ECEFF4; color: var(--text-muted); border-style: dashed; cursor: not-allowed; text-decoration: line-through; }
.seat-input:checked + .seat, .seat-chosen { background: var(--brand-blue); border-color: var(--brand-blue-dark); color: #FFFFFF; }
.seat-input:focus-visible + .seat { outline: 3px solid var(--brand-orange); outline-offset: 2px; }
.seat-key { width: 1rem; height: 1rem; vertical-align: middle; cursor: default; }
.status-chip-sandbox { background: var(--notice); color: var(--notice-text); border: 1px solid var(--brand-orange-dark); margin-left: 0.375rem; }
.status-chip-booking-confirmed { background: #E3F6EA; color: #0B5E2E; }
.status-chip-booking-pending { background: var(--notice); color: var(--notice-text); }
.status-chip-booking-failed, .status-chip-booking-cancelled { background: #ECEFF4; color: var(--text-muted); }
.sandbox-payment { border: 2px dashed var(--brand-orange-dark); border-radius: var(--radius); padding: 1rem; background: var(--notice); }

/* Plans and subscriptions. A plan card lists every feature, with what it includes ticked and what it doesn't crossed out in words, not just colour. */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.plan-card { display: flex; flex-direction: column; gap: 0.75rem; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 1.25rem; min-width: 0; }
.plan-card-current { border: 2px solid var(--brand-blue); }
.plan-price { font-size: 1.5rem; font-weight: 700; margin: 0; }
.plan-features { list-style: none; padding: 0; margin: 0; }
.plan-features li { padding: 0.125rem 0; overflow-wrap: anywhere; }
.plan-feature-missing { color: var(--text-muted); text-decoration: line-through; }
.plan-card form { margin-top: auto; }
.status-chip-subscription-active, .status-chip-subscription-trialing { background: #E3F6EA; color: #0B5E2E; }
.status-chip-subscription-pastdue, .status-chip-subscription-cancelled { background: var(--notice); color: var(--notice-text); }
.status-chip-subscription-suspended, .status-chip-subscription-expired, .status-chip-subscription-none { background: #ECEFF4; color: var(--text-muted); }

/* Reports. Tiles wrap to one column on a phone; the tabs scroll sideways rather than widen the page. */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 0.75rem; }
.stat-tile { display: flex; flex-direction: column; gap: 0.25rem; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 0.875rem 1rem; min-width: 0; }
.stat-value { font-size: 1.375rem; font-weight: 700; overflow-wrap: anywhere; }
.stat-label { color: var(--text-muted); font-size: 0.875rem; }
.report-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 0.25rem; }
.report-tabs .nav-link { white-space: nowrap; }
.report-table th, .report-table td { white-space: nowrap; }

/* Public pages. The search comes first; everything wraps to one column on a phone, and the menu scrolls sideways rather than widen the page. */
.public-nav { background: var(--surface); border-top: 1px solid var(--border-soft); }
.public-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0 auto; padding: 0 max(1rem, env(safe-area-inset-left, 0px)); max-width: 1320px; overflow-x: auto; }
.public-nav a { display: block; color: var(--text-muted); font-weight: 550; text-decoration: none; padding: 0.55rem 0.75rem; white-space: nowrap; border-bottom: 2px solid transparent; }
.public-nav a:hover { color: var(--text-strong); }
.public-nav a[aria-current="page"] { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }
.search-hero { background: var(--surface); color: var(--text-strong); border: 1px solid var(--border-soft); border-radius: 1rem; padding: 2.75rem 2rem; box-shadow: 0 1px 2px rgba(7, 27, 53, 0.04); }
.search-hero h1 { color: var(--text-strong); font-size: clamp(1.75rem, 4.5vw, 2.75rem); line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 0.75rem; }
.search-hero .hero-lead { margin-bottom: 1.25rem; }
.search-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 46rem; }
.search-bar .form-control { flex: 1 1 16rem; min-width: 0; }
.search-bar-secondary { margin-top: 0.75rem; max-width: 34rem; }
.search-bar-panel { max-width: none; }
.info-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0.75rem; margin-top: 1rem; }
.info-strip > div { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 0.875rem 1rem; color: var(--text-muted); font-size: 0.9375rem; }
.info-strip-title { display: block; color: var(--text-strong); font-weight: 700; }
.agency-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0.875rem; }
.agency-card { display: flex; gap: 0.875rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 1rem; color: inherit; text-decoration: none; min-width: 0; }
.agency-card:hover, .agency-card:focus-visible { border-color: var(--brand-blue); box-shadow: 0 0.25rem 0.75rem rgba(7, 27, 53, 0.08); }
.agency-card-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.agency-card-name { font-weight: 700; color: var(--text-strong); overflow-wrap: anywhere; }
.agency-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; margin-top: 0.25rem; }
.initials-badge { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 0.75rem; background: var(--brand-navy); color: #fff; font-weight: 700; letter-spacing: 0.04em; border-bottom: 3px solid var(--brand-orange); }
.initials-badge-lg { width: 4rem; height: 4rem; font-size: 1.375rem; }
.verified-chip { display: inline-flex; align-items: center; gap: 0.25rem; background: #E3F6EA; color: #0B5E2E; border-radius: 999px; padding: 0.125rem 0.625rem; font-size: 0.8125rem; font-weight: 600; }
.verified-chip::before { content: "\2713"; }
.reference-number { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.5rem; font-weight: 700; color: var(--brand-navy); letter-spacing: 0.04em; }
.setup-link-panel { border-color: var(--brand-orange); background: var(--notice); }
.status-chip-registration-approved, .status-chip-registration-activated { background: #E3F6EA; color: #0B5E2E; }
.status-chip-registration-rejected { background: #FDE7E7; color: #8A1C1C; }
.status-chip-registration-pending { background: var(--notice); color: var(--notice-text); }
@media (max-width: 575.98px) {
  .search-hero { padding: 2rem 1.25rem; }
}

/* The public front camera beside the tracking map: a calm 16:9 frame that never overflows the page. */
.camera-frame { background: #F4F6FA; border-radius: 0.75rem; overflow: hidden; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; padding: 0.5rem; }
.camera-picture { display: block; width: 100%; height: 100%; object-fit: contain; }
