:root {
    --primary: #0b7a55;
    --success: #11945f;
    --deep: #064635;
    --teal: #0b9f95;
    --gold: #f5b700;
    --ink: #172033;
    --muted: #667085;
    --soft: #f4faf6;
    --border: #d7eadf;
    --warning-bg: #fff7df;
    --warning-ink: #6d4c00;
}

body {
    background: var(--soft);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bg-primary,
.btn-primary,
.text-bg-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary:hover,
.btn-success:hover {
    background-color: var(--deep) !important;
    border-color: var(--deep) !important;
}

.btn-success,
.text-bg-success {
    background-color: var(--success) !important;
    border-color: var(--success) !important;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.navbar {
    background: linear-gradient(90deg, var(--deep), var(--primary)) !important;
}

.navbar .nav-link {
    font-weight: 600;
}

.brand-seal {
    width: 128px;
    height: 54px;
    border-radius: 0;
    background: transparent;
    padding: 0;
    object-fit: contain;
}

.hero-section {
    min-height: calc(100vh - 72px);
    background:
        linear-gradient(135deg, rgba(7, 84, 63, 0.94), rgba(8, 127, 91, 0.88)),
        radial-gradient(circle at 75% 20%, rgba(242, 183, 5, 0.35), transparent 30%);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 48px 0 36px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-weight: 800;
    letter-spacing: 0;
}

.hero-seal {
    width: min(340px, 78vw);
    height: 150px;
    border-radius: 0;
    background: transparent;
    padding: 0;
    object-fit: contain;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.hero-text {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.88);
}

.hero-map-panel {
    min-height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 60px rgba(3, 46, 34, 0.32);
    overflow: hidden;
}

.mini-map {
    width: 100%;
    height: 420px;
}

.fast-preview {
    position: relative;
    display: grid;
    align-content: end;
    min-height: 420px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
        linear-gradient(0deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: auto, 54px 54px, 54px 54px;
}

.preview-map-grid {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.preview-route-line {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 45%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), #fff, var(--success));
    transform: rotate(-13deg);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.preview-bus-dot,
.preview-stop {
    position: absolute;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.preview-bus-dot {
    display: grid;
    place-items: center;
    width: 68px;
    height: 44px;
    border: 3px solid #fff;
    background: var(--gold);
    color: #2d2300;
    font-size: 0.82rem;
    font-weight: 1000;
}

.preview-bus-dot.one {
    left: 20%;
    top: 49%;
}

.preview-bus-dot.two {
    right: 20%;
    top: 31%;
    background: #fff;
    color: var(--deep);
}

.preview-stop {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    background: var(--success);
}

.preview-stop.a { left: 17%; top: 38%; }
.preview-stop.b { left: 48%; top: 45%; }
.preview-stop.c { right: 17%; top: 55%; }

.preview-copy {
    position: relative;
    z-index: 1;
    padding: 28px;
    color: #fff;
    background: linear-gradient(0deg, rgba(6, 70, 53, 0.9), rgba(6, 70, 53, 0));
}

.preview-copy h2 {
    max-width: 440px;
    font-size: 1.55rem;
    font-weight: 900;
    margin-bottom: 14px;
}

.section-pad {
    padding: 64px 0;
}

.page-header {
    background: #fff;
    padding: 56px 0 36px;
    border-bottom: 1px solid var(--border);
}

.page-seal,
.footer-seal {
    width: 160px;
    height: 82px;
    border-radius: 0;
    background: transparent;
    padding: 0;
    object-fit: contain;
    flex: 0 0 auto;
}

.footer-seal {
    width: 150px;
    height: 70px;
}

.dedication-text {
    color: #fff7cf;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.project-note {
    max-width: 660px;
    border-left: 4px solid var(--gold);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.94);
    font-weight: 650;
    padding: 12px 14px;
}

.hero-service-status,
.page-service-status,
.map-service-status {
    display: grid;
    gap: 2px;
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 800;
}

.hero-service-status {
    max-width: 520px;
    margin-bottom: 14px;
}

.hero-service-status span,
.page-service-status span,
.map-service-status span {
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-service-status.is-live,
.page-service-status.is-live,
.map-service-status.is-live {
    background: #e8fff3;
    color: var(--deep);
    border: 1px solid #8bd8ae;
}

.hero-service-status.is-closed,
.page-service-status.is-closed,
.map-service-status.is-closed {
    background: var(--warning-bg);
    color: var(--warning-ink);
    border: 1px solid #f2d789;
}

.contact-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--border);
    border-left: 6px solid var(--success);
    border-radius: 8px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(7, 84, 63, 0.07);
}

.contact-band h2 {
    font-weight: 800;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer {
    background: linear-gradient(90deg, var(--deep), var(--primary));
}

.service-advisory {
    background: var(--warning-bg);
    border-bottom: 1px solid #f2d789;
    color: var(--warning-ink);
    padding: 10px 0;
}

.service-advisory strong {
    margin-right: 6px;
}

.route-advisory-banner {
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 800;
}

.route-advisory-success {
    background: #e8fff3;
    color: var(--deep);
    border: 1px solid #9bdcba;
}

.route-advisory-warning,
.route-advisory-info {
    background: var(--warning-bg);
    color: var(--warning-ink);
    border: 1px solid #f2d789;
}

.route-advisory-danger {
    background: #fff1f0;
    color: #8a1f11;
    border: 1px solid #ffb3aa;
}

.route-advisory-secondary {
    background: #f2f4f7;
    color: #475467;
    border: 1px solid #d0d5dd;
}

.direction-guide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.direction-guide div {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
    padding: 10px;
}

.direction-guide span {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.direction-guide strong {
    display: block;
    line-height: 1.25;
}

.service-hours-card,
.service-hours-pill,
.service-hours-inline {
    border: 1px solid #f0d079;
    background: var(--warning-bg);
    color: var(--warning-ink);
    border-radius: 8px;
    font-weight: 800;
}

.service-hours-card {
    padding: 12px 14px;
}

.service-hours-card strong,
.service-hours-card span {
    display: block;
}

.service-hours-card span {
    font-size: 0.95rem;
}

.service-hours-pill,
.service-hours-inline {
    display: inline-flex;
    padding: 6px 10px;
    font-size: 0.84rem;
}

.page-header.compact {
    padding: 36px 0 24px;
}

.page-header h1,
.section-heading h2 {
    font-weight: 800;
}

.eyebrow {
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feature-card,
.route-card,
.route-detail,
.driver-panel,
.assigned-driver-card,
.driver-stop-capture,
.admin-form,
.admin-card,
.stat-box,
.admin-table {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(7, 84, 63, 0.07);
}

.feature-card,
.route-card,
.route-detail,
.driver-panel,
.assigned-driver-card,
.driver-stop-capture,
.admin-form,
.admin-card,
.stat-box {
    padding: 22px;
}

.feature-card h2,
.route-card h3,
.route-detail h2 {
    font-size: 1.2rem;
    font-weight: 800;
}

.assigned-driver-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.assigned-driver-card h2,
.driver-stop-capture h2 {
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.driver-stop-list {
    display: grid;
    gap: 10px;
}

.driver-trip-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.driver-stop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
    padding: 12px;
}

.coord-badge {
    display: inline-flex;
    margin-left: 6px;
    border-radius: 999px;
    background: #e8fff3;
    color: var(--deep);
    font-size: 0.72rem;
    font-weight: 900;
    padding: 2px 8px;
}

.hero-search {
    max-width: 680px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    padding: 14px;
}

.hero-search .form-label {
    color: #fff;
    font-weight: 800;
}

.setup-checklist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.setup-checklist a {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
    color: var(--ink);
    font-weight: 800;
    padding: 12px;
    text-decoration: none;
}

.setup-checklist span {
    border-radius: 999px;
    background: var(--success);
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 8px;
}

.bottom-sheet-handle {
    display: none;
}

.route-directory {
    display: grid;
    gap: 22px;
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    margin-bottom: 16px;
}

.route-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    flex: 0 0 18px;
}

.route-code {
    color: var(--primary);
    font-weight: 900;
}

.benefit-grid,
.future-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.benefit-grid div,
.future-list span {
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    font-weight: 700;
}

.narrow {
    max-width: 860px;
}

.map-page {
    height: calc(100vh - 56px);
    display: grid;
    grid-template-columns: 440px minmax(0, 1fr);
}

.map-sidebar {
    background: #fff;
    padding: 22px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
}

.selected-route-empty,
.selected-route-card,
.selected-bus-empty,
.selected-bus-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
    padding: 14px;
}

.selected-route-card,
.selected-bus-card {
    border-left: 6px solid var(--primary);
    background: #fff;
}

.selected-bus-card h2 {
    font-size: 1.2rem;
    font-weight: 900;
    margin: 0;
}

.where-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.where-grid div {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--soft);
    padding: 10px;
}

.where-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.where-grid strong {
    display: block;
    color: var(--ink);
    line-height: 1.25;
}

.live-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.live-control-grid .btn {
    min-height: 46px;
    font-weight: 800;
}

.route-stop-scroll {
    max-height: 390px;
    overflow-y: auto;
    display: grid;
    gap: 14px;
}

.route-stop-scroll ol,
.stop-card ol {
    margin: 0;
    padding-left: 0;
    color: var(--ink);
    list-style: none;
}

.stop-card ol {
    counter-reset: stop-counter;
}

.stop-card li {
    counter-increment: stop-counter;
}

.stop-card li::before {
    content: counter(stop-counter) ". ";
    color: var(--muted);
    font-weight: 800;
}

.route-key-stop-grid {
    columns: 2;
    column-gap: 34px;
}

.route-key-stop-grid li {
    break-inside: avoid;
    margin-bottom: 8px;
}

.map-provider-note {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.stop-editor-map {
    width: 100%;
    height: 360px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.favorite-route {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-weight: 800;
    padding: 8px 10px;
}

.service-status-label {
    display: inline-flex;
    border-radius: 999px;
    background: #e8fff3;
    color: var(--deep);
    font-size: 0.78rem;
    font-weight: 900;
    padding: 4px 9px;
}

.loading-skeleton {
    background: linear-gradient(90deg, #eef7f1, #ffffff, #eef7f1);
    background-size: 220% 100%;
    animation: skeleton 1.2s ease-in-out infinite;
    min-height: 84px;
    border-radius: 8px;
}

@keyframes skeleton {
    from { background-position: 220% 0; }
    to { background-position: -220% 0; }
}

.route-stop-scroll li,
.stop-card li {
    margin-bottom: 4px;
}

.tracker-stop-list li {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 10px;
}

.tracker-stop-list li b {
    color: var(--muted);
    margin-right: 4px;
}

.tracker-stop-list li span {
    float: right;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 800;
}

.tracker-stop-list .current-stop {
    background: #e8fff3;
    border-color: #81d8aa;
    box-shadow: inset 4px 0 0 var(--success);
    font-weight: 800;
}

.tracker-stop-list .current-stop span {
    background: var(--success);
    color: #fff;
}

.tracker-stop-list .next-stop {
    background: var(--warning-bg);
    border-color: #f3d77c;
}

.tracker-stop-list .next-stop span {
    background: var(--gold);
    color: #2c2300;
}

.tracker-stop-list .passed-stop {
    background: #eef4f1;
    color: #667085;
}

.tracker-stop-list .passed-stop span {
    background: #d5ded9;
    color: #4a5565;
}

.stop-card {
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    height: 100%;
}

.stop-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--deep);
}

.stop-card h3 span {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.stop-label {
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.map-sidebar h1 {
    font-size: 1.55rem;
    font-weight: 800;
}

.bus-map {
    min-height: 520px;
    width: 100%;
}

.bus-list {
    display: grid;
    gap: 12px;
}

.bus-card {
    border: 1px solid var(--border);
    border-left: 6px solid var(--primary);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bus-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(7, 84, 63, 0.11);
}

.bus-card.is-selected {
    background: #e8fff3;
    box-shadow: 0 10px 24px rgba(17, 148, 95, 0.18);
}

.unavailable-card,
.status-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(7, 84, 63, 0.06);
}

.status-panel h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.status-panel h3 {
    font-size: 1rem;
    font-weight: 800;
}

.status-list {
    display: grid;
    gap: 10px;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: var(--soft);
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.service-alert {
    border-radius: 8px;
}

.clean-list {
    margin: 0;
    padding-left: 1.25rem;
}

.auth-page {
    min-height: calc(100vh - 220px);
    display: grid;
    place-items: center;
    padding: 56px 16px;
}

.auth-card,
.route-search {
    width: min(100%, 460px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(7, 84, 63, 0.1);
    padding: 24px;
}

.auth-card h1 {
    font-weight: 800;
    margin-bottom: 18px;
}

.route-search {
    width: 100%;
}

.chat-support {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1080;
    display: grid;
    justify-items: end;
    gap: 10px;
}

.chat-toggle {
    border: 0;
    border-radius: 999px;
    background: var(--success);
    color: #fff;
    box-shadow: 0 12px 30px rgba(6, 70, 53, 0.28);
    font-weight: 800;
    padding: 12px 18px;
}

.chat-panel {
    width: min(320px, calc(100vw - 36px));
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(6, 70, 53, 0.25);
    padding: 16px;
}

.chat-panel strong {
    display: block;
    color: var(--deep);
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.chat-panel p {
    color: var(--muted);
    margin-bottom: 12px;
}

.chat-panel .form-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--deep);
    margin-bottom: 3px;
}

.chat-status {
    font-size: 0.88rem;
    font-weight: 700;
    margin-top: 10px;
}

.bus-card h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.bus-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.live-now {
    background: #e8fff3;
    border: 1px solid #b8e8cd;
    border-radius: 8px;
    padding: 10px;
}

.live-now span,
.eta-box span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.live-now strong,
.eta-box strong {
    display: block;
    color: var(--ink);
    line-height: 1.25;
}

.eta-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 8px;
}

.eta-box div {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px;
    background: var(--soft);
}

.gps-status {
    padding: 16px;
    border-radius: 8px;
    background: var(--soft);
    border: 1px solid var(--border);
    font-weight: 700;
}

.stat-box span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.stat-box strong {
    display: block;
    font-size: 1.8rem;
}

.admin-table {
    padding: 8px;
}

.form-control,
.form-select,
.btn {
    border-radius: 8px;
}

.btn-lg {
    min-height: 48px;
}

.leaflet-popup-content strong {
    color: var(--ink);
}

.custom-bus-marker {
    background: transparent;
    border: 0;
}

.bus-marker-shell {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--bus-color) 18%, transparent);
}

.bus-marker-shell::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: var(--bus-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.bus-marker-shell.is-selected {
    animation: busPulse 1.5s ease-in-out infinite;
}

.bus-marker-body {
    position: relative;
    z-index: 1;
    width: 30px;
    height: 22px;
    border-radius: 6px;
    background: #fff;
    color: var(--bus-color);
    display: grid;
    place-items: center;
    font-size: 0.58rem;
    font-weight: 1000;
    line-height: 1;
}

.bus-marker-label {
    position: absolute;
    z-index: 2;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    font-size: 0.62rem;
    font-weight: 900;
    padding: 1px 6px;
    white-space: nowrap;
}

@keyframes busPulse {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(245, 183, 0, 0)); }
    50% { filter: drop-shadow(0 0 12px rgba(245, 183, 0, 0.95)); }
}

.active-route-line {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.28));
}

.route-stop-marker,
.nearest-stop-marker,
.user-location-marker {
    background: transparent;
    border: 0;
}

.route-stop-marker span,
.nearest-stop-marker span {
    display: grid;
    place-items: center;
    height: 26px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0 8px;
}

.route-stop-marker.is-passed span {
    background: #98a2b3;
}

.route-stop-marker.is-current span {
    background: var(--success);
    min-width: 48px;
    animation: stopPulse 1.4s ease-in-out infinite;
}

.route-stop-marker.is-next span,
.nearest-stop-marker span {
    background: var(--gold);
    color: #2c2300;
}

@keyframes stopPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.user-location-dot {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(20, 112, 245, 0.2);
    display: grid;
    place-items: center;
}

.user-location-dot::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(20, 112, 245, 0.25);
}

.user-location-dot span {
    width: 14px;
    height: 14px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #1470f5;
    box-shadow: 0 4px 12px rgba(20, 112, 245, 0.42);
}

@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .map-page {
        height: auto;
        grid-template-columns: 1fr;
    }

    .map-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .bus-map {
        height: 70vh;
        min-height: 460px;
    }

    .contact-band {
        align-items: flex-start;
        flex-direction: column;
    }

    .assigned-driver-card,
    .driver-stop-row {
        align-items: stretch;
        flex-direction: column;
    }

    .contact-actions {
        justify-content: flex-start;
    }

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

@media (max-width: 575px) {
    body:has(.map-page) {
        overflow: hidden;
    }

    .section-pad {
        padding: 40px 0;
    }

    .hero-map-panel,
    .mini-map {
        min-height: 320px;
        height: 320px;
    }

    .benefit-grid,
    .future-list {
        grid-template-columns: 1fr;
    }

    .map-page {
        position: relative;
        height: calc(100vh - 64px);
        display: block;
        overflow: hidden;
    }

    .map-sidebar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 700;
        max-height: 46vh;
        padding: 10px 14px 16px;
        border-top-left-radius: 18px;
        border-top-right-radius: 18px;
        border-right: 0;
        border-bottom: 0;
        box-shadow: 0 -16px 42px rgba(6, 70, 53, 0.22);
        transition: max-height 0.24s ease;
    }

    .map-sidebar.is-expanded {
        max-height: 82vh;
    }

    .bottom-sheet-handle {
        display: block;
        width: 48px;
        height: 5px;
        border-radius: 999px;
        background: #cfd8d3;
        margin: 0 auto 10px;
    }

    .bus-map {
        height: 100%;
        min-height: 100%;
    }

    .route-key-stop-grid {
        columns: 1;
    }

    .where-grid,
    .live-control-grid,
    .direction-guide,
    .driver-trip-actions,
    .setup-checklist {
        grid-template-columns: 1fr;
    }

    .map-sidebar h1 {
        font-size: 1.2rem;
    }

    .route-stop-scroll {
        max-height: 230px;
    }
}
