/* Export pages */
body.aimom-export-page {
    background: #f8fafc;
    margin: 0;
    padding: 32px 16px;
    color: var(--aimom-text-color);
}

.aimom-export-shell {
    max-width: 880px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.aimom-export-topbar {
    display: flex;
    justify-content: flex-start;
}

.aimom-export-back {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--aimom-card-border);
    border-radius: 999px;
    background: #fff;
    color: #2f6fe4;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(56, 76, 96, 0.08);
}

.aimom-export-back:hover,
.aimom-export-back:focus-visible {
    border-color: rgba(75, 134, 232, 0.45);
    background: #f1f6ff;
    outline: none;
}

.aimom-export-hero {
    background: #fff;
    border: 1px solid var(--aimom-card-border);
    border-radius: var(--aimom-card-radius);
    padding: 20px;
    display: grid;
    gap: 6px;
}

.aimom-export-hero h1 { font-size: 22px; }

.aimom-export-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.aimom-export-card {
    background: #fff;
    border: 1px solid var(--aimom-card-border);
    border-radius: var(--aimom-card-radius);
    padding: 18px;
    display: grid;
    gap: 10px;
}

.aimom-export-card h2 { font-size: 18px; }

.aimom-export-alpha-note {
    border-color: rgba(222, 112, 84, 0.28);
    border-left: 4px solid rgba(217, 93, 64, 0.72);
    background: linear-gradient(180deg, rgba(255, 244, 239, 0.98), rgba(255, 250, 247, 0.96));
    box-shadow: 0 8px 18px rgba(180, 82, 52, 0.08);
}

.aimom-export-alpha-note h2 {
    color: #9d3c25;
}

.aimom-export-alpha-note p {
    margin: 0;
    color: #744838;
    font-size: 14px;
    font-weight: 720;
    line-height: 1.55;
}

.aimom-export-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--aimom-font-small);
}

.aimom-export-table th,
.aimom-export-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.aimom-export-table thead th {
    background: #f1f5f9;
    font-weight: 700;
}

.aimom-export-table tfoot th {
    background: #fef3c7;
    font-weight: 700;
}

.aimom-export-empty {
    margin: 0;
    padding: 14px;
    color: var(--aimom-text-muted);
    background: #f8fafc;
    border-radius: 10px;
    text-align: center;
}

.aimom-export-footer {
    text-align: center;
    color: var(--aimom-text-muted);
    padding: 12px;
}

@media print {
    body.aimom-export-page { background: #fff; padding: 0; }
    .aimom-export-actions, .no-print { display: none !important; }
    .aimom-export-card,
    .aimom-export-hero { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
    .aimom-export-table thead th { background: #eee; }
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--scrollbar-thumb-strong), var(--scrollbar-thumb)) border-box;
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d99523, #f4cf72) border-box;
    background-clip: content-box;
}

.app-main,
.school-shell,
.teacher-shell,
.bus-shell {
    display: grid;
    gap: var(--aimom-shell-gap);
    align-content: start;
}

.app-view.is-active,
.school-day-grid,
.routine-check-grid,
.role-check-grid,
.school-workflow-grid,
.teacher-dashboard-grid,
.bus-command-grid,
.bus-stop-list,
.bus-music-list,
.task-list,
.settings-list {
    gap: var(--aimom-section-gap);
}

#today-list,
#upcoming-list,
#all-tasks-list,
#teacher-attendance-list,
#teacher-medication-list,
#teacher-class-history-list,
#teacher-workflow-list,
#school-day-checklist,
#school-risk-checklist,
#school-workflow-list,
#school-class-list,
#school-child-list,
#school-vehicle-list,
#school-staff-list,
#bus-driver-stops,
#bus-driver-music,
#bus-admin-list,
#bus-admin-music {
    display: grid;
    gap: var(--aimom-section-gap);
}

.morning-hero,
.child-setup-panel,
.routine-panel,
.child-advice-card,
.commute-panel,
.kinderbus-panel,
.upcoming-panel,
.week-panel,
.notice-panel,
.task-board,
.settings-panel,
.consent-panel,
.school-hero,
.school-board,
.school-workflow-panel,
.teacher-history-panel,
.teacher-routine-panel,
.bus-hero,
.bus-panel {
    border: 1px solid var(--aimom-card-border);
    border-radius: var(--aimom-card-radius);
    box-shadow: var(--aimom-card-shadow);
}

.routine-panel,
.child-advice-card,
.commute-panel,
.kinderbus-panel,
.upcoming-panel,
.week-panel,
.notice-panel,
.task-board,
.settings-panel,
.consent-panel,
.school-board,
.school-workflow-panel,
.teacher-history-panel,
.teacher-routine-panel,
.bus-panel {
    padding: var(--aimom-section-padding);
}

.task-item,
.commute-card,
.kinderbus-card,
.school-command-card,
.school-editor-card,
.school-list-card,
.school-workflow-card,
.school-day-card,
.routine-check-card,
.role-check-card,
.work-action-card,
.teacher-board-card,
.teacher-attendance-card,
.teacher-medication-card,
.driver-flow-card,
.driver-assigned-card,
.driver-setting-summary,
.bus-stop-card,
.bus-music-card,
.setting-row,
.notice-details,
.upload-row,
.consent-card {
    border-radius: var(--aimom-inner-radius);
}

.school-command-card,
.school-editor-card,
.school-list-card,
.school-workflow-card,
.school-day-card,
.routine-check-card,
.role-check-card,
.work-action-card,
.teacher-board-card,
.teacher-attendance-card,
.teacher-medication-card,
.driver-flow-card,
.driver-assigned-card,
.driver-setting-summary,
.bus-stop-card,
.bus-music-card,
.consent-card {
    border-color: var(--aimom-card-border);
    box-shadow: var(--aimom-soft-shadow);
}

.section-heading {
    gap: 10px;
    margin-bottom: 10px;
}

.section-heading > div {
    min-width: 0;
}

.section-heading h2,
.section-heading h3 {
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.count-chip,
.status-pill,
.school-workflow-status {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.mini-button,
.bottom-nav__item {
    border-radius: var(--aimom-inner-radius);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
    min-height: 42px;
}

.school-helper-text,
.upload-note,
.form-hint,
.metric-line,
.bus-helper-text {
    line-height: 1.45;
}

.school-workflow-grid,
.teacher-dashboard-grid,
.school-split,
.school-notice-layout,
.school-field-grid,
.school-routine-editor,
.bus-command-grid,
.kinderbus-actions,
.consent-actions {
    min-width: 0;
}

.school-workflow-card,
.work-action-card,
.routine-check-card,
.role-check-card,
.teacher-board-card,
.bus-panel {
    min-width: 0;
}

.driver-assigned-card,
.driver-setting-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--aimom-card-border);
    border-radius: var(--aimom-card-radius);
    background: linear-gradient(135deg, rgba(255, 252, 240, 0.95), rgba(244, 250, 255, 0.95));
}

.driver-setting-summary {
    grid-template-columns: minmax(0, 1fr);
}

.driver-assigned-card__icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #2f73c9;
    background: #eef7ff;
    font-size: 28px;
    flex-shrink: 0;
}

.driver-assigned-card__icon i {
    font-size: 28px;
    line-height: 1;
}

.driver-assigned-card span,
.driver-setting-summary span {
    display: block;
    color: #6f8494;
    font-size: 0.78rem;
    font-weight: 800;
}

.driver-assigned-card strong,
.driver-setting-summary strong {
    display: block;
    color: #12314a;
    font-size: 1rem;
    line-height: 1.25;
}

.driver-assigned-card small,
.driver-setting-summary small {
    display: block;
    margin-top: 3px;
    color: #617789;
    line-height: 1.4;
}

.kinderbus-actions,
body.is-admin-embed .kinderbus-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kinderbus-actions .secondary-button,
.consent-actions .secondary-button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    white-space: nowrap;
}

body.is-admin-embed .app-shell,
body.is-admin-embed .school-shell,
body.is-admin-embed .teacher-shell,
body.is-admin-embed .bus-shell {
    gap: 14px;
}

body.is-admin-embed .routine-panel,
body.is-admin-embed .child-advice-card,
body.is-admin-embed .commute-panel,
body.is-admin-embed .kinderbus-panel,
body.is-admin-embed .upcoming-panel,
body.is-admin-embed .consent-panel,
body.is-admin-embed .school-board,
body.is-admin-embed .school-workflow-panel,
body.is-admin-embed .teacher-history-panel,
body.is-admin-embed .teacher-routine-panel,
body.is-admin-embed .bus-panel {
    padding: 13px;
}

@media (max-width: 560px) {
    :root {
        --aimom-shell-gap: 13px;
        --aimom-section-gap: 11px;
        --aimom-section-padding: 13px;
        --aimom-inner-padding: 10px;
    }

    .school-workflow-grid,
    .teacher-dashboard-grid,
    .school-split,
    .school-notice-layout,
    .school-field-grid,
    .school-routine-editor,
    .bus-command-grid {
        grid-template-columns: 1fr;
    }
}

body.is-admin-embed .bi::before {
    content: "" !important;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

body.is-admin-embed .bi-alarm::before { content: "\23F0" !important; }
body.is-admin-embed .bi-arrow-clockwise::before,
body.is-admin-embed .bi-arrow-repeat::before { content: "\21BB" !important; }
body.is-admin-embed .bi-arrow-down::before { content: "\2193" !important; }
body.is-admin-embed .bi-arrow-left::before,
body.is-admin-embed .bi-chevron-left::before { content: "\2039" !important; }
body.is-admin-embed .bi-arrow-up::before { content: "\2191" !important; }
body.is-admin-embed .bi-bag-check::before { content: "\1F392" !important; }
body.is-admin-embed .bi-bell::before,
body.is-admin-embed .bi-bell-fill::before { content: "\1F514" !important; }
body.is-admin-embed .bi-book::before,
body.is-admin-embed .bi-book-half::before { content: "\1F4D6" !important; }
body.is-admin-embed .bi-bookmark-star::before { content: "\2605" !important; }
body.is-admin-embed .bi-box-arrow-right::before,
body.is-admin-embed .bi-send::before { content: "\2197" !important; }
body.is-admin-embed .bi-broadcast-pin::before { content: "\1F4E1" !important; }
body.is-admin-embed .bi-bus-front::before,
body.is-admin-embed .bi-bus-front-fill::before { content: "\1F68C" !important; }
body.is-admin-embed .bi-calendar2-check::before,
body.is-admin-embed .bi-calendar2-week::before,
body.is-admin-embed .bi-calendar3::before,
body.is-admin-embed .bi-calendar-event::before,
body.is-admin-embed .bi-calendar-week::before { content: "\1F4C5" !important; }
body.is-admin-embed .bi-capsule::before { content: "\1F48A" !important; }
body.is-admin-embed .bi-chat-heart::before { content: "\2661" !important; }
body.is-admin-embed .bi-check2-all::before,
body.is-admin-embed .bi-check2-circle::before,
body.is-admin-embed .bi-check2-square::before,
body.is-admin-embed .bi-check-circle::before,
body.is-admin-embed .bi-check-circle-fill::before,
body.is-admin-embed .bi-check-lg::before,
body.is-admin-embed .bi-clipboard-check::before,
body.is-admin-embed .bi-patch-check::before,
.routine-check-card li.is-done .routine-check-item span::before { content: "\2713" !important; }
body.is-admin-embed .bi-chevron-down::before { content: "\2304" !important; }
body.is-admin-embed .bi-chevron-right::before { content: "\203A" !important; }
body.is-admin-embed .bi-circle::before { content: "\25CB" !important; }
body.is-admin-embed .bi-clock::before { content: "\23F1" !important; }
body.is-admin-embed .bi-cloud-arrow-down::before,
body.is-admin-embed .bi-cloud-arrow-up::before { content: "\2601" !important; }
body.is-admin-embed .bi-cloud-rain::before { content: "\2602" !important; }
body.is-admin-embed .bi-cup-straw::before { content: "\1F964" !important; }
body.is-admin-embed .bi-dash-lg::before { content: "\2212" !important; }
body.is-admin-embed .bi-database::before { content: "DB" !important; font-size: 0.64em; }
body.is-admin-embed .bi-diagram-3::before,
body.is-admin-embed .bi-diagram-3-fill::before { content: "\25A6" !important; }
body.is-admin-embed .bi-display::before,
body.is-admin-embed .bi-layout-text-window-reverse::before { content: "\25A3" !important; }
body.is-admin-embed .bi-door-open::before,
body.is-admin-embed .bi-door-open-fill::before { content: "\21E9" !important; }
body.is-admin-embed .bi-dot::before { content: "\2022" !important; }
body.is-admin-embed .bi-download::before { content: "\21E3" !important; }
body.is-admin-embed .bi-eraser::before,
body.is-admin-embed .bi-trash3::before { content: "\232B" !important; }
body.is-admin-embed .bi-exclamation-diamond::before,
body.is-admin-embed .bi-exclamation-triangle::before,
body.is-admin-embed .bi-exclamation-triangle-fill::before { content: "!" !important; }
body.is-admin-embed .bi-eye::before { content: "\25C9" !important; }
body.is-admin-embed .bi-file-earmark-pdf::before { content: "PDF" !important; font-size: 0.58em; }
body.is-admin-embed .bi-file-earmark-text::before { content: "TXT" !important; font-size: 0.58em; }
body.is-admin-embed .bi-file-earmark-zip::before { content: "ZIP" !important; font-size: 0.58em; }
body.is-admin-embed .bi-film::before { content: "\25A4" !important; }
body.is-admin-embed .bi-flask::before { content: "\2697" !important; }
body.is-admin-embed .bi-gear::before,
body.is-admin-embed .bi-gear-fill::before { content: "\2699" !important; }
body.is-admin-embed .bi-geo-alt::before { content: "\2316" !important; }
body.is-admin-embed .bi-gift::before { content: "\1F381" !important; }
body.is-admin-embed .bi-grid-1x2::before { content: "\25A6" !important; }
body.is-admin-embed .bi-hourglass::before,
body.is-admin-embed .bi-hourglass-split::before { content: "\231B" !important; }
body.is-admin-embed .bi-house-fill::before,
body.is-admin-embed .bi-house-heart::before { content: "\2302" !important; }
body.is-admin-embed .bi-image::before { content: "\25A7" !important; }
body.is-admin-embed .bi-inbox::before { content: "\25A4" !important; }
body.is-admin-embed .bi-info-circle::before,
body.is-admin-embed .bi-info-circle-fill::before { content: "i" !important; }
body.is-admin-embed .bi-journal-check::before,
body.is-admin-embed .bi-journal-richtext::before { content: "\1F4D3" !important; }
body.is-admin-embed .bi-list::before,
body.is-admin-embed .bi-list-check::before { content: "\2630" !important; }
body.is-admin-embed .bi-magic::before,
body.is-admin-embed .bi-stars::before { content: "\2726" !important; }
body.is-admin-embed .bi-music-note-beamed::before,
body.is-admin-embed .bi-music-note-list::before { content: "\266A" !important; }
body.is-admin-embed .bi-newspaper::before { content: "\1F4F0" !important; }
body.is-admin-embed .bi-pause-fill::before { content: "\23F8" !important; }
body.is-admin-embed .bi-pencil-square::before { content: "\270E" !important; }
body.is-admin-embed .bi-people-fill::before { content: "\1F465" !important; }
body.is-admin-embed .bi-person-badge::before { content: "ID" !important; font-size: 0.68em; }
body.is-admin-embed .bi-person-circle::before,
body.is-admin-embed .bi-person-video3::before,
body.is-admin-embed .bi-person-standing-dress::before { content: "\25C9" !important; }
body.is-admin-embed .bi-play-circle-fill::before,
body.is-admin-embed .bi-play-fill::before { content: "\25B6" !important; }
body.is-admin-embed .bi-plus-circle::before,
body.is-admin-embed .bi-plus-lg::before,
body.is-admin-embed .bi-plus-square::before { content: "+" !important; }
body.is-admin-embed .bi-search::before { content: "\2315" !important; }
body.is-admin-embed .bi-shield-check::before,
body.is-admin-embed .bi-shield-lock::before { content: "\25C8" !important; }
body.is-admin-embed .bi-signpost-2::before,
body.is-admin-embed .bi-signpost-split::before { content: "\21C4" !important; }
body.is-admin-embed .bi-snow2::before { content: "\273B" !important; }
body.is-admin-embed .bi-stop-fill::before { content: "\25A0" !important; }
body.is-admin-embed .bi-sun-fill::before { content: "\2600" !important; }
body.is-admin-embed .bi-upload::before { content: "\21E1" !important; }
body.is-admin-embed .bi-x::before,
body.is-admin-embed .bi-x-lg::before { content: "\00D7" !important; }
