:root {
  --blue: #004a99;
  --blue-dark: #003b7a;
  --red: #e30613;
  --green: #4caf50;
  --yellow-green: #c6d600;
  --setrag-yellow: #e4b11a;
  --text: #263238;
  --muted: #687381;
  --line: #dce3ea;
  --bg: #f5f7fa;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(23, 41, 77, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  background: var(--setrag-yellow);
  border-bottom: 1px solid #b78d10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand span {
  display: block;
  color: #344000;
  font-size: 0.82rem;
}

.logo-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  flex: 0 0 46px;
}

.logo-mark img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.api-status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff7e6;
  color: #8a5a00;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.api-status.online {
  background: #eaf6ed;
  color: #1b6b31;
}

.api-status.offline {
  background: #fff0f0;
  color: #b00020;
}

.session-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.session-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.session-label select {
  min-height: 34px;
  width: 132px;
  padding: 0 8px;
}

.session-button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: var(--blue);
  color: var(--white);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.session-button.muted-button {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
}

.session-status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab,
.secondary,
.primary,
.danger {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 700;
}

.tab {
  background: transparent;
  color: #263000;
}

.tab.active {
  background: var(--blue);
  color: var(--white);
}

.primary {
  background: var(--red);
  color: var(--white);
}

.secondary {
  background: var(--blue);
  color: var(--white);
}

.danger {
  background: #fff0f0;
  color: #b00020;
  border: 1px solid #ffc6c6;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 60px;
}

.page-context {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto -8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.page-context span:first-child::after { content: " /"; }
.page-context strong { color: var(--text); }
#access-mode-badge { margin-left: auto; padding: 6px 10px; border-radius: 999px; background: #fff7dd; color: #765500; font-weight: 800; }

.access-dialog { width: min(520px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.access-dialog::backdrop { background: rgba(0, 33, 67, .62); backdrop-filter: blur(3px); }
.access-card { position: relative; display: grid; gap: 14px; padding: 30px; }
.access-card h2, .access-card p { margin: 0; }
.access-logo { width: 64px; height: 64px; object-fit: contain; }
.dialog-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); font-size: 1.5rem; cursor: pointer; }
.access-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.access-actions button { flex: 1 1 190px; }
.access-card small { color: var(--muted); }

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 24px;
  align-items: end;
  padding: 34px;
  min-height: 280px;
  background:
    linear-gradient(120deg, rgba(0, 74, 153, 0.95), rgba(0, 59, 122, 0.85)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0 8px, transparent 8px 18px);
  color: var(--white);
  border-radius: 8px;
  overflow: hidden;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-panel {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-left: 5px solid var(--setrag-yellow);
  background: rgba(255, 255, 255, 0.12);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.hero .eyebrow {
  color: var(--setrag-yellow);
}

.search-grid,
.booking-layout,
.split,
.admin-grid {
  display: grid;
  gap: 16px;
}

.search-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  align-items: end;
  margin-top: -26px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.84rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.section,
.module-header {
  margin-top: 28px;
}

.section-head,
.module-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

.results,
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.train-card,
.form-card,
.summary-card,
.admin-card,
.support-card,
.scan-result {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.train-card {
  display: grid;
  gap: 14px;
}

.train-meta,
.price-line,
.ticket-details,
.compact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.price-line strong {
  color: var(--blue);
  font-size: 1.2rem;
}

.booking-layout,
.split {
  grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1.1fr);
}

.form-card {
  display: grid;
  gap: 14px;
}

.form-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.count-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff7df;
  color: #725300;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.passenger-details {
  display: grid;
  gap: 12px;
}

.passenger-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--setrag-yellow);
  border-radius: 8px;
  background: var(--bg);
}

.passenger-card h4 {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--blue-dark);
}

.cargo-section {
  display: grid;
  gap: 14px;
  margin: 4px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cargo-section legend {
  padding: 0 8px;
  color: var(--blue-dark);
  font-weight: 800;
}

.cargo-details,
.cargo-grid {
  display: grid;
  gap: 12px;
}

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

.controller-price-note {
  margin: 0;
  padding: 12px;
  border-left: 4px solid var(--setrag-yellow);
  background: #fff9e8;
  color: #5c470e;
  font-size: 0.86rem;
}

.summary-card {
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.summary-row.total {
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 800;
  border-bottom: 0;
}

.seat-map {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.seat-map-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.seat-map-head strong {
  color: var(--blue);
}

.seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 6px;
  max-height: 190px;
  overflow: auto;
}

.seat-button {
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  font-weight: 800;
  padding: 0;
}

.seat-button.selected {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.ticket {
  position: relative;
  display: grid;
  gap: 0;
  min-height: 310px;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 74, 153, 0.04), transparent 52%),
    linear-gradient(45deg, transparent 0 42%, rgba(111, 76, 160, 0.08) 42% 48%, transparent 48% 100%),
    var(--white);
  border: 1px solid #aeb8c2;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(23, 41, 77, 0.08);
}

.ticket-watermark {
  position: absolute;
  left: 8%;
  bottom: 12%;
  color: rgba(0, 74, 153, 0.07);
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: 0;
  transform: rotate(-12deg);
  pointer-events: none;
}

.ticket-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr minmax(230px, 300px);
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid #aeb8c2;
  padding-bottom: 8px;
  z-index: 1;
}

.ticket-logo {
  width: min(100%, 205px);
  height: 76px;
  object-fit: contain;
  object-position: left center;
}

.ticket-route-box,
.ticket-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.ticket-route-box strong,
.ticket-meta strong {
  margin-left: 8px;
  color: var(--text);
  font-size: 0.86rem;
}

.ticket-client {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 190px 1fr;
  border-bottom: 1px solid #aeb8c2;
  color: var(--muted);
  font-size: 0.75rem;
}

.ticket-client span,
.ticket-client strong {
  padding: 8px;
}

.ticket-client strong {
  color: var(--text);
}

.ticket-grid-lines,
.ticket-placement,
.ticket-payment-line,
.ticket-total-box {
  position: relative;
  z-index: 1;
  display: grid;
  border-left: 1px solid #aeb8c2;
  border-right: 1px solid #aeb8c2;
}

.ticket-grid-lines {
  grid-template-columns: 70px 1fr 70px 1fr 92px 1fr 58px 1fr;
  border-top: 1px solid #aeb8c2;
}

.ticket-placement,
.ticket-payment-line {
  grid-template-columns: 190px 1fr 1fr 1fr;
}

.ticket-total-box {
  justify-self: end;
  width: min(100%, 340px);
  grid-template-columns: 1fr 150px;
}

.ticket-grid-lines span,
.ticket-grid-lines strong,
.ticket-placement span,
.ticket-placement strong,
.ticket-payment-line span,
.ticket-payment-line strong,
.ticket-total-box span,
.ticket-total-box strong {
  min-height: 34px;
  padding: 8px;
  border-bottom: 1px solid #aeb8c2;
  font-size: 0.78rem;
}

.ticket-grid-lines span,
.ticket-placement span,
.ticket-payment-line span,
.ticket-total-box span {
  color: var(--muted);
  font-weight: 800;
}

.ticket-grid-lines strong,
.ticket-placement strong,
.ticket-payment-line strong,
.ticket-total-box strong {
  color: var(--text);
}

.ticket-control,
.ticket-signature,
.ticket-actions,
.ticket-security {
  position: relative;
  z-index: 1;
}

.ticket-signature {
  padding: 10px;
  background: var(--bg);
  border-radius: 6px;
  color: var(--muted);
  font-family: Consolas, Monaco, monospace;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.ticket-control {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ticket-actions button {
  min-height: 36px;
  font-size: 0.84rem;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.support-card {
  display: grid;
  gap: 10px;
}

.support-card h4,
.support-card p {
  margin: 0;
}

.support-card p {
  color: var(--muted);
}

.support-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.support-row {
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.support-row small {
  color: var(--muted);
  width: 100%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(0, 74, 153, 0.09);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.danger-pill {
  background: rgba(227, 6, 19, 0.1);
  color: var(--red);
}

.audit-list {
  max-height: 420px;
  overflow: auto;
}

.audit-row {
  align-items: center;
  border-left: 4px solid rgba(0, 74, 153, 0.22);
}

.audit-row small {
  color: var(--muted);
  width: 100%;
}

.readiness-ready {
  border-left: 4px solid var(--green);
}

.readiness-ready span {
  color: #1f7a3f;
}

.readiness-warning {
  border-left: 4px solid #d68a00;
}

.readiness-warning span {
  color: #9a6500;
}

.readiness-blocked {
  border-left: 4px solid var(--red);
}

.readiness-blocked span {
  color: var(--red);
}

.ticket-security,
.muted {
  color: var(--muted);
}

.qr {
  width: 112px;
  height: 112px;
  border: 6px solid var(--white);
  box-shadow: 0 0 0 1px var(--line);
}

.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.kpi-card,
.status-strip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.kpi-card {
  padding: 16px;
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 1.55rem;
}

.status-strip {
  padding: 12px;
  color: var(--muted);
}

.admin-card {
  min-height: 220px;
}

.admin-editor {
  border-top: 5px solid var(--blue);
}

.admin-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.compact-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.compact-row {
  justify-content: space-between;
  padding: 10px;
  background: var(--bg);
  border-radius: 6px;
}

.scan-result.valid {
  border-color: #3aa655;
}

.scan-result.invalid {
  border-color: var(--red);
}

.hidden {
  display: none;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs {
    justify-content: flex-start;
  }

  .session-box {
    justify-content: flex-start;
  }

  .hero,
  .search-grid,
  .booking-layout,
  .split {
    grid-template-columns: 1fr;
  }

  .search-grid {
    margin-top: 16px;
  }

  .ticket-head {
    grid-template-columns: 1fr;
  }

  .ticket-grid-lines {
    grid-template-columns: 110px 1fr 110px 1fr;
  }

  .ticket-placement,
  .ticket-payment-line {
    grid-template-columns: 150px 1fr;
  }

  .ticket-total-box {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    padding: 24px 18px;
  }

  .passenger-card,
  .cargo-grid {
    grid-template-columns: 1fr;
  }

  .tab {
    flex: 1 1 auto;
  }

  .ticket {
    padding: 10px;
  }

  .ticket-watermark {
    font-size: 3rem;
  }

  .ticket-client,
  .ticket-grid-lines,
  .ticket-placement,
  .ticket-payment-line,
  .ticket-total-box,
  .ticket-control {
    grid-template-columns: 1fr;
  }

  .ticket-logo {
    height: 64px;
  }
}

/* Présentation institutionnelle — démonstration client */
body {
  background: #f2f5f8;
  color: #172333;
}

.institutional-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: #002f63;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.institutional-label {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  color: var(--setrag-yellow);
  white-space: nowrap;
}

.station-ticker {
  position: relative;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.station-ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: station-scroll 30s linear infinite;
  will-change: transform;
}

.station-ticker-track span {
  padding: 0 16px;
  color: #fff;
  white-space: nowrap;
}

.station-ticker-track i {
  color: var(--setrag-yellow);
  font-size: 0.46rem;
  font-style: normal;
}

.institutional-bar:hover .station-ticker-track { animation-play-state: paused; }

@keyframes station-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .station-ticker { overflow-x: auto; mask-image: none; }
  .station-ticker-track { animation: none; }
  .station-ticker-track [aria-hidden="true"] { display: none; }
}

.topbar {
  display: block;
  padding: 0;
  background: #fff;
  border: 0;
  border-top: 5px solid var(--setrag-yellow);
  box-shadow: 0 3px 18px rgba(16, 40, 68, 0.08);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
}

.brand-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.brand strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.18rem;
  letter-spacing: 0.08em;
}

.brand span { color: #5e6d7d; }
.logo-mark { width: 52px; height: 52px; flex-basis: 52px; border: 0; }
.logo-mark img { width: 48px; height: 48px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.secure-label {
  color: #496071;
  font-size: 0.8rem;
  font-weight: 750;
}

.secure-label::before {
  content: "✓";
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  background: #e5f4e9;
  color: #237a3d;
}

.professional-access {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cad6e2;
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.technical-session,
.topbar > .api-status { display: none; }

.tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: min(1180px, calc(100% - 32px));
  min-height: 52px;
  margin: 0 auto;
  border-top: 1px solid #e4eaf0;
}

.tab {
  position: relative;
  min-height: 51px;
  border-radius: 0;
  color: #354a5d;
}

.tab:hover { color: var(--blue); background: #f5f8fb; }
.tab.active { background: transparent; color: var(--blue); }
.tab.active::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--setrag-yellow);
}

.staff-menu { position: relative; margin-left: auto; }
.staff-menu summary {
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 7px;
  background: #edf3f8;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  list-style: none;
}
.staff-menu summary::-webkit-details-marker { display: none; }
.staff-menu summary::after { content: "⌄"; margin-left: 9px; }
.staff-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  width: 230px;
  padding: 8px;
  border: 1px solid #dce5ed;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(14, 43, 73, 0.2);
}
.staff-tab { min-height: 42px; border-radius: 6px; text-align: left; }
.staff-tab.active { background: #edf4fb; }
.staff-tab.active::after { display: none; }

.page-context { margin-top: 14px; margin-bottom: -4px; }
#access-mode-badge { background: #eaf5ec; color: #246d39; }

main { padding-top: 22px; }

.hero {
  position: relative;
  min-height: 390px;
  align-items: center;
  padding: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 25%, rgba(228, 177, 26, 0.38), transparent 23%),
    linear-gradient(125deg, rgba(0, 42, 88, 0.99), rgba(0, 74, 153, 0.88)),
    repeating-linear-gradient(35deg, rgba(255,255,255,.08) 0 3px, transparent 3px 22px);
  box-shadow: 0 24px 60px rgba(0, 57, 119, 0.2);
}

.hero::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: 34px;
  width: 47%;
  height: 5px;
  border: 7px double rgba(255,255,255,.22);
  border-right: 0;
  border-left: 0;
  transform: rotate(-7deg);
}

.hero-copy, .hero-panel { position: relative; z-index: 1; }
.hero h1 {
  max-width: 650px;
  font-size: clamp(2.6rem, 5.7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.hero-copy > p:not(.eyebrow) { max-width: 620px; font-size: 1.08rem; line-height: 1.65; }
.hero-reassurance { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.hero-reassurance span {
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  background: rgba(1, 34, 70, 0.42);
  backdrop-filter: blur(9px);
}
.hero-panel strong { font-size: 1.3rem; }
.hero-panel ul { display: grid; gap: 10px; margin: 18px 0 0; padding-left: 20px; line-height: 1.4; }

.search-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin: -38px 28px 0;
  padding: 24px;
  border: 1px solid #e0e7ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(23, 50, 80, .14);
}
.search-grid > label { grid-column: span 2; }
.search-grid > label:nth-of-type(1), .search-grid > label:nth-of-type(2) { grid-column: span 3; }
.search-grid > label:nth-of-type(4), .search-grid > label:nth-of-type(5) { grid-column: span 1; }
.search-grid input, .search-grid select { min-height: 48px; background: #fbfcfd; }
.search-submit {
  grid-column: 1 / -1;
  min-height: 50px;
  margin-top: 2px;
  border-radius: 8px;
  font-size: 1rem;
}

.section { margin-top: 46px; }
.section-head h2, .module-header h2 { color: #17324f; letter-spacing: -0.02em; }
.form-card, .summary-card, .admin-card, .kpi-card, .status-strip, .ticket {
  border-color: #dce5ed;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(18, 46, 77, .06);
}

.site-footer {
  margin-top: 45px;
  padding: 38px max(24px, calc((100vw - 1180px) / 2));
  background: #002f63;
  color: rgba(255,255,255,.8);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-brand img { width: 50px; height: 50px; object-fit: contain; padding: 5px; border-radius: 7px; background: #fff; }
.footer-brand strong { display: block; color: #fff; }
.footer-brand span, .site-footer small { display: block; margin-top: 4px; }
.footer-links { display: flex; align-items: center; gap: 18px; }
.footer-link { border: 0; background: transparent; color: #fff; cursor: pointer; font-weight: 800; }

button, summary, input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, transform .18s ease; }
button:hover { transform: translateY(-1px); }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(228, 177, 26, .45);
  outline-offset: 2px;
}

@media (max-width: 920px) {
  .header-main { min-height: 70px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { white-space: nowrap; }
  .staff-menu { margin-left: 0; flex: 0 0 auto; }
  .staff-menu-panel { position: fixed; top: 125px; right: 16px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 38px; }
  .hero-panel { align-self: auto; }
  .search-grid { grid-template-columns: repeat(6, 1fr); margin: -22px 16px 0; }
  .search-grid > label, .search-grid > label:nth-of-type(1), .search-grid > label:nth-of-type(2) { grid-column: span 3; }
  .search-grid > label:nth-of-type(4), .search-grid > label:nth-of-type(5) { grid-column: span 1; }
  .search-grid > label:nth-of-type(6) { grid-column: span 4; }
}

@media (max-width: 620px) {
  .institutional-label, .secure-label { display: none; }
  .institutional-bar { padding: 0; }
  .header-main { width: calc(100% - 24px); }
  .brand span { display: none; }
  .professional-access { padding: 0 10px; font-size: .75rem; }
  .tabs { width: calc(100% - 24px); }
  .page-context { width: calc(100% - 24px); }
  #access-mode-badge { display: none; }
  main { width: calc(100% - 20px); }
  .hero { padding: 30px 22px 46px; border-radius: 14px; }
  .hero h1 { font-size: 2.7rem; }
  .hero-panel { padding: 20px; }
  .search-grid { grid-template-columns: 1fr 1fr; margin: -26px 10px 0; padding: 18px; }
  .search-grid > label, .search-grid > label:nth-of-type(n) { grid-column: 1 / -1; }
  .search-grid > label:nth-of-type(4), .search-grid > label:nth-of-type(5) { grid-column: span 1; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-links { align-items: flex-start; flex-direction: column; }
}
