:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --canvas: #f5f5f7;
  --panel: #ffffff;
  --line: #e5e5e7;
  --green: #0071e3;
  --green-dark: #1d1d1f;
  --green-soft: #eaf3ff;
  --amber: #9a6700;
  --red: #d70015;
  --shadow: 0 8px 30px rgba(0, 0, 0, .045);
}

/* Owner-only system control room */
.system-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.system-status-card { min-width: 0; display: grid; gap: 10px; padding: 19px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.system-status-card.is-error { border-color: #f0b8bd; background: #fffafa; }
.system-status-card.is-warning, .system-status-card.is-paused { border-color: #efd5a6; background: #fffcf5; }
.system-status-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.system-status-card > strong { overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
.system-status-card > small { color: var(--muted); line-height: 1.45; }
.service-pill { display: inline-flex; width: max-content; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; color: var(--muted); background: #ededf0; font-size: 11px; font-weight: 800; white-space: nowrap; }
.service-pill.ok { color: #176b52; background: #e9f6f0; }
.service-pill.working { color: #1762a6; background: #eaf3ff; }
.service-pill.warning, .service-pill.paused { color: #8a5b00; background: #fff0d6; }
.service-pill.error { color: #b42332; background: #fdebed; }
.system-control-panel .panel-heading p, .system-panel-heading p, .codex-panel .panel-heading p { margin: 7px 0 0; color: var(--muted); }
.system-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 18px 0; }
.system-controls form { margin: 0; }
.system-alert { display: grid; gap: 4px; margin: 16px 0; padding: 13px 15px; border-radius: 12px; font-size: 13px; }
.system-alert span { line-height: 1.5; }
.system-alert.error { color: #9b1c2a; background: #fdebed; }
.system-alert.warning { color: #75500c; background: #fff3df; }
.system-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.system-facts div { min-width: 0; padding: 13px; border-radius: 12px; background: #f7f7f8; }
.system-facts dt { margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.system-facts dd { margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 750; }
.system-facts a { color: var(--green); }
.system-history .system-panel-heading { margin: 0; padding: 20px 24px; }
.system-history td { vertical-align: top; }
.system-history .wrap-cell { max-width: 360px; white-space: normal; line-height: 1.45; }
.run-error { display: block; max-width: 380px; margin-top: 7px; color: var(--red); white-space: normal; line-height: 1.4; }
.codex-job-form { display: grid; grid-template-columns: minmax(220px, .36fr) minmax(0, 1fr); gap: 14px; margin-top: 18px; }
.codex-job-form label { display: grid; align-content: start; gap: 7px; color: #40534c; font-weight: 700; }
.codex-job-form label.wide { grid-column: 2; grid-row: 1 / span 2; }
.codex-job-form select, .codex-job-form textarea { width: 100%; padding: 12px 13px; border: 1px solid #bac8c2; border-radius: 10px; color: var(--ink); background: white; outline: none; }
.codex-job-form textarea { min-height: 125px; resize: vertical; }
.codex-job-form small { color: var(--muted); font-weight: 500; }
.codex-submit { display: grid; align-content: end; gap: 8px; }
.codex-submit span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.codex-job-list { display: grid; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.codex-job-list article { display: grid; grid-template-columns: minmax(160px, .34fr) minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.codex-job-list article div { display: grid; gap: 5px; }
.codex-job-list article span { color: var(--muted); font-size: 11px; }
.codex-job-list article p { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.codex-job-body { min-width: 0; }
.codex-job-body details { margin-top: 10px; }
.codex-job-body summary { width: max-content; color: var(--green); font-size: 13px; font-weight: 750; cursor: pointer; }
.codex-result { max-height: 420px; overflow: auto; margin-top: 10px; padding: 14px; border-radius: 10px; color: #25352f; background: #f3f6f4; white-space: pre-wrap; line-height: 1.55; }
.codex-result.error { color: #9b1c2a; background: #fdebed; }

@media (max-width: 1100px) {
  .system-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .system-status-grid, .system-facts { grid-template-columns: 1fr; }
  .system-controls { align-items: stretch; }
  .system-controls form, .system-controls button { width: 100%; }
  .codex-job-form { grid-template-columns: 1fr; }
  .codex-job-form label.wide { grid-column: auto; grid-row: auto; }
  .codex-job-list article { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 16px 20px; background: rgba(255,255,255,.82); color: var(--ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; backdrop-filter: blur(18px); }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 10px 30px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: white; font-weight: 750; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 2px; }
nav { display: grid; gap: 4px; overflow-y: auto; }
.nav-link { display: flex; align-items: center; padding: 11px 13px; color: var(--muted); text-decoration: none; border-radius: 10px; font-size: 14px; font-weight: 600; }
.nav-link:hover { color: var(--ink); background: #f2f2f4; }
.nav-link.active { color: var(--ink); background: #e9e9ec; }
.logout-form { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.user-chip { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.user-chip > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); }
.user-chip small { display: block; color: #a8c1b8; }
.ghost-button { width: 100%; padding: 9px; border: 0; color: var(--muted); background: transparent; border-radius: 9px; cursor: pointer; }
.ghost-button:hover { color: var(--ink); background: #f2f2f4; }
.content { width: min(100%, 1500px); padding: 38px clamp(22px, 4vw, 62px) 64px; overflow: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.topbar h1, .login-card h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.035em; line-height: 1.1; }
.eyebrow { margin: 0; color: var(--green); font-weight: 800; font-size: 12px; letter-spacing: .11em; text-transform: uppercase; }
.environment { padding: 8px 12px; border: 1px solid #c8d7d0; border-radius: 999px; color: var(--green-dark); background: #edf4f0; font-size: 13px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.kpi span, .kpi small, .mini-kpis span, .finance-strip span { display: block; color: var(--muted); }
.kpi strong { display: block; margin: 11px 0 4px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; }
.kpi.accent { background: var(--green-dark); color: white; border-color: var(--green-dark); }
.kpi.accent span, .kpi.accent small { color: #c4dbd3; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr); gap: 18px; margin-bottom: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.panel h2, .panel h3 { margin: 4px 0 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.panel-heading > a { color: var(--green); font-weight: 700; text-decoration: none; font-size: 14px; }
.panel-heading > a.primary-button { color: white; }
.empty-state { min-height: 170px; display: grid; place-content: center; text-align: center; gap: 8px; color: var(--muted); }
.empty-state strong { color: var(--ink); font-size: 18px; }
.empty-state.roomy { min-height: 330px; }
.compact-list > div { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); }
.status { padding: 6px 10px; border-radius: 999px; background: #eef1ef; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.status.ok { background: var(--green-soft); color: var(--green-dark); }
.status.warning { background: #fff0d6; color: var(--amber); }
.source-stats { display: grid; gap: 13px; margin: 0; }
.source-stats div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 11px; }
.source-stats dt { color: var(--muted); }
.source-stats dd { margin: 0; font-weight: 850; }
.safe-note { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #edf4f0; color: var(--green-dark); font-size: 13px; }
.finance-strip, .mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.finance-strip div, .mini-kpis div { padding: 14px; background: #f7f8f5; border-radius: 11px; }
.finance-strip strong, .mini-kpis strong { display: block; margin-top: 7px; font-size: 19px; }
.section-intro { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 20px; }
.section-intro p { color: var(--muted); margin: 0; max-width: 650px; font-size: 17px; }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--green); color: white; font-weight: 650; text-decoration: none; cursor: pointer; }
.primary-button:disabled { opacity: .55; cursor: not-allowed; }
.secondary-button { background: #ededf0; color: var(--ink); }
.table-panel { padding: 0; overflow: hidden; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; background: #f7f7f8; color: var(--muted); font-size: 11px; text-transform: none; letter-spacing: .01em; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.import-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.muted { color: var(--muted); line-height: 1.55; }
.upload-form, .stack-form { display: grid; gap: 14px; }
.dropzone { display: grid; place-items: center; min-height: 130px; padding: 18px; border: 1.5px dashed #91a79e; border-radius: 12px; background: #f7faf8; color: var(--green); font-weight: 800; cursor: pointer; }
.dropzone input { margin-top: 12px; max-width: 100%; }
.check-list { color: var(--muted); line-height: 1.9; padding-left: 20px; }
.alert { border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.alert.error { color: var(--red); background: #fdeceb; }
.profile-card .mini-kpis { margin: 12px 0 24px; }
.mapping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 22px; }
.mapping-grid > div { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.preview-table { border: 1px solid var(--line); border-radius: 10px; }
.schedule-card { padding: 0; overflow: hidden; }
.schedule-heading { padding: 22px 22px 0; }
.departure-badge { min-width: 132px; padding: 10px 14px; border-radius: 12px; background: var(--green-dark); color: white; text-align: center; }
.departure-badge span, .departure-badge small { display: block; color: #c4dbd3; font-size: 11px; }
.departure-badge strong { display: block; margin: 3px 0; font-size: 22px; }
.schedule-table .time-cell { color: var(--green-dark); font-weight: 850; font-variant-numeric: tabular-nums; }
.schedule-table td { white-space: normal; vertical-align: middle; }
.schedule-table th:first-child { width: 120px; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #e2efe8, transparent 45%), var(--canvas); }
.login-card { width: min(440px, 100%); padding: 34px; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.login-brand { padding: 0 0 28px; }
.login-brand small { color: var(--muted); }
.stack-form { margin-top: 24px; }
.stack-form label { display: grid; gap: 7px; color: #40534c; font-weight: 700; }
.stack-form input { width: 100%; padding: 12px 13px; border: 1px solid #bac8c2; border-radius: 10px; outline: none; }
.stack-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,82,.12); }

.workday-toolbar { position: relative; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(260px, auto) minmax(150px, 1fr); align-items: stretch; gap: 10px; margin: -8px 0 20px; }
.day-step { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 66px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 13px; color: var(--green-dark); background: white; text-align: center; text-decoration: none; font-size: 13px; font-weight: 850; }
.day-step:hover { border-color: #9dbbb0; background: var(--green-soft); }
.day-step.disabled { color: #a4ada9; background: #f2f4f3; cursor: default; }
.current-workday { display: grid; place-content: center; gap: 3px; min-height: 66px; padding: 10px 26px; border-radius: 13px; color: white; background: var(--green-dark); text-align: center; }
.current-workday strong { font-size: 18px; }
.current-workday .toolbar-label { color: rgba(255,255,255,.72); }
.current-workday a { color: white; font-size: 11px; font-weight: 800; }
.date-jump { grid-column: 1 / -1; justify-self: center; position: relative; width: min(100%, 440px); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.date-jump summary { padding: 5px 10px; color: var(--green); font-size: 13px; font-weight: 800; cursor: pointer; list-style-position: inside; }
.date-jump[open] { width: min(100%, 440px); padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.date-jump[open] summary { margin-bottom: 9px; text-align: center; }
.date-picker-form { display: flex; gap: 8px; align-items: end; }
.date-picker-form label { flex: 1; display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.date-picker-form input { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.day-arrow { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; color: var(--green); background: white; text-decoration: none; font-weight: 900; }
.toolbar-label { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.attention-strip { display: flex; align-items: center; gap: 18px; margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; background: #fff4df; color: #7f561b; font-size: 13px; }
.attention-strip strong { margin-right: auto; }
.attention-strip a { color: inherit; text-decoration: none; font-weight: 650; }
.attention-mail-link { padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.62); }
.attention-refund-link { color: #a33a35 !important; }
.flash { margin: -8px 0 20px; padding: 13px 16px; border-radius: 11px; font-weight: 750; }
.flash.success { color: var(--green-dark); background: var(--green-soft); border: 1px solid #bddbce; }
.inline-actions, .empty-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.empty-actions { justify-content: center; margin-top: 10px; }
.empty-actions form { margin: 0; }
.action-empty { min-height: 240px; }
.trip-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.trip-card { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fbfcfa; text-decoration: none; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.trip-card:hover { transform: translateY(-2px); border-color: #9ab8ac; box-shadow: 0 10px 24px rgba(28,48,41,.08); }
.trip-card-head { display: flex; justify-content: space-between; align-items: center; }
.route-number { display: grid; place-items: center; min-width: 44px; height: 30px; padding: 0 9px; border-radius: 8px; color: white; background: var(--green-dark); font-weight: 900; }
.trip-time { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.trip-card h3 { margin: 14px 0 13px; font-size: 19px; }
.occupancy, .analytics-bar { height: 7px; overflow: hidden; border-radius: 99px; background: #dfe6e1; }
.occupancy span, .analytics-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1b7a5c, #5ca985); }
.trip-statline { display: flex; align-items: baseline; gap: 7px; margin-top: 8px; }
.trip-statline strong { font-size: 20px; }
.trip-statline span, .trip-meta dt { color: var(--muted); font-size: 12px; }
.trip-meta { display: grid; gap: 7px; margin: 15px 0; padding-top: 13px; border-top: 1px solid var(--line); }
.trip-meta div { display: flex; justify-content: space-between; gap: 12px; }
.trip-meta dd { margin: 0; max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 750; }
.open-manifest { color: var(--green); font-size: 13px; font-weight: 850; }
.compact-source { padding-block: 16px; }
.compact-source .panel-heading { margin-bottom: 4px; }
.today-trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 14px; }
.today-trip-card { min-height: 255px; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: linear-gradient(145deg, #fff, #f7faf8); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.today-trip-card:hover { transform: translateY(-3px); border-color: #8eafa1; box-shadow: 0 14px 30px rgba(28,48,41,.1); }
.today-trip-top { display: flex; justify-content: space-between; align-items: center; }
.today-trip-top > strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.today-trip-card h3 { min-height: 48px; margin: 16px 0 12px; font-size: 18px; line-height: 1.3; }
.today-trip-load { display: flex; align-items: baseline; gap: 7px; }
.today-trip-load strong { font-size: 25px; }
.today-trip-load span { color: var(--muted); font-size: 12px; }
.today-trip-card .occupancy { margin: 8px 0 14px; }
.today-trip-card dl { display: grid; gap: 7px; margin: 0 0 14px; }
.today-trip-card dl div { display: flex; justify-content: space-between; gap: 10px; }
.today-trip-card dt { color: var(--muted); font-size: 12px; }
.today-trip-card dd { margin: 0; font-size: 13px; font-weight: 850; }
.today-trip-card .open-manifest { margin-top: auto; }

.date-group { margin-bottom: 26px; }
.date-group-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.date-group-heading h2 { margin: 0; font-size: 21px; }
.date-group-heading span { color: var(--muted); font-size: 13px; }
.trip-row-list { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.trip-row { display: grid; grid-template-columns: 70px minmax(220px, 1.6fr) minmax(100px, .5fr) minmax(120px, .6fr) 24px; gap: 16px; align-items: center; padding: 16px 18px; text-decoration: none; border-bottom: 1px solid var(--line); }
.trip-row:last-child { border-bottom: 0; }
.trip-row:hover { background: #f4f8f5; }
.trip-row-time { font-size: 20px; font-weight: 900; }
.trip-row-route, .trip-row-load, .trip-row-due { display: grid; gap: 4px; }
.trip-row-route span, .trip-row-load span, .trip-row-due span { color: var(--muted); font-size: 12px; }
.trip-row-load strong, .trip-row-due strong { font-size: 17px; }
.row-arrow { color: var(--green); font-size: 20px; }

.back-link { display: inline-block; margin: -8px 0 16px; color: var(--green); text-decoration: none; font-weight: 800; }
.trip-hero { display: flex; justify-content: space-between; gap: 30px; align-items: end; padding: 23px; margin-bottom: 18px; border-radius: 17px; color: white; background: linear-gradient(130deg, #0f4938, #187457); box-shadow: var(--shadow); }
.trip-hero .eyebrow, .trip-hero p { color: #c2dcd2; }
.trip-hero h2 { margin: 5px 0 7px; font-size: 27px; }
.trip-hero p { margin-bottom: 0; }
.hero-stats { display: flex; gap: 26px; }
.hero-stats div { display: grid; gap: 3px; min-width: 88px; }
.hero-stats strong { font-size: 23px; }
.hero-stats span { color: #c2dcd2; font-size: 11px; }
.manifest-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.seat-panel { min-width: 0; }
.seat-legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.seat-legend span { display: flex; align-items: center; gap: 5px; }
.seat-legend i { width: 9px; height: 9px; border-radius: 3px; background: #d9e2dd; }
.seat-legend i.occupied { background: #3d8b6f; }
.seat-legend i.no-show { background: #d49a41; }
.manifest-note { margin: -4px 0 18px; padding: 10px 12px; border-radius: 9px; background: #f2f4f1; color: var(--muted); font-size: 12px; }
.bus-shell { max-width: 760px; margin: auto; padding: 18px; border: 2px solid #b8c7c0; border-radius: 38px 38px 20px 20px; background: #f3f5f2; }
.driver-cab { width: 110px; margin-left: auto; margin-bottom: 20px; padding: 11px; border-radius: 18px 18px 8px 8px; text-align: center; color: var(--muted); background: white; border: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.seat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 9px; }
.seat { position: relative; display: block; min-height: 128px; padding: 25px 10px 10px; border: 1px solid #b8d2c7; border-radius: 12px 12px 8px 8px; color: var(--ink); background: #e8f3ee; overflow: hidden; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.seat:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(28,48,41,.12); }
.seat.after-aisle { margin-left: 25px; }
.seat.free { min-height: 84px; color: #8a9792; background: transparent; border-style: dashed; }
.seat.no_show { border-color: #dab269; background: #fff3dc; }
.seat-number { position: absolute; top: 7px; left: 8px; display: grid; place-items: center; width: 23px; height: 20px; border-radius: 6px; color: white; background: var(--green-dark); font-size: 10px; font-weight: 900; }
.seat.no_show .seat-number { background: var(--amber); }
.seat strong, .seat small, .payment-tag { display: block; }
.seat strong { padding-right: 2px; font-size: 12px; line-height: 1.25; }
.seat small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.3; }
.payment-tag { margin-top: 8px; padding: 4px 6px; border-radius: 6px; color: var(--green-dark); background: rgba(255,255,255,.7); font-size: 9px; font-weight: 850; }
.seat .provisional { display: inline-block; padding: 2px 5px; border-radius: 4px; color: #80591d; background: #fff0d2; font-weight: 800; }
.manifest-summary { position: sticky; top: 20px; }
.manifest-summary h3 { margin: 0 0 18px; }
.refund-list { display: grid; gap: 7px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 12px; }
.refund-list span { color: var(--muted); }
.analytics-list { display: grid; gap: 8px; }
.analytics-list a { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(180px, 1fr) 50px; gap: 18px; align-items: center; padding: 14px; border-radius: 10px; color: inherit; background: #f7f8f5; text-decoration: none; }
.analytics-list a > div:first-child { display: grid; gap: 4px; }
.analytics-list a span { color: var(--muted); font-size: 12px; }

.hero-side { display: grid; justify-items: end; gap: 15px; }
.hero-button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 10px; color: var(--green-dark); background: #f2c56f; text-decoration: none; font-weight: 900; }
.print-button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; color: white; background: transparent; text-decoration: none; font-weight: 800; cursor: pointer; }
.form-panel { max-width: 920px; margin-inline: auto; padding: 28px; }
.form-heading { margin-bottom: 22px; }
.form-heading h2 { margin: 5px 0 7px; }
.form-heading p:last-child { margin: 0; color: var(--muted); }
.editor-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.booking-editor { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { position: relative; display: grid; gap: 7px; color: #40534c; font-size: 13px; font-weight: 800; }
.field.wide, .form-actions.wide, .form-section-title.wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #bac8c2; border-radius: 10px; outline: none; color: var(--ink); background: white; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,82,.12); }
.money-field b { position: absolute; right: 12px; bottom: 13px; color: var(--muted); }
.money-field input { padding-right: 34px; }
.form-actions { display: flex; gap: 9px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-top: 12px; padding: 13px 0 3px; border-top: 1px solid var(--line); }
.form-section-title:first-of-type { margin-top: 0; border-top: 0; }
.form-section-title strong { font-size: 17px; }
.form-section-title span { color: var(--muted); font-size: 12px; }
.booking-context { display: flex; gap: 12px; align-items: center; max-width: 920px; margin: -8px auto 14px; padding: 13px 16px; border-radius: 12px; color: var(--green-dark); background: var(--green-soft); }
.booking-context > span { padding: 5px 8px; border-radius: 7px; color: white; background: var(--green-dark); font-weight: 900; }
.booking-context small { margin-left: auto; color: var(--muted); }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 25px; padding: 18px; border: 1px solid #edc4c1; border-radius: 12px; background: #fff7f6; }
.danger-zone span { display: grid; gap: 4px; }
.danger-zone small { color: var(--muted); }
.danger-button { min-height: 40px; padding: 0 14px; border: 1px solid #cf6c66; border-radius: 9px; color: var(--red); background: white; font-weight: 850; cursor: pointer; }
.dispatch-tables { display: grid; gap: 18px; }
.dispatch-trip { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.dispatch-trip-head { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto; gap: 20px; align-items: center; padding: 16px 18px; background: #f4f8f5; border-bottom: 1px solid var(--line); }
.dispatch-route { display: flex; align-items: center; gap: 12px; }
.dispatch-route > div { display: grid; gap: 4px; }
.dispatch-route small { color: var(--muted); }
.dispatch-summary { display: flex; gap: 18px; }
.dispatch-summary span { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.dispatch-summary strong { color: var(--ink); font-size: 17px; }
.dispatch-actions { display: flex; gap: 7px; }
.passenger-table th { position: sticky; top: 0; z-index: 1; }
.passenger-table tbody tr { cursor: pointer; }
.passenger-table tbody tr:hover { background: #f5faf7; }
.passenger-table td { vertical-align: middle; }
.payment-value { color: var(--green-dark); }
.payment-state { display: inline-flex; padding: 5px 8px; border-radius: 7px; color: var(--green-dark); background: var(--green-soft); font-size: 11px; font-weight: 850; }
.payment-state.due { color: #80591d; background: #fff0d2; }
.operator-price { display: block; margin-top: 5px; color: var(--muted); font-weight: 800; }
.boarding-due { color: var(--muted); }
.boarding-due.due { color: var(--red); }
.phone-link { color: var(--green); font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.empty-trip { display: flex; justify-content: space-between; padding: 18px; color: var(--muted); }
.empty-trip a { color: var(--green); font-weight: 850; }
.month-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.month-toolbar strong { min-width: 160px; text-align: center; }
.month-toolbar form { display: flex; gap: 8px; margin-left: auto; }
.month-toolbar input { min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; }
.mail-status { margin-bottom: 18px; padding: 17px 18px; border: 1px solid #e5cf9f; border-radius: 14px; background: #fff8e9; }
.mail-status.connected { border-color: #b8d8ca; background: var(--green-soft); }
.mail-status > div { display: grid; grid-template-columns: 12px auto; gap: 3px 10px; align-items: center; }
.mail-status small { grid-column: 2; color: var(--muted); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.mail-status.connected .status-dot { background: var(--green); }
.mail-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mail-result { display: inline-flex; padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 850; }
.mail-result.imported { color: var(--green-dark); background: var(--green-soft); }
.mail-result.refunded { color: #a33a35; background: #ffe8e6; }
.mail-result.review { color: #80591d; background: #fff0d2; }
.mail-result.waiting_trip { color: #496078; background: #e9f0f7; }
.mail-result.pending { color: var(--muted); background: #edf0ee; }
.mail-result.resolved { color: #4f5055; background: #ededf0; }
.mail-result.dismissed { color: #6e6e73; background: #ededf0; }
.mail-filters { display: flex; gap: 6px; margin: 0 0 16px; overflow-x: auto; }
.mail-filters a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 999px; color: var(--muted); background: white; border: 1px solid var(--line); text-decoration: none; font-size: 13px; font-weight: 650; }
.mail-filters a.active { color: white; border-color: var(--ink); background: var(--ink); }
.mail-filters a.refund-filter:not(.active) { color: #a33a35; background: #fff5f4; }
.mail-filters b { min-width: 22px; padding: 3px 6px; border-radius: 999px; background: rgba(127,127,135,.14); text-align: center; font-size: 11px; }
.mail-queue { padding: 0; overflow: hidden; }
.mail-record-list { display: grid; }
.mail-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.mail-record:last-child { border-bottom: 0; }
.mail-record.refunded { border-left: 4px solid var(--red); background: #fffafa; }
.mail-record.review { border-left: 4px solid #d69a24; }
.mail-record.waiting_trip { border-left: 4px solid #6b89a6; }
.mail-record-main { min-width: 0; }
.mail-record-title { display: flex; gap: 10px; align-items: center; }
.mail-record-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-record-main p { margin: 8px 0 5px; color: var(--ink); font-size: 13px; line-height: 1.45; }
.mail-record-main > small { color: var(--muted); }
.mail-record-actions { display: flex; gap: 8px; align-items: center; }
.mail-record-actions form { margin: 0; }
.attention-table-wrap { width: 100%; overflow-x: auto; }
.attention-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; }
.attention-table th { padding: 12px 10px; color: var(--muted); background: #f6f8f6; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.attention-table th:nth-child(1) { width: 185px; }
.attention-table th:nth-child(2) { width: 72px; }
.attention-table th:nth-child(3), .attention-table th:nth-child(4) { width: 150px; }
.attention-table th:nth-child(5) { width: 155px; }
.attention-table th:nth-child(7) { width: 130px; }
.attention-row td { padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 12px; }
.attention-row:last-child td { border-bottom: 0; }
.attention-row.review td:first-child { border-left: 4px solid #d69a24; }
.attention-row.waiting_trip td:first-child { border-left: 4px solid #6b89a6; }
.mail-id-cell { display: grid; gap: 4px; }
.mail-id-cell code { display: block; max-width: 165px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.mail-id-cell small { color: var(--muted); font-size: 10px; }
.small-route { min-width: 42px; justify-content: center; }
.cell-main { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-height: 1.35; }
.problem-cell p { margin: 7px 0 0; color: var(--ink); line-height: 1.4; }
.attention-actions { display: grid; gap: 7px; justify-items: stretch; }
.attention-actions form { margin: 0; }
.attention-actions a, .attention-actions button { width: 100%; text-align: center; }
.mail-detail-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: 28px; margin-bottom: 16px; padding: 22px; }
.mail-detail-header h2 { margin: 10px 0 5px; }
.mail-detail-header p { margin: 0; color: var(--muted); }
.mail-detail-header dl { display: grid; gap: 9px; margin: 0; }
.mail-detail-header dl div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px; }
.mail-detail-header dt { color: var(--muted); font-size: 11px; }
.mail-detail-header dd { min-width: 0; margin: 0; font-size: 12px; }
.mail-detail-header code { display: block; overflow-wrap: anywhere; }
.issue-summary { margin-bottom: 16px; padding: 16px 18px; border: 1px solid #e8c46d; border-radius: var(--radius); color: #6e4a0f; background: #fff8e7; }
.issue-summary ul { margin: 8px 0 0; padding-left: 19px; }
.mail-review-form .form-section-title { display: flex; justify-content: space-between; gap: 16px; }
.mail-review-form .form-section-title small { color: var(--muted); font-weight: 500; }
.field-needs-review { margin: -5px; padding: 10px; border: 1px solid #e3ae45; border-radius: 10px; background: #fff9e9; }
.field-needs-review input, .field-needs-review select, .field-needs-review textarea { border-color: #c98a15; background: white; }
.field-issue { color: #8a5a06 !important; font-weight: 700; line-height: 1.4; }
.source-value { color: var(--muted); }
.correction-history { margin-top: 12px; }
.correction-history summary { width: fit-content; color: var(--green-dark); cursor: pointer; font-size: 12px; font-weight: 750; }
.correction-history ul { display: grid; gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.correction-history li { display: flex; justify-content: space-between; gap: 14px; max-width: 520px; color: var(--muted); font-size: 12px; }
.correction-history time { white-space: nowrap; }
.quiet-action { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.compact-link { padding: 7px 8px; border: 0; background: transparent; cursor: pointer; font-size: 12px; }
.refund-badge { width: fit-content; display: inline-flex; margin-top: 6px; padding: 4px 7px; border-radius: 7px; color: #a33a35; background: #ffe8e6; font-size: 10px; font-weight: 750; }
.panel-actions { display: flex; gap: 14px; align-items: center; }
.passenger-search { display: flex; }
.passenger-search input { width: 190px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px 0 0 9px; }
.passenger-search button { padding: 0 11px; border: 0; border-radius: 0 9px 9px 0; color: white; background: var(--green); font-weight: 800; }
.trip-workspace { padding: 0; overflow: hidden; }
.trip-view-tabs { display: flex; gap: 5px; padding: 9px; border-bottom: 1px solid var(--line); background: #f2f5f2; }
.trip-view-tab { min-height: 42px; padding: 0 18px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-weight: 850; cursor: pointer; }
.trip-view-tab.active { color: white; background: var(--green-dark); }
.trip-view { padding: 22px; }
.manifest-heading { align-items: center; }
.passenger-count { color: var(--muted); font-size: 13px; font-weight: 750; }
.manifest-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(190px, .55fr); gap: 10px; margin-bottom: 16px; }
.manifest-filters label { display: grid; gap: 6px; color: #40534c; font-size: 12px; font-weight: 800; }
.manifest-filters input, .manifest-filters select { min-height: 43px; padding: 0 12px; border: 1px solid #bac8c2; border-radius: 9px; color: var(--ink); background: white; outline: none; }
.manifest-filters input:focus, .manifest-filters select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,82,.12); }
.trip-passenger-table { min-width: 1050px; }
.trip-passenger-table th, .trip-passenger-table td { padding: 12px 11px; }
.trip-passenger-table tbody tr[hidden] { display: none; }
.table-action { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 8px; color: var(--green-dark); background: var(--green-soft); text-decoration: none; font-size: 12px; font-weight: 850; }
.empty-filter { padding: 28px 15px; color: var(--muted); text-align: center; }

/* Simplified dispatcher workspace */
.day-summary { display: flex; align-items: center; gap: 0; margin-bottom: 20px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.day-summary > div { display: flex; align-items: baseline; gap: 9px; padding-right: 30px; }
.day-summary > div + div { padding-left: 30px; border-left: 1px solid var(--line); }
.day-summary strong { font-size: 24px; letter-spacing: -.03em; }
.day-summary span { color: var(--muted); font-size: 13px; }
.operations-panel { padding: 24px; }
.today-trip-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.today-trip-card { min-height: 205px; padding: 20px; border-radius: 18px; background: white; box-shadow: none; }
.today-trip-card:hover { transform: none; border-color: #b8b8bd; box-shadow: var(--shadow); }
.today-trip-card h3 { min-height: 44px; margin: 18px 0 14px; font-size: 18px; letter-spacing: -.015em; }
.today-trip-facts { display: flex; gap: 24px; margin-bottom: 18px; }
.today-trip-facts div { display: grid; gap: 2px; }
.today-trip-facts strong { font-size: 19px; }
.today-trip-facts span { color: var(--muted); font-size: 11px; }
.today-trip-card .open-manifest { align-self: flex-start; margin-top: auto; padding: 7px 13px; border-radius: 999px; color: white; background: var(--green); font-size: 12px; }
.route-number { border-radius: 8px; background: var(--ink); font-weight: 700; }
.workday-toolbar { gap: 8px; }
.day-step { border-radius: 14px; color: var(--ink); font-weight: 600; }
.day-step:hover { border-color: #c7c7cb; background: white; }
.current-workday { border-radius: 14px; background: var(--ink); }
.date-jump summary, .month-toolbar summary, .form-more summary, .cancelled-bookings summary { color: var(--green); font-weight: 600; cursor: pointer; }
.attention-strip { border: 1px solid #f0d7a3; border-radius: 14px; background: #fff9ed; }

.month-toolbar { justify-content: flex-start; gap: 10px; padding: 10px 12px; border-radius: 15px; }
.month-toolbar strong { min-width: 150px; }
.month-toolbar details { margin-left: auto; }
.month-toolbar details[open] { display: flex; align-items: center; gap: 10px; }
.month-toolbar summary { color: var(--muted); font-size: 13px; }
.month-toolbar form { margin-left: 0; }
.trip-row-list { border-radius: 18px; box-shadow: none; }
.trip-row { grid-template-columns: 70px minmax(220px, 1.6fr) minmax(90px, .45fr) minmax(115px, .55fr) 20px; }
.trip-row:hover { background: #f7f7f8; }

.schedule-disclosure { margin-bottom: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.schedule-disclosure > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 72px; padding: 14px 18px; cursor: pointer; list-style: none; }
.schedule-disclosure > summary::-webkit-details-marker { display: none; }
.schedule-disclosure > summary::after { content: "›"; grid-column: 4; color: var(--muted); font-size: 24px; transition: transform .15s ease; }
.schedule-disclosure[open] > summary::after { transform: rotate(90deg); }
.schedule-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.schedule-departure { color: var(--muted); font-variant-numeric: tabular-nums; }
.schedule-meta { display: grid; justify-items: end; gap: 2px; color: var(--ink); font-variant-numeric: tabular-nums; }
.schedule-meta small { color: var(--muted); font-size: 11px; font-weight: 500; }
.schedule-warning { display: grid; gap: 4px; margin: 14px 18px 0; padding: 13px 14px; border-radius: 12px; color: #80591d; background: #fff7e7; font-size: 12px; }
.schedule-warning span { color: #806b48; line-height: 1.45; }
.needs-check { color: #9a6700; font-weight: 650; }

.trip-hero { align-items: center; padding: 22px 24px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.trip-identity { min-width: 260px; }
.trip-identity > span { color: var(--muted); font-size: 13px; }
.trip-identity h2 { margin: 6px 0 0; font-size: 24px; }
.trip-totals { display: flex; gap: 28px; margin-left: auto; }
.trip-totals div { display: grid; gap: 2px; }
.trip-totals strong { font-size: 21px; }
.trip-totals span { color: var(--muted); font-size: 11px; }
.trip-actions { display: flex; gap: 9px; align-items: center; }
.hero-button { min-height: 42px; padding: 0 17px; border-radius: 999px; color: white; background: var(--green); font-weight: 650; }
.print-menu { position: relative; }
.print-menu > summary { display: flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; background: #ededf0; cursor: pointer; list-style: none; font-weight: 650; }
.print-menu > summary::-webkit-details-marker { display: none; }
.print-menu > div { position: absolute; right: 0; z-index: 3; display: grid; width: 210px; margin-top: 7px; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 16px 44px rgba(0,0,0,.12); }
.print-menu a { padding: 10px 11px; border-radius: 8px; text-decoration: none; font-size: 13px; }
.print-menu a:hover { background: #f3f3f5; }
.trip-workspace { padding: 24px; overflow: hidden; }
.manifest-heading { align-items: baseline; }
.trip-passenger-table { min-width: 900px; }
.passenger-phone { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; }
.ticket-source { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.payment-state { padding: 4px 7px; border-radius: 6px; }
.cancelled-bookings { margin: 2px 0 22px; padding: 0 4px; color: var(--muted); font-size: 13px; }
.cancelled-bookings > div { display: grid; gap: 7px; padding: 10px; }
.cancelled-bookings > div > span { display: block; }
.cancelled-bookings b { display: inline-grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; color: #a33a35; background: #fff0ef; }
.cancelled-bookings em { color: var(--ink); font-style: normal; font-weight: 700; }
.history-item.refunded { margin-inline: -8px; padding: 9px 8px; border-radius: 9px; color: #8d2f2a; background: #fff0ef; }
.cancelled-bookings a { color: var(--green); font-weight: 700; text-decoration: none; }
.cancelled-bookings small { display: block; margin: 3px 0 0 31px; white-space: pre-line; }
.hidden-passengers .history-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px; }
.hidden-passengers .history-item small { grid-column: 2; margin: 0; }
.hidden-passengers .history-item form { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
.hidden-passengers .secondary-button { min-height: 36px; padding: 7px 12px; }
.booking-note { display: block; max-width: 260px; margin-top: 7px; padding: 6px 8px; border-left: 3px solid #e2a63b; border-radius: 4px; color: #6f5422; background: #fff8e9; font-size: 11px; line-height: 1.35; white-space: pre-line; }
.booking-comment textarea { border-color: #d8c28f; background: #fffdf8; }
.booking-comment small { color: var(--muted); font-size: 11px; }
.transfer-card { overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fbfbfd; }
.transfer-card-heading { display: flex; gap: 12px; align-items: center; }
.transfer-card-heading > div { display: grid; gap: 4px; }
.transfer-card-heading > div > span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.transfer-symbol { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--green); background: var(--green-soft); font-size: 20px; font-weight: 750; }
.transfer-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--line); }
.transfer-step { margin: 0; }
.transfer-step > span { display: flex; align-items: center; gap: 7px; }
.transfer-step > span b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-size: 11px; }
.transfer-step select:disabled { color: #9a9aa0; background: #f1f1f3; cursor: not-allowed; }
.transfer-step small, .transfer-empty { color: var(--muted); font-size: 11px; }
.transfer-empty { margin-top: 16px; padding: 13px 14px; border-radius: 12px; background: #f1f1f3; }
.trip-cancellation { margin: -4px 0 18px; padding: 0 18px; border: 1px solid #efdad7; border-radius: 14px; background: #fffafa; }
.trip-cancellation > summary { padding: 13px 0; color: #a33a35; cursor: pointer; font-size: 13px; font-weight: 700; }
.trip-cancellation > form { display: flex; gap: 10px; align-items: end; padding: 0 0 15px; }
.trip-cancellation label { flex: 1; display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }
.trip-cancellation input { min-height: 42px; padding: 0 11px; border: 1px solid #d8c8c5; border-radius: 10px; background: white; }
.trip-cancellation.cancelled { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-block: 15px; border-color: #efcbc7; background: #fff1ef; }
.trip-cancellation.cancelled > div { display: grid; gap: 4px; }
.trip-cancellation.cancelled strong { color: #a33a35; }
.trip-cancellation.cancelled span { color: #7a5551; font-size: 12px; white-space: pre-line; }
.today-trip-card.cancelled, .trip-row.cancelled { opacity: .72; background: #fff5f4; }
.trip-cancelled-label { width: fit-content; display: inline-flex; margin-top: 5px; padding: 4px 7px; border-radius: 6px; color: #a33a35; background: #ffe4e1; font-size: 10px; font-weight: 750; }

.simple-search { display: flex; gap: 9px; align-items: center; max-width: 620px; margin-bottom: 18px; }
.simple-search input { flex: 1; min-height: 44px; padding: 0 14px; border: 1px solid #d2d2d7; border-radius: 12px; background: white; outline: none; }
.simple-search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.quiet-link { color: var(--muted); text-decoration: none; font-size: 13px; }
.passenger-directory { max-width: 900px; }
.form-more { border-top: 1px solid var(--line); padding-top: 16px; }
.form-more > summary { width: fit-content; padding: 5px 0; }
.extra-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.extra-fields .wide { grid-column: 1 / -1; }
.form-panel { max-width: 920px; margin-inline: auto; }
.booking-context { max-width: 920px; border-radius: 14px; color: var(--ink); background: white; border: 1px solid var(--line); }
.booking-context > span { background: var(--ink); }

.trip-crew { display: grid; gap: 3px; margin: -4px 0 16px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.trip-crew.needs-assignment { color: var(--amber); }
.trip-assignment { display: flex; align-items: center; gap: 20px; margin: -4px 0 18px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.72); }
.assignment-summary { display: flex; gap: 30px; }
.assignment-summary div { display: grid; gap: 3px; min-width: 150px; }
.assignment-summary span { color: var(--muted); font-size: 11px; }
.assignment-summary strong { font-size: 14px; }
.assignment-editor { position: relative; margin-left: auto; }
.assignment-editor > summary { min-height: 40px; display: flex; align-items: center; padding: 0 14px; border-radius: 999px; color: var(--green); background: white; cursor: pointer; list-style: none; font-size: 13px; font-weight: 650; }
.assignment-editor > summary::-webkit-details-marker { display: none; }
.assignment-editor[open] { flex: 1; }
.assignment-editor[open] > summary { width: fit-content; margin-left: auto; }
.assignment-form { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)) auto; gap: 10px; align-items: end; width: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.assignment-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }
.assignment-form select { min-width: 0; min-height: 42px; padding: 0 10px; border: 1px solid #d2d2d7; border-radius: 10px; background: white; }
.assignment-form .quiet-link { grid-column: 1 / -1; }
.passenger-name { color: var(--ink); font-weight: 700; text-decoration: none; }
.passenger-name:hover, .record-link:hover { color: var(--green); }
.attendance-state { width: fit-content; padding: 4px 7px; border-radius: 6px; color: var(--muted); background: #eeeeF0; font-size: 11px; font-weight: 700; }
.attendance-state.boarded, .booking-status.boarded { color: #1c6b3c; background: #e7f6ed; }
.attendance-state.no_show, .booking-status.no_show { color: #a33a35; background: #fff0ef; }
.attendance-state.refunded { color: white; background: #d70015; }
.attendance-state.transferred { color: #5c3a00; background: #ffd56a; }
.attendance-actions { display: flex; gap: 5px; margin-top: 6px; }
.attendance-actions form, .row-menu form { margin: 0; }
.status-action { min-height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 650; }
.status-action.arrived { color: #1c6b3c; border-color: #cce7d6; background: #eff9f3; }
.status-action.absent { color: #a33a35; border-color: #f0d2cf; background: #fff5f4; }
.status-action.arrived:hover { background: #e1f3e8; }
.status-action.absent:hover { background: #ffe8e6; }
.booking-row.no_show { opacity: .7; }
.booking-row.boarded { background: #fbfefc; }
.booking-row.refunded { background: #fff1f0; box-shadow: inset 5px 0 0 #d70015; }
.booking-row.transferred { background: #fff8e8; box-shadow: inset 5px 0 0 #d99516; }
.booking-row.refunded td, .booking-row.transferred td { color: #66666b; }
.inactive-booking-mark { width: fit-content; display: block; margin: 0 0 5px; padding: 5px 9px; border-radius: 7px; font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.inactive-booking-mark.refunded { color: white; background: #d70015; }
.inactive-booking-mark.transferred { color: #5c3a00; background: #ffd56a; }
.inactive-booking-detail { display: block; margin-bottom: 8px; color: #6e6e73; font-size: 11px; font-weight: 700; }
.row-menu { position: relative; }
.row-menu > summary { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #f1f1f3; cursor: pointer; list-style: none; font-weight: 750; letter-spacing: 1px; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > div { position: absolute; right: 0; z-index: 5; display: grid; width: 205px; margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 16px 44px rgba(0,0,0,.14); }
.row-menu a, .row-menu button { width: 100%; display: block; padding: 10px; border: 0; border-radius: 8px; color: var(--ink); background: transparent; text-align: left; text-decoration: none; cursor: pointer; font-size: 13px; }
.row-menu a:hover, .row-menu button:hover { background: #f4f4f6; }
.row-menu .destructive-link { color: var(--red); }
.row-menu .restore-link { color: var(--green-dark); font-weight: 750; }
.record-highlight { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 12px; margin-bottom: 18px; }
.record-highlight > div { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.record-highlight span, .cell-subtitle { display: block; color: var(--muted); font-size: 11px; }
.record-highlight strong, .record-highlight a { font-size: 17px; font-weight: 700; }
.record-highlight a { color: var(--green); text-decoration: none; }
.related-bookings { max-width: 1100px; }
.related-bookings .panel-heading { padding: 20px 20px 0; }
.record-link { color: var(--ink); font-weight: 700; text-decoration: none; }
.cell-subtitle { margin-top: 3px; }
.booking-status { display: inline-flex; padding: 5px 8px; border-radius: 7px; color: var(--muted); background: #eeeeF0; font-size: 11px; font-weight: 700; }
.booking-status.cancelled, .booking-status.refunded { color: #a33a35; background: #fff0ef; }
.partner-badge { width: fit-content; display: block; margin-bottom: 6px; padding: 4px 7px; border-radius: 999px; color: #5d4300; background: #fff0bd; font-size: 10px; font-weight: 800; }
.partner-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.8); }
.partner-toolbar > div { display: grid; gap: 5px; }
.partner-toolbar > div strong { font-size: 20px; }
.partner-toolbar > div span { color: var(--muted); font-size: 13px; }
.period-form { display: flex; align-items: end; gap: 8px; }
.period-form label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.period-form input { min-height: 40px; padding: 0 10px; border: 1px solid #d2d2d7; border-radius: 10px; background: white; }
.partner-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.partner-summary-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.partner-summary-grid > div { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.partner-summary-grid span, .partner-summary-grid small { color: var(--muted); font-size: 11px; }
.partner-summary-grid strong { font-size: 24px; letter-spacing: -.03em; }
.partner-summary-grid .primary-metric { color: white; border-color: var(--green); background: var(--green); }
.partner-summary-grid .primary-metric span { color: rgba(255,255,255,.76); }
.partner-table, .partner-detail-table { width: 100%; border-collapse: collapse; }
.partner-table th, .partner-table td, .partner-detail-table th, .partner-detail-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.partner-table th, .partner-detail-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.partner-table td small, .partner-detail-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.amount-due { color: #9c5b00; }
.compact-partner-toolbar { align-items: center; }
.partner-payout-card { margin-bottom: 18px; padding: 0 18px 18px; border: 1px solid #b9dfc7; border-radius: 16px; background: #f5fcf7; }
.partner-payout-card > summary { padding: 16px 0; cursor: pointer; font-weight: 800; }
.payout-form { display: grid; grid-template-columns: 160px 1fr 1fr auto; gap: 10px; align-items: end; }
.payout-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.payout-form input { min-height: 42px; padding: 0 11px; border: 1px solid #cbd8cf; border-radius: 10px; background: white; }
.payout-form > small { grid-column: 1 / -1; color: var(--muted); }
.partner-days { display: grid; gap: 12px; }
.partner-day { margin: 0; overflow: hidden; }
.partner-day > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; cursor: pointer; list-style: none; }
.partner-day > summary::-webkit-details-marker { display: none; }
.partner-day > summary span { display: grid; gap: 3px; }
.partner-day > summary small { color: var(--muted); }
.partner-day > summary b { color: var(--green-dark); }
.commission-status { width: fit-content; display: block; margin-bottom: 4px; padding: 4px 7px; border-radius: 999px; color: var(--muted); background: #eeeef0; font-size: 10px; font-weight: 800; }
.commission-status.accrued, .commission-status.partial { color: #8a5300; background: #fff0bd; }
.commission-status.paid { color: #176836; background: #e2f5e8; }
.commission-status.void { color: #9b3a35; background: #fff0ef; }
.payout-history { margin-top: 18px; }
.page-lead { max-width: 620px; margin: -10px 0 22px; color: var(--muted); font-size: 15px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-card-wide { grid-column: 1 / -1; }
.settings-card { margin: 0; }
.settings-card .panel-heading { align-items: center; }
.settings-card .panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.compact-button { min-height: 38px; padding-inline: 14px; font-size: 13px; }
.settings-list { display: grid; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 64px; padding: 11px 0; border-top: 1px solid var(--line); }
.settings-row > div { display: grid; gap: 4px; }
.settings-row span { color: var(--muted); font-size: 12px; }
.schedule-settings-main { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 12px !important; }
.schedule-settings-main > div { display: grid; gap: 4px; }
.schedule-settings-main .route-number { flex: 0 0 auto; color: white; }
.compact-empty { min-height: 120px; }
.asset-form-panel { max-width: 650px; }
.schedule-form-panel { max-width: 1200px; }
.weekday-field { margin: 0; padding: 0; border: 0; }
.weekday-field legend { margin-bottom: 8px; color: #40534c; font-size: 13px; font-weight: 800; }
.weekday-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.weekday-picker label { cursor: pointer; }
.weekday-picker input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-picker span { min-height: 44px; display: grid; place-items: center; border: 1px solid #d2d2d7; border-radius: 10px; color: var(--muted); background: white; font-size: 12px; font-weight: 700; }
.weekday-picker input:checked + span { color: white; border-color: var(--ink); background: var(--ink); }
.weekday-picker input:focus-visible + span { outline: 3px solid rgba(0,113,227,.2); outline-offset: 2px; }
.toggle-field { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; }
.toggle-field input { width: 20px; height: 20px; accent-color: var(--green); }
.toggle-field span { display: grid; gap: 3px; }
.toggle-field small { color: var(--muted); }
.route-stops-editor { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.route-stops-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.route-stops-heading > div { display: grid; gap: 4px; }
.route-stops-heading > div > strong { font-size: 18px; }
.route-stops-heading > div > span { color: var(--muted); font-size: 12px; }
.route-stops-heading .secondary-button { flex: 0 0 auto; }
.stop-editor-list { display: grid; gap: 8px; }
.stop-editor-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #fafafa; }
.stop-editor-index { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--ink); font-size: 12px; font-weight: 750; }
.stop-editor-fields { min-width: 0; display: grid; grid-template-columns: minmax(180px, 1.6fr) 105px 105px minmax(150px, 1fr) minmax(150px, 1fr); gap: 8px; align-items: start; }
.stop-editor-fields .field { min-width: 0; font-size: 11px; }
.stop-editor-fields .field input { min-height: 40px; padding: 8px 9px; border-color: #d7d7da; }
.stop-editor-fields .field small { color: var(--muted); font-size: 9px; font-weight: 500; }
.stop-editor-actions { display: grid; grid-template-columns: repeat(2, 34px); gap: 5px; }
.stop-editor-actions button { min-height: 34px; border: 0; border-radius: 8px; color: var(--muted); background: #ededf0; cursor: pointer; font-weight: 700; }
.stop-editor-actions button:disabled { opacity: .35; cursor: default; }
.stop-editor-actions .remove-stop { grid-column: 1 / -1; padding: 0 7px; color: var(--red); font-size: 10px; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand { padding-inline: 8px; }
  .nav-link { padding: 11px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manifest-layout { grid-template-columns: 1fr; }
  .manifest-summary { position: static; }
  .trip-row { grid-template-columns: 58px minmax(180px, 1fr) 90px 110px 20px; gap: 10px; }
  .dispatch-trip-head { grid-template-columns: 1fr auto; }
  .dispatch-actions { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr; }
  .trip-assignment { align-items: flex-start; }
  .assignment-editor[open] { min-width: 0; }
  .assignment-form { grid-template-columns: 1fr; }
  .assignment-form .quiet-link { grid-column: auto; }
  .stop-editor-row { align-items: start; }
  .stop-editor-fields { grid-template-columns: minmax(200px, 1fr) 110px 110px; }
  .stop-editor-fields .field:nth-child(4), .stop-editor-fields .field:nth-child(5) { grid-column: span 1; }
}

@media print {
  .sidebar, .topbar, .back-link, .hero-button, .print-button, .print-menu, .manifest-note, .flash, .trip-view-tabs, .manifest-filters, .manifest-summary, [data-trip-panel="seats"], .edit-column { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  .trip-hero { color: var(--ink); background: white; border: 1px solid var(--line); box-shadow: none; }
  .trip-hero .eyebrow, .trip-hero p, .hero-stats span { color: var(--muted); }
  .manifest-layout { display: block; }
  .seat-panel { box-shadow: none; }
  [data-trip-panel="manifest"] { display: block !important; padding: 0; }
  .trip-passenger-table { min-width: 0; font-size: 10px; }
  .trip-passenger-table th, .trip-passenger-table td { padding: 7px 5px; white-space: normal; }
}

@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px; }
  .brand { padding: 0 4px 12px; }
  .brand > div { display: block; }
  nav { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; padding-bottom: 4px; }
  .nav-link, .nav-link.active, .nav-link:not(.active) { min-width: 0; justify-content: center; font-size: 10.5px; padding: 10px 3px; white-space: nowrap; }
  .nav-dot, .logout-form { display: none; }
  .content { padding: 22px 15px 40px; }
  .topbar { align-items: center; }
  .environment { display: none; }
  .kpi-grid, .two-column, .import-layout, .finance-strip, .mini-kpis, .mapping-grid { grid-template-columns: 1fr; }
  .section-intro { align-items: flex-start; flex-direction: column; }
  .section-intro .primary-button { width: 100%; }
  .trip-hero { align-items: flex-start; flex-direction: column; }
  .trip-totals { margin-left: 0; }
  .trip-actions { width: 100%; }
  .trip-actions .hero-button { flex: 1; }
  .trip-actions { flex-wrap: wrap; }
  .print-menu[open] { width: 100%; order: 3; }
  .print-menu[open] > summary { width: 100%; justify-content: center; }
  .print-menu > div { position: static; width: 100%; margin-top: 8px; padding: 7px; box-shadow: none; }
  .print-menu a { min-height: 46px; display: flex; align-items: center; padding: 0 14px; border-radius: 9px; background: #f5f5f7; font-weight: 650; }
  .workday-toolbar { grid-template-columns: 1fr 1fr; }
  .current-workday { grid-column: 1 / -1; grid-row: 1; }
  .day-step { min-height: 52px; }
  .date-jump { grid-column: 1 / -1; }
  .date-picker-form { width: 100%; }
  .date-picker-form input { flex: 1; }
  .date-picker-form { flex-direction: column; align-items: stretch; }
  .date-picker-form label { width: 100%; }
  .transfer-steps { grid-template-columns: 1fr; }
  .trip-cancellation > form, .trip-cancellation.cancelled { align-items: stretch; flex-direction: column; }
  .trip-card-grid { grid-template-columns: 1fr; }
  .attention-strip { align-items: flex-start; flex-direction: column; gap: 7px; }
  .attention-strip strong { margin-right: 0; }
  .mail-record { grid-template-columns: 1fr; gap: 13px; padding: 16px; }
  .mail-record-title { align-items: flex-start; flex-direction: column; }
  .mail-record-title strong { max-width: 100%; white-space: normal; }
  .mail-record-actions { align-items: stretch; flex-direction: column; }
  .mail-record-actions a, .mail-record-actions button { width: 100%; }
  .attention-table { min-width: 0; }
  .attention-table thead { display: none; }
  .attention-table, .attention-table tbody, .attention-table tr, .attention-table td { display: block; width: 100%; }
  .attention-row { padding: 15px; border-bottom: 1px solid var(--line); }
  .attention-row td { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 5px 0; border: 0; }
  .attention-row td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
  .attention-row td:first-child { padding-left: 10px; }
  .mail-id-cell { display: grid !important; grid-template-columns: 88px minmax(0, 1fr) !important; }
  .mail-id-cell > * { grid-column: 2; }
  .mail-id-cell::before { grid-column: 1; grid-row: 1 / span 3; }
  .attention-actions { display: flex !important; grid-template-columns: 1fr !important; margin-top: 8px; }
  .attention-actions::before { display: none; }
  .mail-detail-header { grid-template-columns: 1fr; }
  .partner-toolbar { align-items: stretch; flex-direction: column; }
  .period-form { display: grid; grid-template-columns: 1fr 1fr; }
  .period-form .secondary-button { grid-column: 1 / -1; }
  .partner-summary-grid, .partner-summary-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payout-form { grid-template-columns: 1fr; }
  .payout-form > small { grid-column: auto; }
  .partner-table thead, .partner-detail-table thead { display: none; }
  .partner-table tr, .partner-detail-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; border-bottom: 1px solid var(--line); }
  .partner-table td, .partner-detail-table td { display: grid; gap: 3px; padding: 8px; border: 0; }
  .partner-table td::before, .partner-detail-table td::before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
  .trip-row { grid-template-columns: 52px 1fr 20px; }
  .trip-row-load, .trip-row-due { display: none; }
  .hero-stats { width: 100%; justify-content: space-between; gap: 10px; }
  .hero-side { width: 100%; justify-items: stretch; }
  .hero-button { justify-content: center; }
  .seat-panel { padding: 14px 10px; }
  .bus-shell { padding: 12px 7px; }
  .seat-grid { gap: 6px 4px; }
  .seat.after-aisle { margin-left: 10px; }
  .seat { min-height: 118px; padding-inline: 6px; }
  .seat-legend { margin-top: 8px; }
  .analytics-list a { grid-template-columns: 1fr 45px; }
  .analytics-bar { display: none; }
  .editor-form, .booking-editor { grid-template-columns: 1fr; }
  .form-panel { padding: 19px 15px; }
  .form-section-title { align-items: flex-start; flex-direction: column; gap: 4px; }
  .booking-context { align-items: flex-start; flex-wrap: wrap; }
  .booking-context small { width: 100%; margin-left: 0; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .dispatch-trip-head { grid-template-columns: 1fr; align-items: start; }
  .dispatch-summary { flex-wrap: wrap; }
  .dispatch-actions .primary-button, .dispatch-actions .secondary-button { flex: 1; }
  .month-toolbar { flex-wrap: wrap; }
  .month-toolbar form { width: 100%; margin-left: 0; }
  .month-toolbar input { flex: 1; }
  .mail-kpis { grid-template-columns: 1fr; }
  .manifest-filters { grid-template-columns: 1fr; }
  .trip-view { padding: 16px 12px; }
  .day-summary { align-items: flex-start; flex-direction: column; gap: 12px; }
  .day-summary > div { padding: 0; }
  .day-summary > div + div { padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .simple-search { align-items: stretch; flex-wrap: wrap; }
  .simple-search input { flex-basis: 100%; }
  .extra-fields { grid-template-columns: 1fr; }
  .extra-fields .wide { grid-column: auto; }
  .schedule-disclosure > summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .schedule-disclosure > summary::after { display: none; }
  .schedule-meta { justify-items: start; grid-column: 2; }
  .schedule-settings-main { align-items: flex-start; }
  .settings-row { align-items: flex-start; }
  .weekday-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .route-stops-heading { align-items: stretch; flex-direction: column; }
  .route-stops-heading .secondary-button { width: 100%; }
  .stop-editor-row { grid-template-columns: 30px minmax(0, 1fr); }
  .stop-editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stop-editor-fields .field { grid-column: 1 / -1; }
  .stop-editor-fields .field:nth-child(2), .stop-editor-fields .field:nth-child(3) { grid-column: span 1; }
  .stop-editor-actions { grid-column: 2; grid-template-columns: 40px 40px 1fr; }
  .stop-editor-actions .remove-stop { grid-column: auto; }
  .today-trip-grid { grid-template-columns: 1fr; }
  .today-trip-card { min-height: 190px; }
  .trip-assignment { align-items: stretch; flex-direction: column; gap: 12px; }
  .assignment-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .assignment-summary div { min-width: 0; }
  .assignment-editor { width: 100%; margin-left: 0; }
  .assignment-editor > summary, .assignment-editor[open] > summary { width: 100%; justify-content: center; margin-left: 0; }
  .trip-passenger-table { min-width: 0; }
  .trip-workspace { padding: 18px 12px; }
  .trip-passenger-table thead { display: none; }
  .trip-passenger-table tbody { display: grid; gap: 12px; }
  .trip-passenger-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: white; }
  .trip-passenger-table tbody tr[hidden] { display: none; }
  .trip-passenger-table td { min-width: 0; display: grid; align-content: start; gap: 5px; padding: 9px 6px; border: 0; white-space: normal; }
  .trip-passenger-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 650; }
  .trip-passenger-table td.mobile-wide { grid-column: 1 / -1; }
  .trip-passenger-table .edit-column { padding-top: 5px; border-top: 1px solid var(--line); }
  .row-menu > summary { width: 100%; border-radius: 9px; }
  .row-menu > div { position: static; width: 100%; box-shadow: none; }
  .attendance-actions { flex-wrap: wrap; }
  .status-action { min-height: 36px; }
  .record-highlight { grid-template-columns: 1fr; }
  .settings-card { padding: 18px; }
  .related-bookings table { min-width: 720px; }
}
