:root {
    color-scheme: light;
    --bg: var(--color-base-200, #f4f8fd);
    --bg-soft: var(--color-base-100, #f8fbff);
    --panel: color-mix(in srgb, var(--color-base-100, #ffffff) 94%, transparent);
    --panel-solid: var(--color-base-100, #ffffff);
    --ink: var(--color-base-content, #111c33);
    --muted: color-mix(in srgb, var(--color-base-content, #111c33) 64%, transparent);
    --muted-2: color-mix(in srgb, var(--color-base-content, #111c33) 46%, transparent);
    --line: color-mix(in srgb, var(--color-base-content, #111c33) 14%, transparent);
    --line-strong: color-mix(in srgb, var(--color-base-content, #111c33) 22%, transparent);
    --primary: var(--color-primary, #0b73f6);
    --primary-dark: color-mix(in srgb, var(--color-primary, #0b73f6) 82%, #001f54);
    --primary-soft: color-mix(in srgb, var(--color-primary, #0b73f6) 12%, var(--color-base-100, #ffffff));
    --success: var(--color-success, #12a86b);
    --success-soft: color-mix(in srgb, var(--color-success, #12a86b) 13%, var(--color-base-100, #ffffff));
    --accent: var(--color-warning, #ff8a1f);
    --accent-soft: color-mix(in srgb, var(--color-warning, #ff8a1f) 13%, var(--color-base-100, #ffffff));
    --danger: var(--color-error, #ef3b45);
    --danger-soft: color-mix(in srgb, var(--color-error, #ef3b45) 12%, var(--color-base-100, #ffffff));
    --warning: var(--color-warning, #c76a00);
    --shadow: 0 18px 42px color-mix(in srgb, var(--color-base-content, #111c33) 10%, transparent);
    --shadow-soft: 0 10px 24px color-mix(in srgb, var(--color-base-content, #111c33) 8%, transparent);
    --radius: var(--radius-box, 0.75rem);
    --radius-sm: var(--radius-field, 0.5rem);
    font-family: var(--font-sans, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

html[data-theme="light"] {
    --color-primary: #0b73f6;
    --color-primary-content: #ffffff;
    --color-accent: #12a86b;
    --color-accent-content: #ffffff;
    --color-info: #2f8ce8;
    --color-success: #12a86b;
    --color-warning: #ff8a1f;
    --color-error: #ef3b45;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(180deg, var(--color-base-100, #ffffff) 0%, var(--bg) 52%, var(--color-base-200, #eef5ff) 100%);
    color: var(--ink);
    overflow-x: hidden;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(17, 28, 51, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 28, 51, 0.028) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
}

a {
    color: var(--primary);
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.8rem 0.95rem;
    background: #fff;
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(11, 115, 246, 0.65);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(11, 115, 246, 0.11);
}

label {
    display: grid;
    gap: 0.42rem;
    color: var(--muted);
    font-weight: 750;
}

.flyon-surface,
.auth-panel,
.panel,
.trip-card,
.empty-state,
.console-panel,
.console-pair,
.console-empty,
.console-students,
.console-top,
.console-stat,
.console-map,
.console-metric,
.list-item,
.pwa-card,
.student-desktop-header,
.driver-desktop-header {
    border-color: var(--color-base-content, #111c33);
    border-color: color-mix(in srgb, var(--color-base-content, #111c33) 12%, transparent);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 76px;
    padding: 0.7rem clamp(1rem, 3vw, 2.15rem);
    border-bottom: 1px solid rgba(205, 216, 231, 0.76);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px) saturate(1.2);
}

.brand {
    display: inline-grid;
    grid-template-columns: 46px auto;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.1;
}

.brand::before {
    width: 46px;
    height: 46px;
    content: "";
    border-radius: 16px;
    background: #fff var(--platform-logo-url, url("/icons/icon.svg")) center / 32px no-repeat;
    box-shadow: 0 8px 18px rgba(11, 115, 246, 0.16);
}

.brand small {
    display: block;
    margin-top: 0.18rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.94rem;
}

.topnav > a:not(.language-switch),
.link-button,
.user-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.45rem 0.78rem;
    color: var(--muted);
    background: transparent;
    font-weight: 800;
}

.topnav > a:not(.language-switch):hover,
.link-button:hover {
    border-color: var(--line);
    color: var(--primary);
    background: #fff;
}

.topnav form {
    margin: 0;
}

.user-pill {
    border-color: var(--line);
    color: var(--ink);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.language-switch {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid rgba(11, 115, 246, 0.22);
    border-radius: 999px;
    padding: 0.45rem 0.74rem;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 900;
}

.link-button {
    appearance: none;
    cursor: pointer;
}

.shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(1rem, 2.8vw, 2rem);
}

.auth-panel,
.panel,
.trip-card,
.empty-state,
.console-panel,
.console-pair,
.console-empty,
.console-students,
.console-top,
.console-stat,
.console-map,
.console-metric,
.list-item {
    border: 1px solid rgba(210, 221, 236, 0.88);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.auth-panel {
    position: relative;
    overflow: hidden;
    max-width: 460px;
    margin: 7vh auto;
    padding: 1.65rem;
}

.auth-panel-wide {
    max-width: 820px;
}

.login-page {
    min-height: 100dvh;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 247, 255, 0.96) 100%),
        #eef5ff;
}

.login-page > .topbar,
.login-page > .mobile-tabbar {
    display: none;
}

.login-page .auth-shell {
    display: grid;
    align-items: center;
    min-height: 100dvh;
    width: min(520px, 100%);
    padding: clamp(1rem, 3vw, 2rem);
}

.login-screen {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
}

.login-form-card,
.login-visual-panel {
    border: 1px solid rgba(192, 212, 238, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(20, 41, 82, 0.08);
}

.login-form-card {
    display: grid;
    gap: 1.12rem;
    align-content: center;
    padding: clamp(1.25rem, 3.4vw, 1.9rem);
}

.login-card-top,
.login-brand,
.login-form-row,
.login-footer-actions,
.login-role-list div {
    display: flex;
    align-items: center;
}

.login-card-top,
.login-form-row,
.login-footer-actions {
    justify-content: space-between;
    gap: 0.8rem;
}

.login-brand {
    gap: 0.65rem;
    color: var(--ink);
}

.login-brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: #fff var(--platform-logo-url, url("/icons/icon.svg")) center / 36px no-repeat;
    box-shadow: 0 14px 28px rgba(11, 115, 246, 0.16);
}

.login-brand strong,
.login-brand small {
    display: block;
}

.login-brand strong {
    font-size: 1rem;
    font-weight: 950;
}

.login-brand small {
    margin-top: 0.1rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.login-language {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid rgba(11, 115, 246, 0.24);
    border-radius: 999px;
    padding: 0.45rem 0.78rem;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 950;
}

.login-heading {
    display: grid;
    gap: 0.28rem;
}

.login-heading h1 {
    margin: 0;
    color: #101a32;
    font-size: clamp(1.85rem, 5vw, 2.45rem);
    line-height: 1.05;
}

.login-badge {
    width: fit-content;
    border-radius: 999px;
    padding: 0.34rem 0.72rem;
    background: rgba(17, 168, 106, 0.12);
    color: #0a8653;
    font-size: 0.8rem;
    font-weight: 950;
}

.login-form label {
    color: #273856;
}

.login-form input {
    min-height: 54px;
    border-color: rgba(193, 211, 235, 0.96);
    border-radius: 14px;
    background: #f8fbff;
}

.auth-code-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.75rem;
}

.auth-code-button {
    min-height: 54px;
    white-space: nowrap;
}

.auth-code-hint {
    margin: -0.35rem 0 0;
    border: 1px solid rgba(11, 115, 246, 0.18);
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    background: var(--primary-soft);
    color: var(--primary-dark);
    text-align: center;
    font-weight: 950;
    letter-spacing: 0.18em;
}

.auth-password-details {
    border: 1px solid rgba(193, 211, 235, 0.84);
    border-radius: 14px;
    padding: 0.8rem;
    background: rgba(248, 251, 255, 0.78);
}

.auth-password-details summary {
    cursor: pointer;
    color: var(--primary-dark);
    font-weight: 900;
}

.auth-password-details label {
    margin-top: 0.75rem;
}

.login-form-row {
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 850;
}

.login-submit {
    width: 100%;
    min-height: 54px;
    border-radius: 14px;
}

.login-footer-actions {
    border-top: 1px solid rgba(215, 226, 241, 0.9);
    padding-top: 1rem;
    color: var(--muted);
    font-weight: 850;
}

.login-footer-actions a,
.login-form-row a {
    color: var(--primary);
    font-weight: 950;
}

.login-visual-panel {
    display: grid;
    gap: 1.2rem;
    align-content: space-between;
    overflow: hidden;
    padding: clamp(1.15rem, 2.4vw, 1.9rem);
    background:
        linear-gradient(135deg, rgba(236, 246, 255, 0.96), rgba(255, 255, 255, 0.98)),
        #fff;
}

.login-visual-copy {
    display: grid;
    gap: 0.55rem;
    max-width: 620px;
}

.login-visual-copy span {
    color: var(--primary);
    font-size: 0.86rem;
    font-weight: 950;
}

.login-visual-copy h2 {
    margin: 0;
    color: #101a32;
    font-size: clamp(1.65rem, 3vw, 2.8rem);
}

.login-visual-copy p {
    margin: 0;
    max-width: 58ch;
    color: #5d6c86;
    line-height: 1.7;
}

.login-route-visual {
    position: relative;
    min-height: 210px;
    border: 1px solid rgba(190, 213, 242, 0.88);
    border-radius: 16px;
    overflow: hidden;
    background: #f7fbff;
}

.login-route-visual .pwa-map-canvas {
    min-height: 210px;
    border-radius: 0;
}

.login-bus-chip {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58px;
    height: 58px;
    border: 6px solid #fff;
    border-radius: 20px;
    background: #0b73f6 url("/icons/icon.svg") center / 38px no-repeat;
    box-shadow: 0 18px 34px rgba(11, 115, 246, 0.24);
    transform: translate(-50%, -50%);
}

.login-role-list {
    display: grid;
    gap: 0.65rem;
}

.login-role-list div {
    gap: 0.7rem;
    border: 1px solid rgba(210, 224, 242, 0.82);
    border-radius: 14px;
    padding: 0.76rem;
    background: rgba(255, 255, 255, 0.78);
}

.login-role-list strong,
.login-role-list small {
    display: block;
}

.login-role-list strong {
    color: #13203a;
    font-weight: 950;
}

.login-role-list small {
    margin-top: 0.12rem;
    color: var(--muted);
    line-height: 1.45;
}

.login-role-icon {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef6ff;
    color: #0b73f6;
}

.login-role-icon::before {
    position: absolute;
    inset: 11px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.login-role-icon::after {
    position: absolute;
    right: 10px;
    bottom: 8px;
    left: 10px;
    height: 12px;
    border-radius: 12px 12px 5px 5px;
    background: currentColor;
    content: "";
}

.login-role-icon.driver {
    background: #ecfdf5;
    color: #11a86a;
}

.login-role-icon.admin {
    background: #fff7e8;
    color: #f59e0b;
}

.auth-panel::before {
    display: block;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    content: "";
    border-radius: 20px;
    background: #fff var(--platform-logo-url, url("/icons/icon.svg")) center / 44px no-repeat;
    box-shadow: 0 16px 32px rgba(11, 115, 246, 0.18);
}

.muted-copy {
    margin: 0.65rem 0 1.15rem;
    color: var(--muted);
    line-height: 1.7;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 1rem;
    font-weight: 850;
}

.role-grid,
.form-grid {
    display: grid;
    gap: 0.85rem;
}

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

.role-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.9rem;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.role-card:has(input:checked) {
    border-color: rgba(11, 115, 246, 0.42);
    background: var(--primary-soft);
    box-shadow: 0 12px 24px rgba(11, 115, 246, 0.09);
}

.role-card input {
    width: auto;
    min-height: auto;
    margin-top: 0.18rem;
}

.role-card strong,
.role-card small {
    display: block;
}

.role-card small {
    margin-top: 0.25rem;
    color: var(--muted);
    font-weight: 650;
    line-height: 1.5;
}

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

.form-section {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.geo-picker,
.optional-details {
    margin-top: 0.9rem;
    border: 1px solid rgba(11, 115, 246, 0.16);
    border-radius: var(--radius-sm);
    padding: 0.95rem;
    background: rgba(248, 251, 255, 0.82);
}

.geo-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.geo-status {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.address-map {
    min-height: 220px;
    margin-top: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #eef4fb;
}

.optional-details summary {
    cursor: pointer;
    color: var(--primary-dark);
    font-weight: 850;
}

.optional-details .form-grid {
    margin-top: 0.9rem;
}

.pwa-address-form {
    display: grid;
    gap: 1rem;
}

.pwa-address-form h3 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 900;
    color: var(--ink);
}

.push-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(11, 115, 246, 0.16);
    border-radius: var(--radius);
    padding: 1rem;
    background: linear-gradient(135deg, rgba(232, 242, 255, 0.92), rgba(255, 255, 255, 0.94));
    box-shadow: var(--shadow-soft);
}

.push-control-compact {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 0.8rem;
    border-radius: 14px;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
}

.push-control-compact h2 {
    margin: 0;
    font-size: 0.95rem;
}

.push-control-compact [data-push-status] {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
}

.push-control-compact .push-actions {
    gap: 0.45rem;
}

.push-control-compact .button {
    min-height: 38px;
    padding: 0.48rem 0.68rem;
    font-size: 0.82rem;
}

.push-control h2 {
    margin-bottom: 0.35rem;
}

.push-control p:not(.eyebrow) {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.65;
}

.push-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.push-actions .button {
    min-height: 42px;
    padding-block: 0.56rem;
    white-space: nowrap;
}

.toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: grid;
    gap: 0.65rem;
    width: min(360px, calc(100vw - 2rem));
}

.toast {
    border: 1px solid rgba(210, 221, 236, 0.9);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.toast strong,
.toast span {
    display: block;
}

.toast span {
    margin-top: 0.18rem;
    color: var(--muted);
    line-height: 1.5;
}

.public-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
    align-items: center;
    gap: clamp(1rem, 4vw, 2rem);
    min-height: calc(100vh - 132px);
    padding-block: clamp(1rem, 5vh, 3.5rem);
}

.hero-content {
    max-width: 660px;
}

.hero-mark {
    display: inline-block;
    width: 78px;
    height: 78px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(11, 115, 246, 0.16);
    border-radius: 24px;
    background: #fff var(--platform-logo-url, url("/icons/icon.svg")) center / 54px no-repeat;
    box-shadow: 0 20px 42px rgba(11, 115, 246, 0.18);
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.public-visual {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid rgba(191, 219, 254, 0.86);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.84)),
        radial-gradient(circle at 22% 24%, rgba(11, 115, 246, 0.16), transparent 30%);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
}

.visual-map {
    position: absolute;
    inset: 1rem;
    overflow: hidden;
    border-radius: 20px;
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.78));
    background-size: 42px 42px, 42px 42px, auto;
}

.visual-route {
    position: absolute;
    right: 16%;
    top: 53%;
    width: 68%;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, #16a34a 0 22%, var(--primary) 22% 100%);
    box-shadow: 0 10px 26px rgba(11, 115, 246, 0.2);
    transform: rotate(-8deg);
}

[dir="ltr"] .visual-route {
    right: auto;
    left: 16%;
}

.visual-route::before,
.visual-route::after {
    content: "";
    position: absolute;
    width: 36%;
    height: 7px;
    border-radius: inherit;
    background: inherit;
}

.visual-route::before {
    right: 28%;
    top: -44px;
    transform: rotate(24deg);
}

.visual-route::after {
    left: 6%;
    top: 42px;
    transform: rotate(-24deg);
}

.visual-stop,
.visual-bus {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.visual-stop {
    width: 32px;
    height: 32px;
    border: 6px solid #fff;
    border-radius: 999px;
}

.visual-stop.start {
    right: 14%;
    top: 58%;
    background: #16a34a;
}

.visual-stop.mid {
    right: 48%;
    top: 37%;
    background: var(--primary);
}

.visual-stop.end {
    left: 16%;
    top: 64%;
    background: #ef4444;
}

[dir="ltr"] .visual-stop.start {
    right: auto;
    left: 14%;
}

[dir="ltr"] .visual-stop.mid {
    right: auto;
    left: 48%;
}

[dir="ltr"] .visual-stop.end {
    left: auto;
    right: 16%;
}

.visual-bus {
    right: 44%;
    top: 47%;
    width: 64px;
    height: 64px;
    border: 8px solid #dbeafe;
    border-radius: 22px;
    background: #fff var(--platform-logo-url, url("/icons/icon.svg")) center / 40px no-repeat;
}

[dir="ltr"] .visual-bus {
    right: auto;
    left: 44%;
}

.visual-stats {
    position: absolute;
    right: 1.65rem;
    bottom: 1.65rem;
    z-index: 3;
    display: grid;
    gap: 0.15rem;
    min-width: 150px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 18px;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

[dir="ltr"] .visual-stats {
    right: auto;
    left: 1.65rem;
}

.visual-stats span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.visual-stats strong {
    color: var(--primary);
    font-size: 1.65rem;
}

.gateway-grid {
    display: grid;
    gap: 0.85rem;
}

.gateway-card {
    border: 1px solid rgba(210, 221, 236, 0.88);
    border-radius: var(--radius);
    padding: 1.05rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.gateway-card span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 900;
}

.gateway-card h2 {
    margin-top: 0.8rem;
}

.gateway-card p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.7;
}

.page-heading,
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-heading {
    min-height: 72px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 0.75rem;
    font-size: 1.08rem;
    line-height: 1.25;
}

.eyebrow {
    margin-bottom: 0.3rem;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
}

.panel {
    padding: 1.05rem;
    margin-bottom: 1rem;
}

.stack {
    display: grid;
    gap: 1rem;
}

.stack > * {
    grid-column: auto;
    grid-row: auto;
    transform: none;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.checkline input {
    width: auto;
    min-height: auto;
}

.button,
button.primary,
.primary:not(.btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.68rem 1rem;
    background: #fff;
    color: var(--ink);
    font-weight: 900;
    line-height: 1.1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(20, 41, 82, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.btn.primary,
.btn.btn-primary {
    min-height: 46px;
}

.button:hover,
button.primary:not(.btn):hover,
.primary:not(.btn):hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(20, 41, 82, 0.12);
}

.button.primary,
button.primary:not(.btn),
.primary[type="submit"]:not(.btn) {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #075ee6);
    color: #fff;
}

.button.danger,
button.danger {
    border-color: rgba(239, 59, 69, 0.28);
    background: var(--danger-soft);
    color: var(--danger);
}

.button.warning,
button.warning {
    border-color: rgba(255, 138, 31, 0.34);
    background: var(--accent-soft);
    color: var(--warning);
}

.button.tiny {
    min-height: 34px;
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    font-size: 0.72rem;
    box-shadow: none;
}

.button:disabled,
button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
}

.action-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.action-row form {
    margin: 0;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

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

.metric-grid div,
.stop-stack div {
    min-width: 0;
    border: 1px solid rgba(220, 229, 241, 0.82);
    border-radius: var(--radius-sm);
    padding: 0.82rem;
    background: linear-gradient(180deg, #fff, #f9fbff);
}

.metric-grid span,
.stop-stack span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.metric-grid strong,
.stop-stack strong {
    display: block;
    margin-top: 0.18rem;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 950;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    border: 1px solid rgba(18, 168, 107, 0.16);
    border-radius: 999px;
    padding: 0.28rem 0.68rem;
    background: var(--success-soft);
    color: #078250;
    font-weight: 900;
    font-size: 0.82rem;
    white-space: nowrap;
}

.list {
    display: grid;
    gap: 0.8rem;
}

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

.list-item,
.trip-card {
    padding: 1rem;
}

.list-item {
    display: grid;
    gap: 0.25rem;
}

.trip-card {
    display: grid;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.trip-card::before {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 4px;
    height: 100%;
    content: "";
    background: linear-gradient(180deg, var(--primary), var(--success));
}

.split {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.muted,
small,
.list-item span {
    color: var(--muted);
}

.empty-state {
    padding: 1.5rem;
    text-align: center;
}

.flash {
    width: min(1120px, calc(100% - 2rem));
    margin: 1rem auto 0;
    border: 1px solid rgba(18, 168, 107, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.82rem 1rem;
    background: var(--success-soft);
    color: #08784d;
    box-shadow: var(--shadow-soft);
}

.flash.error {
    border-color: rgba(239, 59, 69, 0.22);
    background: var(--danger-soft);
    color: #ba1e2a;
}

.qr-screen {
    display: grid;
    place-items: center;
    gap: 1rem;
    min-height: 68vh;
    text-align: center;
}

.qr-code {
    width: min(340px, 86vw);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.map {
    width: 100%;
    min-height: 430px;
    border: 1px solid rgba(210, 221, 236, 0.94);
    border-radius: var(--radius);
    overflow: hidden;
    background: #e8eef7;
    box-shadow: var(--shadow-soft);
}

.map-full {
    min-height: calc(100vh - 120px);
}

.mobile-tabbar {
    display: none;
}

.mobile-tabbar form {
    display: contents;
}

.console-body {
    background: linear-gradient(180deg, #fbfdff 0%, #eef5ff 100%);
}

.console-body .topbar,
.console-body .mobile-tabbar {
    display: none;
}

.console-shell {
    width: min(1600px, 100%);
    padding: 1rem;
}

.console-pair,
.console-empty {
    max-width: 540px;
    margin: 10vh auto;
    padding: 1.6rem;
}

.console-pair-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0.85rem;
}

.console-pair-form label,
.console-driver-login label {
    display: grid;
    gap: 0.42rem;
}

.console-pair-form input,
.console-driver-login input {
    position: relative;
    z-index: 1;
}

.console-pair-form button,
.console-driver-login button {
    position: relative;
    z-index: 2;
    width: 100%;
}

.console-pair-form > label {
    grid-column: 1;
    grid-row: 1;
}

.console-pair-form > button {
    grid-column: 1;
    grid-row: 2;
    transform: none;
}

.console-grid {
    display: grid;
    grid-template-columns: minmax(340px, 0.34fr) minmax(0, 1fr);
    grid-template-areas:
        "top top"
        "notice notice"
        "stats stats"
        "students map"
        "students metrics"
        "actions actions";
    grid-template-rows: auto auto auto minmax(280px, 1fr) auto auto;
    align-items: start;
    gap: 0.65rem;
    min-height: calc(100vh - 2rem);
}

.console-top {
    grid-area: top;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.62rem 0.9rem;
}

.console-top::before {
    width: 48px;
    height: 48px;
    content: "";
    border-radius: 16px;
    background: #fff var(--platform-logo-url, url("/icons/icon.svg")) center / 34px no-repeat;
    box-shadow: 0 12px 26px rgba(11, 115, 246, 0.16);
    order: -1;
}

.console-top h1 {
    font-size: 1.15rem;
}

.console-top small {
    display: block;
    margin-top: 0.18rem;
    color: var(--muted);
    font-weight: 700;
}

.console-status {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.console-notice,
.safety-banner,
.offline-banner {
    grid-area: notice;
    border: 1px solid rgba(11, 115, 246, 0.18);
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
    background: linear-gradient(180deg, #f7fbff, #eef6ff);
    color: var(--primary-dark);
    font-weight: 950;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.offline-banner {
    grid-area: auto;
    grid-column: 1 / -1;
}

.safety-banner,
.offline-banner {
    border-color: rgba(239, 59, 69, 0.22);
    background: var(--danger-soft);
    color: #ba1e2a;
}

.console-stats {
    grid-area: stats;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.console-stat {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem;
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.45rem;
    font-weight: 950;
}

.stat-icon::before {
    display: block;
    width: 24px;
    height: 24px;
    content: "";
    border-radius: 7px;
    background: currentColor;
}

.stat-icon-bus {
    background: #e8f2ff url("/icons/icon.svg") center / 30px no-repeat;
}

.stat-icon-bus::before {
    display: none;
}

.stat-icon-booked {
    color: #12a86b;
    background: #e7f8f0;
}

.stat-icon-booked::before {
    width: 27px;
    height: 17px;
    border-radius: 999px 999px 7px 7px;
}

.stat-icon-boarded {
    color: #0b73f6;
}

.stat-icon-boarded::before {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: 15px 0 0 -6px currentColor;
}

.stat-icon-remaining {
    color: #ff8a1f;
    background: #fff3e6;
}

.stat-icon-remaining::before {
    width: 24px;
    height: 18px;
    border-radius: 9px;
}

.stat-icon-available {
    color: #12a86b;
    background: #e7f8f0;
}

.stat-icon-available::before {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.console-stat span,
.console-metric span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.console-stat strong,
.console-metric strong {
    display: block;
    margin-top: 0.15rem;
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 950;
}

.console-left {
    display: grid;
    grid-area: students;
    gap: 0.9rem;
    align-content: start;
    min-height: 0;
    max-height: calc(100vh - 330px);
    overflow: auto;
    padding-inline-end: 0.1rem;
}

.console-panel {
    padding: 0.8rem;
}

.console-driver-login {
    display: grid;
    gap: 0.65rem;
}

.console-driver-login p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.console-driver-login form {
    display: grid;
    gap: 0.5rem;
}

.console-driver-login input {
    min-height: 44px;
    border: 1px solid rgba(210, 221, 236, 0.95);
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
}

.console-panel.critical,
.critical-row {
    border-color: rgba(239, 59, 69, 0.22);
    background: var(--danger-soft);
}

.stop-stack {
    display: grid;
    gap: 0.65rem;
}

.console-map {
    position: relative;
    grid-area: map;
    align-self: stretch;
    min-width: 0;
    padding: 0.62rem;
    overflow: hidden;
}

.console-map-inner {
    min-height: clamp(270px, 36vh, 360px);
    height: 100%;
    border: 0;
    box-shadow: none;
}

.console-map-toolbar,
.console-map-summary {
    position: absolute;
    z-index: 610;
}

.console-map-toolbar {
    top: 1rem;
    right: auto;
    left: 1rem;
}

.map-control-button {
    min-height: 42px;
    border: 1px solid rgba(185, 204, 232, 0.9);
    border-radius: 12px;
    padding: 0.45rem 0.7rem;
    background: rgba(255, 255, 255, 0.94);
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft);
    font-weight: 950;
    cursor: pointer;
    backdrop-filter: blur(14px);
}

.console-map-summary {
    inset-inline: 1rem;
    bottom: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    border: 1px solid rgba(205, 218, 238, 0.86);
    border-radius: 16px;
    padding: 0.65rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(20, 41, 82, 0.12);
    backdrop-filter: blur(16px);
}

.console-map-summary div {
    min-width: 0;
    border-inline-start: 1px solid rgba(205, 218, 238, 0.7);
    padding-inline: 0.7rem;
}

.console-map-summary div:first-child {
    border-inline-start: 0;
}

.console-map-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 850;
}

.console-map-summary strong {
    display: block;
    overflow: hidden;
    margin-top: 0.15rem;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.console-map-open {
    overflow: hidden;
}

.console-map.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 90;
    border-radius: 0;
    padding: 0;
    background: #eef5ff;
}

.console-map.is-fullscreen .console-map-inner {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
}

.console-map.is-fullscreen .console-map-toolbar {
    top: max(1rem, env(safe-area-inset-top));
    right: auto;
    left: max(1rem, env(safe-area-inset-left));
}

.console-map.is-fullscreen .console-map-summary {
    inset-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
}

.leaflet-control-layers {
    border: 1px solid rgba(185, 204, 232, 0.85) !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow-soft) !important;
    font: inherit;
    font-weight: 850;
}

.leaflet-control-layers-expanded {
    padding: 0.55rem 0.65rem !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(14px);
}

.transport-map-popup {
    display: grid;
    gap: 0.24rem;
    color: var(--ink);
    font: 800 0.85rem/1.4 Inter, system-ui, sans-serif;
}

.transport-map-popup span {
    color: var(--muted);
    font-size: 0.76rem;
}

.transport-bus-marker {
    display: grid;
    place-items: center;
    border: 4px solid rgba(219, 234, 254, 0.94);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(11, 115, 246, 0.24);
}

.transport-bus-marker span {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--platform-logo-url, url("/icons/icon.svg")) center / 26px no-repeat;
}

.console-students {
    min-height: 0;
    padding: 0.8rem;
}

.console-boarding-code {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 0.75rem;
    align-items: center;
}

.console-boarding-code h2,
.console-boarding-code p {
    margin: 0;
}

.console-boarding-code p {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.console-boarding-code img {
    width: 92px;
    height: 92px;
    border: 1px solid rgba(205, 218, 238, 0.9);
    border-radius: 16px;
    padding: 0.35rem;
    background: #fff;
}

.console-boarding-code strong {
    grid-column: 1 / -1;
    color: var(--primary-dark);
    font-size: 0.9rem;
}

.console-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.console-panel-heading h2 {
    margin: 0;
}

.console-panel-heading span {
    border-radius: 999px;
    padding: 0.28rem 0.58rem;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 950;
}

.console-student-groups {
    display: grid;
    gap: 0.75rem;
}

.console-list-label {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.console-student-cards {
    display: grid;
    gap: 0.45rem;
}

.console-student-cards article {
    display: grid;
    gap: 0.08rem;
    border: 1px solid rgba(205, 218, 238, 0.78);
    border-radius: 14px;
    padding: 0.58rem 0.65rem;
    background: #fff;
}

.console-student-cards strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.console-student-cards span,
.console-student-cards small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.console-student-cards em {
    justify-self: start;
    border-radius: 999px;
    padding: 0.18rem 0.48rem;
    background: var(--success-soft);
    color: var(--success);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 950;
}

.console-student-cards .button.tiny {
    justify-self: start;
    margin-top: 0.28rem;
}

.console-empty-line {
    margin: 0;
    border: 1px dashed rgba(185, 204, 232, 0.9);
    border-radius: 14px;
    padding: 0.65rem;
    color: var(--muted);
    background: rgba(248, 251, 255, 0.82);
    font-size: 0.8rem;
    font-weight: 850;
}

.student-table {
    display: grid;
    gap: 0.48rem;
    max-height: 280px;
    overflow: auto;
    padding-inline-end: 0.15rem;
}

.student-table.full {
    max-height: none;
}

.student-table article {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr 0.9fr auto;
    gap: 0.7rem;
    align-items: center;
    border: 1px solid rgba(220, 229, 241, 0.9);
    border-radius: 14px;
    padding: 0.58rem 0.65rem;
    background: #fff;
}

.student-table span {
    color: var(--muted);
}

.console-metrics {
    display: grid;
    grid-area: metrics;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.console-metric {
    min-height: 78px;
    padding: 0.8rem;
}

.console-actions {
    position: relative;
    z-index: 8;
    display: grid;
    grid-area: actions;
    grid-template-columns: 1.35fr repeat(7, minmax(0, 1fr));
    gap: 0.55rem;
    padding-top: 0.1rem;
}

.console-actions .button {
    min-height: 58px;
    padding-inline: 0.75rem;
}

.console-road-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 0;
    min-height: calc(100dvh - 2rem);
    overflow: hidden;
    border: 1px solid rgba(205, 218, 238, 0.86);
    border-radius: 18px;
    background: #f5f8fc;
    box-shadow: 0 22px 50px rgba(20, 41, 82, 0.12);
}

.console-road-main {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    padding: 0.85rem;
}

.console-road-main > *,
.console-road-workspace > *,
.console-road-bottom > *,
.console-route-sidebar > * {
    grid-area: auto;
}

.console-road-header {
    display: grid;
    grid-template-columns: minmax(190px, 0.75fr) minmax(220px, 1fr) auto auto auto;
    gap: 0.7rem;
    align-items: center;
    min-height: 76px;
    border: 1px solid rgba(205, 218, 238, 0.82);
    border-radius: 16px;
    padding: 0.65rem 0.8rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
}

.console-road-header,
.console-stat-strip,
.console-road-workspace,
.console-road-bottom,
.console-road-nav {
    width: 100%;
    min-width: 0;
}

.console-language-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid rgba(11, 115, 246, 0.22);
    border-radius: 12px;
    padding: 0.35rem 0.72rem;
    background: #fff;
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft);
    font-size: 0.86rem;
    font-weight: 950;
    white-space: nowrap;
}

.console-language-inline {
    justify-self: end;
}

.console-language-card {
    justify-self: end;
    margin-bottom: 0.8rem;
}

.console-language-page {
    align-self: center;
}

.console-language-map {
    position: fixed;
    top: 1rem;
    inset-inline-start: 1rem;
    z-index: 700;
}

.console-driver-card,
.console-device-strip,
.console-clock-block,
.console-trip-status {
    min-width: 0;
}

.console-driver-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.console-driver-avatar,
.console-side-brand > span {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 32%, #dbeafe 0 18%, transparent 19%),
        radial-gradient(circle at 50% 76%, #0b73f6 0 28%, transparent 29%),
        #eef5ff;
    box-shadow: inset 0 0 0 1px rgba(11, 115, 246, 0.12);
}

.console-driver-card strong,
.console-side-brand strong {
    display: block;
    overflow: hidden;
    color: #07152a;
    font-size: 0.98rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.console-driver-card span,
.console-side-brand small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.console-device-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    color: #20304d;
    font-weight: 900;
}

.console-dot-status {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 34px;
    border: 1px solid rgba(205, 218, 238, 0.75);
    border-radius: 999px;
    padding: 0.25rem 0.58rem;
    background: #fff;
    font-size: 0.78rem;
}

.console-dot-status::before {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--success);
    content: "";
}

.console-clock-block {
    display: grid;
    justify-items: center;
    line-height: 1.1;
}

.console-clock-block strong {
    color: #07152a;
    font-size: clamp(1.35rem, 2.3vw, 2rem);
    font-weight: 950;
    letter-spacing: 0;
}

.console-clock-block span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.console-trip-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: end;
    min-height: 54px;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    background: linear-gradient(135deg, #0f9b62, #087a4d);
    color: #fff;
    box-shadow: 0 16px 30px rgba(18, 168, 107, 0.28);
}

.console-trip-status::after {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--platform-logo-url, url("/icons/icon.svg")) center / 26px no-repeat;
    filter: brightness(0) invert(1);
    content: "";
}

.console-trip-status span {
    opacity: 0.82;
    font-size: 0.72rem;
    font-weight: 850;
}

.console-trip-status strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 950;
}

.console-stat-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.7rem;
    margin-block: 0.8rem;
}

.console-road-stat {
    min-height: 112px;
    border-radius: 14px;
    background: #fff;
}

.console-road-stat strong {
    font-size: clamp(1.15rem, 1.6vw, 1.65rem);
    line-height: 1.15;
}

.console-road-workspace {
    display: grid;
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    gap: 0.8rem;
    min-height: 0;
}

.console-ops-column {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    min-height: 0;
}

.console-current-phase {
    display: grid;
    gap: 0.65rem;
    min-height: 190px;
    padding: 1rem;
}

.console-current-phase > span {
    color: #07152a;
    font-weight: 950;
}

.console-current-phase h2 {
    margin: 0;
    color: #087a4d;
    font-size: clamp(1.05rem, 1.4vw, 1.35rem);
    line-height: 1.35;
}

.console-current-phase p,
.console-current-phase small {
    margin: 0;
    color: #20304d;
    font-weight: 850;
}

.console-progress-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf6;
}

.console-progress-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #12a86b, #087a4d);
}

.console-road-alerts {
    display: grid;
    min-height: 0;
    padding: 0.95rem;
}

.console-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.console-panel-title-row h2 {
    margin: 0;
}

.console-panel-title-row a,
.console-panel-title-row > span {
    color: var(--success);
    font-size: 0.78rem;
    font-weight: 950;
    white-space: nowrap;
}

.console-alert-list,
.console-log-list {
    display: grid;
    gap: 0.55rem;
    min-height: 0;
    overflow: auto;
}

.console-alert-list article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem;
    align-items: start;
    border-radius: 12px;
    padding: 0.58rem;
    background: #f8fbff;
}

.console-alert-list article > span {
    width: 12px;
    height: 12px;
    margin-top: 0.3rem;
    border-radius: 50%;
    background: var(--success);
}

.console-alert-list strong,
.console-log-list strong {
    color: #07152a;
    font-size: 0.86rem;
    font-weight: 950;
}

.console-alert-list small {
    display: block;
    margin-top: 0.12rem;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.45;
    font-weight: 800;
}

.console-emergency-button {
    min-height: 72px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff3f4b, #c61f2a);
    color: #fff;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 950;
    box-shadow: 0 18px 34px rgba(239, 59, 69, 0.28);
    cursor: pointer;
}

.console-road-map {
    min-height: 460px;
    border-radius: 16px;
    padding: 0;
}

.console-road-map .console-map-inner {
    min-height: 100%;
    border-radius: 16px;
}

.console-road-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(220px, 0.7fr);
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.console-trip-stats,
.console-boarding-log,
.console-passenger-gauge {
    min-height: 142px;
    padding: 0.9rem;
}

.console-mini-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.console-mini-metrics div {
    min-width: 0;
    border-inline-start: 1px solid rgba(205, 218, 238, 0.75);
    padding-inline: 0.55rem;
}

.console-mini-metrics div:first-child {
    border-inline-start: 0;
}

.console-mini-metrics strong {
    display: block;
    color: #07152a;
    font-size: 1.25rem;
    font-weight: 950;
}

.console-mini-metrics span,
.console-log-list span,
.console-log-list em {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
}

.console-log-list article {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
    border-bottom: 1px solid rgba(205, 218, 238, 0.7);
    padding-bottom: 0.45rem;
}

.console-log-list em {
    border-radius: 999px;
    padding: 0.18rem 0.46rem;
    background: var(--success-soft);
    color: var(--success);
    font-style: normal;
}

.console-passenger-gauge {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
}

.console-passenger-gauge h2 {
    justify-self: stretch;
    margin: 0;
}

.console-gauge {
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background:
        radial-gradient(circle, #fff 0 53%, transparent 54%),
        conic-gradient(#12a86b var(--value), #2f8ce8 var(--value) 100%);
}

.console-gauge strong {
    color: #07152a;
    font-size: 1.65rem;
    font-weight: 950;
    line-height: 1;
}

.console-gauge span {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 850;
}

.console-gauge-legend {
    display: flex;
    justify-content: space-between;
    width: 100%;
    color: var(--muted);
    font-weight: 900;
}

.console-road-nav {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.8rem;
    padding: 0.55rem;
    border: 1px solid rgba(205, 218, 238, 0.82);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
}

.console-road-nav .button {
    min-height: 54px;
    border-radius: 12px;
}

.console-route-sidebar {
    display: grid;
    align-content: start;
    gap: 0.9rem;
    min-height: 0;
    overflow: auto;
    padding: 1rem;
    background:
        radial-gradient(circle at 80% -5%, rgba(18, 168, 107, 0.26), transparent 16rem),
        linear-gradient(180deg, #071d2b, #03101b);
    color: #fff;
}

.console-side-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 72px;
}

.console-side-brand > span {
    background: rgba(18, 168, 107, 0.15) var(--platform-logo-url, url("/icons/icon.svg")) center / 36px no-repeat;
    box-shadow: 0 0 0 8px rgba(18, 168, 107, 0.08);
}

.console-side-brand strong {
    color: #fff;
    font-size: 1.2rem;
}

.console-side-brand small {
    color: #6ee7b7;
}

.console-side-panel {
    border: 1px solid rgba(125, 211, 252, 0.12);
    border-radius: 16px;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.console-side-panel .console-panel-title-row h2,
.console-side-panel h2,
.console-side-panel strong {
    color: #fff;
}

.console-route-list {
    position: relative;
    display: grid;
    gap: 0.15rem;
    padding-block: 0.25rem;
}

.console-route-list::before {
    position: absolute;
    inset-block: 0.8rem;
    inset-inline-start: 0.65rem;
    width: 2px;
    border-radius: 999px;
    background: rgba(110, 231, 183, 0.42);
    content: "";
}

.console-route-list article {
    position: relative;
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 0.65rem;
    align-items: center;
    min-height: 54px;
    border-radius: 12px;
    padding: 0.45rem 0.5rem;
}

.console-route-list article.is-active {
    background: rgba(18, 168, 107, 0.17);
}

.console-route-list i {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    border-radius: 50%;
    background: #071d2b;
}

.console-route-list .is-visited i,
.console-route-list .is-next i,
.console-route-list .is-active i {
    border-color: #6ee7b7;
    background: #12a86b;
    box-shadow: 0 0 0 6px rgba(18, 168, 107, 0.14);
}

.console-route-list strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.35;
}

.console-route-list span {
    display: block;
    margin-top: 0.1rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.75rem;
    font-weight: 850;
}

.console-route-sidebar .console-student-cards article,
.console-route-sidebar .console-empty-line {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.console-route-sidebar .console-student-cards span,
.console-route-sidebar .console-student-cards small,
.console-route-sidebar .console-list-label,
.console-route-sidebar .console-empty-line,
.console-route-sidebar .console-driver-login p,
.console-route-sidebar .console-boarding-code p {
    color: rgba(255, 255, 255, 0.68);
}

.console-route-sidebar .console-boarding-code {
    grid-template-columns: minmax(0, 1fr) 88px;
    box-shadow: none;
}

.console-route-sidebar .console-boarding-code img {
    width: 88px;
    height: 88px;
}

.console-route-sidebar .console-driver-login input {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.console-route-sidebar .console-driver-login input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.student-dashboard-body {
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(244, 248, 253, 0.98)),
        radial-gradient(circle at 20% 0%, rgba(11, 115, 246, 0.07), transparent 34rem);
}

.student-dashboard-body::before {
    opacity: 0.8;
}

.student-dashboard-body .topbar {
    min-height: 84px;
    border-bottom-color: rgba(219, 228, 241, 0.9);
    background: rgba(255, 255, 255, 0.92);
}

.student-dashboard-body .topnav > a[aria-current="page"] {
    border-color: rgba(11, 115, 246, 0.1);
    background: var(--primary-soft);
    color: var(--primary);
}

.student-dashboard-body .user-pill {
    min-height: 44px;
    border-color: rgba(190, 205, 226, 0.95);
    border-radius: 12px;
    padding-inline: 1rem;
}

.student-shell {
    width: min(1780px, 100%);
    padding: clamp(1rem, 2.2vw, 2rem) clamp(1rem, 3vw, 3.5rem);
}

.student-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.46fr);
    gap: 1.5rem;
    align-items: start;
}

.student-main,
.student-sidebar {
    display: grid;
    gap: 1.25rem;
}

.student-card,
.student-hero-card {
    border: 1px solid rgba(210, 221, 236, 0.88);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 26px rgba(20, 41, 82, 0.06);
}

.student-card {
    padding: 1.25rem;
}

.student-hero-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr);
    align-items: center;
    min-height: 168px;
    overflow: hidden;
    padding: 1.25rem 1.45rem;
    background:
        linear-gradient(90deg, rgba(232, 242, 255, 0.94), rgba(255, 255, 255, 0.96)),
        #fff;
}

.student-hero-card h1 {
    font-size: clamp(1.65rem, 2.6vw, 2.1rem);
}

.student-hero-card p:not(.eyebrow) {
    margin: 0.45rem 0 0.8rem;
    color: var(--muted);
    line-height: 1.7;
}

.student-hero-card strong {
    color: var(--primary);
    font-weight: 950;
}

.hero-illustration {
    position: relative;
    min-height: 136px;
    opacity: 0.76;
}

.hero-campus,
.hero-bus {
    position: absolute;
    display: block;
}

.hero-campus {
    inset-inline-start: 0;
    bottom: 14px;
    width: min(360px, 100%);
    height: 82px;
    border: 3px solid rgba(11, 115, 246, 0.15);
    border-bottom-width: 8px;
    border-radius: 8px 8px 0 0;
    opacity: 0.74;
}

.hero-campus::before,
.hero-campus::after {
    position: absolute;
    content: "";
    background: rgba(11, 115, 246, 0.12);
}

.hero-campus::before {
    inset-inline-start: 24px;
    top: -26px;
    width: 76px;
    height: 26px;
    border-radius: 10px 10px 0 0;
}

.hero-campus::after {
    inset-inline-end: 28px;
    top: 18px;
    width: 180px;
    height: 38px;
    background: repeating-linear-gradient(90deg, rgba(11, 115, 246, 0.18), rgba(11, 115, 246, 0.18) 10px, transparent 10px, transparent 30px);
}

.hero-bus {
    inset-inline-start: 180px;
    bottom: 18px;
    width: 190px;
    height: 64px;
    border: 4px solid rgba(11, 115, 246, 0.22);
    border-radius: 28px 22px 16px 16px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 16px 30px rgba(11, 115, 246, 0.08);
}

.hero-bus::before,
.hero-bus::after {
    position: absolute;
    content: "";
}

.hero-bus::before {
    inset-inline-start: 22px;
    top: 12px;
    width: 112px;
    height: 24px;
    border-radius: 8px;
    background: rgba(11, 115, 246, 0.16);
}

.hero-bus::after {
    inset-inline: 28px;
    bottom: -13px;
    height: 18px;
    background:
        radial-gradient(circle, #b9c9df 0 8px, transparent 9px) left center / 42px 18px no-repeat,
        radial-gradient(circle, #b9c9df 0 8px, transparent 9px) right center / 42px 18px no-repeat;
}

.student-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.96fr);
    gap: 1.25rem;
}

.student-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.student-card-header.compact {
    margin-bottom: 0.85rem;
}

.student-card-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 950;
}

.dash-icon {
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 950;
}

.booking-empty,
.booking-summary,
.next-trip-copy {
    display: grid;
    justify-items: center;
    text-align: center;
}

.booking-empty {
    min-height: 258px;
    place-content: center;
    border: 1px solid rgba(220, 229, 241, 0.9);
    border-radius: 12px;
    padding: 1.3rem;
}

.booking-empty h3,
.booking-summary h3,
.next-trip-copy h3 {
    margin: 0.65rem 0 0.4rem;
    color: var(--ink);
    font-size: 1.05rem;
}

.booking-empty p,
.booking-summary p,
.next-trip-copy p {
    color: var(--muted);
    line-height: 1.65;
}

.soft-icon,
.large-soft-icon {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(180deg, #eef6ff, #f8fbff);
    color: var(--primary);
    font-weight: 950;
}

.soft-icon {
    width: 54px;
    height: 54px;
}

.large-soft-icon {
    width: 92px;
    height: 92px;
    font-size: 2rem;
}

.student-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}

.student-mini-grid div {
    border: 1px solid rgba(220, 229, 241, 0.9);
    border-radius: 10px;
    padding: 0.72rem;
    background: #fbfdff;
}

.student-mini-grid span,
.student-mini-grid strong {
    display: block;
}

.student-mini-grid span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.student-mini-grid strong {
    margin-top: 0.2rem;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.student-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.student-button-row .button {
    flex: 1 1 150px;
}

.mini-map {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background:
        linear-gradient(30deg, rgba(11, 115, 246, 0.06) 12%, transparent 12% 24%, rgba(11, 115, 246, 0.06) 24% 28%, transparent 28%),
        linear-gradient(120deg, transparent 0 34%, rgba(11, 115, 246, 0.12) 34% 37%, transparent 37%),
        linear-gradient(180deg, #f8fbff, #edf4ff);
}

.top-map {
    min-height: 150px;
    margin-bottom: 0.9rem;
}

.map-pin {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 5px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: var(--primary);
    box-shadow: 0 12px 24px rgba(11, 115, 246, 0.26);
    transform: rotate(-45deg);
}

.map-pin::after {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.map-pin.main {
    top: 36%;
    left: 50%;
    width: 56px;
    height: 56px;
    border-width: 10px;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.next-trip-copy .button {
    min-width: 210px;
}

.quick-actions-card {
    padding: 1rem 1.25rem 1.1rem;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.quick-action {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.28rem 0.75rem;
    align-items: center;
    min-height: 74px;
    border: 1px solid rgba(220, 229, 241, 0.9);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    background: #fff;
    color: var(--ink);
    text-align: start;
    box-shadow: 0 8px 18px rgba(20, 41, 82, 0.04);
    cursor: pointer;
    font: inherit;
}

.quick-action.primary {
    border-color: rgba(18, 168, 107, 0.18);
}

.quick-action.danger {
    border-color: rgba(239, 59, 69, 0.18);
}

.quick-action span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 950;
}

.quick-action.primary span {
    background: var(--success-soft);
    color: var(--success);
}

.quick-action.danger span {
    background: var(--danger-soft);
    color: var(--danger);
}

.quick-action strong,
.quick-action small {
    min-width: 0;
}

.quick-action strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.quick-action small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.quick-action[hidden] {
    display: none;
}

.route-map {
    min-height: 230px;
    border: 1px solid rgba(220, 229, 241, 0.9);
}

.route-map svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.route-bg,
.route-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.route-bg {
    stroke: rgba(11, 115, 246, 0.12);
    stroke-width: 18;
}

.route-line {
    stroke: var(--primary);
    stroke-width: 9;
}

.map-pin.start {
    top: 35%;
    left: 42%;
    background: var(--success);
}

.map-pin.end {
    top: 40%;
    right: 18%;
}

.route-summary {
    position: absolute;
    inset-block: 18px;
    left: 18px;
    display: grid;
    align-content: start;
    gap: 0.65rem;
    width: min(250px, calc(100% - 36px));
    border: 1px solid rgba(220, 229, 241, 0.9);
    border-radius: 12px;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(20, 41, 82, 0.08);
}

.route-summary h2 {
    margin-bottom: 0.2rem;
}

.route-stop {
    position: relative;
    display: grid;
    gap: 0.1rem;
    padding-inline-start: 1.4rem;
}

.route-stop i {
    position: absolute;
    inset-inline-start: 0.18rem;
    top: 0.24rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
}

.route-stop:first-of-type i {
    background: var(--success);
}

.route-stop strong {
    color: var(--ink);
    font-size: 0.9rem;
}

.route-stop span {
    color: var(--muted);
    font-size: 0.78rem;
}

.map-control {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(210, 221, 236, 0.9);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}

.profile-name {
    display: grid;
    justify-items: center;
    margin-bottom: 0.9rem;
    color: var(--ink);
}

.profile-name strong {
    font-size: 1.02rem;
}

.profile-name span {
    margin-top: 0.18rem;
    color: var(--primary);
    font-weight: 850;
}

.profile-list {
    display: grid;
    gap: 0.72rem;
    margin: 0 0 1rem;
}

.profile-list div,
.settings-list div {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    align-items: center;
    gap: 0.65rem;
}

.profile-list dt,
.settings-list span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 850;
}

.profile-list dd {
    margin: 0;
    color: var(--ink);
    overflow-wrap: anywhere;
    font-weight: 800;
}

.profile-card .button {
    width: 100%;
}

.settings-list {
    display: grid;
    gap: 0.65rem;
}

.pill {
    justify-self: start;
    border-radius: 999px;
    padding: 0.18rem 0.62rem;
    font-size: 0.76rem;
}

.pill.on {
    background: var(--success-soft);
    color: #078250;
}

.pill.off {
    background: #eef2f7;
    color: var(--muted);
}

.inline-link {
    display: inline-flex;
    margin-top: 0.9rem;
    color: var(--primary);
    font-weight: 900;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.stat-item {
    display: grid;
    place-items: center;
    min-height: 92px;
    border: 1px solid rgba(220, 229, 241, 0.88);
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.stat-item strong {
    color: var(--ink);
    font-size: 1.45rem;
}

.stat-item span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.stat-item.green {
    background: linear-gradient(180deg, #effcf6, #fff);
}

.stat-item.amber {
    background: linear-gradient(180deg, #fff8ed, #fff);
}

.stat-item.violet {
    background: linear-gradient(180deg, #f5f2ff, #fff);
}

.compact-alert-list {
    display: grid;
}

.compact-alert-list article {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.65rem;
    border-bottom: 1px solid rgba(220, 229, 241, 0.9);
    padding: 0.78rem 0;
}

.compact-alert-list article:first-child {
    padding-top: 0;
}

.compact-alert-list article:last-child {
    border-bottom: 0;
}

.compact-alert-list strong,
.compact-alert-list p {
    margin: 0;
}

.compact-alert-list strong {
    color: var(--ink);
    font-size: 0.9rem;
}

.compact-alert-list p,
.compact-alert-list time {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

@media (max-width: 1100px) {
    .login-screen {
        grid-template-columns: minmax(340px, 0.86fr) minmax(0, 1fr);
    }

    .console-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "top"
            "notice"
            "stats"
            "map"
            "metrics"
            "students"
            "actions";
    }

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

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

    .console-left {
        max-height: none;
    }

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

    .student-table article {
        grid-template-columns: 1fr;
    }

    .student-dashboard,
    .student-card-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .console-map-summary {
        inset-inline: 0.75rem;
        bottom: 0.75rem;
        grid-template-columns: 1fr 1fr;
        padding: 0.5rem;
    }

    .console-map-summary div {
        border-inline-start: 0;
        padding-inline: 0.25rem;
    }

    .console-boarding-code {
        grid-template-columns: 1fr;
    }

    .console-boarding-code img {
        justify-self: center;
    }

    .login-page .auth-shell {
        align-items: start;
        padding: 0;
    }

    .login-screen {
        min-height: 100dvh;
        grid-template-columns: 1fr;
        gap: 0;
    }

    .login-form-card,
    .login-visual-panel {
        border-radius: 0;
        border-inline: 0;
        box-shadow: none;
    }

    .login-form-card {
        min-height: 100dvh;
        padding: 1rem;
    }

    .login-visual-panel {
        display: none;
    }

    body {
        background: #fbfdff;
    }

    body::before {
        display: none;
    }

    .topbar {
        align-items: flex-start;
        min-height: 104px;
        padding: 1rem 1rem 0.85rem;
    }

    .brand {
        grid-template-columns: 42px auto;
        font-size: 1rem;
    }

    .brand::before {
        width: 42px;
        height: 42px;
        border-radius: 15px;
    }

    .topnav > a:not(.language-switch),
    .topnav form,
    .user-pill {
        display: none;
    }

    .language-switch {
        min-height: 34px;
        padding-inline: 0.65rem;
    }

    .shell {
        padding: 1rem 1rem 6.4rem;
    }

    .auth-panel {
        margin: 3vh auto;
    }

    .student-shell {
        padding: 1rem 1rem 6.4rem;
    }

    .student-dashboard {
        gap: 1rem;
    }

    .student-main,
    .student-sidebar {
        gap: 1rem;
    }

    .student-card,
    .student-hero-card {
        border-radius: 14px;
    }

    .student-hero-card {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 1.1rem;
    }

    .hero-illustration {
        order: 2;
        min-height: 108px;
        margin-top: 0.5rem;
    }

    .hero-bus {
        inset-inline-start: 34%;
        width: 168px;
    }

    .student-card {
        padding: 1rem;
    }

    .student-card-grid,
    .quick-action-grid,
    .stats-grid,
    .student-mini-grid {
        grid-template-columns: 1fr;
    }

    .quick-action {
        min-height: 68px;
    }

    .top-map {
        min-height: 128px;
    }

    .route-map {
        min-height: 340px;
    }

    .route-summary {
        right: 14px;
        left: 14px;
        inset-block-start: 14px;
        inset-block-end: auto;
        width: auto;
    }

    .map-pin.start {
        top: 62%;
        left: 20%;
    }

    .map-pin.end {
        top: 58%;
        right: 18%;
    }

    .profile-list div,
    .settings-list div,
    .compact-alert-list article {
        grid-template-columns: 1fr;
    }

    .role-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .geo-actions {
        grid-template-columns: 1fr;
    }

    .push-control {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .push-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .push-actions .button {
        width: 100%;
    }

    .page-heading {
        align-items: flex-start;
        min-height: auto;
    }

    h1 {
        font-size: 1.55rem;
    }

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

    .cards {
        display: flex;
        gap: 0.85rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.25rem;
    }

    .cards > .trip-card {
        min-width: 240px;
        scroll-snap-align: start;
    }

    .panel,
    .trip-card,
    .list-item,
    .empty-state {
        border-radius: 20px;
    }

    .map {
        min-height: 390px;
    }

    .action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .public-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-block: 1rem;
    }

    .home-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .home-actions .button,
    .action-row .button,
    .action-row form,
    .action-row button {
        width: 100%;
    }

    .mobile-tabbar {
        position: fixed;
        right: 0.85rem;
        bottom: 0.85rem;
        left: 0.85rem;
        z-index: 30;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 0.35rem;
        border: 1px solid rgba(210, 221, 236, 0.9);
        border-radius: 24px;
        padding: 0.45rem;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 16px 38px rgba(17, 28, 51, 0.16);
        backdrop-filter: blur(16px);
    }

    .mobile-tabbar a,
    .mobile-tabbar button {
        display: grid;
        place-items: center;
        min-height: 52px;
        border: 0;
        border-radius: 18px;
        background: transparent;
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 900;
        cursor: pointer;
    }

    .mobile-tabbar a[aria-current="page"] {
        background: var(--primary-soft);
        color: var(--primary);
    }
}

@media (max-width: 520px) {
    .login-card-top {
        align-items: flex-start;
    }

    .login-brand-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        background-size: 32px;
    }

    .login-heading h1 {
        font-size: 2rem;
    }

    .login-form-row,
    .auth-code-grid,
    .login-footer-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-code-grid {
        grid-template-columns: 1fr;
    }

    .auth-code-button {
        width: 100%;
    }

    .metric-grid,
    .metric-grid.compact {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .metric-grid div {
        padding: 0.72rem;
    }

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

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .brand,
html[dir="rtl"] .topnav,
html[dir="rtl"] .page-heading,
html[dir="rtl"] .panel-header,
html[dir="rtl"] .action-row,
html[dir="rtl"] .mobile-tabbar,
html[dir="rtl"] .console-status,
html[dir="rtl"] .checkline,
html[dir="rtl"] .student-table article {
    direction: rtl;
}

html[dir="rtl"] .qr-screen,
html[dir="rtl"] .empty-state {
    text-align: center;
}

.student-pwa-body {
    --student-pwa-max: 430px;
    --student-pwa-page-padding: 1.05rem;
    min-height: 100dvh;
    background: #e8f0fb;
    color: #121b33;
}

.student-pwa-body::before {
    display: none;
}

.student-pwa-body > .topbar,
.student-pwa-body > .mobile-tabbar {
    display: none;
}

.student-pwa-shell {
    width: min(100%, var(--student-pwa-max));
    min-height: 100dvh;
    margin: 0 auto;
    padding: 0;
    background: #fff;
    box-shadow: 0 24px 70px rgba(13, 31, 67, 0.16);
}

.student-pwa-app {
    position: relative;
    min-height: 100dvh;
    overflow: hidden;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 48%, #ffffff 100%);
}

.pwa-blue-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 92px;
    padding: 0.9rem 1.05rem;
    background:
        radial-gradient(circle at 12% 4%, rgba(255, 255, 255, 0.22), transparent 12rem),
        linear-gradient(135deg, #004bb8 0%, #006df6 58%, #0455c8 100%);
    color: #fff;
    direction: ltr;
    box-shadow: 0 10px 28px rgba(0, 75, 184, 0.22);
}

.pwa-statusbar,
.pwa-appbar,
.pwa-status-icons,
.pwa-card-heading,
.pwa-profile-hero,
.pwa-trip-row,
.pwa-alert-row,
.pwa-info-grid {
    display: flex;
    align-items: center;
}

.pwa-statusbar {
    justify-content: space-between;
    min-height: 28px;
    font-weight: 900;
    font-size: 1rem;
}

.pwa-status-icons {
    gap: 0.35rem;
}

.pwa-status-icons i {
    display: block;
    position: relative;
}

.pwa-status-icons i:first-child {
    width: 22px;
    height: 16px;
    background:
        linear-gradient(#fff, #fff) 0 10px / 4px 6px no-repeat,
        linear-gradient(#fff, #fff) 6px 7px / 4px 9px no-repeat,
        linear-gradient(#fff, #fff) 12px 4px / 4px 12px no-repeat,
        linear-gradient(#fff, #fff) 18px 1px / 4px 15px no-repeat;
}

.pwa-status-icons i:nth-child(2) {
    width: 20px;
    height: 14px;
    border: 3px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
}

.pwa-status-icons i:nth-child(2)::before,
.pwa-status-icons i:nth-child(2)::after {
    position: absolute;
    left: 50%;
    border: 3px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    content: "";
    transform: translateX(-50%);
}

.pwa-status-icons i:nth-child(2)::before {
    top: 2px;
    width: 12px;
    height: 8px;
}

.pwa-status-icons i:nth-child(2)::after {
    top: 7px;
    width: 4px;
    height: 3px;
}

.pwa-status-icons i:nth-child(3) {
    width: 24px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 4px;
}

.pwa-status-icons i:nth-child(3)::after {
    position: absolute;
    right: -4px;
    top: 3px;
    width: 2px;
    height: 5px;
    border-radius: 999px;
    background: #fff;
    content: "";
}

.pwa-appbar {
    justify-content: space-between;
    min-height: 58px;
    gap: 0.85rem;
}

.pwa-title-stack {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    text-align: center;
    direction: rtl;
}

.pwa-title-stack strong {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 950;
    letter-spacing: 0;
}

.pwa-title-stack small {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.76rem;
    font-weight: 800;
}

.pwa-language-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 0.3rem 0.72rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 950;
    backdrop-filter: blur(8px);
}

.pwa-bus-icon {
    position: relative;
    display: block;
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 9px;
}

.pwa-bus-icon::before,
.pwa-bus-icon::after {
    position: absolute;
    content: "";
}

.pwa-bus-icon::before {
    inset-inline: 6px;
    top: 7px;
    height: 12px;
    border-radius: 4px;
    background: #fff;
}

.pwa-bus-icon::after {
    inset-inline: 7px;
    bottom: -7px;
    height: 8px;
    background:
        radial-gradient(circle, #fff 0 3px, transparent 4px) left center / 10px 8px no-repeat,
        radial-gradient(circle, #fff 0 3px, transparent 4px) right center / 10px 8px no-repeat;
}

.pwa-content {
    display: grid;
    gap: 1rem;
    padding: 1.05rem var(--student-pwa-page-padding) 6.9rem;
}

.pwa-card {
    border: 1px solid rgba(205, 218, 238, 0.9);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 11px 24px rgba(20, 41, 82, 0.06);
}

.pwa-profile-hero {
    direction: ltr;
    justify-content: space-between;
    gap: 1rem;
}

.pwa-avatar-block {
    display: grid;
    direction: rtl;
    gap: 0.38rem;
    justify-items: center;
    min-width: 142px;
    color: #151f39;
}

.pwa-avatar-block p,
.pwa-greeting span,
.pwa-ride-copy p,
.pwa-empty-trip p,
.pwa-alert-row p,
.pwa-alert-row time,
.pwa-info-grid small {
    margin: 0;
    color: #5f6d86;
}

.pwa-avatar {
    position: relative;
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 36%, #5f8eef 0 10px, transparent 11px),
        radial-gradient(circle at 50% 72%, #5f8eef 0 22px, transparent 23px),
        linear-gradient(180deg, #ecf4ff, #dbe9ff);
}

.pwa-avatar::after {
    position: absolute;
    right: -1px;
    bottom: 9px;
    width: 23px;
    height: 23px;
    border: 4px solid #fff;
    border-radius: 50%;
    background:
        linear-gradient(135deg, transparent 49%, #fff 50% 58%, transparent 59%) 7px 6px / 11px 9px no-repeat,
        #12a86b;
    content: "";
}

.pwa-account-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border-radius: 999px;
    padding: 0.16rem 1.15rem;
    background: #dff6e8;
    color: #087946;
    font-size: 0.9rem;
    font-weight: 950;
}

.pwa-greeting {
    display: grid;
    direction: rtl;
    gap: 0.2rem;
    text-align: start;
}

.pwa-greeting h1 {
    margin: 0;
    color: #101a32;
    font-size: 2rem;
    line-height: 1.05;
}

.pwa-greeting strong,
.pwa-section-label,
.pwa-card-heading h2,
.pwa-card-heading a {
    color: #006df6;
    font-weight: 950;
}

.pwa-greeting strong,
.pwa-info-grid strong {
    unicode-bidi: plaintext;
}

.pwa-ride-card {
    display: grid;
    direction: ltr;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 0.8rem;
    align-items: center;
    overflow: hidden;
    min-height: 178px;
    padding: 1rem;
    background:
        linear-gradient(90deg, rgba(232, 242, 255, 0.95), rgba(255, 255, 255, 0.96)),
        #fff;
}

.pwa-bus-scene {
    position: relative;
    min-height: 132px;
}

.pwa-city,
.pwa-bus-drawing {
    position: absolute;
    display: block;
}

.pwa-city {
    inset-inline: 0;
    bottom: 32px;
    height: 82px;
    opacity: 0.5;
    background:
        linear-gradient(90deg, transparent 0 6%, #d7e8ff 6% 18%, transparent 18% 24%, #d7e8ff 24% 38%, transparent 38% 46%, #d7e8ff 46% 62%, transparent 62% 72%, #d7e8ff 72% 86%, transparent 86%),
        linear-gradient(180deg, transparent 0 58%, #e7f1ff 58% 100%);
}

.pwa-bus-drawing {
    inset-inline-start: 8px;
    bottom: 18px;
    width: 148px;
    height: 70px;
    border-radius: 32px 18px 14px 14px;
    background:
        linear-gradient(180deg, #286ee9 0 44%, #80b7ff 44% 68%, #dcecff 68%),
        #2e76ea;
    box-shadow: 0 16px 30px rgba(0, 109, 246, 0.18);
}

.pwa-bus-drawing::before,
.pwa-bus-drawing::after {
    position: absolute;
    content: "";
}

.pwa-bus-drawing::before {
    inset-inline-start: 16px;
    top: 12px;
    width: 92px;
    height: 24px;
    border-radius: 10px 8px 8px 8px;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95) 18px, rgba(44, 94, 177, 0.3) 18px, rgba(44, 94, 177, 0.3) 21px);
}

.pwa-bus-drawing::after {
    inset-inline: 18px;
    bottom: -8px;
    height: 18px;
    background:
        radial-gradient(circle, #243656 0 8px, #fff 9px 11px, transparent 12px) left center / 32px 18px no-repeat,
        radial-gradient(circle, #243656 0 8px, #fff 9px 11px, transparent 12px) right center / 32px 18px no-repeat;
}

.pwa-ride-copy {
    display: grid;
    direction: rtl;
    gap: 0.5rem;
    justify-items: start;
}

.pwa-section-label {
    font-size: 0.92rem;
}

.pwa-ride-copy h2,
.pwa-empty-trip h3,
.pwa-trip-details h3 {
    margin: 0;
    color: #111c33;
}

.pwa-ride-copy h2 {
    font-size: 1.35rem;
}

.pwa-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 48px;
    min-width: 230px;
    border-radius: 12px;
    padding: 0.72rem 1.1rem;
    background: linear-gradient(135deg, #0b73f6, #0060df);
    color: #fff;
    font-weight: 950;
    box-shadow: 0 12px 24px rgba(0, 109, 246, 0.22);
}

.pwa-small-calendar,
.pwa-calendar-icon {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.pwa-small-calendar::before,
.pwa-calendar-icon::before {
    position: absolute;
    inset-inline: 2px;
    top: 4px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.pwa-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
}

.pwa-action-card {
    display: grid;
    justify-items: center;
    gap: 0.36rem;
    min-height: 104px;
    border: 1px solid rgba(205, 218, 238, 0.9);
    border-radius: 15px;
    padding: 0.78rem 0.55rem;
    background: #fff;
    color: #121b33;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(20, 41, 82, 0.05);
}

.pwa-action-card[hidden] {
    display: none;
}

.pwa-action-card:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.pwa-action-card strong {
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.35;
}

.pwa-action-card small {
    color: #12a86b;
    font-size: 0.83rem;
    font-weight: 900;
}

.pwa-action-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.is-green .pwa-action-icon {
    background: #e4f8ee;
    color: #12a86b;
}

.is-blue .pwa-action-icon {
    background: #e8f2ff;
    color: #0b73f6;
}

.is-purple .pwa-action-icon {
    background: #f1e8ff;
    color: #8b3ff4;
}

.is-red .pwa-action-icon {
    background: #fff0f1;
    color: #ef3b45;
}

.icon-bell::before {
    width: 17px;
    height: 19px;
    border-radius: 12px 12px 8px 8px;
    background: currentColor;
    content: "";
}

.icon-bell::after {
    position: absolute;
    bottom: 9px;
    width: 8px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.icon-megaphone::before {
    width: 22px;
    height: 16px;
    clip-path: polygon(0 36%, 58% 0, 58% 100%, 0 64%);
    background: currentColor;
    content: "";
}

.icon-megaphone::after {
    position: absolute;
    right: 10px;
    bottom: 11px;
    width: 9px;
    height: 13px;
    border-radius: 4px;
    background: currentColor;
    transform: rotate(-18deg);
    content: "";
}

.icon-volume::before {
    width: 13px;
    height: 18px;
    clip-path: polygon(0 35%, 35% 35%, 100% 0, 100% 100%, 35% 65%, 0 65%);
    background: currentColor;
    content: "";
}

.icon-volume::after {
    width: 18px;
    height: 18px;
    border: 3px solid currentColor;
    border-bottom-color: transparent;
    border-left-color: transparent;
    border-radius: 50%;
    transform: rotate(45deg);
    content: "";
}

.icon-x::before,
.icon-x::after {
    position: absolute;
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.icon-x::before {
    transform: rotate(45deg);
}

.icon-x::after {
    transform: rotate(-45deg);
}

.pwa-next-trip {
    padding: 0.95rem 1rem;
}

.pwa-card-heading {
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.pwa-card-heading h2 {
    margin: 0;
    font-size: 1.02rem;
}

.pwa-card-heading span {
    border-radius: 999px;
    padding: 0.22rem 0.72rem;
    background: #e7f8f0;
    color: #078250;
    font-weight: 900;
}

.pwa-trip-row {
    gap: 0.9rem;
}

.pwa-time-box {
    display: grid;
    justify-items: center;
    min-width: 104px;
    border: 1px solid rgba(205, 218, 238, 0.9);
    border-radius: 13px;
    padding: 0.78rem 0.55rem;
    background: #f5f9ff;
}

.pwa-time-box strong {
    color: #0b73f6;
    font-size: 1.18rem;
}

.pwa-time-box span {
    color: #5f6d86;
}

.pwa-trip-details {
    min-width: 0;
}

.pwa-trip-details h3 {
    font-size: 1rem;
    line-height: 1.6;
}

.pwa-trip-details h3 b {
    display: inline-block;
    width: 22px;
    height: 2px;
    margin-inline: 0.35rem;
    background: #8a96aa;
    vertical-align: middle;
}

.pwa-trip-details p {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.45rem 0 0;
    color: #5f6d86;
    font-size: 0.85rem;
}

.pwa-trip-details i {
    width: 1px;
    min-height: 18px;
    background: #d9e3f1;
}

.pwa-empty-trip {
    display: grid;
    gap: 0.4rem;
}

.pwa-empty-trip a {
    justify-self: start;
    border: 1px solid rgba(11, 115, 246, 0.22);
    border-radius: 10px;
    padding: 0.5rem 0.9rem;
    color: #0b73f6;
    font-weight: 950;
}

.pwa-route-card,
.pwa-alert-card,
.pwa-student-info-card {
    padding: 0.95rem;
}

.pwa-route-card .pwa-card-heading {
    margin-bottom: 0.55rem;
}

.pwa-map-canvas {
    position: relative;
    min-height: 158px;
    overflow: hidden;
    border-radius: 13px;
    background:
        linear-gradient(30deg, rgba(18, 168, 107, 0.12) 0 16%, transparent 16% 100%),
        linear-gradient(120deg, transparent 0 42%, rgba(255, 213, 97, 0.5) 42% 47%, transparent 47%),
        repeating-linear-gradient(0deg, transparent 0 22px, rgba(205, 218, 238, 0.55) 23px 25px),
        repeating-linear-gradient(90deg, transparent 0 36px, rgba(205, 218, 238, 0.52) 37px 39px),
        #f7fbff;
}

.pwa-map-canvas svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.pwa-map-road,
.pwa-map-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pwa-map-road {
    stroke: rgba(11, 115, 246, 0.13);
    stroke-width: 17;
}

.pwa-map-line {
    stroke: #0b73f6;
    stroke-width: 7;
}

.pwa-map-pin {
    position: absolute;
    width: 31px;
    height: 31px;
    border: 6px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 10px 22px rgba(20, 41, 82, 0.2);
    transform: rotate(-45deg);
}

.pwa-map-pin::after {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.pwa-map-pin.start {
    left: 13%;
    bottom: 36%;
    background: #12a86b;
}

.pwa-map-pin.end {
    right: 14%;
    top: 27%;
    background: #0b73f6;
}

.pwa-map-label {
    position: absolute;
    color: #111c33;
    font-size: 0.78rem;
    font-weight: 950;
    text-shadow: 0 1px 0 #fff;
}

.pwa-map-label.start {
    left: 8%;
    bottom: 24%;
}

.pwa-map-label.end {
    right: 8%;
    top: 47%;
}

.pwa-alert-card .pwa-card-heading,
.pwa-student-info-card .pwa-card-heading {
    margin-bottom: 0.55rem;
}

.pwa-alert-row {
    justify-content: space-between;
    gap: 0.75rem;
}

.pwa-alert-row > div {
    min-width: 0;
    flex: 1;
}

.pwa-alert-row strong {
    color: #111c33;
}

.pwa-alert-row p {
    margin-top: 0.2rem;
    line-height: 1.45;
}

.pwa-alert-row time {
    display: block;
    margin-top: 0.18rem;
    font-size: 0.78rem;
}

.pwa-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #42c77b;
}

.pwa-calendar-icon {
    width: 48px;
    height: 48px;
    color: #0b73f6;
    border-color: rgba(11, 115, 246, 0.2);
    border-radius: 14px;
    background: #eef6ff;
}

.pwa-info-grid {
    justify-content: space-between;
    gap: 0.5rem;
}

.pwa-info-grid div {
    position: relative;
    display: grid;
    flex: 1;
    gap: 0.18rem;
    justify-items: center;
    min-width: 0;
    padding-inline: 0.35rem;
    text-align: center;
}

.pwa-info-grid div + div {
    border-inline-start: 1px solid #dbe5f2;
}

.pwa-info-grid strong {
    max-width: 100%;
    color: #111c33;
    overflow-wrap: anywhere;
}

.pwa-mini-user,
.pwa-mini-school,
.pwa-mini-level,
.pwa-bottom-nav span {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    color: #59677f;
}

.pwa-mini-user::before,
.nav-user::before {
    position: absolute;
    inset-inline: 7px;
    top: 2px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.pwa-mini-user::after,
.nav-user::after {
    position: absolute;
    inset-inline: 4px;
    bottom: 3px;
    height: 9px;
    border: 2px solid currentColor;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    content: "";
}

.pwa-mini-school::before {
    position: absolute;
    inset-inline: 1px;
    top: 6px;
    height: 10px;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 35%, 50% 70%, 0 35%);
    content: "";
}

.pwa-mini-school::after {
    position: absolute;
    right: 4px;
    bottom: 3px;
    width: 2px;
    height: 9px;
    background: currentColor;
    content: "";
}

.pwa-mini-level::before {
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 5px;
    height: 10px;
    border-radius: 4px 4px 0 0;
    background: currentColor;
    box-shadow:
        8px -6px 0 currentColor,
        16px -12px 0 currentColor;
    content: "";
}

.pwa-bottom-nav {
    position: fixed;
    right: auto;
    bottom: 0;
    left: 50%;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.2rem;
    width: min(100%, var(--student-pwa-max));
    max-width: calc(100vw - 0.7rem);
    border: 1px solid rgba(205, 218, 238, 0.94);
    border-radius: 18px 18px 0 0;
    padding: 0.44rem 0.5rem calc(0.44rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 30px rgba(20, 41, 82, 0.1);
    transform: translateX(-50%);
    backdrop-filter: blur(16px);
}

.pwa-bottom-nav a {
    position: relative;
    display: grid;
    place-items: center;
    gap: 0.16rem;
    min-height: 56px;
    border-radius: 14px;
    color: #65728a;
    font-size: 0.78rem;
    font-weight: 900;
}

.pwa-bottom-nav a[aria-current="page"] {
    color: #0b73f6;
}

.pwa-bottom-nav a[aria-current="page"] span {
    color: #0b73f6;
}

.nav-home::before {
    position: absolute;
    inset-inline: 3px;
    bottom: 3px;
    height: 14px;
    border-radius: 3px;
    background: currentColor;
    content: "";
}

.nav-home::after {
    position: absolute;
    inset-inline: 2px;
    top: 2px;
    height: 14px;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 56%, 86% 56%, 86% 100%, 14% 100%, 14% 56%, 0 56%);
    content: "";
}

.nav-bus::before {
    position: absolute;
    inset-inline: 4px;
    top: 3px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 5px;
    content: "";
}

.nav-bus::after {
    position: absolute;
    inset-inline: 6px;
    bottom: 1px;
    height: 5px;
    background:
        radial-gradient(circle, currentColor 0 2px, transparent 3px) left center / 8px 5px no-repeat,
        radial-gradient(circle, currentColor 0 2px, transparent 3px) right center / 8px 5px no-repeat;
    content: "";
}

.nav-bell::before {
    position: absolute;
    inset-inline: 6px;
    top: 3px;
    height: 16px;
    border: 2px solid currentColor;
    border-bottom-width: 3px;
    border-radius: 12px 12px 8px 8px;
    content: "";
}

.nav-bell::after {
    position: absolute;
    left: 10px;
    bottom: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 18%;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 999px;
    padding-inline: 0.24rem;
    background: #ef3b45;
    color: #fff;
    font-size: 0.68rem;
    line-height: 1;
}

.pwa-page-intro,
.pwa-live-strip,
.pwa-trip-card,
.pwa-notification-item,
.pwa-account-hero,
.pwa-setting-row {
    border: 1px solid rgba(205, 218, 238, 0.9);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 11px 24px rgba(20, 41, 82, 0.06);
}

.pwa-page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
}

.pwa-page-intro span,
.pwa-page-intro p,
.pwa-live-strip small,
.pwa-trip-card p,
.pwa-notification-item p,
.pwa-notification-item time,
.pwa-profile-list dt,
.pwa-setting-row small {
    margin: 0;
    color: #65728a;
}

.pwa-page-intro h1 {
    margin: 0.15rem 0 0.28rem;
    color: #111c33;
    font-size: 1.28rem;
    line-height: 1.25;
}

.pwa-page-intro > strong {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    min-width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #e8f2ff;
    color: #0b73f6;
    font-size: 1.3rem;
    font-weight: 950;
}

.pwa-live-strip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 0.9rem;
}

.pwa-live-strip strong {
    color: #111c33;
    font-size: 0.9rem;
}

.pwa-live-dot {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #12a86b;
    box-shadow: 0 0 0 7px rgba(18, 168, 107, 0.12);
}

.pwa-live-dot::after {
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(18, 168, 107, 0.35);
    border-radius: inherit;
    animation: pwa-live-pulse 1.7s ease-out infinite;
    content: "";
}

@keyframes pwa-live-pulse {
    from {
        opacity: 0.9;
        transform: scale(0.82);
    }

    to {
        opacity: 0;
        transform: scale(1.7);
    }
}

.live-updated {
    animation: pwa-live-highlight 0.8s ease;
}

@keyframes pwa-live-highlight {
    from {
        filter: saturate(1.25);
        transform: translateY(-1px);
    }

    to {
        filter: saturate(1);
        transform: translateY(0);
    }
}

.pwa-trip-list,
.pwa-notification-list {
    display: grid;
    gap: 0.85rem;
}

.pwa-trip-card {
    display: grid;
    gap: 0.95rem;
    padding: 1rem;
}

.pwa-trip-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
}

.pwa-trip-card h2 {
    margin: 0 0 0.2rem;
    color: #111c33;
    font-size: 1.04rem;
}

.pwa-status-pill {
    align-self: start;
    border-radius: 999px;
    padding: 0.22rem 0.62rem;
    background: #e7f8f0;
    color: #078250;
    font-size: 0.76rem;
    font-weight: 950;
    white-space: nowrap;
}

.pwa-outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid rgba(11, 115, 246, 0.32);
    border-radius: 12px;
    padding: 0.56rem 1rem;
    color: #0b73f6;
    font-weight: 950;
}

.pwa-empty-panel {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    border: 1px dashed rgba(205, 218, 238, 0.95);
    border-radius: 16px;
    padding: 1.6rem 1rem;
    background: rgba(255, 255, 255, 0.76);
    text-align: center;
}

.pwa-empty-panel h2 {
    margin: 0;
    color: #111c33;
}

.pwa-empty-panel p {
    margin: 0;
    color: #65728a;
}

.pwa-empty-icon {
    display: block;
    width: 44px;
    height: 44px;
    color: #0b73f6;
}

.pwa-notification-item {
    display: flex;
    gap: 0.78rem;
    padding: 0.9rem;
}

.pwa-notification-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef6ff;
    color: #0b73f6;
}

.pwa-notification-item strong {
    display: block;
    margin-bottom: 0.18rem;
    color: #111c33;
}

.pwa-notification-item p {
    line-height: 1.55;
}

.pwa-notification-item time {
    display: block;
    margin-top: 0.24rem;
    font-size: 0.78rem;
}

.pwa-account-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.pwa-avatar.large {
    flex: 0 0 auto;
    width: 86px;
    height: 86px;
}

.pwa-account-hero h1 {
    margin: 0.45rem 0 0.15rem;
    color: #111c33;
    font-size: 1.35rem;
}

.pwa-account-hero p {
    margin: 0;
    color: #0b73f6;
    font-weight: 950;
    unicode-bidi: plaintext;
}

.pwa-account-card,
.pwa-settings-card {
    padding: 1rem;
}

.pwa-profile-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.pwa-profile-list div {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 0.7rem;
    align-items: center;
    border-bottom: 1px solid #e6edf6;
    padding-bottom: 0.65rem;
}

.pwa-profile-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.pwa-profile-list dt {
    font-size: 0.85rem;
    font-weight: 850;
}

.pwa-profile-list dd {
    margin: 0;
    color: #111c33;
    overflow-wrap: anywhere;
    font-weight: 900;
    unicode-bidi: plaintext;
}

.pwa-settings-card {
    display: grid;
    gap: 0.7rem;
}

.pwa-setting-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.78rem;
    color: #111c33;
}

.pwa-setting-icon {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #e8f2ff;
    color: #0b73f6;
}

.pwa-setting-icon.language::before {
    width: 22px;
    height: 22px;
    border: 2px solid currentColor;
    border-radius: 50%;
    content: "";
}

.pwa-setting-icon.language::after {
    position: absolute;
    width: 24px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -7px 0 -1px currentColor, 0 7px 0 -1px currentColor;
    content: "";
}

.pwa-setting-icon.alerts::before {
    width: 17px;
    height: 18px;
    border: 2px solid currentColor;
    border-bottom-width: 3px;
    border-radius: 12px 12px 7px 7px;
    content: "";
}

.pwa-logout-form {
    margin: 0.2rem 0 0;
}

.pwa-logout-form button {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(239, 59, 69, 0.22);
    border-radius: 13px;
    background: #fff0f1;
    color: #c7222d;
    font-weight: 950;
    cursor: pointer;
}

@media (min-width: 560px) {
    .student-pwa-body {
        --student-pwa-max: min(520px, calc(100vw - 2rem));
        --student-pwa-page-padding: 1.15rem;
        padding: 1.25rem 0;
    }

    .student-pwa-shell {
        min-height: calc(100dvh - 2.5rem);
        border: 1px solid rgba(205, 218, 238, 0.9);
        border-radius: 34px;
        overflow: hidden;
    }

    .student-pwa-app {
        min-height: calc(100dvh - 2.5rem);
    }

    .pwa-bottom-nav {
        bottom: 1.25rem;
        border-radius: 18px 18px 30px 30px;
    }
}

@media (min-width: 768px) {
    .student-pwa-body {
        --student-pwa-max: min(760px, calc(100vw - 3rem));
        --student-pwa-page-padding: 1.25rem;
    }

    .pwa-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .pwa-profile-hero,
    .pwa-ride-card,
    .pwa-actions,
    .pwa-page-intro,
    .pwa-live-strip,
    .pwa-account-hero,
    .pwa-route-card,
    .pwa-trip-list,
    .pwa-notification-list {
        grid-column: 1 / -1;
    }

    .pwa-trip-list,
    .pwa-notification-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pwa-route-card .pwa-map-canvas {
        min-height: 220px;
    }

    .pwa-account-card,
    .pwa-settings-card,
    .pwa-alert-card,
    .pwa-student-info-card,
    .pwa-next-trip {
        min-height: 100%;
    }
}

@media (min-width: 1120px) {
    .student-pwa-body {
        --student-pwa-max: min(880px, calc(100vw - 4rem));
        --student-pwa-page-padding: 1.35rem;
    }

    .pwa-content {
        gap: 1.1rem;
    }

    .pwa-trip-list,
    .pwa-notification-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .student-pwa-shell,
    .student-pwa-app {
        width: 100%;
    }

    .pwa-blue-header {
        min-height: 86px;
        padding-inline: 1rem;
    }

    .pwa-content {
        padding-inline: 0.8rem;
    }

    .pwa-profile-hero {
        align-items: flex-start;
    }

    .pwa-avatar-block {
        min-width: 118px;
    }

    .pwa-avatar {
        width: 70px;
        height: 70px;
    }

    .pwa-greeting h1 {
        font-size: 1.75rem;
    }

    .pwa-ride-card {
        grid-template-columns: 0.7fr 1.3fr;
        min-height: 166px;
    }

    .pwa-bus-drawing {
        width: 124px;
        height: 62px;
    }

    .pwa-primary-button {
        min-width: 0;
        width: 100%;
    }

    .pwa-actions {
        gap: 0.55rem;
    }

    .pwa-action-card {
        min-height: 98px;
        padding-inline: 0.32rem;
    }

    .pwa-trip-row,
    .pwa-info-grid {
        align-items: stretch;
    }
}

@media (max-width: 360px) {
    .pwa-actions {
        grid-template-columns: 1fr;
    }

    .pwa-action-card {
        grid-template-columns: auto 1fr;
        justify-items: start;
        min-height: 72px;
        text-align: start;
    }

    .pwa-action-icon {
        grid-row: span 2;
    }

    .pwa-page-intro,
    .pwa-trip-card-head,
    .pwa-trip-row,
    .pwa-account-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .pwa-page-intro > strong,
    .pwa-time-box {
        width: 100%;
    }

    .pwa-profile-list div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

.student-desktop-header,
.pwa-desktop-only {
    display: none;
}

.pwa-filter-bar,
.pwa-notification-toolbar {
    display: grid;
    gap: 0.65rem;
}

.pwa-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pwa-filter-bar div,
.pwa-filter-form label,
.pwa-filter-form button,
.pwa-filter-form a,
.pwa-notification-toolbar a,
.pwa-preference-button,
.pwa-stat-list div,
.pwa-summary-list div,
.pwa-subscription-progress,
.pwa-logout-panel {
    border: 1px solid rgba(205, 218, 238, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(20, 41, 82, 0.045);
}

.pwa-filter-bar div,
.pwa-filter-form label {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.72rem;
}

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

.pwa-filter-form select,
.pwa-filter-form input {
    min-width: 0;
    width: 100%;
    min-height: 34px;
    border: 0;
    background: transparent;
    color: #111c33;
    font: inherit;
    font-weight: 950;
}

.pwa-filter-form button,
.pwa-filter-form a {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    color: #0b73f6;
    font-weight: 950;
}

.pwa-filter-form button {
    background: linear-gradient(135deg, #0b73f6, #0060df);
    color: #fff;
    cursor: pointer;
}

.pwa-filter-bar small,
.pwa-stat-list span,
.pwa-summary-list dt,
.pwa-subscription-progress small,
.pwa-muted {
    color: #65728a;
}

.pwa-filter-bar strong,
.pwa-stat-list strong,
.pwa-summary-list dd {
    color: #111c33;
    font-weight: 950;
}

.pwa-notification-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pwa-notification-toolbar a {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    color: #52627c;
    font-weight: 900;
}

.pwa-notification-toolbar a[aria-current="page"] {
    border-color: rgba(11, 115, 246, 0.35);
    background: #eaf3ff;
    color: #0b73f6;
}

.pwa-trip-list-panel,
.pwa-notification-list-panel {
    min-width: 0;
}

.pwa-trip-summary,
.pwa-notification-preferences,
.pwa-stats-card,
.pwa-subscription-card,
.pwa-support-card,
.pwa-trip-detail-card,
.pwa-qr-preview-card,
.pwa-qr-full-card,
.pwa-live-map-card {
    padding: 1rem;
}

.pwa-stat-list,
.pwa-summary-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.pwa-stat-list div,
.pwa-summary-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.72rem 0.82rem;
}

.pwa-stat-list strong {
    color: #0b73f6;
    font-size: 1.12rem;
}

.pwa-summary-list dt,
.pwa-summary-list dd {
    margin: 0;
}

.pwa-summary-route {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.7rem;
    align-items: center;
    margin-bottom: 0.9rem;
}

.pwa-summary-route strong {
    min-width: 0;
    color: #111c33;
    font-weight: 950;
}

.pwa-summary-route i {
    width: 36px;
    height: 2px;
    border-radius: 999px;
    background: #8a96aa;
}

.pwa-trip-summary .pwa-primary-button {
    width: 100%;
    margin-top: 0.9rem;
}

.pwa-notification-preferences {
    display: grid;
    gap: 0.72rem;
}

.pwa-preference-button {
    display: flex;
    width: 100%;
    min-height: 72px;
    align-items: center;
    gap: 0.85rem;
    padding: 0.72rem;
    color: #111c33;
    text-align: start;
    cursor: pointer;
}

.pwa-preference-button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.pwa-preference-button[hidden] {
    display: none;
}

.pwa-preference-button > div {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.pwa-preference-button small {
    color: #65728a;
    font-weight: 850;
}

.pwa-preference-button.is-danger {
    border-color: rgba(239, 59, 69, 0.22);
    background: #fff6f7;
}

.pwa-subscription-progress {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    padding: 0.82rem;
}

.pwa-subscription-progress strong {
    color: #078250;
}

.pwa-subscription-progress span {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eef9;
}

.pwa-subscription-progress i {
    display: block;
    width: 72%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0b73f6, #12a86b);
}

.pwa-setting-icon.phone::before {
    width: 21px;
    height: 21px;
    border: 3px solid currentColor;
    border-top-color: transparent;
    border-left-color: transparent;
    border-radius: 6px;
    transform: rotate(45deg);
    content: "";
}

.pwa-setting-icon.mail::before {
    width: 24px;
    height: 17px;
    border: 2px solid currentColor;
    border-radius: 5px;
    content: "";
}

.pwa-setting-icon.mail::after {
    position: absolute;
    width: 17px;
    height: 17px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: translateY(-4px) rotate(-45deg);
    content: "";
}

.pwa-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.9rem;
}

.pwa-action-row > * {
    flex: 1 1 150px;
}

.pwa-action-row form {
    display: flex;
}

.pwa-action-row form > button {
    width: 100%;
}

.pwa-booking-form {
    display: grid;
    gap: 0.8rem;
}

.pwa-booking-form label {
    display: grid;
    gap: 0.35rem;
    color: #52627c;
    font-weight: 900;
}

.pwa-booking-form select {
    min-height: 48px;
    border: 1px solid rgba(205, 218, 238, 0.92);
    border-radius: 12px;
    padding: 0 0.82rem;
    background: #fff;
    color: #111c33;
    font: inherit;
}

.pwa-booking-form .pwa-primary-button {
    width: 100%;
    border: 0;
    cursor: pointer;
}

.pwa-qr-preview-card,
.pwa-qr-full-card {
    display: grid;
    justify-items: center;
    gap: 1rem;
}

.pwa-qr-placeholder {
    display: grid;
    grid-template-columns: repeat(3, 22px);
    grid-template-rows: repeat(3, 22px);
    gap: 8px;
    border-radius: 18px;
    padding: 1.4rem;
    background:
        repeating-linear-gradient(45deg, #111c33 0 8px, transparent 8px 16px),
        #fff;
    box-shadow: inset 0 0 0 16px #fff, 0 14px 30px rgba(20, 41, 82, 0.08);
}

.pwa-qr-placeholder i {
    border: 4px solid #0b73f6;
    border-radius: 4px;
    background: #fff;
}

.pwa-qr-placeholder i:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.pwa-qr-placeholder i:nth-child(2) {
    grid-column: 3;
    grid-row: 1;
}

.pwa-qr-placeholder i:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
}

.pwa-qr-full-card .qr-code {
    width: min(280px, 72vw);
    height: auto;
    border: 1px solid #dbe5f2;
    border-radius: 18px;
    padding: 0.85rem;
    background: #fff;
}

.pwa-live-map-card {
    overflow: hidden;
}

.pwa-live-map-card .map {
    min-height: min(68dvh, 620px);
    border-radius: 14px;
}

.pwa-map-content .pwa-live-map-card,
.pwa-detail-content .pwa-route-card,
.pwa-detail-content .pwa-settings-card,
.pwa-detail-content .pwa-trip-detail-card,
.pwa-detail-content .pwa-qr-preview-card {
    grid-column: 1 / -1;
}

.pwa-logout-panel {
    display: block;
    padding: 0;
}

.driver-pwa-app {
    --driver-green: #11a86a;
    --driver-amber: #f59e0b;
    --driver-red: #ef3b45;
}

.driver-blue-header {
    background:
        radial-gradient(circle at 18% 8%, rgba(17, 168, 106, 0.34), transparent 10rem),
        linear-gradient(135deg, #063f99 0%, #0873f5 58%, #054eb9 100%);
}

.driver-content {
    gap: 0.9rem;
    padding-bottom: calc(8.2rem + env(safe-area-inset-bottom));
}

.driver-hero,
.driver-trip-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 50%, rgba(17, 168, 106, 0.12), transparent 11rem),
        linear-gradient(90deg, rgba(232, 242, 255, 0.94), rgba(255, 255, 255, 0.98));
}

.driver-hero-copy,
.driver-trip-hero > div {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.driver-hero h1,
.driver-trip-hero h1 {
    margin: 0;
    color: #101a32;
    font-size: 1.65rem;
    line-height: 1.08;
}

.driver-hero p,
.driver-trip-hero p,
.driver-help-text {
    margin: 0;
    color: #5f6d86;
    line-height: 1.55;
}

.driver-trip-hero p b,
.driver-current-route p b,
.driver-student-route b {
    display: inline-block;
    width: 24px;
    height: 2px;
    margin-inline: 0.35rem;
    border-radius: 999px;
    background: #8a96aa;
    vertical-align: middle;
}

.driver-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.driver-inline-meta span {
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    background: rgba(11, 115, 246, 0.08);
    color: #20304d;
    font-size: 0.8rem;
    font-weight: 900;
}

.driver-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 82px;
    height: 82px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 32%, #0b73f6 0 11px, transparent 12px),
        radial-gradient(circle at 50% 72%, #0b73f6 0 25px, transparent 26px),
        linear-gradient(180deg, #eef6ff, #dcecff);
    box-shadow: 0 14px 30px rgba(11, 115, 246, 0.15);
}

.driver-avatar::after {
    position: absolute;
    right: -4px;
    bottom: 10px;
    width: 26px;
    height: 26px;
    border: 4px solid #fff;
    border-radius: 50%;
    background:
        linear-gradient(135deg, transparent 49%, #fff 50% 58%, transparent 59%) 8px 7px / 12px 10px no-repeat,
        var(--driver-green);
    content: "";
}

.driver-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
}

.driver-stat {
    display: grid;
    gap: 0.18rem;
    min-height: 92px;
    padding: 0.9rem;
}

.driver-stat span,
.driver-trip-metrics span,
.driver-gps-grid span,
.driver-stop-list small,
.driver-student-main span {
    color: #65728a;
    font-size: 0.78rem;
    font-weight: 850;
}

.driver-stat strong {
    color: #111c33;
    font-size: 1.75rem;
    line-height: 1;
}

.driver-current-card,
.driver-readiness-card,
.driver-command-card,
.driver-live-map-card,
.driver-scan-card,
.driver-gps-card,
.driver-route-card,
.driver-students-card,
.driver-account-card {
    padding: 1rem;
}

.driver-current-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.62rem;
}

.driver-current-actions .pwa-primary-button,
.driver-current-actions .pwa-outline-button {
    min-height: 46px;
    width: 100%;
}

.driver-current-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.driver-current-route strong {
    display: block;
    color: #111c33;
    font-size: 1.1rem;
    line-height: 1.35;
}

.driver-current-route p {
    margin: 0.35rem 0 0;
    color: #5f6d86;
}

.driver-time-chip {
    display: grid;
    place-items: center;
    min-width: 92px;
    border-radius: 16px;
    padding: 0.74rem 0.5rem;
    background: #eef6ff;
    color: #0b73f6;
}

.driver-time-chip strong {
    font-size: 1.05rem;
}

.driver-time-chip span {
    color: #65728a;
    font-size: 0.78rem;
    font-weight: 850;
}

.driver-trip-metrics,
.driver-gps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0.85rem 0;
}

.driver-trip-metrics div,
.driver-gps-grid div {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
    border: 1px solid rgba(205, 218, 238, 0.86);
    border-radius: 13px;
    padding: 0.7rem;
    background: #f8fbff;
}

.driver-trip-metrics strong,
.driver-gps-grid strong {
    color: #111c33;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.driver-live-map-card .pwa-map-canvas {
    min-height: 190px;
}

.driver-check-list {
    display: grid;
    gap: 0.7rem;
}

.driver-check-list div {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #20304d;
    font-weight: 850;
    line-height: 1.5;
}

.driver-check-dot {
    display: block;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.driver-check-dot.ok {
    background: var(--driver-green);
    box-shadow: 0 0 0 6px rgba(17, 168, 106, 0.12);
}

.driver-check-dot.warn {
    background: var(--driver-amber);
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12);
}

.driver-section-heading {
    margin-bottom: 0.75rem;
}

.driver-trip-list {
    display: grid;
    gap: 0.82rem;
}

.driver-trip-card .pwa-outline-button {
    justify-self: stretch;
}

.driver-command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.68rem;
}

.driver-command-grid form {
    display: contents;
}

.driver-command {
    display: grid;
    gap: 0.18rem;
    min-height: 92px;
    width: 100%;
    border: 1px solid rgba(205, 218, 238, 0.9);
    border-radius: 14px;
    padding: 0.78rem 0.55rem;
    background: #fff;
    color: #111c33;
    text-align: center;
    cursor: pointer;
}

.driver-command strong {
    font-size: 0.98rem;
    font-weight: 950;
}

.driver-command small {
    color: #65728a;
    font-size: 0.76rem;
    font-weight: 800;
}

.driver-command.primary {
    border-color: rgba(11, 115, 246, 0.36);
    background: #eef6ff;
    color: #0b73f6;
}

.driver-command.success {
    border-color: rgba(17, 168, 106, 0.32);
    background: #edfdf5;
    color: var(--driver-green);
}

.driver-command.warning {
    border-color: rgba(245, 158, 11, 0.32);
    background: #fff7e8;
    color: #b76600;
}

.driver-command.danger {
    border-color: rgba(239, 59, 69, 0.32);
    background: #fff0f1;
    color: var(--driver-red);
}

.driver-command:disabled {
    cursor: not-allowed;
    filter: grayscale(0.35);
    opacity: 0.55;
}

.driver-scan-form {
    display: grid;
    gap: 0.75rem;
}

.driver-scan-form label {
    color: #20304d;
}

.driver-scan-form .pwa-primary-button {
    width: 100%;
    border: 0;
    cursor: pointer;
}

.driver-help-text {
    margin-top: 0.65rem;
    font-size: 0.84rem;
}

.driver-stop-list,
.driver-student-list {
    display: grid;
    gap: 0.7rem;
}

.driver-stop-list article,
.driver-student-list article {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    border: 1px solid rgba(205, 218, 238, 0.82);
    border-radius: 14px;
    padding: 0.72rem;
    background: #f8fbff;
}

.driver-stop-list article > span:first-child {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #e8f2ff;
    color: #0b73f6;
    font-weight: 950;
}

.driver-stop-list strong,
.driver-student-main strong {
    color: #111c33;
    font-weight: 950;
}

.driver-stop-list div,
.driver-student-main,
.driver-student-route {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.driver-student-list article {
    align-items: flex-start;
    justify-content: space-between;
}

.driver-student-main {
    flex: 1;
}

.driver-student-route {
    flex: 1.2;
    color: #5f6d86;
    font-size: 0.82rem;
    line-height: 1.45;
}

.driver-student-meta {
    display: grid;
    gap: 0.28rem;
    justify-items: start;
}

.driver-student-meta small {
    color: #65728a;
    font-size: 0.76rem;
    font-weight: 800;
}

.driver-students-full-card .driver-student-list article {
    align-items: center;
}

.driver-students-trip-card .pwa-primary-button {
    width: 100%;
}

.driver-account-hero {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 1rem;
    background:
        radial-gradient(circle at 12% 50%, rgba(11, 115, 246, 0.12), transparent 12rem),
        linear-gradient(90deg, rgba(232, 242, 255, 0.94), rgba(255, 255, 255, 0.98));
}

.driver-account-hero > div {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 0.2rem;
}

.driver-account-hero h1 {
    margin: 0;
    color: #101a32;
    font-size: 1.65rem;
    line-height: 1.08;
}

.driver-account-hero p {
    margin: 0;
    color: #65728a;
    font-weight: 850;
}

.driver-bus-list {
    display: grid;
    gap: 0.68rem;
}

.driver-bus-list article {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-width: 0;
    border: 1px solid rgba(205, 218, 238, 0.82);
    border-radius: 14px;
    padding: 0.72rem;
    background: #f8fbff;
}

.driver-bus-list .pwa-bus-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background-color: #e8f2ff;
    background-size: 28px;
}

.driver-bus-list div {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 0.12rem;
}

.driver-bus-list strong {
    color: #111c33;
    font-weight: 950;
}

.driver-bus-list small {
    color: #65728a;
    font-size: 0.78rem;
    font-weight: 850;
}

.driver-account-actions {
    display: grid;
    gap: 0.7rem;
}

.driver-account-actions .pwa-primary-button,
.driver-account-actions .pwa-outline-button,
.driver-logout-button {
    min-height: 48px;
    width: 100%;
}

.driver-account-actions form {
    margin: 0;
}

.driver-logout-button {
    border: 1px solid rgba(239, 59, 69, 0.32);
    border-radius: 14px;
    background: #fff0f1;
    color: var(--driver-red);
    font: inherit;
    font-weight: 950;
    cursor: pointer;
}

.driver-bottom-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pwa-bottom-nav form {
    display: contents;
}

.pwa-bottom-nav button {
    display: grid;
    place-items: center;
    gap: 0.16rem;
    min-height: 56px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #65728a;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
}

.nav-exit {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    color: currentColor;
}

.nav-exit::before {
    position: absolute;
    inset-inline-start: 3px;
    top: 4px;
    width: 12px;
    height: 16px;
    border: 2px solid currentColor;
    border-inline-end: 0;
    border-radius: 4px 0 0 4px;
    content: "";
}

.nav-exit::after {
    position: absolute;
    inset-inline-end: 2px;
    top: 10px;
    width: 15px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: -4px -4px 0 -1px currentColor, -4px 4px 0 -1px currentColor;
    content: "";
}

@media (min-width: 1024px) {
    .student-pwa-body {
        --student-pwa-max: 100%;
        --student-pwa-page-padding: 1.25rem;
        padding: 0;
        background:
            linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
    }

    .student-pwa-shell {
        width: 100%;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .student-pwa-app {
        min-height: 100dvh;
        overflow: visible;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0, rgba(247, 251, 255, 0.98) 220px, #f6f9fd 100%);
    }

    .pwa-blue-header,
    .pwa-bottom-nav {
        display: none;
    }

    .student-desktop-header {
        position: sticky;
        top: 0;
        z-index: 40;
        display: grid;
        grid-template-columns: auto minmax(340px, 1fr) auto auto;
        gap: 1rem;
        align-items: center;
        min-height: 76px;
        border-bottom: 1px solid rgba(205, 218, 238, 0.82);
        padding: 0.72rem clamp(1rem, 2vw, 1.6rem);
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 8px 24px rgba(20, 41, 82, 0.06);
        backdrop-filter: blur(18px);
        direction: ltr;
    }

    .student-desktop-lang,
    .student-desktop-profile,
    .student-desktop-brand,
    .student-desktop-nav a {
        display: inline-flex;
        align-items: center;
        color: #111c33;
    }

    .student-desktop-lang {
        min-height: 42px;
        gap: 0.45rem;
        border: 1px solid rgba(205, 218, 238, 0.95);
        border-radius: 12px;
        padding: 0.25rem 0.65rem;
        background: #fff;
        color: #20304d;
        font-weight: 950;
    }

    .student-desktop-lang .pwa-setting-icon {
        width: 24px;
        height: 24px;
        border-radius: 8px;
        background: transparent;
        color: #52627c;
    }

    .student-desktop-lang .pwa-setting-icon.language::before {
        width: 17px;
        height: 17px;
    }

    .student-desktop-lang .pwa-setting-icon.language::after {
        width: 18px;
    }

    .student-desktop-nav {
        display: flex;
        justify-content: center;
        gap: 0.35rem;
        min-width: 0;
        direction: rtl;
    }

    .student-desktop-nav a {
        position: relative;
        min-height: 54px;
        gap: 0.5rem;
        border-bottom: 3px solid transparent;
        padding: 0.35rem 1rem;
        color: #52627c;
        font-weight: 900;
        white-space: nowrap;
    }

    .student-desktop-nav a[aria-current="page"] {
        border-bottom-color: #0b73f6;
        color: #0b73f6;
    }

    .student-desktop-nav span {
        position: relative;
        display: block;
        width: 21px;
        height: 21px;
        color: currentColor;
    }

    .student-desktop-brand {
        justify-content: flex-end;
        gap: 0.7rem;
        text-align: end;
        direction: rtl;
    }

    .student-desktop-brand > span:first-child,
    .student-desktop-profile > span:first-child {
        display: grid;
        gap: 0.1rem;
    }

    .student-desktop-brand > span:first-child {
        color: #0060df;
        font-size: 1.35rem;
        font-weight: 950;
        line-height: 1.05;
    }

    .student-desktop-brand small,
    .student-desktop-profile small {
        color: #65728a;
        font-size: 0.72rem;
        font-weight: 850;
    }

    .student-desktop-brand .pwa-bus-icon {
        width: 44px;
        height: 44px;
        border-color: #0b73f6;
        border-radius: 12px;
        color: #0b73f6;
    }

    .student-desktop-brand .pwa-bus-icon::before,
    .student-desktop-brand .pwa-bus-icon::after {
        background-color: #0b73f6;
    }

    .student-desktop-brand .pwa-bus-icon::before {
        background: #0b73f6;
    }

    .student-desktop-brand .pwa-bus-icon::after {
        background:
            radial-gradient(circle, #0b73f6 0 3px, transparent 4px) left center / 10px 8px no-repeat,
            radial-gradient(circle, #0b73f6 0 3px, transparent 4px) right center / 10px 8px no-repeat;
    }

    .student-desktop-profile {
        justify-content: flex-end;
        gap: 0.65rem;
        min-width: 134px;
        direction: rtl;
    }

    .student-desktop-profile strong {
        max-width: 112px;
        overflow: hidden;
        color: #111c33;
        font-size: 0.86rem;
        font-weight: 950;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pwa-avatar.mini {
        width: 42px;
        height: 42px;
    }

    .pwa-avatar.mini::after {
        right: -3px;
        bottom: 2px;
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .pwa-content {
        width: min(100%, 1540px);
        margin: 0 auto;
        gap: 1.15rem;
        padding: 1.35rem clamp(1rem, 2vw, 1.6rem) 2.1rem;
    }

    .pwa-card,
    .pwa-page-intro,
    .pwa-live-strip,
    .pwa-trip-card,
    .pwa-notification-item,
    .pwa-account-hero,
    .pwa-setting-row {
        border-radius: 14px;
        box-shadow: 0 12px 28px rgba(20, 41, 82, 0.055);
    }

    .pwa-page-intro {
        min-height: 92px;
        padding: 1.1rem 1.25rem;
    }

    .pwa-page-intro h1 {
        font-size: 1.8rem;
    }

    .pwa-desktop-only {
        display: block;
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 340px);
        align-items: stretch;
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-profile-hero {
        grid-column: 1 / 3;
        grid-row: 1;
        min-height: 228px;
        border: 1px solid rgba(183, 212, 250, 0.95);
        border-radius: 16px;
        padding: 1.35rem;
        background:
            radial-gradient(circle at 16% 55%, rgba(11, 115, 246, 0.08), transparent 18rem),
            linear-gradient(90deg, rgba(232, 242, 255, 0.94), rgba(255, 255, 255, 0.98)),
            #fff;
        box-shadow: 0 12px 28px rgba(20, 41, 82, 0.055);
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-student-info-card {
        grid-column: 3;
        grid-row: 1;
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-ride-card {
        grid-column: 1;
        grid-row: 2;
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-next-trip {
        grid-column: 2;
        grid-row: 2;
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-stats-card {
        grid-column: 3;
        grid-row: 2;
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-actions {
        grid-column: 1 / 3;
        grid-row: 3;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-alert-card {
        grid-column: 3;
        grid-row: 3;
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-route-card {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    .student-pwa-app[data-live-page="dashboard"] .pwa-route-card .pwa-map-canvas {
        min-height: 245px;
    }

    .student-pwa-app[data-live-page="trips"] .pwa-content,
    .student-pwa-app[data-live-page="notifications"] .pwa-content {
        grid-template-columns: minmax(0, 1fr) minmax(310px, 340px);
        align-items: start;
    }

    .student-pwa-app[data-live-page="trips"] .pwa-page-intro,
    .student-pwa-app[data-live-page="notifications"] .pwa-page-intro {
        grid-column: 1 / -1;
    }

    .student-pwa-app[data-live-page="trips"] .pwa-filter-bar,
    .student-pwa-app[data-live-page="notifications"] .pwa-notification-toolbar,
    .student-pwa-app[data-live-page="trips"] .pwa-live-strip,
    .student-pwa-app[data-live-page="notifications"] .pwa-live-strip,
    .student-pwa-app[data-live-page="trips"] .pwa-trips-map-panel,
    .student-pwa-app[data-live-page="trips"] .pwa-trip-list-panel,
    .student-pwa-app[data-live-page="notifications"] .pwa-notification-list-panel {
        grid-column: 1;
    }

    .student-pwa-app[data-live-page="trips"] .pwa-trip-summary,
    .student-pwa-app[data-live-page="notifications"] .pwa-notification-preferences {
        position: sticky;
        top: 96px;
        grid-column: 2;
        grid-row: 2 / span 4;
    }

    .student-pwa-app[data-live-page="trips"] .pwa-trip-list,
    .student-pwa-app[data-live-page="notifications"] .pwa-notification-list {
        grid-template-columns: 1fr;
    }

    .student-pwa-app[data-live-page="trips"] .pwa-trip-card {
        grid-template-columns: minmax(220px, 1.35fr) minmax(260px, 1fr) minmax(130px, auto);
        align-items: center;
    }

    .student-pwa-app[data-live-page="trips"] .pwa-trip-card-head {
        align-items: center;
    }

    .student-pwa-app[data-live-page="trips"] .pwa-trip-card .pwa-outline-button {
        min-width: 128px;
    }

    .student-pwa-app[data-live-page="trips"] .pwa-trips-map-panel .pwa-map-canvas {
        min-height: 230px;
    }

    .student-pwa-app[data-live-page="notifications"] .pwa-notification-item {
        align-items: center;
        min-height: 88px;
        padding: 1rem 1.1rem;
    }

    .student-pwa-app[data-live-page="account"] .pwa-content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr) minmax(300px, 340px);
        align-items: start;
    }

    .student-pwa-app[data-live-page="account"] .pwa-account-hero {
        grid-column: 1;
        grid-row: 1;
        min-height: 250px;
        align-items: center;
        padding: 1.35rem;
        background:
            radial-gradient(circle at 14% 52%, rgba(11, 115, 246, 0.08), transparent 14rem),
            linear-gradient(90deg, rgba(232, 242, 255, 0.92), rgba(255, 255, 255, 0.98));
    }

    .student-pwa-app[data-live-page="account"] .pwa-account-card {
        grid-column: 2;
        grid-row: 1;
        min-height: 250px;
    }

    .student-pwa-app[data-live-page="account"] .pwa-settings-card {
        grid-column: 3;
        grid-row: 1;
    }

    .student-pwa-app[data-live-page="account"] .pwa-subscription-card {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    .student-pwa-app[data-live-page="account"] .pwa-support-card {
        grid-column: 3;
        grid-row: 2;
    }

    .student-pwa-app[data-live-page="account"] .pwa-logout-panel {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .student-pwa-app[data-live-page="trip-detail"] .pwa-detail-content,
    .student-pwa-app[data-live-page="booking"] .pwa-detail-content,
    .student-pwa-app[data-live-page="qr"] .pwa-detail-content,
    .student-pwa-app[data-live-page="map"] .pwa-map-content {
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 1000px);
    }

    .driver-desktop-header {
        grid-template-columns: auto minmax(220px, 1fr) auto auto;
    }

    .student-pwa-app[data-live-page="driver-dashboard"] .driver-content {
        grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
        align-items: start;
    }

    .student-pwa-app[data-live-page="driver-dashboard"] .driver-hero {
        grid-column: 1;
        grid-row: 1;
        min-height: 220px;
        padding: 1.4rem;
    }

    .student-pwa-app[data-live-page="driver-dashboard"] .driver-stat-grid {
        grid-column: 2;
        grid-row: 1;
        align-self: stretch;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-pwa-app[data-live-page="driver-dashboard"] .driver-current-card {
        grid-column: 1;
        grid-row: 2;
    }

    .student-pwa-app[data-live-page="driver-dashboard"] .driver-readiness-card {
        grid-column: 2;
        grid-row: 2;
    }

    .student-pwa-app[data-live-page="driver-dashboard"] .driver-trip-list-panel {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .student-pwa-app[data-live-page="driver-dashboard"] .driver-trip-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-pwa-app[data-live-page="driver-trip"] .driver-content {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.42fr);
        align-items: start;
        padding-bottom: 2.1rem;
    }

    .student-pwa-app[data-live-page="driver-trip"] .driver-trip-hero,
    .student-pwa-app[data-live-page="driver-trip"] .driver-stat-grid {
        grid-column: 1 / -1;
    }

    .student-pwa-app[data-live-page="driver-trip"] .driver-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .student-pwa-app[data-live-page="driver-trip"] .driver-command-card,
    .student-pwa-app[data-live-page="driver-trip"] .driver-live-map-card,
    .student-pwa-app[data-live-page="driver-trip"] .driver-route-card,
    .student-pwa-app[data-live-page="driver-trip"] .driver-students-card {
        grid-column: 1;
    }

    .student-pwa-app[data-live-page="driver-trip"] .driver-scan-card {
        position: sticky;
        top: 96px;
        grid-column: 2;
        grid-row: 3;
    }

    .student-pwa-app[data-live-page="driver-trip"] .driver-gps-card {
        position: sticky;
        top: 390px;
        grid-column: 2;
        grid-row: 4;
    }

    .student-pwa-app[data-live-page="driver-students"] .driver-content {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
        align-items: start;
        padding-bottom: 2.1rem;
    }

    .student-pwa-app[data-live-page="driver-students"] .driver-trip-hero,
    .student-pwa-app[data-live-page="driver-students"] .driver-stat-grid,
    .student-pwa-app[data-live-page="driver-students"] .driver-students-full-card {
        grid-column: 1;
    }

    .student-pwa-app[data-live-page="driver-students"] .driver-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .student-pwa-app[data-live-page="driver-students"] .driver-students-trip-card {
        position: sticky;
        top: 96px;
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .student-pwa-app[data-live-page="driver-account"] .driver-content {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
        align-items: start;
        padding-bottom: 2.1rem;
    }

    .student-pwa-app[data-live-page="driver-account"] .driver-account-hero {
        grid-column: 1;
        min-height: 210px;
        padding: 1.35rem;
    }

    .student-pwa-app[data-live-page="driver-account"] .driver-stat-grid {
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-pwa-app[data-live-page="driver-account"] .driver-account-card {
        grid-column: auto;
    }

    .student-pwa-app[data-live-page="driver-account"] .driver-account-actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .driver-command-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .driver-student-list article {
        display: grid;
        grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
        align-items: center;
    }
}

@media (max-width: 520px) {
    .pwa-filter-bar,
    .pwa-notification-toolbar {
        grid-template-columns: 1fr;
    }

    .pwa-summary-route {
        grid-template-columns: 1fr;
    }

    .pwa-summary-route i {
        width: 100%;
    }
}

html[dir="rtl"] .map,
html[dir="rtl"] .leaflet-container {
    direction: ltr;
}

@media (max-width: 1280px) {
    .console-road-dashboard {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
    }

    .console-stat-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .console-road-workspace {
        grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
    }

    .console-road-bottom {
        grid-template-columns: 1fr 1fr;
    }

    .console-passenger-gauge {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1100px) {
    .console-shell {
        padding: 0.65rem;
    }

    .console-grid.console-road-dashboard {
        grid-template-columns: 1fr;
        grid-template-areas: none;
        grid-template-rows: none;
        overflow: visible;
    }

    .console-road-main {
        min-height: auto;
    }

    .console-road-header {
        grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.9fr) auto auto;
    }

    .console-trip-status {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: center;
    }

    .console-language-inline {
        grid-column: 1 / -1;
        justify-self: center;
        width: min(220px, 100%);
    }

    .console-road-workspace {
        grid-template-columns: 1fr;
    }

    .console-ops-column {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .console-emergency-button {
        grid-column: 1 / -1;
    }

    .console-road-map {
        min-height: 520px;
    }

    .console-route-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        max-height: none;
    }

    .console-side-brand,
    .console-route-timeline {
        grid-column: 1 / -1;
    }

    .console-road-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .console-body {
        background: #f5f8fc;
    }

    .console-shell {
        padding: 0;
    }

    .console-grid.console-road-dashboard {
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .console-road-main,
    .console-route-sidebar {
        padding: 0.7rem;
    }

    .console-road-header {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: auto;
        gap: 0.55rem;
    }

    .console-driver-card,
    .console-trip-status,
    .console-language-inline {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: center;
        text-align: center;
    }

    .console-device-strip,
    .console-clock-block {
        justify-self: stretch;
        justify-content: center;
        text-align: center;
    }

    .console-trip-status {
        min-height: 48px;
        padding-block: 0.28rem;
    }

    .console-language-switch {
        width: 100%;
    }

    .page-heading {
        grid-template-columns: 1fr;
    }

    .console-language-page,
    .console-language-card {
        justify-self: stretch;
    }

    .console-stat-strip {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.55rem;
    }

    .console-road-stat {
        min-height: 82px;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0.28rem;
        padding: 0.62rem;
        text-align: center;
    }

    .console-road-stat .stat-icon {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    .console-road-workspace,
    .console-ops-column,
    .console-road-bottom,
    .console-route-sidebar {
        grid-template-columns: 1fr;
    }

    .console-road-map {
        min-height: 430px;
    }

    .console-map-summary {
        grid-template-columns: 1fr 1fr;
    }

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

    .console-mini-metrics div:nth-child(odd) {
        border-inline-start: 0;
    }

    .console-log-list article {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .console-road-nav {
        position: static;
        z-index: 30;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        backdrop-filter: blur(16px);
    }

    .console-road-nav .button {
        min-height: 46px;
    }

    .console-route-sidebar .console-boarding-code {
        grid-template-columns: 1fr;
    }

    .console-route-sidebar .console-boarding-code img {
        justify-self: center;
    }
}

@media (max-width: 480px) {
    .console-stat-strip,
    .console-map-summary,
    .console-road-nav {
        grid-template-columns: 1fr;
    }

    .console-road-map {
        min-height: 360px;
    }

    .console-map-summary {
        position: static;
        margin: 0.55rem;
    }

    .console-map.is-fullscreen .console-map-summary {
        position: absolute;
        inset-inline: 0.75rem;
        bottom: 0.75rem;
        margin: 0;
    }

    .console-road-map .console-map-inner {
        min-height: 330px;
        height: 330px;
    }

    .console-map.is-fullscreen .console-map-inner {
        min-height: 100dvh;
        height: 100dvh;
    }
}

html[dir="rtl"] .trip-card::before {
    right: 0;
    left: auto;
}

.qr-scan-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 2rem);
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(16px);
}

.qr-scan-card {
    width: min(100%, 520px);
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 24px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.32);
}

.qr-scan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.qr-scan-head strong {
    font-size: 1rem;
}

.qr-scan-head button {
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 999px;
    background: #eff6ff;
    color: #0b73f6;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.qr-scan-card video {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    object-fit: cover;
    background: #0f172a;
}

.qr-scan-fallback {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.65rem;
    align-items: end;
}

.qr-scan-fallback label {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 0.86rem;
}

.qr-scan-fallback input {
    min-width: 0;
    min-height: 46px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 0 0.9rem;
    color: #0f172a;
    background: #f8fafc;
}

.qr-scan-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

@media (max-width: 520px) {
    .qr-scan-card {
        border-radius: 20px;
    }

    .qr-scan-fallback {
        grid-template-columns: 1fr;
    }
}
