/* Sirb Admin page-specific exceptions.
   Domain screens such as organizations, schools, trips, students, users, fleet, and dashboards. */

/* Student-management baseline migrated from the retired global stylesheet.
   Keep this before the newer page refinements below so their cascade remains authoritative. */
/* Student onboarding and trip-plan roster */
.student-toolbar { gap: 12px; }
.student-filter-panel { width: min(540px, calc(100vw - 24px)); }
.student-monogram { display: grid; place-items: center; overflow: hidden; color: var(--brand-dark); background: var(--brand-soft); font-weight: 900; line-height: 1; text-align: center; }
.students-table { min-width: 1240px; table-layout: fixed; }
.students-table .student-col-profile { width: 25%; }
.students-table .student-col-education { width: 18%; }
.students-table .student-col-guardians { width: 27%; }
.students-table .student-col-readiness { width: 18%; }
.students-table .student-col-status { width: 8%; }
.students-table .student-col-actions { width: 58px; }
.students-table th:nth-child(3),.students-table td:nth-child(3) { padding-inline-end: 28px; }
.students-table th:nth-child(4),.students-table td:nth-child(4) { padding-inline-start: 28px; }
.students-table th:nth-child(6) { width: 58px; }
.students-table td { vertical-align: middle; }
.students-table th:last-child,.students-table td:last-child { width: 58px; padding-inline: 4px 14px; text-align: end; }
.students-table td:last-child .row-action { margin-inline-start: auto; }
.students-table .student-name-link { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; color: inherit; text-decoration: none; }
.students-table .student-name-link .student-monogram { transition: box-shadow .18s ease, transform .18s ease; }
.students-table .student-name-link strong { color: var(--ink); transition: color .18s ease; }
.students-table .student-name-link small { color: var(--muted); }
.students-table .student-name-link:hover strong { color: var(--brand-dark); }
.students-table .student-name-link:hover .student-monogram { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-soft) 72%, transparent); transform: translateY(-1px); }
.students-table .org-link,
.students-table .table-stacked-value,
.students-table .student-readiness,
.students-table .count-chip,
.students-table .state { min-width: 0; }
.students-table .org-link span:last-child,
.students-table .table-stacked-value { overflow: hidden; }
.students-table .org-link strong,
.students-table .org-link small,
.students-table .table-stacked-value strong,
.students-table .table-stacked-value small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.students-table .state { max-width: 100%; }
.students-table .state .chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-readiness { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.student-readiness .count-chip { justify-content: center; min-width: 58px; max-width: 100%; overflow: hidden; }
.student-hero .hero-monogram { font-size: 22px; }
.student-hero .hero-actions { flex-wrap: wrap; justify-content: flex-end; }
.student-hero .hero-actions .secondary-button { min-height: 40px; padding-inline: 13px; border-radius: 13px; font-size: 12px; }
.student-detail-panel { overflow: visible; }
.student-detail-tabs button { white-space: nowrap; }
.student-detail-profile-pane .student-summary-card { margin: 0 22px 22px; }
.student-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.student-profile-card { display: grid; align-content: start; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); }
.student-profile-card.wide { grid-column: 1 / -1; }
.student-profile-card > header { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 11px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.student-profile-card > header > .material-symbols-rounded { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 22px; }
.student-profile-card > header strong { display: block; color: var(--ink); font-size: 15px; font-weight: 900; }
.student-profile-card > header small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.55; }
.student-detail-list { display: grid; gap: 9px; }
.student-detail-list section { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 11px; border: 1px solid color-mix(in srgb, var(--line) 76%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, var(--canvas)); }
.student-detail-list section > .material-symbols-rounded { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--brand-dark); background: var(--brand-soft); font-size: 20px; }
.student-detail-list section div { min-width: 0; }
.student-detail-list strong,.student-detail-list small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-detail-list strong { color: var(--ink); font-size: 13px; font-weight: 900; }
.student-detail-list small { color: var(--muted); font-size: 11px; font-weight: 800; }
.student-detail-list em { padding: 5px 9px; border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 10px; font-style: normal; font-weight: 900; white-space: nowrap; }
.student-detail-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.student-detail-dl div { display: grid; gap: 4px; min-width: 0; padding: 12px; border: 1px solid color-mix(in srgb, var(--line) 76%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, var(--canvas)); }
.student-detail-dl dt { color: var(--muted); font-size: 11px; font-weight: 900; }
.student-detail-dl dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 900; line-height: 1.5; overflow-wrap: anywhere; }
.student-detail-table { min-width: 1040px; table-layout: fixed; }
.student-detail-table th,.student-detail-table td { vertical-align: middle; }
.student-detail-table .table-text-clip,.student-detail-table .muted-block,.student-detail-table .plain-table-text,.student-detail-table .state { min-width: 0; max-width: 100%; }
.student-detail-table .muted-block,.student-detail-table .plain-table-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-summary-card { overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); }
.student-summary-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.student-summary-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.student-summary-table th,.student-summary-table td { padding: 14px 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent); vertical-align: middle; text-align: inherit; }
.student-summary-table tr:last-child th,.student-summary-table tr:last-child td { border-bottom: 0; }
.student-summary-table th { width: 36%; color: var(--muted); font-size: 12px; font-weight: 900; }
.student-summary-table td { color: var(--ink); font-size: 13px; font-weight: 850; line-height: 1.55; overflow-wrap: anywhere; }
.student-summary-table .state { display: inline-flex; }
.detail-list-heading.with-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.primary-button.compact { min-height: 42px; padding-inline: 16px; border-radius: 13px; font-size: 12px; }
.student-relation-table { min-width: 980px; table-layout: fixed; }
.student-relation-table th:last-child,.student-relation-table td:last-child { width: 112px; text-align: end; }
.student-relation-table td { vertical-align: middle; }
.student-relation-table .plain-table-text,.student-relation-table .muted-block { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relation-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.relation-person .student-monogram,.guardian-readonly-card .student-monogram,.guardian-selected-card .student-monogram,.guardian-candidate-list .student-monogram,.relation-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; overflow: hidden; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 12px; font-weight: 900; line-height: 1; text-align: center; }
.relation-icon { display: grid; place-items: center; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 22px; }
.relation-person div { min-width: 0; }
.relation-person strong,.relation-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relation-person strong { color: var(--ink); font-size: 13px; font-weight: 900; }
.relation-person small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 800; }
.relation-actions { display: inline-flex; justify-content: flex-end; gap: 6px; }
.relation-actions .icon-button { width: 34px; height: 34px; border-radius: 11px; }
.relation-actions .icon-button.danger { color: #b42318; }
.relation-actions .icon-button.danger:hover { color: #fff; border-color: #d92d20; background: #d92d20; }
.relation-modal { width: min(820px, calc(100vw - 32px)); }
.relation-modal h2 { color: var(--ink); font-size: 18px; font-weight: 900; }
.relation-modal header p { font-size: 12px; font-weight: 750; line-height: 1.55; }
.relation-modal form { gap: 16px; padding: 22px; }
.relation-modal .student-field { min-height: 78px; color: #445148; font-size: 12px; font-weight: 850; }
.relation-modal .sirb-dropdown { min-height: auto; }
.relation-modal .sirb-dropdown-trigger,.relation-modal input { min-height: 46px; border-radius: 13px; font-size: 13px; font-weight: 850; }
@media (min-width: 701px) { .relation-modal .align-with-field-control { margin-top: 25px; } }
.relation-modal input[type=number]::-webkit-outer-spin-button,.relation-modal input[type=number]::-webkit-inner-spin-button,.student-create-modal input[type=number]::-webkit-outer-spin-button,.student-create-modal input[type=number]::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.relation-modal input[type=number],.student-create-modal input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.relation-modal .field-error { display: flex; align-items: center; gap: 5px; min-height: 17px; margin: 0; color: #d92d20; font-size: 11px; font-weight: 800; line-height: 1.35; }
.relation-modal .stable-error { visibility: hidden; }
.relation-modal .stable-error.visible { visibility: visible; }
.relation-modal .field-error .material-symbols-rounded { font-size: 15px; }
.relation-modal footer { align-items: center; padding-top: 4px; }
.relation-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.relation-mode-switch button { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 74px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); font: inherit; text-align: start; cursor: pointer; transition: .18s ease; }
.relation-mode-switch button:hover,.relation-mode-switch button.active { color: var(--brand-dark); border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); background: color-mix(in srgb, var(--surface) 86%, var(--brand-soft)); box-shadow: 0 12px 26px rgba(25,176,0,.08); }
.relation-mode-switch .material-symbols-rounded { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 22px; }
.relation-mode-switch button > span:last-child { display: grid; gap: 3px; min-width: 0; }
.relation-mode-switch strong { color: var(--ink); font-size: 13px; font-weight: 900; line-height: 1.3; }
.relation-mode-switch small { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.45; }
.guardian-readonly-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid color-mix(in srgb, var(--line) 78%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--surface) 94%, var(--canvas)); }
.guardian-readonly-card .student-monogram { width: 46px; height: 46px; border-radius: 14px; }
.guardian-readonly-card div { display: grid; gap: 3px; min-width: 0; }
.guardian-readonly-card strong,.guardian-readonly-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guardian-readonly-card strong { color: var(--ink); font-size: 14px; font-weight: 900; }
.guardian-readonly-card small { color: var(--muted); font-size: 11px; font-weight: 800; }
.guardian-mode-heading { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 11px; padding: 13px; border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); }
.guardian-mode-heading > .material-symbols-rounded { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 22px; }
.guardian-mode-heading div { display: grid; gap: 2px; min-width: 0; }
.guardian-mode-heading strong { color: var(--ink); font-size: 14px; font-weight: 900; line-height: 1.3; }
.guardian-mode-heading small { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.5; }
.guardian-candidate-panel { display: grid; gap: 12px; }
.candidate-search,.modal label.candidate-search,.relation-modal label.candidate-search { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; column-gap: 12px; min-height: 54px; padding: 0 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: color-mix(in srgb, var(--surface) 97%, var(--canvas)); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.candidate-search:focus-within { border-color: color-mix(in srgb, var(--brand) 34%, var(--line)); background: color-mix(in srgb, var(--surface) 94%, var(--brand-soft)); box-shadow: 0 14px 34px rgba(0,0,0,.08), 0 0 0 3px rgba(25,176,0,.045); }
.candidate-search .material-symbols-rounded { display: grid; width: 24px; height: 24px; place-items: center; color: color-mix(in srgb, var(--muted) 86%, transparent); font-size: 23px; line-height: 1; }
.candidate-search input,.modal .candidate-search input,.relation-modal .candidate-search input { display: block; width: 100%; min-width: 0; min-height: 0 !important; height: auto !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; outline: 0 !important; color: var(--ink); background: transparent !important; box-shadow: none !important; font-size: 13px; font-weight: 850; line-height: 1.3; appearance: none; }
.candidate-search input:focus,.modal .candidate-search input:focus,.relation-modal .candidate-search input:focus { border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; }
.candidate-search input::placeholder { color: color-mix(in srgb, var(--muted) 78%, transparent); opacity: 1; }
.guardian-selected-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, var(--brand-soft)); }
.guardian-selected-card .student-monogram { flex-basis: 46px; width: 46px; height: 46px; border-radius: 14px; font-size: 13px; }
.guardian-selected-card div { display: grid; gap: 2px; min-width: 0; }
.guardian-selected-card small,.guardian-selected-card strong,.guardian-selected-card em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guardian-selected-card small { color: var(--brand-dark); font-size: 11px; font-weight: 900; }
.guardian-selected-card strong { color: var(--ink); font-size: 14px; font-weight: 900; }
.guardian-selected-card em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 800; }
.guardian-candidate-list { display: grid; gap: 10px; max-height: 250px; overflow: auto; padding: 10px 12px 30px; scroll-padding-bottom: 30px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); }
.guardian-candidate-list button { display: grid; grid-template-columns: 46px minmax(0, 1fr) 30px; align-items: center; gap: 14px; width: calc(100% - 4px); min-height: 96px; margin-inline: 2px; padding: 14px 16px; border: 1px solid transparent; border-radius: 16px; color: var(--ink); background: transparent; font: inherit; text-align: start; cursor: pointer; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.guardian-candidate-list button:hover,.guardian-candidate-list button.selected { border-color: color-mix(in srgb, var(--brand) 36%, var(--line)); background: color-mix(in srgb, var(--surface) 88%, var(--brand-soft)); }
.guardian-candidate-list button.selected { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 34%, transparent); }
.guardian-candidate-list button:disabled { opacity: .45; cursor: not-allowed; }
.guardian-candidate-list button:disabled:hover { border-color: transparent; background: transparent; }
.guardian-candidate-list button:last-child { margin-bottom: 18px; }
.guardian-candidate-list button > span:nth-child(2) { display: grid; gap: 5px; min-width: 0; align-content: center; }
.guardian-candidate-list strong,.guardian-candidate-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guardian-candidate-list strong { color: var(--ink); font-size: 13px; font-weight: 900; line-height: 1.25; }
.guardian-candidate-list small { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.35; }
.guardian-candidate-list button > .material-symbols-rounded { color: var(--brand-dark); font-size: 22px; }
.guardian-link-fields { display: grid; gap: 11px; padding-top: 2px; }
.guardian-link-fields h3 { margin: 0; color: var(--muted); font-size: 12px; font-weight: 900; }
.guardian-new-fields { display: grid; gap: 12px; }
.relation-toggle { display: flex !important; align-items: center; gap: 10px !important; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink) !important; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); cursor: pointer; }
.relation-toggle input { width: 17px !important; height: 17px !important; min-height: 0 !important; padding: 0 !important; accent-color: var(--brand); }
.relation-toggle .material-symbols-rounded { color: var(--brand-dark); font-size: 20px; }
.relation-toggle strong { font-size: 12px; font-weight: 900; }
.relation-confirm-modal { width: min(480px, calc(100vw - 32px)); overflow: hidden; }
.relation-confirm-modal .modal-icon.danger { color: #b42318; background: #fff0ef; }
.relation-confirm-body { display: grid; gap: 4px; margin: 18px 22px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); }
.relation-confirm-body strong { color: var(--ink); font-size: 14px; font-weight: 900; }
.relation-confirm-body small { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.relation-confirm-modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px 22px; }
.danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid #d92d20; border-radius: 13px; color: #fff; background: #d92d20; font: inherit; font-size: 12px; font-weight: 900; box-shadow: 0 12px 22px rgba(217,45,32,.2); }
.danger-button:hover { background: #b42318; }
.danger-button:disabled { opacity: .7; cursor: default; }
.dark-theme .student-profile-card,.dark-theme .student-detail-list section,.dark-theme .student-detail-dl div,.dark-theme .student-summary-card,.dark-theme .relation-toggle,.dark-theme .relation-mode-switch button,.dark-theme .guardian-readonly-card,.dark-theme .candidate-search,.dark-theme .guardian-mode-heading { background: #1a261f; }
.dark-theme .relation-mode-switch button:hover,.dark-theme .relation-mode-switch button.active,.dark-theme .guardian-candidate-list button:hover,.dark-theme .guardian-candidate-list button.selected,.dark-theme .candidate-search:focus-within,.dark-theme .guardian-selected-card { background: #1b3020; }
.dark-theme .relation-modal .student-field { color: #c5d0c8; }
.dark-theme .relation-confirm-body { background: #1a261f; }
.dark-theme .relation-confirm-modal .modal-icon.danger { color: #ffb4ab; background: #3a1f1c; }
.student-create-modal { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(1040px, calc(100vw - 32px)); max-height: min(820px, calc(100dvh - 32px)); overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 28px 90px rgba(18,38,24,.2); }
.student-edit-modal { width: min(880px, calc(100vw - 32px)); }
.student-create-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--brand-soft)), var(--surface)); }
.student-create-header > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.student-create-header .modal-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px; font-size: 22px; box-shadow: none; }
.student-create-header h2 { margin: 0; color: var(--ink); font-size: 22px; font-weight: 900; line-height: 1.25; }
.student-create-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.6; }
.student-step-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent); border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 11px; font-weight: 900; white-space: nowrap; }
.student-create-modal .student-create-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: 100%; min-height: 0; gap: 0; padding: 0; overflow: hidden; background: transparent; }
.student-create-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 14px 22px; border-bottom: 1px solid var(--line); background: transparent; scrollbar-width: none; }
.student-create-steps::-webkit-scrollbar { display: none; }
.student-create-steps button { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 9px; min-width: 0; min-height: 60px; padding: 8px 10px; border: 1px solid transparent; border-radius: 16px; color: var(--muted); background: transparent; text-align: start; font: inherit; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.student-create-steps button:not(:disabled):hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 24%, var(--line)); background: var(--surface); }
.student-create-steps button:disabled { cursor: default; opacity: .72; }
.student-create-steps button.active { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--surface); box-shadow: 0 8px 24px rgba(18,38,24,.07); }
.student-create-steps button.complete { background: color-mix(in srgb, var(--surface) 88%, var(--brand-soft)); }
.student-create-step-icon { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: #728078; background: var(--surface); font-size: 22px; transition: .18s ease; }
.student-create-steps button.active .student-create-step-icon { color: #fff; border-color: var(--brand); background: linear-gradient(145deg, #24b80c, #138f03); }
.student-create-steps button.complete .student-create-step-icon { color: var(--brand-dark); border-color: #acdca4; background: var(--brand-soft); }
.student-create-steps button span:last-child { display: grid; overflow: hidden; color: inherit; line-height: 1.35; }
.student-create-steps button strong { overflow: hidden; font-size: 13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.student-create-steps button.active span:last-child,.student-create-steps button.complete span:last-child { color: var(--brand-dark); }
.student-create-body { min-height: 0; padding: 22px 24px; overflow-y: auto; overflow-x: visible; background: transparent; }
.student-create-step { display: grid; width: 100%; gap: 18px; align-content: start; animation: fadeIn .18s ease; }
.student-create-step-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.student-create-step-heading > .material-symbols-rounded { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 21px; }
.student-create-step-heading div { display: grid; gap: 2px; min-width: 0; }
.student-create-step-heading strong { color: var(--ink); font-size: 17px; font-weight: 900; line-height: 1.3; }
.student-create-step-heading small { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.55; }
.student-form-grid { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.student-form-grid.compact { gap: 12px; }
.student-form-grid .full,.student-form-grid .full-span { grid-column: 1 / -1; }
.student-field-spacer { min-height: 88px; }
.student-create-modal .student-field { display: grid; align-content: start; gap: 7px; min-width: 0; min-height: 88px; color: #445148; font-size: 12px; font-weight: 800; line-height: 1.35; }
.student-field input { width: 100%; height: 46px; padding: 0 13px; border-radius: 13px; font-size: 13px; font-weight: 800; }
.student-create-modal .sirb-dropdown { display: grid; align-content: start; gap: 7px; min-height: 88px; }
.student-create-modal .sirb-dropdown-trigger { min-height: 46px; border-radius: 13px; }
.student-create-modal .sirb-dropdown-copy small { font-size: 12px; font-weight: 800; }
.student-create-modal .sirb-dropdown-copy strong { font-size: 13px; font-weight: 900; }
.student-create-modal .sirb-dropdown-menu { border-radius: 13px; }
.student-create-modal .sirb-dropdown-menu.above { box-shadow: 0 -18px 42px rgba(10,25,15,.16); }
.student-create-modal .sirb-dropdown-search { display: flex; align-items: center; min-height: 42px; height: 42px; padding: 0 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.student-create-modal .sirb-dropdown-search input { height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; font-size: 13px; font-weight: 700; }
.student-create-modal .field-error { display: flex; align-items: center; gap: 5px; min-height: 17px; margin: 0; color: #d92d20; font-size: 11px; font-weight: 800; line-height: 1.35; }
.student-create-modal .field-error .material-symbols-rounded { font-size: 15px; }
.student-create-error { grid-column: 1 / -1; }
.student-create-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border: 1px solid #d5ead1; border-radius: 13px; color: #3f6045; background: #f3faf2; font-size: 11px; font-weight: 800; line-height: 1.65; }
.student-create-note.compact { align-items: center; padding: 10px 12px; border-style: dashed; color: var(--muted); background: transparent; }
.student-create-note > .material-symbols-rounded { flex: 0 0 auto; color: var(--brand-dark); font-size: 19px; }
.student-create-note.success { color: #315b38; border-color: #cce8c8; background: #f1faf0; }
.student-create-note strong { display: block; font-size: 12px; }
.student-create-note p { margin: 3px 0 0; color: #67806b; font-size: 10px; line-height: 1.6; }
.student-skip-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px; border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--surface) 96%, var(--brand-soft)); }
.student-skip-card > .material-symbols-rounded { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 22px; }
.student-skip-card strong { display: block; color: var(--ink); font-size: 13px; font-weight: 900; }
.student-skip-card p { margin: 3px 0 0; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.55; }
.student-skip-card .secondary-button { white-space: nowrap; }
.student-guardian-list { display: grid; gap: 10px; }
.guardian-form-card { display: grid; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--surface) 97%, var(--canvas)); }
.guardian-form-card > header { display: flex; align-items: center; justify-content: space-between; }
.guardian-form-card > header > div { display: flex; align-items: center; gap: 8px; }
.guardian-number { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; color: var(--brand-dark); background: var(--brand-soft); font-size: 10px; font-weight: 800; }
.guardian-form-card > header .icon-button { width: 32px; height: 32px; color: #b42318; }
.student-guardian-mode-switch { gap: 8px; }
.student-guardian-mode-switch button { min-height: 64px; padding: 10px 12px; border-radius: 14px; }
.student-guardian-mode-switch .material-symbols-rounded { width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
.student-guardian-candidate-panel { gap: 10px; padding: 2px 0 4px; }
.student-guardian-candidate-panel .candidate-search { min-height: 48px; border-radius: 14px; }
.student-guardian-candidate-panel .guardian-candidate-list { max-height: 230px; }
.student-guardian-candidate-panel .empty-state { padding: 18px 14px; border-radius: 15px; }
.primary-contact-toggle { display: flex; align-items: center; gap: 7px; width: fit-content; min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: transparent; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.primary-contact-toggle.active { color: var(--brand-dark); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--brand-soft); }
.add-guardian-button { width: fit-content; }
.student-check-row { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 10px !important; cursor: pointer; }
.student-check-row input { width: 18px !important; height: 18px !important; accent-color: var(--brand); }
.student-check-row span { display: grid; gap: 2px; }
.student-check-row small { color: var(--muted); font-weight: 500; }
.student-toggle-card { position: relative; display: grid !important; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 11px !important; min-height: 70px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); cursor: pointer; transition: .18s ease; }
.student-toggle-card input { position: absolute; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.student-toggle-card > .material-symbols-rounded { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 22px; }
.student-toggle-card > span:last-child { display: grid; gap: 2px; }
.student-toggle-card strong { font-size: 12px; font-weight: 900; }
.student-toggle-card small { color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.5; }
.student-toggle-card.active { border-color: color-mix(in srgb, var(--brand) 48%, var(--line)); background: color-mix(in srgb, var(--surface) 89%, var(--brand-soft)); box-shadow: 0 8px 22px rgba(25,176,0,.08); }
.student-option-card { grid-template-columns: 18px 36px 1fr !important; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); transition: .2s ease; }
.student-option-card.active { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--surface) 91%, var(--brand-soft)); box-shadow: 0 6px 18px rgba(25,176,0,.06); }
.student-option-card .student-option-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--brand-dark); background: var(--brand-soft); font-size: 19px; }
.student-address-fields { display: grid; gap: 12px; }
.student-review-screen { display: grid; gap: 16px; }
.student-review-hero { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--line)); border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, var(--brand-soft)), var(--surface)); box-shadow: 0 12px 30px rgba(18,38,24,.06); }
.student-review-hero .student-monogram { width: 58px; height: 58px; font-size: 17px; }
.student-review-hero h3 { margin: 0; color: var(--ink); font-size: 21px; font-weight: 900; line-height: 1.25; }
.student-review-hero p { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-weight: 800; line-height: 1.5; }
.student-review-status { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 12px; font-weight: 900; white-space: nowrap; }
.student-review-status .material-symbols-rounded { font-size: 19px; }
.student-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.student-review-section { display: grid; align-content: start; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); }
.student-review-section.wide { grid-column: 1 / -1; }
.student-review-section > header { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 11px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.student-review-section > header > .material-symbols-rounded { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 22px; }
.student-review-section > header div { display: grid; gap: 2px; min-width: 0; }
.student-review-section > header strong { color: var(--ink); font-size: 15px; font-weight: 900; line-height: 1.3; }
.student-review-section > header small { overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.student-review-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
.student-review-details.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.student-review-details div { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--line) 74%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--surface) 92%, var(--canvas)); }
.student-review-details dt { color: var(--muted); font-size: 11px; font-weight: 900; line-height: 1.3; }
.student-review-details dd { overflow-wrap: anywhere; margin: 0; color: var(--ink); font-size: 14px; font-weight: 900; line-height: 1.45; }
.student-review-guardians { display: grid; gap: 10px; }
.student-review-guardian { display: grid; gap: 10px; padding: 12px; border: 1px solid color-mix(in srgb, var(--line) 78%, transparent); border-radius: 15px; background: color-mix(in srgb, var(--surface) 93%, var(--canvas)); }
.student-review-guardian > header { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.student-review-guardian > header .guardian-number { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--brand-dark); background: var(--brand-soft); font-size: 13px; font-weight: 900; }
.student-review-guardian > header div { display: grid; gap: 1px; min-width: 0; }
.student-review-guardian > header strong { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.student-review-guardian > header small { color: var(--muted); font-size: 12px; font-weight: 800; }
.student-review-guardian > header em { padding: 5px 9px; border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 10px; font-style: normal; font-weight: 900; white-space: nowrap; }
.student-review-empty { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 11px; padding: 13px; border: 1px dashed color-mix(in srgb, var(--line) 86%, var(--muted)); border-radius: 15px; color: var(--muted); background: color-mix(in srgb, var(--surface) 94%, var(--canvas)); }
.student-review-empty > .material-symbols-rounded { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--brand-dark); background: var(--brand-soft); font-size: 20px; }
.student-review-empty strong { display: block; color: var(--ink); font-size: 14px; font-weight: 900; }
.student-review-empty p { margin: 2px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.5; }
.student-support-panel,.student-support-form { display: grid; gap: 12px; align-content: start; }
.student-support-panel { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); }
.student-support-choice-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.student-support-choice { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 11px; min-height: 78px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); text-align: start; font: inherit; cursor: pointer; transition: .18s ease; }
.student-support-choice > .material-symbols-rounded { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--brand-dark); background: var(--brand-soft); font-size: 22px; }
.student-support-choice > span:last-child { display: grid; gap: 2px; min-width: 0; }
.student-support-choice strong { color: var(--ink); font-size: 13px; font-weight: 900; line-height: 1.35; }
.student-support-choice small { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.45; }
.student-support-choice.active { border-color: color-mix(in srgb, var(--brand) 48%, var(--line)); background: color-mix(in srgb, var(--surface) 89%, var(--brand-soft)); box-shadow: 0 8px 22px rgba(25,176,0,.08); }
.student-create-modal .student-create-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 86px; padding: 16px 34px; border-top: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 97%, transparent), color-mix(in srgb, var(--surface) 90%, var(--canvas))); }
.student-footer-secondary,.student-footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.student-footer-secondary { justify-content: flex-start; }
.student-footer-actions { justify-content: flex-end; margin-inline-start: auto; padding-inline-end: 8px; }
.student-create-footer .secondary-button,.student-create-footer .primary-button,.student-create-footer .student-skip-button { min-width: 142px; min-height: 52px; justify-content: center; border-radius: 16px; font-size: 14px; font-weight: 900; letter-spacing: -.01em; }
.student-create-footer .primary-button { min-width: 172px; box-shadow: 0 16px 30px rgba(25,176,0,.24); }
.student-create-footer .secondary-button { border-color: color-mix(in srgb, var(--line) 86%, var(--ink)); background: color-mix(in srgb, var(--surface) 94%, var(--canvas)); }
.student-create-footer .student-cancel-button { display: inline-flex; align-items: center; justify-content: center; min-width: 104px; min-height: 52px; padding: 0 18px; border: 1px solid transparent; border-radius: 16px; color: var(--muted); background: transparent; box-shadow: none; font: inherit; font-size: 14px; font-weight: 900; }
.student-create-footer .student-cancel-button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 86%, var(--canvas)); }
.student-skip-button { display: inline-flex; align-items: center; gap: 8px; padding: 0 17px; border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); color: color-mix(in srgb, var(--ink) 82%, var(--brand-dark)); background: color-mix(in srgb, var(--surface) 92%, var(--brand-soft)); font: inherit; cursor: pointer; transition: .18s ease; }
.student-skip-button .material-symbols-rounded { color: var(--brand-dark); font-size: 20px; }
.student-skip-button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 48%, var(--line)); background: color-mix(in srgb, var(--surface) 86%, var(--brand-soft)); box-shadow: 0 12px 24px rgba(25,176,0,.1); }
.dark-theme .student-create-modal { border-color: #344139; background: #17221b; box-shadow: 0 28px 90px rgba(0,0,0,.44); }
.dark-theme .student-create-header { background: linear-gradient(180deg, #18241d, #17221b); }
.dark-theme .student-create-steps { border-color: #344139; background: transparent; }
.dark-theme .student-create-footer { border-color: #344139; background: linear-gradient(180deg, #17221b, #121d16); }
.dark-theme .student-create-steps button.active { background: #1c2920; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.dark-theme .student-create-steps button.complete,.dark-theme .student-option-card.active,.dark-theme .primary-contact-toggle.active,.dark-theme .student-toggle-card.active,.dark-theme .student-support-choice.active { background: #1b3020; }
.dark-theme .student-create-steps button:disabled { opacity: .78; }
.dark-theme .student-create-step-icon { color: #9aaaa0; background: #1a261f; }
.dark-theme .student-create-steps button span:last-child,.dark-theme .student-create-step-heading strong { color: #edf5ef; }
.dark-theme .student-create-modal .student-field { color: #c5d0c8; }
.dark-theme .student-field input::placeholder { color: #87938b; }
.dark-theme .student-create-note { color: #b9d8bd; border-color: #35513a; background: #1b3020; }
.dark-theme .student-create-note.compact { color: #91aa95; background: transparent; }
.dark-theme .student-create-note p { color: #91aa95; }
.dark-theme .student-skip-card { border-color: #35513a; background: #1a261f; }
.dark-theme .student-skip-button { color: #dce9de; border-color: #3a5a40; background: #1b3020; }
.dark-theme .student-skip-button .material-symbols-rounded { color: #88f08b; }
.dark-theme .student-skip-button:hover { border-color: #168d06; background: #203b25; box-shadow: 0 14px 28px rgba(25,176,0,.12); }
.dark-theme .guardian-form-card,.dark-theme .student-option-card,.dark-theme .student-support-panel,.dark-theme .student-toggle-card,.dark-theme .student-support-choice { background: #1a261f; }
.roster-modal { width: min(860px, 100%); max-height: calc(100dvh - 32px); overflow: auto; }
.roster-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.roster-toolbar aside { display: grid; min-width: 132px; min-height: 50px; place-items: center; padding: 7px 13px; border: 1px solid var(--line); border-radius: 15px; color: var(--muted); background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); font-size: 11px; font-weight: 800; }
.roster-toolbar aside strong { color: var(--brand-dark); font-size: 17px; font-weight: 900; line-height: 1; }
.roster-candidate-list { display: grid; gap: 10px; max-height: 55vh; overflow: auto; padding: 2px 2px 14px; scroll-padding-bottom: 14px; }
.roster-candidate-list > article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 82px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 97%, var(--canvas)); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease; }
.roster-candidate-list > article:hover { border-color: color-mix(in srgb, var(--brand) 26%, var(--line)); background: color-mix(in srgb, var(--surface) 94%, var(--brand-soft)); }
.roster-candidate-list > article.selected { border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); background: color-mix(in srgb, var(--surface) 89%, var(--brand-soft)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent); }
.roster-candidate-list > article.dragging { opacity: .5; }
.roster-candidate-list > article.missing-address:not(.selected) { border-style: dashed; }
.roster-student-choice { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 12px !important; min-width: 0; cursor: pointer; }
.roster-student-choice > input {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-grid !important;
  place-content: center !important;
  flex: 0 0 22px !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  border: 2px solid color-mix(in srgb, var(--muted) 45%, var(--line)) !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
}
.roster-student-choice > input::before {
  content: "";
  width: 10px;
  height: 6px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .12s ease;
}
.roster-student-choice > input:checked {
  border-color: var(--brand) !important;
  background: var(--brand) !important;
}
.roster-student-choice > input:checked::before {
  transform: rotate(-45deg) scale(1);
}
.roster-student-choice > input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent);
  outline-offset: 2px;
}
.roster-student-choice > span:last-child { display: grid; gap: 2px; min-width: 0; }
.roster-student-choice strong { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.roster-student-choice small,.table-subline { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.roster-student-choice em { color: #b7791f; font-size: 10px; font-style: normal; font-weight: 900; }
.roster-order-badge { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 12px; color: var(--brand-dark); background: var(--brand-soft); font-size: 13px; font-weight: 900; }
.roster-drag-handle { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); cursor: grab; }
.roster-drag-handle:active { cursor: grabbing; }
.roster-table { min-width: 860px; table-layout: fixed; }
.roster-table .roster-col-order { width: 118px; }
.roster-table .roster-col-student { width: 38%; }
.roster-table .roster-col-grade { width: 22%; }
.roster-table .roster-col-address { width: auto; }
.roster-table .stop-index { position: static; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--brand-dark); background: var(--brand-soft); font-weight: 800; }
.roster-table td:nth-child(1),.roster-table th:nth-child(1) { text-align: start; }
.roster-table td:nth-child(2) strong,.roster-table td:nth-child(4) strong,.roster-table .table-subline { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.school-grade-table { min-width: 860px; table-layout: fixed; }
.school-grade-table th:nth-child(1) { width: 34%; }
.school-grade-table th:nth-child(2) { width: 36%; }
.school-grade-table th:nth-child(3) { width: 14%; }
.school-grade-table th:nth-child(4) { width: 10%; }
.school-grade-table th:nth-child(5) { width: 96px; }
.grade-identity { pointer-events: none; }
.grade-section-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.grade-section-chips span,.grade-section-chips em { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 11px; font-style: normal; font-weight: 900; line-height: 1; }
.grade-section-chips em { color: var(--muted); background: color-mix(in srgb, var(--surface) 90%, var(--canvas)); }
.inline-actions { display: inline-flex; justify-content: flex-end; gap: 6px; width: 100%; }
.icon-button.small { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
.icon-button.small.danger { color: #b42318; }
.icon-button.small.danger:hover { color: #fff; border-color: #d92d20; background: #d92d20; }
.modal.school-grade-modal { width: min(880px, calc(100vw - 32px)); overflow: hidden; }
.modal.school-grade-modal > header { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--brand-soft)), var(--surface)); }
.modal.school-grade-modal h2 { color: var(--ink); font-size: 22px; font-weight: 900; line-height: 1.2; }
.modal.school-grade-modal header p { max-width: 680px; color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.55; }
.modal.school-grade-modal form { display: grid; gap: 18px; max-height: min(680px, calc(100dvh - 190px)); overflow: auto; padding: 22px; }
.school-grade-form-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 150px; gap: 14px; align-items: start; }
.modal.school-grade-modal label { min-width: 0; color: #445148; font-size: 12px; font-weight: 900; }
.modal.school-grade-modal input { min-height: 48px; border-radius: 14px; font-size: 13px; font-weight: 850; }
.modal.school-grade-modal label.invalid input { border-color: #ef9b9b; background: color-mix(in srgb, var(--surface) 88%, #fff1f1); box-shadow: 0 0 0 4px rgba(239,68,68,.08); }
.school-grade-sections { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); }
.school-grade-sections-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.school-grade-sections-heading h3 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 900; }
.school-grade-sections-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11px; font-weight: 750; line-height: 1.5; }
.secondary-button.compact { min-height: 38px; padding-inline: 13px; border-radius: 12px; font-size: 11px; }
.school-grade-section-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 120px 38px; gap: 10px; align-items: end; padding: 12px; border: 1px solid color-mix(in srgb, var(--line) 78%, transparent); border-radius: 16px; background: var(--surface); }
.modal.school-grade-modal footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.modal.school-grade-modal footer .primary-button,.modal.school-grade-modal footer .secondary-button { min-width: 132px; min-height: 48px; border-radius: 15px; font-size: 13px; font-weight: 900; }
.confirm-body { display: grid; gap: 3px; margin: 18px 22px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 96%, var(--canvas)); }
.confirm-body strong { color: var(--ink); font-size: 14px; font-weight: 900; }
.confirm-body p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.dark-theme .grade-section-chips span { background: #1b3020; }
.dark-theme .grade-section-chips em,.dark-theme .school-grade-sections,.dark-theme .school-grade-section-row,.dark-theme .confirm-body { background: #1a261f; }
.dark-theme .modal.school-grade-modal > header { background: linear-gradient(180deg, #18241d, #17221b); }
.dark-theme .modal.school-grade-modal label { color: #c5d0c8; }
@media (max-width: 900px) { .student-toolbar,.student-detail-toolbar,.detail-list-heading.with-actions { align-items: stretch; flex-direction: column; } .student-profile-grid,.student-detail-dl,.student-review-grid,.student-summary-columns,.school-grade-form-grid,.school-grade-section-row,.relation-mode-switch { grid-template-columns: 1fr; } .student-profile-card.wide,.student-review-section.wide { grid-column: auto; } .student-summary-table { min-width: 0; } .school-grade-section-row .icon-button { justify-self: end; } .school-grade-sections-heading { align-items: stretch; flex-direction: column; } .guardian-selected-card { grid-template-columns: 46px minmax(0, 1fr); } .guardian-selected-card .secondary-button { grid-column: 1 / -1; } }
@media (max-width: 700px) { .student-create-modal { width: min(100%, calc(100vw - 20px)); max-height: calc(100dvh - 20px); border-radius: 18px; } .student-create-header { align-items: flex-start; padding: 15px 16px; } .student-create-header .modal-icon { width: 36px; height: 36px; border-radius: 12px; font-size: 20px; } .student-step-pill { min-height: 24px; padding-inline: 8px; font-size: 10px; } .student-create-steps { gap: 6px; padding: 10px 12px; } .student-create-steps button { display: flex; min-height: 44px; justify-content: center; padding: 0; } .student-create-step-icon { flex: 0 0 34px; width: 34px; height: 34px; } .student-create-steps button span:last-child { display: none; } .student-create-body { padding: 14px; } .student-form-grid,.student-support-choice-group,.student-review-details,.student-review-details.compact { grid-template-columns: 1fr; } .student-review-hero { grid-template-columns: 48px minmax(0, 1fr); } .student-review-hero .student-monogram { width: 48px; height: 48px; } .student-review-status { grid-column: 1 / -1; justify-content: center; } .student-field-spacer { display: none; } .student-skip-card { grid-template-columns: 38px minmax(0, 1fr); } .student-skip-card .secondary-button { grid-column: 1 / -1; width: 100%; } .student-create-modal .student-create-footer { align-items: stretch; flex-direction: column-reverse; padding: 12px 14px; } .student-footer-secondary,.student-footer-actions { width: 100%; } .student-footer-actions { margin: 0; } .student-create-footer .secondary-button,.student-create-footer .primary-button,.student-create-footer .student-skip-button,.student-cancel-button { flex: 1; min-width: 0; justify-content: center; } }
@media (max-width: 620px) { .roster-modal { max-height: calc(100dvh - 20px); } .roster-toolbar { grid-template-columns: 1fr; } .roster-toolbar aside { min-width: 0; } .roster-candidate-list > article { grid-template-columns: minmax(0, 1fr) auto; } .roster-drag-handle { grid-column: 2; } }
@media (max-width: 460px) { .student-create-footer .secondary-button,.student-create-footer .primary-button { padding-inline: 10px; } .student-create-footer .secondary-button { font-size: 0; } .student-create-footer .secondary-button .material-symbols-rounded { font-size: 19px; } }

@media (max-width: 1180px) {
  .dashboard-grid,
  .lower-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
  }
}

@media (max-width: 940px) {
  .dashboard-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .alerts-panel {
    min-height: auto;
  }

  .search-box {
    width: 300px;
  }
}

@media (max-width: 640px) {
  .date-chip,
  .chart-legend {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .kpi-card {
    min-height: 150px;
  }

  .performance-panel {
    min-height: 330px;
  }

  .bar-chart {
    padding-inline: 8px;
  }

  .panel-header {
    padding-inline: 15px;
  }

  .lower-grid {
    gap: 11px;
  }

  .management-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .management-tools > div,
  .filter-search {
    width: 100%;
  }

  .filter-button {
    flex: 1;
  }

  .table-wrap {
    margin-bottom: 4px;
  }
}

.sidebar-card,
.profile-mini {
  border-color: rgba(207,225,214,.82);
  background: rgba(247,252,248,.78);
}

.sidebar-card strong,
.profile-mini strong {
  color: var(--ink);
  font-size: 13px;
}

.sidebar-card small,
.profile-mini small {
  color: var(--muted);
  font-size: 11px;
}

.profile-mini {
  margin: 0 4px;
  padding: 12px;
  border: 1px solid rgba(207,225,214,.82);
  border-radius: 19px;
}

.profile-mini button {
  color: var(--muted);
}

.dashboard-grid,
.lower-grid {
  gap: 18px;
}

.lower-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr);
}

.organizations-panel,
.alerts-panel {
  min-height: 310px;
}

.organizations-panel table {
  margin-top: 10px;
}

.organization-workspace {
  overflow: visible;
}

.organization-toolbar {
  gap: 12px;
  padding: 18px;
  border-color: rgba(207,225,214,.82);
}

.organization-search,
.filter-search {
  height: var(--control-h);
  border-color: rgba(207,225,214,.92);
  color: var(--muted);
  background: rgba(255,255,255,.72);
}

.organization-workspace .table-wrap {
  border-top-color: rgba(207,225,214,.82);
}

.organization-hero {
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 15%, rgba(18,183,0,.11), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(250,253,251,.88));
}

.organization-identity {
  gap: 18px;
}

.organization-hero h1 {
  font-size: clamp(28px, 2.5vw, 42px);
  line-height: 1.2;
  letter-spacing: -.045em;
}

.organization-hero p {
  margin-top: 7px;
  font-size: 15px;
}

.driver-details-page .hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  flex-wrap: wrap;
}

.driver-details-page .hero-actions .driver-hero-status {
  flex: 0 1 auto;
  width: auto;
  max-width: clamp(150px, 16vw, 250px);
  overflow: hidden;
  justify-content: center;
}

.driver-details-page .hero-actions .driver-hero-status .chip-label {
  min-width: 0;
}

.dark-theme .date-range-filter,
.dark-theme .plan-chip,
.dark-theme .empty-illustration,
.dark-theme .sidebar-card,
.dark-theme .profile-mini {
  border-color: rgba(49,70,56,.95);
  background: rgba(20,36,24,.8);
}

@media (max-width: 640px) {
  .organization-toolbar,
    .hero-actions,
    .filter-panel footer,
    .modal footer {
      align-items: stretch;
      flex-direction: column;
    }

  .organization-hero {
      padding: 22px;
    }

  .organization-identity {
      align-items: flex-start;
    }

}

@media (min-width: 941px) {
  .nav-collapsed .brand-copy,
    .nav-collapsed .main-nav a > span:not(.material-symbols-rounded),
    .nav-collapsed .sidebar-card div,
    .nav-collapsed .sidebar-card .status-dot,
    .nav-collapsed .profile-mini > div:nth-child(2),
    .nav-collapsed .profile-mini button {
      opacity: 0;
      overflow: hidden;
      pointer-events: none;
      white-space: nowrap;
      transition: opacity .08s ease;
    }

  .nav-collapsed .sidebar-card,
    .nav-collapsed .profile-mini {
      display: grid;
      grid-template-columns: 64px 1fr auto;
      justify-content: center;
      gap: 0;
      margin-inline: 0;
      padding-inline: 0;
      overflow: hidden;
      transition:
        opacity .12s ease,
        background .14s ease,
        border-color .14s ease;
    }

  .nav-collapsed .sidebar-card > .material-symbols-rounded,
    .nav-collapsed .profile-mini .avatar {
      justify-self: center;
    }

  .nav-collapsed .profile-mini {
      min-height: 62px;
      border-color: transparent;
      background: transparent;
    }

  .nav-collapsed .sidebar:hover .brand-copy,
    .nav-collapsed .sidebar:focus-within .brand-copy,
    .nav-collapsed .sidebar:hover .main-nav a > span:not(.material-symbols-rounded),
    .nav-collapsed .sidebar:focus-within .main-nav a > span:not(.material-symbols-rounded),
    .nav-collapsed .sidebar:hover .sidebar-card div,
    .nav-collapsed .sidebar:focus-within .sidebar-card div,
    .nav-collapsed .sidebar:hover .sidebar-card .status-dot,
    .nav-collapsed .sidebar:focus-within .sidebar-card .status-dot,
    .nav-collapsed .sidebar:hover .profile-mini > div:nth-child(2),
    .nav-collapsed .sidebar:focus-within .profile-mini > div:nth-child(2),
    .nav-collapsed .sidebar:hover .profile-mini button,
    .nav-collapsed .sidebar:focus-within .profile-mini button {
      opacity: 1;
      pointer-events: auto;
      transition-delay: .07s;
    }

  .nav-collapsed .sidebar:hover .sidebar-card,
    .nav-collapsed .sidebar:focus-within .sidebar-card,
    .nav-collapsed .sidebar:hover .profile-mini,
    .nav-collapsed .sidebar:focus-within .profile-mini {
      margin-inline: 4px;
      padding-inline: 0;
      opacity: 1;
    }

  .nav-collapsed .sidebar:hover .profile-mini,
    .nav-collapsed .sidebar:focus-within .profile-mini {
      min-height: 62px;
      border-color: rgba(207,225,214,.82);
      background: rgba(247,252,248,.78);
    }

  .dark-theme.nav-collapsed .sidebar:hover .sidebar-card,
    .dark-theme.nav-collapsed .sidebar:focus-within .sidebar-card,
    .dark-theme.nav-collapsed .sidebar:hover .profile-mini,
    .dark-theme.nav-collapsed .sidebar:focus-within .profile-mini {
      border-color: rgba(68,91,76,.95);
      background: rgba(21,35,25,.78);
    }

  .nav-collapsed .sidebar:hover .sidebar-card div,
    .nav-collapsed .sidebar:focus-within .sidebar-card div,
    .nav-collapsed .sidebar:hover .profile-mini > div:nth-child(2),
    .nav-collapsed .sidebar:focus-within .profile-mini > div:nth-child(2) {
      align-self: center;
      min-width: 0;
    }

}

.school-access-modal { width: min(680px, calc(100vw - 28px)); }

.school-access-modal form { gap: 16px; }

.scope-options > button:disabled,
.school-access-option:disabled {
  cursor: default;
  opacity: .72;
}

.school-access-list {
  display: grid;
  gap: 7px;
  max-height: min(360px, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px 5px 8px;
}

.school-access-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  text-align: start;
  font: inherit;
  cursor: pointer;
}

.school-access-option.selected { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, transparent); }

.school-access-option .school-access-checkbox { color: var(--muted); font-size: 22px; }

.school-access-option.selected .school-access-checkbox { color: var(--brand-dark); }

.school-access-option strong, .school-access-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.school-access-option small { margin-top: 2px; color: var(--muted); font-size: 12px; }

.school-access-empty { padding: 20px; color: var(--muted); text-align: center; }

.school-access-error { margin: 2px 0 0; }

.school-access-list.compact { max-height: min(260px, 34vh); }

.school-access-list.compact .school-access-option { min-height: 54px; }

.dark-theme .access-scope-chip,
.dark-theme .compact-action,
.dark-theme .inline-access-panel,
.dark-theme .scope-options > button,
.dark-theme .school-access-option { background: rgba(255, 255, 255, .018); }

.dark-theme .access-scope-chip .material-symbols-rounded,
.dark-theme .compact-action:hover,
.dark-theme .scope-options > button.selected > .material-symbols-rounded:first-child,
.dark-theme .scope-options > button.selected .scope-check,
.dark-theme .school-access-option.selected .school-access-checkbox { color: #72e979; }

@media (min-width: 941px) {
  .nav-collapsed .profile-mini,
    .nav-collapsed .sidebar:hover .profile-mini,
    .nav-collapsed .sidebar:focus-within .profile-mini {
      display: grid !important;
      place-items: center !important;
      width: 64px !important;
      min-height: 62px !important;
      margin: auto auto 0 !important;
      padding: 0 !important;
      border-color: transparent !important;
      background: transparent !important;
    }

  .nav-collapsed .profile-mini > div:nth-child(2),
    .nav-collapsed .profile-mini button,
    .nav-collapsed .sidebar:hover .profile-mini > div:nth-child(2),
    .nav-collapsed .sidebar:hover .profile-mini button,
    .nav-collapsed .sidebar:focus-within .profile-mini > div:nth-child(2),
    .nav-collapsed .sidebar:focus-within .profile-mini button {
      display: none !important;
    }

}

.sidebar .profile-mini + .sidebar-collapse-toggle,
.sidebar .profile-mini + .sidebar-collapse-toggle:hover,
.dark-theme .sidebar .profile-mini + .sidebar-collapse-toggle,
.dark-theme .sidebar .profile-mini + .sidebar-collapse-toggle:hover {
  margin: 10px 4px 0 !important;
}

/* Compact table chips: prevent date/location/status badges from colliding */
.organizations-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-profile-facts article strong,
.user-profile-facts article strong a {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-activity-panel .detail-tabs button {
  pointer-events: none;
}

.workspace-users-table {
  min-width: 1120px;
}

.workspace-users-table th:nth-child(1),
.workspace-users-table td:nth-child(1) {
  width: 310px;
}

.workspace-users-table th:nth-child(2),
.workspace-users-table td:nth-child(2) {
  width: 220px;
}

.workspace-users-table th:nth-child(3),
.workspace-users-table td:nth-child(3) {
  width: 130px;
}

.workspace-users-table th:nth-child(4),
.workspace-users-table td:nth-child(4) {
  width: 210px;
}

.workspace-users-table th:nth-child(5),
.workspace-users-table td:nth-child(5) {
  width: 180px;
}

.workspace-users-table th:nth-child(6),
.workspace-users-table td:nth-child(6) {
  width: 120px;
}

.workspace-invitations-table {
  min-width: 1080px;
}

.workspace-invitations-table th:nth-child(1),
.workspace-invitations-table td:nth-child(1) {
  width: 300px;
}

.workspace-invitations-table th:nth-child(2),
.workspace-invitations-table td:nth-child(2) {
  width: 220px;
}

.workspace-invitations-table th:nth-child(3),
.workspace-invitations-table td:nth-child(3) {
  width: 140px;
}

.workspace-invitations-table th:nth-child(4),
.workspace-invitations-table td:nth-child(4) {
  width: 210px;
}

.workspace-invitations-table th:nth-child(5),
.workspace-invitations-table td:nth-child(5) {
  width: 150px;
}

.workspace-invitations-table th:nth-child(6),
.workspace-invitations-table td:nth-child(6) {
  width: 120px;
}

.detail-invitations-table {
  min-width: 900px;
}

.detail-invitations-table th:nth-child(1),
.detail-invitations-table td:nth-child(1) {
  width: 310px;
}

.detail-invitations-table th:nth-child(2),
.detail-invitations-table td:nth-child(2) {
  width: 130px;
}

.detail-invitations-table th:nth-child(3),
.detail-invitations-table td:nth-child(3) {
  width: 210px;
}

.detail-invitations-table th:nth-child(4),
.detail-invitations-table td:nth-child(4) {
  width: 170px;
}

.detail-invitations-table th:nth-child(5),
.detail-invitations-table td:nth-child(5) {
  width: 120px;
}

.invitation-person small {
  direction: ltr;
  text-align: inherit;
}

.schools-table {
  min-width: 1260px;
}

.schools-table th:nth-child(1),
.schools-table td:nth-child(1) {
  width: 300px;
}

.schools-table th:nth-child(2),
.schools-table td:nth-child(2) {
  width: 220px;
}

.schools-table th:nth-child(3),
.schools-table td:nth-child(3),
.schools-table th:nth-child(4),
.schools-table td:nth-child(4) {
  width: 104px;
}

.schools-table th:nth-child(5),
.schools-table td:nth-child(5) {
  width: 220px;
}

.schools-table th:nth-child(6),
.schools-table td:nth-child(6) {
  width: 178px;
}

.schools-table th:nth-child(7),
.schools-table td:nth-child(7) {
  width: 154px;
}

.fleet-table {
  min-width: 1420px;
}

.fleet-table th:nth-child(1),
.fleet-table td:nth-child(1) {
  width: 290px;
}

.fleet-table th:nth-child(2),
.fleet-table td:nth-child(2) {
  width: 230px;
}

.fleet-table th:nth-child(3),
.fleet-table td:nth-child(3) {
  width: 190px;
}

.fleet-table th:nth-child(4),
.fleet-table td:nth-child(4),
.fleet-table th:nth-child(5),
.fleet-table td:nth-child(5) {
  width: 140px;
}

.fleet-table th:nth-child(6),
.fleet-table td:nth-child(6) {
  width: 180px;
}

.fleet-table th:nth-child(7),
.fleet-table td:nth-child(7) {
  width: 150px;
}

.fleet-table th:nth-child(8),
.fleet-table td:nth-child(8) {
  width: 72px;
}

.fleet-table .count-chip {
  justify-content: flex-start;
  white-space: nowrap;
}

.fleet-table .vehicle-capacity-chip {
  width: max-content;
  min-width: 94px;
  max-width: 100%;
  gap: 8px;
  padding-inline: 12px;
}

.fleet-table .vehicle-capacity-chip .material-symbols-rounded {
  flex: 0 0 auto;
}

.fleet-table .vehicle-capacity-chip .chip-label {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-trip-plans-table {
  min-width: 1280px;
  table-layout: fixed;
}

.vehicle-trip-plans-table th,
.vehicle-trip-plans-table td,
.vehicle-scheduled-trips-table th,
.vehicle-scheduled-trips-table td {
  min-width: 0;
  white-space: nowrap;
}

.vehicle-trip-plans-table th:nth-child(1),
.vehicle-trip-plans-table td:nth-child(1) {
  width: 260px;
}

.vehicle-trip-plans-table th:nth-child(2),
.vehicle-trip-plans-table td:nth-child(2) {
  width: 230px;
}

.vehicle-trip-plans-table th:nth-child(3),
.vehicle-trip-plans-table td:nth-child(3) {
  width: 150px;
}

.vehicle-trip-plans-table th:nth-child(4),
.vehicle-trip-plans-table td:nth-child(4) {
  width: 240px;
}

.vehicle-trip-plans-table th:nth-child(5),
.vehicle-trip-plans-table td:nth-child(5) {
  width: 120px;
}

.vehicle-trip-plans-table th:nth-child(6),
.vehicle-trip-plans-table td:nth-child(6) {
  width: 170px;
}

.vehicle-trip-plans-table th:nth-child(7),
.vehicle-trip-plans-table td:nth-child(7) {
  width: 140px;
}

.vehicle-trip-plans-table th:nth-child(8),
.vehicle-trip-plans-table td:nth-child(8) {
  width: 64px;
  text-align: end;
}

.vehicle-scheduled-trips-table {
  min-width: 1160px;
  table-layout: fixed;
}

.vehicle-scheduled-trips-table th:nth-child(1),
.vehicle-scheduled-trips-table td:nth-child(1) {
  width: 260px;
}

.vehicle-scheduled-trips-table th:nth-child(2),
.vehicle-scheduled-trips-table td:nth-child(2) {
  width: 220px;
}

.vehicle-scheduled-trips-table th:nth-child(3),
.vehicle-scheduled-trips-table td:nth-child(3) {
  width: 230px;
}

.vehicle-scheduled-trips-table th:nth-child(4),
.vehicle-scheduled-trips-table td:nth-child(4) {
  width: 160px;
}

.vehicle-scheduled-trips-table th:nth-child(5),
.vehicle-scheduled-trips-table td:nth-child(5),
.vehicle-scheduled-trips-table th:nth-child(6),
.vehicle-scheduled-trips-table td:nth-child(6) {
  width: 140px;
}

.vehicle-scheduled-trips-table th:nth-child(7),
.vehicle-scheduled-trips-table td:nth-child(7) {
  width: 64px;
  text-align: end;
}

.vehicle-trip-plans-table .plain-table-text,
.vehicle-trip-plans-table .count-chip,
.vehicle-trip-plans-table .state,
.vehicle-trip-plans-table .trip-direction,
.vehicle-scheduled-trips-table .plain-table-text,
.vehicle-scheduled-trips-table .count-chip,
.vehicle-scheduled-trips-table .state,
.vehicle-scheduled-trips-table .trip-direction,
.vehicle-scheduled-trips-table .trip-time-link {
  max-width: 100%;
}

.vehicle-trip-plans-table .table-text-clip,
.vehicle-trip-plans-table .plain-table-text,
.vehicle-scheduled-trips-table .table-text-clip,
.vehicle-scheduled-trips-table .plain-table-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-users-table {
  min-width: 960px;
}

.detail-users-table th:nth-child(1),
.detail-users-table td:nth-child(1) {
  width: 300px;
}

.detail-users-table th:nth-child(2),
.detail-users-table td:nth-child(2) {
  width: 150px;
}

.detail-users-table th:nth-child(3),
.detail-users-table td:nth-child(3) {
  width: 220px;
}

.detail-users-table th:nth-child(4),
.detail-users-table td:nth-child(4) {
  width: 190px;
}

.detail-users-table th:nth-child(5),
.detail-users-table td:nth-child(5) {
  width: 130px;
}

.organizations-table td {
  overflow: visible;
  text-overflow: clip;
}

/* Softer separators in dark mode */
.dark-theme .organization-workspace .table-wrap {
  border-top-color: rgba(220,244,226,.09) !important;
}

.dark-theme .pagination,
.dark-theme .organization-toolbar,
.dark-theme .detail-tabs,
.dark-theme .notifications-panel header,
.dark-theme .notifications-panel article {
  border-color: rgba(220,244,226,.075) !important;
}

.trip-command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.trip-command-strip article {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(0, 128, 0, .14);
  border-radius: 24px;
  background: rgba(255, 255, 255, .48);
}

.dark-theme .trip-command-strip article {
  border-color: rgba(193, 224, 203, .16);
  background: rgba(12, 31, 20, .74);
}

.trip-command-strip .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--brand-dark);
  background: rgba(0, 194, 0, .12);
  font-size: 26px;
}

.trip-command-strip small,
.muted-block,
.muted-text {
  color: var(--muted);
}

.trip-command-strip strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 900;
}

.trips-table th:first-child,
.trips-table td:first-child {
  min-width: 240px;
}

.trips-table th,
.trips-table td {
  white-space: nowrap;
}

.trips-table {
  min-width: 1180px;
  table-layout: fixed;
}

.trips-table th:nth-child(1),
.trips-table td:nth-child(1) {
  width: 250px;
}

.trips-table th:nth-child(2),
.trips-table td:nth-child(2) {
  width: 240px;
}

.trips-table th:nth-child(3),
.trips-table td:nth-child(3) {
  width: 250px;
}

.trips-table th:nth-child(4),
.trips-table td:nth-child(4) {
  width: 160px;
}

.trips-table th:nth-child(5),
.trips-table td:nth-child(5) {
  width: 160px;
}

.trips-table th:nth-child(6),
.trips-table td:nth-child(6),
.trips-table th:nth-child(7),
.trips-table td:nth-child(7) {
  width: 140px;
}

.trips-table th:nth-child(8),
.trips-table td:nth-child(8) {
  width: 64px;
  text-align: end;
}

.trip-time-link {
  display: inline-grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
  max-width: 260px;
  color: var(--ink);
  text-decoration: none;
}

.trip-time-link .material-symbols-rounded {
  grid-row: span 2;
  color: var(--muted);
  font-size: 24px;
}

.trip-time-link strong,
.trip-time-link small,
.muted-block,
.table-text-clip {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-time-link strong {
  font-weight: 900;
}

.trip-time-link small,
.muted-block {
  margin-top: 2px;
  font-size: 13px;
}

.trip-direction {
  max-width: 150px;
}

.trip-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 128, 0, .14);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .42);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-source-pill.scheduled {
  color: var(--brand-dark);
  background: rgba(0, 194, 0, .12);
}

.trip-source-pill .material-symbols-rounded {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 20px;
}

.dark-theme .trip-source-pill {
  border-color: rgba(196, 214, 198, .16);
  background: rgba(10, 27, 18, .86);
}

.dark-theme .trip-source-pill.scheduled {
  background: rgba(0, 188, 0, .1);
}

.trip-time-text {
  max-width: 290px;
}

.trip-hero .hero-monogram {
  display: grid;
  place-items: center;
}

.trip-hero .hero-monogram .material-symbols-rounded {
  font-size: 46px;
}

.trip-map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 18px;
  margin-top: 20px;
}

.trip-map-panel,
.trip-timeline-panel {
  border: 1px solid rgba(0, 128, 0, .14);
  border-radius: 30px;
  background: rgba(255, 255, 255, .44);
  box-shadow: 0 22px 60px rgba(0, 95, 34, .08);
  overflow: hidden;
}

.dark-theme .trip-map-panel,
.dark-theme .trip-timeline-panel {
  border-color: rgba(193, 224, 203, .16);
  background: rgba(9, 29, 18, .82);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .18);
}

.trip-map-panel > header,
.trip-timeline-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(0, 128, 0, .12);
}

.dark-theme .trip-map-panel > header,
.dark-theme .trip-timeline-panel > header {
  border-bottom-color: rgba(193, 224, 203, .12);
}

.trip-map-panel h2,
.trip-timeline-panel h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 24px;
}

.trip-map-panel .map-points-chip,
.trip-timeline-panel .timeline-stops-chip {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 2px;
  font-size: 14px;
}

.trip-stop-list {
  display: grid;
}

.trip-stop-list section {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0, 128, 0, .10);
}

.dark-theme .trip-stop-list section {
  border-bottom-color: rgba(193, 224, 203, .10);
}

.trip-stop-list strong,
.trip-stop-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-stop-list small {
  color: var(--muted);
}

.trip-scheduler-modal input[type="datetime-local"] {
  color-scheme: light;
}

.dark-theme .trip-scheduler-modal input[type="datetime-local"] {
  color-scheme: dark;
}

.trip-modal-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(0, 128, 0, .14);
  border-radius: 24px;
  background: rgba(0, 194, 0, .045);
}

.dark-theme .trip-modal-section {
  border-color: rgba(196, 214, 198, .16);
  background: rgba(255, 255, 255, .025);
}

.trip-modal-section > header,
.trip-scheduler-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.trip-modal-section > header .material-symbols-rounded,
.trip-scheduler-note > .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--brand-dark);
  background: rgba(0, 194, 0, .12);
  font-size: 24px;
}

.trip-modal-section strong,
.trip-scheduler-note strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
}

.trip-modal-section small,
.trip-scheduler-note p {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.trip-schedule-section {
  gap: 18px;
}

.trip-scheduler-modal .form-row {
  align-items: start;
}

.trip-schedule-main-row,
.trip-date-row {
  gap: 18px;
}

.trip-scheduler-modal .form-row > *,
.trip-scheduler-modal .sirb-dropdown {
  min-width: 0;
}

.trip-schedule-main-row .sirb-dropdown-trigger,
.schedule-time-field {
  min-height: 78px;
}

.schedule-time-field {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(207, 225, 214, .95);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, .82);
  outline: 0;
}

.dark-theme .schedule-time-field {
  border-color: rgba(49, 70, 56, .95);
  background: rgba(7, 24, 16, .72);
}

.schedule-time-field:hover,
.schedule-time-field:focus-within {
  border-color: rgba(18, 183, 0, .42);
  box-shadow: inset 0 0 0 2px rgba(18, 183, 0, .12);
}

.dark-theme .schedule-time-field:hover,
.dark-theme .schedule-time-field:focus-within {
  border-color: rgba(113, 242, 96, .45);
  box-shadow: inset 0 0 0 2px rgba(113, 242, 96, .12);
}

.schedule-time-field.field-invalid {
  border-color: rgba(239, 68, 68, .45);
  box-shadow: inset 0 0 0 2px rgba(239, 68, 68, .1);
}

.schedule-time-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  color: var(--success);
  background: rgba(0, 188, 0, .10);
  font-size: 28px;
}

.schedule-time-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.schedule-time-copy small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.schedule-time-copy input {
  width: 100%;
  min-height: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none !important;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.2;
}

.dark-theme .schedule-time-copy input {
  color: #e8f5e9;
  background: transparent;
}

.schedule-time-copy input:focus {
  box-shadow: none !important;
}

.schedule-time-field .field-error {
  grid-column: 1 / -1;
}

.trip-date-row .date-field-title {
  display: flex;
  align-items: center;
  min-height: 26px;
  gap: 8px;
}

.trip-date-row .date-field-title small {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: .82em;
  line-height: 1;
}

.weekday-selector {
  display: grid;
  gap: 12px;
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
}

.weekday-card-selector {
  padding: 18px;
  border: 1px solid rgba(207, 225, 214, .20);
  border-radius: 24px;
  background: rgba(255, 255, 255, .035);
}

.dark-theme .weekday-card-selector {
  border-color: rgba(196, 214, 198, .14);
  background: rgba(255, 255, 255, .018);
}

.weekday-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weekday-selector-header > span {
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
}

.weekday-selector-header > small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(18, 183, 0, .18);
  border-radius: 999px;
  color: var(--success);
  background: rgba(0, 188, 0, .08);
  font-weight: 950;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.dark-theme .weekday-grid {
  background: transparent;
}

.weekday-selector button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid rgba(207, 225, 214, .20);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted-strong);
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
  text-align: start;
  cursor: pointer;
  overflow: hidden;
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.weekday-selector button:hover,
.weekday-selector button.active {
  background: rgba(0, 188, 0, .08);
  border-color: rgba(0, 188, 0, .24);
  color: var(--success);
}

.weekday-selector button.active {
  box-shadow: inset 0 0 0 1px rgba(18, 183, 0, .14);
}

.weekday-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekday-selector button.active .weekday-name {
  color: var(--success);
}

.weekday-check {
  display: grid;
  flex: 0 0 20px;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(117, 142, 130, .36);
  border-radius: 999px;
  color: var(--success);
  background: rgba(255, 255, 255, .04);
  font-size: 14px;
  opacity: .42;
  transition: opacity .16s ease, border-color .16s ease, background .16s ease;
}

.weekday-selector button.active .weekday-check {
  opacity: 1;
  border-color: var(--success);
  background: rgba(0, 188, 0, .12);
}

.trip-plans-table {
  min-width: 1220px;
  table-layout: fixed;
}

.trip-plans-table th,
.trip-plans-table td {
  min-width: 0;
}

.trip-plans-table th:nth-child(1),
.trip-plans-table td:nth-child(1) {
  width: 240px;
}

.trip-plans-table th:nth-child(2),
.trip-plans-table td:nth-child(2) {
  width: 210px;
}

.trip-plans-table th:nth-child(3),
.trip-plans-table td:nth-child(3) {
  width: 150px;
}

.trip-plans-table th:nth-child(4),
.trip-plans-table td:nth-child(4) {
  width: 150px;
}

.trip-plans-table th:nth-child(5),
.trip-plans-table td:nth-child(5) {
  width: 110px;
}

.trip-plans-table th:nth-child(6),
.trip-plans-table td:nth-child(6) {
  width: 150px;
}

.trip-plans-table th:nth-child(7),
.trip-plans-table td:nth-child(7) {
  width: 150px;
}

.trip-plans-table th:nth-child(8),
.trip-plans-table td:nth-child(8) {
  width: 130px;
}

.trip-plans-table th:nth-child(9),
.trip-plans-table td:nth-child(9) {
  width: 64px;
  text-align: end;
}

.trip-plans-table .plain-table-text,
.trip-plans-table .count-chip,
.trip-plans-table .state,
.trip-plans-table .trip-direction {
  max-width: 100%;
}

.trip-plans-table .plain-table-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-plan-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.trip-plan-map-grid {
  margin-top: 0;
  padding: 0 22px 22px;
}

.trip-plan-map-grid .sirb-map-canvas {
  min-height: 380px;
}

.trip-plan-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(0, 128, 0, .12);
  border-radius: 26px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 18px 46px rgba(17, 59, 32, .07);
}

.dark-theme .trip-plan-card {
  border-color: rgba(196, 214, 198, .16);
  background: rgba(10, 27, 18, .76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .20);
}

.trip-plan-card header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.trip-plan-card header > .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: var(--brand);
  background: rgba(0, 188, 0, .12);
}

.trip-plan-card strong,
.trip-plan-card small,
.trip-plan-card dt,
.trip-plan-card dd {
  display: block;
}

.trip-plan-card header strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.trip-plan-card header small,
.trip-plan-card dt {
  color: var(--muted);
  font-weight: 750;
}

.trip-plan-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.trip-plan-card dl > div {
  display: grid;
  grid-template-columns: minmax(110px, .45fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}

.trip-plan-card dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheduled-trip-note.detail-list-note {
  display: flex;
  margin: 0;
  padding: 18px 18px 0;
}

.generated-trip-time {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.generated-trip-time .material-symbols-rounded {
  flex: 0 0 auto;
  color: var(--muted);
}

.generated-trip-time strong {
  min-width: 0;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
}

.trip-scheduler-note {
  padding: 16px;
  border: 1px dashed rgba(0, 128, 0, .24);
  border-radius: 22px;
  background: rgba(255, 255, 255, .32);
}

.dark-theme .trip-scheduler-note {
  border-color: rgba(196, 214, 198, .18);
  background: rgba(10, 27, 18, .64);
}

.driver-monogram {
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(0, 194, 0, .18), rgba(0, 128, 0, .08));
  color: var(--brand-dark);
}

.driver-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 22px 24px;
}

.driver-profile-grid article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 16px;
  border: 1px solid rgba(0, 128, 0, .11);
  border-radius: 20px;
  background: rgba(0, 128, 0, .035);
}

.driver-profile-grid article.wide {
  grid-column: 1 / -1;
}

.driver-profile-grid article > .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--brand-dark);
  background: rgba(0, 194, 0, .12);
  font-size: 25px;
}

.driver-profile-grid small,
.driver-profile-grid strong,
.driver-profile-grid span {
  display: block;
}

.driver-profile-grid small {
  margin-bottom: 3px;
  color: var(--muted);
  font-weight: 750;
}

.driver-profile-grid strong {
  color: var(--ink);
  font-size: 15px;
}

.driver-profile-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.driver-modal {
  width: min(780px, calc(100vw - 32px));
}

.driver-modal form {
  gap: 18px;
}

.driver-modal form > label,
.driver-modal .form-row > label {
  min-width: 0;
}

.driver-identity-card {
  display: flex;
  align-items: center;
  min-height: 100px;
  padding: 18px 20px 10px;
  border: 1px dashed rgba(117, 142, 130, .34);
  border-radius: 18px;
  background: rgba(117, 142, 130, .075);
  gap: 16px;
  overflow: visible;
}

.driver-identity-card > .material-symbols-rounded {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--brand);
  background: rgba(0, 188, 0, .10);
  font-size: 26px;
}

.driver-identity-card > div {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 6px;
  overflow: visible;
}

.driver-identity-card small {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.driver-identity-card strong,
.driver-identity-card > div > span {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-identity-card strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.driver-identity-card > div > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  unicode-bidi: isolate;
}

.driver-identity-phone {
  display: block;
  width: 100%;
  margin-block-start: 4px;
  padding-block-end: 12px;
  direction: ltr;
  unicode-bidi: embed;
}

.driver-identity-hint {
  margin: 0 2px 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

body:not(.ltr) .driver-identity-card {
  flex-direction: row;
  direction: rtl;
}

body:not(.ltr) .driver-identity-card > div {
  direction: rtl;
  align-items: flex-end;
  text-align: right;
}

body:not(.ltr) .driver-identity-card small,
body:not(.ltr) .driver-identity-card strong,
body:not(.ltr) .driver-identity-card > div > span,
body:not(.ltr) .driver-identity-hint {
  text-align: right;
}

body:not(.ltr) .driver-identity-phone {
  align-self: stretch;
  text-align: right;
  direction: ltr;
  unicode-bidi: embed;
}

body.ltr .driver-identity-card {
  flex-direction: row;
  direction: ltr;
}

body.ltr .driver-identity-card > div {
  align-items: flex-start;
  text-align: left;
}

body.ltr .driver-identity-card small,
body.ltr .driver-identity-card strong,
body.ltr .driver-identity-card > div > span,
body.ltr .driver-identity-hint {
  text-align: left;
}

body.ltr .driver-identity-phone {
  align-self: stretch;
  text-align: left;
  direction: ltr;
  unicode-bidi: embed;
}

.dark-theme .driver-monogram {
  color: var(--brand);
  background: linear-gradient(145deg, rgba(25, 176, 0, .24), rgba(25, 176, 0, .08));
}

.dark-theme .driver-profile-grid article {
  border-color: rgba(193, 224, 203, .10);
  background: rgba(193, 224, 203, .035);
}

.dark-theme .driver-profile-grid article > .material-symbols-rounded {
  color: var(--brand);
  background: rgba(25, 176, 0, .14);
}

.dark-theme .driver-identity-card {
  border-color: rgba(196, 214, 198, .20);
  background: rgba(11, 33, 23, .84);
}

.dark-theme .driver-identity-card strong {
  color: #e8f5e9;
}

.floating-filter-panel.driver-filter-panel {
  position: fixed;
  z-index: 80;
  width: min(380px, calc(100vw - 24px));
}

.drivers-table {
  min-width: 1120px;
  table-layout: fixed;
}

.drivers-table th:nth-child(1) { width: 24%; }

.drivers-table th:nth-child(2) { width: 18%; }

.drivers-table th:nth-child(3) { width: 14%; }

.drivers-table th:nth-child(4) { width: 17%; }

.drivers-table th:nth-child(5) { width: 10%; }

.drivers-table th:nth-child(6) { width: 12%; }

.drivers-table th:nth-child(7) { width: 5%; }

.drivers-table td {
  vertical-align: middle;
}

.drivers-table .org-link,
.drivers-table .soft-link,
.drivers-table .table-stacked-value,
.drivers-table .count-chip,
.drivers-table .state {
  min-width: 0;
}

.drivers-table .org-link span:last-child,
.drivers-table .table-stacked-value {
  overflow: hidden;
}

.drivers-table .org-link strong,
.drivers-table .org-link small,
.drivers-table .soft-link,
.drivers-table .table-stacked-value strong,
.drivers-table .table-stacked-value small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drivers-table .count-chip,
.drivers-table .state {
  max-width: 100%;
  overflow: hidden;
}

.drivers-table .chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drivers-table .driver-access-chip {
  width: auto;
  max-width: 100%;
  min-width: 0;
  justify-content: flex-start;
  gap: 8px;
  padding-inline: 12px;
}

.drivers-table .driver-access-chip .material-symbols-rounded {
  flex: 0 0 auto;
}

.drivers-table .driver-access-chip .chip-label {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal .invitation-role-readonly {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 8px 12px;
    gap: 12px;
    border: 1px dashed rgba(117, 142, 130, .34);
    border-radius: 18px;
    background: rgba(117, 142, 130, .075);
}

.modal .invitation-role-readonly .readonly-select-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.modal .invitation-role-readonly .readonly-select-copy label {
    font-size: 12px;
    line-height: 1.2;
}

.modal .invitation-role-readonly .readonly-select-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 23px;
}

.modal .invitation-role-readonly strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    line-height: 1.25;
}

.enhanced-driver-panel .driver-profile-grid-enhanced {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.enhanced-driver-panel .driver-operational-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  align-items: start;
  gap: 16px;
}

.driver-operational-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.driver-operational-column-main .school-access-card {
  align-items: start;
  min-height: 230px;
}

.driver-operational-column-side .driver-profile-card {
  min-height: 126px;
}

.driver-operational-column-side .driver-notes-card {
  align-items: start;
  min-height: 164px;
}

.driver-operational-column-side .driver-notes-card strong {
  line-height: 1.55;
}

.driver-profile-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(11, 53, 31, .10);
  border-radius: 24px;
  color: inherit;
  text-align: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(239, 248, 241, .70));
}

button.driver-profile-card {
  cursor: pointer;
}

.driver-profile-card > .material-symbols-rounded:first-child {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--brand);
  background: rgba(0, 188, 0, .10);
}

.driver-profile-card small,
.driver-profile-card span {
  color: var(--muted);
  font-weight: 700;
}

.driver-profile-card strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.driver-emergency-phone {
  display: block;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: inherit;
}

body:not(.ltr) .driver-emergency-phone {
  text-align: right;
}

body.ltr .driver-emergency-phone {
  text-align: left;
}

.driver-profile-card.wide {
  grid-column: span 2;
}

.driver-profile-card.clickable {
  grid-template-columns: 52px minmax(0, 1fr) 28px;
}

.driver-profile-card.clickable:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 188, 0, .35);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .08);
}

.driver-profile-card .open-icon {
  width: auto !important;
  height: auto !important;
  color: var(--muted) !important;
  background: transparent !important;
}

.driver-school-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.driver-school-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 188, 0, .18);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  background: rgba(0, 188, 0, .06);
}

.driver-school-chip .school-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-basis: 44px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1;
  text-align: center;
  transform: none;
}

.driver-school-chip span:last-child {
  min-width: 0;
}

.driver-school-chip strong,
.driver-school-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-access-empty {
  margin: 14px 0 0;
  color: var(--muted);
}

.driver-trips-panel {
  margin-top: 18px;
}

.driver-trips-table {
  min-width: 1120px;
  table-layout: fixed;
}

.driver-trips-table th,
.driver-trips-table td {
  min-width: 0;
}

.driver-trips-table th:nth-child(1),
.driver-trips-table td:nth-child(1) {
  width: 230px;
}

.driver-trips-table th:nth-child(2),
.driver-trips-table td:nth-child(2) {
  width: 210px;
}

.driver-trips-table th:nth-child(3),
.driver-trips-table td:nth-child(3) {
  width: 150px;
}

.driver-trips-table th:nth-child(4),
.driver-trips-table td:nth-child(4) {
  width: 150px;
}

.driver-trips-table th:nth-child(5),
.driver-trips-table td:nth-child(5) {
  width: 130px;
}

.driver-trips-table th:nth-child(6),
.driver-trips-table td:nth-child(6) {
  width: 150px;
}

.driver-trips-table th:nth-child(7),
.driver-trips-table td:nth-child(7) {
  width: 130px;
}

.driver-trips-table th:nth-child(8),
.driver-trips-table td:nth-child(8) {
  width: 64px;
  text-align: end;
}

.driver-trips-table .plain-table-text,
.driver-trips-table .count-chip,
.driver-trips-table .state,
.driver-trips-table .trip-direction {
  max-width: 100%;
}

.driver-trip-list {
  display: grid;
  gap: 12px;
  padding: 0 22px 24px;
}

.driver-trip-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(11, 53, 31, .10);
  border-radius: 22px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, .80);
}

.driver-trip-card > .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--brand);
  background: rgba(0, 188, 0, .10);
}

.driver-trip-card strong,
.driver-trip-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-trip-card time {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.dark-theme .driver-profile-card {
  border-color: rgba(196, 214, 198, .18);
  background: linear-gradient(135deg, rgba(10, 27, 18, .92), rgba(13, 42, 26, .76));
}

.dark-theme .driver-profile-card strong {
  color: #e8f5e9;
}

.dark-theme .driver-trip-card {
  border-color: rgba(196, 214, 198, .18);
  background: rgba(10, 27, 18, .86);
}

.dark-theme .driver-school-chip {
  border-color: rgba(0, 188, 0, .24);
  background: rgba(0, 188, 0, .08);
}

@media (max-width: 1180px) {
  .enhanced-driver-panel .driver-profile-grid-enhanced {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

  .enhanced-driver-panel .driver-operational-grid {
      grid-template-columns: 1fr;
    }

}

@media (max-width: 980px) {
  .trip-command-strip,
    .trip-map-grid,
    .trip-plan-detail-grid {
      grid-template-columns: 1fr;
    }

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

}

@media (max-width: 640px) {
  .driver-profile-grid {
      grid-template-columns: 1fr;
      padding-inline: 16px;
    }

  .driver-profile-grid article.wide {
      grid-column: auto;
    }

  .driver-profile-card.wide {
      grid-column: auto;
    }

  .driver-trip-card {
      grid-template-columns: 48px minmax(0, 1fr);
    }

  .driver-trip-card time {
      grid-column: 2;
    }

  .trip-command-strip {
      gap: 10px;
    }

  .trip-command-strip article {
      padding: 14px;
    }

  .trip-source-pill,
    .trip-time-text {
      max-width: 220px;
    }

  .trip-modal-section,
    .trip-scheduler-note {
      padding: 14px;
      border-radius: 20px;
    }

  .trip-scheduler-modal .form-row,
    .trip-schedule-main-row,
    .trip-date-row {
      grid-template-columns: 1fr;
    }

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

  .trip-stop-list section {
      grid-template-columns: 36px minmax(0, 1fr);
    }

  .trip-stop-list .state {
      grid-column: 2;
      justify-self: start;
    }

}

@media (max-width: 420px) {
  .weekday-grid {
      grid-template-columns: 1fr;
    }

}

.panel,
.kpi-card,
.organization-hero,
.detail-facts article,
.student-summary-card,
.student-profile-card,
.driver-profile-card,
.trip-modal-section,
.trip-scheduler-note {
  border: 1px solid var(--sirb-border);
  border-radius: var(--sirb-radius-lg);
  background: linear-gradient(180deg, var(--sirb-surface), color-mix(in srgb, var(--sirb-surface-solid) 88%, var(--sirb-bg)));
  box-shadow: var(--sirb-shadow-sm);
}

.panel-header,
.organization-toolbar,
.detail-toolbar,
.detail-list-heading {
  border-color: var(--sirb-border);
}

.organization-toolbar,
.detail-toolbar {
  padding: 18px 20px;
}

.primary-button,
.secondary-button,
.filter-button,
.filter-panel-toggle,
.danger-button,
.student-skip-button,
.compact-action {
  min-height: var(--sirb-control-height);
  border-radius: var(--sirb-radius-sm);
  font-size: 14px;
  font-weight: 900;
}

.dark-theme .sidebar,
.dark-theme .topbar,
.dark-theme .panel,
.dark-theme .kpi-card,
.dark-theme .organization-hero,
.dark-theme .detail-facts article,
.dark-theme .student-summary-card,
.dark-theme .student-profile-card,
.dark-theme .driver-profile-card,
.dark-theme .modal,
.dark-theme .quick-actions-menu,
.dark-theme .notifications-panel,
.dark-theme .row-action-menu,
.dark-theme .filter-panel,
.dark-theme .sirb-dropdown-menu {
  border-color: var(--sirb-border);
  background: linear-gradient(180deg, rgba(18, 30, 22, .94), rgba(13, 24, 17, .9));
}

.topbar-start,
.topbar-actions,
.organization-toolbar,
.detail-toolbar,
.management-tools {
  min-width: 0;
}

.search-box,
.filter-search,
.organization-search {
  min-width: 260px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(340px, .85fr);
  gap: var(--sirb-page-gap);
  margin-bottom: var(--sirb-page-gap);
}

.organizations-table,
.schools-table,
.trips-table,
.students-table,
.student-detail-table,
.student-relation-table {
  min-width: 1000px;
}

.organizations-table th,
.organizations-table td,
.schools-table th,
.schools-table td,
.trips-table th,
.trips-table td,
.students-table th,
.students-table td,
.student-detail-table th,
.student-detail-table td,
.student-relation-table th,
.student-relation-table td {
  vertical-align: middle;
}

.org-link,
.relation-person,
.student-name-link {
  min-width: 0;
}

.org-link:hover strong,
.soft-link:hover,
.trip-time-link:hover strong {
  color: var(--sirb-brand-hover);
}

@media (max-width: 1180px) {
  .dashboard-grid,
    .lower-grid {
      grid-template-columns: 1fr;
    }

}

@media (max-width: 760px) {
  .page-heading,
    .panel-header,
    .detail-list-heading.with-actions,
    .organization-toolbar,
    .detail-toolbar {
      align-items: stretch;
      flex-direction: column;
    }

  .page-heading .primary-button,
    .filter-panel-toggle,
    .organization-search,
    .filter-search {
      width: 100%;
    }

  .search-box,
    .filter-search,
    .organization-search {
      min-width: 0;
    }

}

.organization-hero,
.trip-hero,
.student-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 26px;
  overflow: hidden;
  isolation: isolate;
}

.organization-hero::before,
.trip-hero::before,
.student-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .72;
  background:
    radial-gradient(circle at 10% 0%, rgba(22, 163, 11, .12), transparent 34%),
    radial-gradient(circle at 94% 16%, rgba(22, 163, 11, .08), transparent 28%);
  pointer-events: none;
}

.organization-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.organization-identity h1 {
  max-width: min(760px, 62vw);
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--sirb-text);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 950;
  line-height: 1.22;
  letter-spacing: -.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organization-identity p {
  max-width: min(780px, 62vw);
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--sirb-muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-facts small,
.trip-plan-card dt,
.student-summary-table th {
  color: var(--sirb-muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-facts strong,
.trip-plan-card dd,
.student-summary-table td {
  min-width: 0;
  overflow: hidden;
  color: var(--sirb-text);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-lists > section,
.detail-lists > div {
  min-width: 0;
}

.detail-lists .organization-toolbar,
.detail-lists .detail-toolbar,
.detail-list-tools {
  margin: 0 22px 18px;
  padding: 14px;
  border: 1px solid var(--sirb-border);
  border-radius: var(--sirb-radius-lg);
  background: color-mix(in srgb, var(--sirb-surface-muted) 52%, transparent);
}

.detail-lists > section > .table-wrap,
.detail-lists > div > .table-wrap {
  margin: 0 22px 22px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--sirb-border);
  border-radius: var(--sirb-radius-lg);
}

.detail-lists > section > .table-wrap table,
.detail-lists > div > .table-wrap table {
  margin: 0;
}

.detail-lists > section > .pagination,
.detail-lists > div > .pagination {
  margin: 0 22px 22px;
  border: 1px solid var(--sirb-border);
  border-radius: var(--sirb-radius-lg);
}

.trip-plan-detail-grid {
  gap: 16px;
  margin-bottom: 20px;
}

.trip-plan-card,
.trip-map-panel,
.trip-timeline-panel,
.driver-profile-card,
.student-summary-card {
  border: 1px solid var(--sirb-border);
  border-radius: var(--sirb-radius-lg);
  background: color-mix(in srgb, var(--sirb-surface-solid) 78%, transparent);
  box-shadow: var(--sirb-shadow-sm);
}

.trip-plan-card header,
.trip-map-panel header,
.trip-timeline-panel header {
  border-color: var(--sirb-border);
}

.student-detail-profile-pane .student-summary-card {
  margin: 0 22px 22px;
  padding: 18px;
}

.student-summary-columns {
  gap: 16px;
}

.student-summary-table {
  overflow: hidden;
  border: 1px solid var(--sirb-border);
  border-radius: var(--sirb-radius-md);
  background: color-mix(in srgb, var(--sirb-surface-solid) 72%, transparent);
}

.student-summary-table th,
.student-summary-table td {
  padding: 15px 18px;
  border-bottom-color: var(--sirb-border);
}

[dir="rtl"] .student-summary-table th,
[dir="rtl"] .student-summary-table td {
  text-align: right;
}

body.ltr .student-summary-table th,
body.ltr .student-summary-table td {
  text-align: left;
}

.student-summary-table tr:last-child th,
.student-summary-table tr:last-child td {
  border-bottom: 0;
}

.relation-modal,
.school-grade-modal,
.trip-scheduler-modal,
.student-edit-modal {
  border-radius: var(--sirb-radius-xl);
}

.relation-modal form,
.school-grade-modal form,
.trip-scheduler-modal form,
.student-edit-modal form {
  padding: 24px 28px 0;
}

.relation-mode-switch button,
.guardian-mode-heading,
.guardian-selected-card,
.guardian-readonly-card,
.relation-toggle {
  border-color: var(--sirb-border);
  border-radius: var(--sirb-radius-md);
}

.dark-theme .organization-hero::before,
.dark-theme .trip-hero::before,
.dark-theme .student-hero::before {
  opacity: .5;
  background:
    radial-gradient(circle at 10% 0%, rgba(54, 210, 41, .13), transparent 34%),
    radial-gradient(circle at 94% 16%, rgba(54, 210, 41, .08), transparent 28%);
}

.dark-theme .detail-lists,
.dark-theme .trip-plan-card,
.dark-theme .trip-map-panel,
.dark-theme .trip-timeline-panel,
.dark-theme .driver-profile-card,
.dark-theme .student-summary-card,
.dark-theme .student-summary-table {
  border-color: var(--sirb-border);
  background: linear-gradient(180deg, rgba(18, 30, 22, .92), rgba(13, 24, 17, .88));
}

.dark-theme .detail-lists .organization-toolbar,
.dark-theme .detail-lists .detail-toolbar,
.dark-theme .detail-list-tools,
.dark-theme .detail-lists .reusable-empty,
.dark-theme .relation-actions .icon-button {
  border-color: var(--sirb-border);
  background: rgba(19, 33, 24, .72);
}

@media (max-width: 860px) {
  .organization-hero,
    .trip-hero,
    .student-hero {
      align-items: stretch;
      flex-direction: column;
    }

  .organization-identity h1,
    .organization-identity p {
      max-width: 100%;
    }

  .detail-facts,
    .student-summary-columns {
      grid-template-columns: 1fr;
    }

}

@media (max-width: 620px) {
  .organization-identity {
      align-items: flex-start;
    }

  .organization-identity h1 {
      white-space: normal;
    }

  .organization-identity p {
      white-space: normal;
    }

  .detail-lists .organization-toolbar,
    .detail-lists .detail-toolbar,
    .detail-list-tools,
    .detail-lists > section > .table-wrap,
    .detail-lists > div > .table-wrap,
    .detail-lists > section > .pagination,
    .detail-lists > div > .pagination,
    .detail-lists sirb-empty-state .reusable-empty,
    .detail-lists .reusable-empty,
    .student-detail-profile-pane .student-summary-card {
      margin-inline: 14px;
    }

}

.primary-button,
.modal form > footer .primary-button,
.modal footer .primary-button,
.student-create-footer .primary-button,
.page-heading > .primary-button {
  border-color: var(--sirb-brand);
  color: #fff;
  background: var(--sirb-brand);
  box-shadow: none;
  text-shadow: none;
}

.primary-button:hover,
.modal form > footer .primary-button:hover,
.modal footer .primary-button:hover,
.student-create-footer .primary-button:hover,
.page-heading > .primary-button:hover {
  border-color: var(--sirb-brand-hover);
  background: var(--sirb-brand-hover);
  box-shadow: none;
  transform: translateY(-1px);
}

.primary-button:active,
.modal form > footer .primary-button:active,
.modal footer .primary-button:active,
.student-create-footer .primary-button:active,
.page-heading > .primary-button:active {
  border-color: var(--sirb-brand-active);
  background: var(--sirb-brand-active);
  transform: translateY(0);
}

.primary-button:focus-visible,
.modal form > footer .primary-button:focus-visible,
.modal footer .primary-button:focus-visible,
.student-create-footer .primary-button:focus-visible,
.page-heading > .primary-button:focus-visible {
  outline: 0;
  box-shadow: var(--sirb-focus);
}

.dark-theme .primary-button,
.dark-theme .modal form > footer .primary-button,
.dark-theme .modal footer .primary-button,
.dark-theme .student-create-footer .primary-button,
.dark-theme .page-heading > .primary-button,
.dark-theme .topbar-actions > .primary-button,
.dark-theme .topbar-actions > .quick-actions-trigger {
  color: #fff;
  background: #19b000;
  border-color: #19b000;
  box-shadow: none;
}

.dark-theme .primary-button:hover,
.dark-theme .modal form > footer .primary-button:hover,
.dark-theme .modal footer .primary-button:hover,
.dark-theme .student-create-footer .primary-button:hover,
.dark-theme .page-heading > .primary-button:hover,
.dark-theme .topbar-actions > .primary-button:hover,
.dark-theme .topbar-actions > .quick-actions-trigger:hover,
.dark-theme .topbar-actions > .quick-actions-trigger.active {
  background: #128a05;
  border-color: #128a05;
  box-shadow: none;
}

.panel,
.kpi-card,
.organization-hero,
.detail-lists,
.detail-facts article,
.student-summary-card,
.student-profile-card,
.driver-profile-card,
.trip-plan-card,
.trip-map-panel,
.trip-timeline-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(252, 254, 252, .9));
}

.organization-toolbar,
.detail-toolbar,
.detail-list-tools,
.detail-lists .organization-toolbar,
.detail-lists .detail-toolbar {
  background: rgba(250, 253, 251, .76);
}

.primary-button:hover,
.modal form > footer .primary-button:hover,
.modal footer .primary-button:hover,
.student-create-footer .primary-button:hover,
.page-heading > .primary-button:hover,
.topbar-actions > .primary-button:hover,
.topbar-actions > .quick-actions-trigger:hover,
.topbar-actions > .quick-actions-trigger.active {
  border-color: #128a05;
  background: #128a05;
  box-shadow: none;
  transform: none;
}

.org-monogram,
.student-monogram,
.hero-monogram,
.avatar,
.relation-person .student-monogram,
.guardian-readonly-card .student-monogram,
.guardian-selected-card .student-monogram,
.guardian-candidate-list .student-monogram {
  color: #087300;
  background: #d8f8dc;
  box-shadow: inset 0 0 0 1px rgba(8, 115, 0, .08);
  text-shadow: none;
}

.dark-theme .org-monogram,
.dark-theme .student-monogram,
.dark-theme .hero-monogram,
.dark-theme .avatar,
.dark-theme .relation-person .student-monogram,
.dark-theme .guardian-readonly-card .student-monogram,
.dark-theme .guardian-selected-card .student-monogram,
.dark-theme .guardian-candidate-list .student-monogram {
  color: #0a5f05;
  background: #c8f7cf;
}

.organization-workspace,
.detail-lists,
.detail-lists > section,
.detail-lists > div,
.student-detail-profile-pane,
.trip-plan-detail-grid,
.trip-map-grid,
.driver-profile-grid,
.driver-operational-grid,
.student-summary-card,
.student-summary-columns,
.trip-plan-card,
.trip-map-panel,
.trip-timeline-panel {
  min-width: 0;
  max-width: 100%;
}

.detail-lists > section > .table-wrap,
.detail-lists > div > .table-wrap,
.detail-lists > section > .pagination,
.detail-lists > div > .pagination,
.detail-lists sirb-empty-state .reusable-empty,
.detail-lists .reusable-empty,
.student-detail-profile-pane .student-summary-card {
  width: calc(100% - 44px);
  max-width: calc(100% - 44px);
  margin-inline: 22px;
  box-sizing: border-box;
}

.detail-lists .organization-toolbar,
.detail-lists .detail-toolbar,
.detail-list-tools {
  width: calc(100% - 44px);
  max-width: calc(100% - 44px);
  margin-inline: 22px;
  box-sizing: border-box;
}

.student-summary-table,
.student-summary-table tbody,
.student-summary-table tr {
  max-width: 100%;
}

.student-summary-table th,
.student-summary-table td {
  min-width: 0;
}

.dark-theme .panel,
.dark-theme .kpi-card,
.dark-theme .organization-hero,
.dark-theme .detail-lists,
.dark-theme .detail-facts article,
.dark-theme .student-summary-card,
.dark-theme .student-profile-card,
.dark-theme .driver-profile-card,
.dark-theme .trip-plan-card,
.dark-theme .trip-map-panel,
.dark-theme .trip-timeline-panel {
  background: linear-gradient(180deg, rgba(18, 30, 22, .94), rgba(13, 24, 17, .9));
}

@media (max-width: 620px) {
  .detail-lists > section > .table-wrap,
    .detail-lists > div > .table-wrap,
    .detail-lists > section > .pagination,
    .detail-lists > div > .pagination,
    .detail-lists sirb-empty-state .reusable-empty,
    .detail-lists .reusable-empty,
    .student-detail-profile-pane .student-summary-card,
    .detail-lists .organization-toolbar,
    .detail-lists .detail-toolbar,
    .detail-list-tools {
      width: calc(100% - 28px);
      max-width: calc(100% - 28px);
      margin-inline: 14px;
    }

}

.modal,
.student-create-modal,
.relation-modal,
.school-grade-modal,
.trip-scheduler-modal,
.roster-modal,
.school-access-modal,
.driver-modal {
  width: min(760px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid var(--sirb-border-strong);
  border-radius: var(--sirb-radius-xl);
  background: color-mix(in srgb, var(--sirb-bg-elevated) 96%, transparent);
  box-shadow: var(--sirb-shadow-lg);
}

.relation-modal,
.school-grade-modal,
.roster-modal {
  width: min(900px, calc(100vw - 48px));
}

.student-create-modal {
  width: min(1080px, calc(100vw - 48px));
}

.modal > header,
.student-create-header,
.modal.school-grade-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 112px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--sirb-border);
  background:
    radial-gradient(circle at 14% 0%, rgba(25, 176, 0, .065), transparent 34%),
    color-mix(in srgb, var(--sirb-bg-elevated) 94%, var(--sirb-brand-soft));
}

.modal > header > div,
.student-create-header > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.modal > header > div > div,
.student-create-header > div > div {
  min-width: 0;
}

.modal-icon,
.student-create-header .modal-icon {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--sirb-brand) 16%, var(--sirb-border));
  border-radius: 18px;
  color: var(--sirb-brand);
  background: var(--sirb-brand-soft);
  box-shadow: none;
  font-size: 28px;
}

.modal h2,
.relation-modal h2,
.modal.school-grade-modal h2,
.student-create-header h2 {
  margin: 0;
  overflow: hidden;
  color: var(--sirb-text);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal header p,
.relation-modal header p,
.modal.school-grade-modal header p,
.student-create-header p {
  max-width: 720px;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--sirb-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal > header .icon-button,
.student-create-header .icon-button {
  flex: 0 0 auto;
}

.modal form,
.relation-modal form,
.modal.school-grade-modal form,
.trip-scheduler-modal form,
.roster-modal form,
.student-create-form {
  display: grid;
  min-height: 0;
  max-height: calc(100dvh - 164px);
  overflow-x: hidden;
  overflow-y: auto;
  gap: 18px;
  padding: 24px 28px 0;
}

.student-create-form {
  gap: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0;
}

.student-create-body {
  min-height: 0;
  padding: 26px 28px 24px;
  overflow: auto;
  overflow-x: hidden;
  background: transparent;
}

.student-create-step {
  display: grid;
  gap: 20px;
}

.student-create-step-heading,
.guardian-mode-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sirb-border);
}

.student-create-step-heading > .material-symbols-rounded,
.guardian-mode-heading > .material-symbols-rounded {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  color: var(--sirb-brand);
  background: var(--sirb-brand-soft);
}

.student-create-step-heading strong,
.guardian-mode-heading strong,
.guardian-link-fields h3 {
  color: var(--sirb-text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.student-create-step-heading small,
.guardian-mode-heading small {
  display: block;
  margin-top: 4px;
  color: var(--sirb-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.modal label,
.relation-modal .student-field,
.student-create-modal .student-field,
.modal.school-grade-modal label {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: var(--sirb-text-soft);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.modal input,
.modal select,
.modal textarea,
.relation-modal input,
.student-create-modal input,
.student-create-modal textarea,
.modal.school-grade-modal input,
.sirb-dropdown-trigger {
  width: 100%;
  min-height: 52px;
  padding-inline: 16px;
  border: 1px solid var(--sirb-border);
  border-radius: 16px;
  color: var(--sirb-text);
  background: color-mix(in srgb, var(--sirb-bg-elevated) 91%, var(--sirb-surface-muted));
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.modal textarea,
.student-create-modal textarea {
  min-height: 96px;
  padding-block: 14px;
  resize: vertical;
}

.modal input::placeholder,
.modal textarea::placeholder,
.student-create-modal input::placeholder,
.student-create-modal textarea::placeholder {
  color: color-mix(in srgb, var(--sirb-muted) 74%, transparent);
  opacity: 1;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus,
.relation-modal input:focus,
.student-create-modal input:focus,
.student-create-modal textarea:focus,
.modal.school-grade-modal input:focus,
.sirb-dropdown.open .sirb-dropdown-trigger,
.sirb-dropdown-trigger:focus-visible {
  outline: 0;
  border-color: color-mix(in srgb, var(--sirb-brand) 54%, var(--sirb-border));
  background: var(--sirb-bg-elevated);
  box-shadow: var(--sirb-focus);
}

.field-invalid input,
.field-invalid select,
.field-invalid textarea,
.modal label.invalid input,
.modal label.invalid select,
.modal label.invalid textarea,
.student-create-modal .field-invalid input,
.student-create-modal .field-invalid textarea,
.sirb-dropdown.invalid .sirb-dropdown-trigger {
  border-color: color-mix(in srgb, var(--sirb-danger) 48%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-danger) 6%, var(--sirb-bg-elevated));
  box-shadow: none;
}

.field-error,
.relation-modal .field-error,
.student-create-modal .field-error,
.modal.school-grade-modal .field-error,
.school-access-error {
  display: flex;
  min-height: 18px;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--sirb-danger);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.field-error .material-symbols-rounded,
.relation-modal .field-error .material-symbols-rounded,
.student-create-modal .field-error .material-symbols-rounded {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 16px;
}

.form-row,
.student-form-grid,
.student-form-grid.compact,
.modal.school-grade-modal .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.student-form-grid .full,
.student-field.full,
.form-row .full,
.guardian-link-fields,
.guardian-candidate-panel,
.guardian-new-fields {
  grid-column: 1 / -1;
}

.student-field-spacer {
  display: block;
}

.relation-mode-switch,
.student-guardian-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.guardian-candidate-panel,
.student-guardian-candidate-panel,
.guardian-new-fields,
.guardian-link-fields,
.student-support-panel,
.student-review-section,
.student-skip-card,
.student-create-note,
.guardian-form-card {
  min-width: 0;
  border: 1px solid var(--sirb-border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--sirb-bg-elevated) 83%, var(--sirb-surface-muted));
  box-shadow: none;
}

.guardian-candidate-panel,
.student-guardian-candidate-panel,
.guardian-new-fields,
.guardian-link-fields,
.student-support-panel,
.guardian-form-card {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.guardian-candidate-list {
  display: grid;
  gap: 10px;
  max-height: min(320px, 36dvh);
  overflow: auto;
  padding: 6px 6px 18px;
  scroll-padding-bottom: 22px;
  border: 1px solid var(--sirb-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--sirb-bg-elevated) 74%, var(--sirb-surface-muted));
}

.guardian-candidate-list button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 86px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--sirb-text);
  background: transparent;
  box-shadow: none;
  text-align: start;
  transform: none;
}

.guardian-candidate-list button:hover,
.guardian-candidate-list button.selected {
  border-color: color-mix(in srgb, var(--sirb-brand) 44%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-brand-soft) 64%, var(--sirb-bg-elevated));
  box-shadow: none;
  transform: none;
}

.guardian-candidate-list button:last-child {
  margin-bottom: 10px;
}

.guardian-candidate-list strong,
.guardian-candidate-list small,
.guardian-selected-card strong,
.guardian-selected-card em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guardian-selected-card,
.guardian-readonly-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--sirb-brand) 42%, var(--sirb-border));
  border-radius: 20px;
  background: color-mix(in srgb, var(--sirb-brand-soft) 58%, var(--sirb-bg-elevated));
}

.relation-person .student-monogram,
.guardian-readonly-card .student-monogram,
.guardian-selected-card .student-monogram,
.guardian-candidate-list .student-monogram,
.student-create-modal .student-monogram,
.roster-candidate-list .student-monogram {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  color: #087300;
  background: #d8f8dc;
  box-shadow: inset 0 0 0 1px rgba(8, 115, 0, .08);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.student-create-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-bg-elevated) 86%, var(--sirb-surface-muted));
}

.student-create-steps button {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--sirb-muted);
  background: transparent;
  box-shadow: none;
  text-align: start;
  transform: none;
}

.student-create-steps button:hover:not(:disabled),
.student-create-steps button.active,
.student-create-steps button.complete {
  border-color: color-mix(in srgb, var(--sirb-brand) 28%, var(--sirb-border));
  color: var(--sirb-text);
  background: color-mix(in srgb, var(--sirb-brand-soft) 58%, var(--sirb-bg-elevated));
  box-shadow: none;
  transform: none;
}

.student-create-step-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  color: var(--sirb-brand);
  background: var(--sirb-brand-soft);
  box-shadow: none;
}

.student-create-steps button.active .student-create-step-icon,
.student-create-steps button.complete .student-create-step-icon {
  color: #fff;
  background: var(--sirb-brand);
}

.student-create-steps strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal form > footer,
.modal footer,
.student-create-footer,
.relation-modal footer,
.modal.school-grade-modal footer,
.roster-modal footer {
  display: flex;
  position: sticky;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 -28px;
  padding: 18px 28px;
  border-top: 1px solid var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-bg-elevated) 94%, var(--sirb-surface-muted));
  box-shadow: 0 -16px 34px rgba(12, 32, 17, .06);
}

.student-create-footer {
  margin: 0;
  min-height: 82px;
  justify-content: space-between;
}

.student-footer-actions,
.student-footer-secondary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.student-footer-actions {
  margin-inline-start: auto;
  justify-content: flex-end;
}

.student-create-footer .secondary-button,
.student-create-footer .primary-button,
.student-create-footer .student-skip-button,
.student-create-footer .student-cancel-button,
.modal footer .secondary-button,
.modal footer .primary-button,
.modal form > footer .secondary-button,
.modal form > footer .primary-button {
  min-height: 50px;
  min-width: 128px;
  justify-content: center;
  border-radius: 16px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
  transform: none;
}

.student-create-footer .primary-button,
.modal footer .primary-button,
.modal form > footer .primary-button {
  color: #fff;
  background: var(--sirb-brand);
  border-color: var(--sirb-brand);
}

.student-create-footer .primary-button:hover,
.modal footer .primary-button:hover,
.modal form > footer .primary-button:hover {
  color: #fff;
  background: var(--sirb-brand-hover);
  border-color: var(--sirb-brand-hover);
  box-shadow: none;
  transform: none;
}

.student-create-footer .student-skip-button {
  color: #8a650b;
  border-color: color-mix(in srgb, #b98005 36%, var(--sirb-border));
  background: color-mix(in srgb, #ffedbc 52%, var(--sirb-bg-elevated));
}

.student-create-footer .student-skip-button:hover {
  color: #765200;
  background: color-mix(in srgb, #ffe29a 68%, var(--sirb-bg-elevated));
}

.roster-modal form {
  padding-bottom: 0;
}

.roster-toolbar,
.roster-candidate-list {
  min-width: 0;
}

.roster-candidate-list > article {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.dark-theme .modal,
.dark-theme .student-create-modal,
.dark-theme .relation-modal,
.dark-theme .school-grade-modal,
.dark-theme .trip-scheduler-modal,
.dark-theme .roster-modal,
.dark-theme .school-access-modal,
.dark-theme .driver-modal {
  border-color: rgba(191, 214, 197, .16);
  background: rgba(14, 26, 18, .96);
}

.dark-theme .modal > header,
.dark-theme .student-create-header,
.dark-theme .modal.school-grade-modal > header,
.dark-theme .student-create-steps,
.dark-theme .modal form > footer,
.dark-theme .modal footer,
.dark-theme .student-create-footer,
.dark-theme .relation-modal footer,
.dark-theme .modal.school-grade-modal footer,
.dark-theme .roster-modal footer {
  border-color: rgba(191, 214, 197, .14);
  background: color-mix(in srgb, #101d15 92%, #19371f);
}

.dark-theme .modal input,
.dark-theme .modal select,
.dark-theme .modal textarea,
.dark-theme .relation-modal input,
.dark-theme .student-create-modal input,
.dark-theme .student-create-modal textarea,
.dark-theme .modal.school-grade-modal input,
.dark-theme .sirb-dropdown-trigger,
.dark-theme .candidate-search,
.dark-theme .guardian-candidate-panel,
.dark-theme .student-guardian-candidate-panel,
.dark-theme .guardian-new-fields,
.dark-theme .guardian-link-fields,
.dark-theme .student-support-panel,
.dark-theme .student-review-section,
.dark-theme .student-skip-card,
.dark-theme .student-create-note,
.dark-theme .guardian-form-card,
.dark-theme .guardian-candidate-list,
.dark-theme .relation-toggle,
.dark-theme .primary-contact-toggle {
  border-color: rgba(191, 214, 197, .16);
  background: rgba(20, 36, 25, .82);
}

.dark-theme .modal input:focus,
.dark-theme .modal select:focus,
.dark-theme .modal textarea:focus,
.dark-theme .relation-modal input:focus,
.dark-theme .student-create-modal input:focus,
.dark-theme .student-create-modal textarea:focus,
.dark-theme .modal.school-grade-modal input:focus,
.dark-theme .sirb-dropdown.open .sirb-dropdown-trigger,
.dark-theme .sirb-dropdown-trigger:focus-visible,
.dark-theme .candidate-search:focus-within {
  background: rgba(23, 42, 29, .96);
}

.dark-theme .relation-mode-switch button,
.dark-theme .relation-mode-switch button:hover,
.dark-theme .relation-mode-switch button.active,
.dark-theme .student-create-steps button:hover:not(:disabled),
.dark-theme .student-create-steps button.active,
.dark-theme .student-create-steps button.complete,
.dark-theme .guardian-candidate-list button:hover,
.dark-theme .guardian-candidate-list button.selected,
.dark-theme .guardian-selected-card,
.dark-theme .guardian-readonly-card,
.dark-theme .primary-contact-toggle.active,
.dark-theme .relation-toggle:focus-within,
.dark-theme .primary-contact-toggle:hover {
  border-color: rgba(25, 176, 0, .42);
  background: rgba(28, 52, 33, .92);
}

.dark-theme .relation-person .student-monogram,
.dark-theme .guardian-readonly-card .student-monogram,
.dark-theme .guardian-selected-card .student-monogram,
.dark-theme .guardian-candidate-list .student-monogram,
.dark-theme .student-create-modal .student-monogram,
.dark-theme .roster-candidate-list .student-monogram {
  color: #0a5f05;
  background: #c8f7cf;
}

.dark-theme .student-create-footer .student-skip-button {
  color: #ffd77a;
  border-color: rgba(255, 205, 92, .34);
  background: rgba(97, 67, 10, .28);
}

@media (max-width: 900px) {
  .student-create-steps {
      grid-template-columns: repeat(5, minmax(44px, 1fr));
    }

  .student-create-steps strong {
      display: none;
    }

  .student-create-steps button {
      justify-content: center;
      padding-inline: 8px;
    }

}

@media (max-width: 700px) {
  .modal,
    .student-create-modal,
    .relation-modal,
    .school-grade-modal,
    .trip-scheduler-modal,
    .roster-modal,
    .school-access-modal,
    .driver-modal {
      width: min(100%, calc(100vw - 24px));
      max-width: calc(100vw - 24px);
      max-height: calc(100dvh - 24px);
      border-radius: 22px;
    }

  .modal > header,
    .student-create-header,
    .modal.school-grade-modal > header {
      min-height: 92px;
      padding: 18px;
    }

  .modal-icon,
    .student-create-header .modal-icon {
      flex-basis: 46px;
      width: 46px;
      height: 46px;
      border-radius: 16px;
      font-size: 24px;
    }

  .modal h2,
    .relation-modal h2,
    .modal.school-grade-modal h2,
    .student-create-header h2 {
      font-size: 21px;
    }

  .modal header p,
    .relation-modal header p,
    .modal.school-grade-modal header p,
    .student-create-header p {
      white-space: normal;
    }

  .modal form,
    .relation-modal form,
    .modal.school-grade-modal form,
    .trip-scheduler-modal form,
    .roster-modal form {
      padding: 18px 18px 0;
    }

  .student-create-body {
      padding: 18px;
    }

  .form-row,
    .student-form-grid,
    .student-form-grid.compact,
    .modal.school-grade-modal .form-row,
    .relation-mode-switch,
    .student-guardian-mode-switch {
      grid-template-columns: 1fr;
    }

  .student-field-spacer {
      display: none;
    }

  .student-create-steps {
      gap: 8px;
      padding: 12px 18px;
    }

  .student-create-step-icon {
      flex-basis: 36px;
      width: 36px;
      height: 36px;
      border-radius: 13px;
    }

  .modal form > footer,
    .modal footer,
    .student-create-footer,
    .relation-modal footer,
    .modal.school-grade-modal footer,
    .roster-modal footer {
      flex-direction: column-reverse;
      align-items: stretch;
      margin-inline: -18px;
      padding: 14px 18px;
    }

  .student-create-footer {
      margin: 0;
    }

  .student-footer-secondary,
    .student-footer-actions {
      width: 100%;
      justify-content: stretch;
    }

  .student-create-footer .secondary-button,
    .student-create-footer .primary-button,
    .student-create-footer .student-skip-button,
    .student-create-footer .student-cancel-button,
    .modal footer .secondary-button,
    .modal footer .primary-button,
    .modal form > footer .secondary-button,
    .modal form > footer .primary-button {
      flex: 1;
      min-width: 0;
    }

  .guardian-selected-card,
    .guardian-readonly-card {
      grid-template-columns: 46px minmax(0, 1fr);
    }

  .guardian-selected-card .secondary-button,
    .guardian-readonly-card .state {
      grid-column: 1 / -1;
    }

}

.panel,
.detail-lists,
.table-wrap,
.organization-workspace {
  max-width: 100%;
  box-sizing: border-box;
}

.organizations-panel,
.schools-panel,
.students-panel,
.users-panel,
.drivers-panel,
.fleet-panel,
.trips-panel {
  overflow: hidden;
}

.organization-toolbar,
.detail-toolbar,
.management-tools,
.detail-list-tools {
  border-radius: 0;
}

.dark-theme .organization-toolbar,
.dark-theme .detail-toolbar,
.dark-theme .management-tools,
.dark-theme .detail-list-tools,
.dark-theme .panel-header {
  border-color: rgba(191, 214, 197, .13);
  background: rgba(15, 31, 20, .9);
}

.dark-theme .organization-toolbar .search-box,
.dark-theme .detail-toolbar .search-box,
.dark-theme .management-tools .search-box,
.dark-theme .organization-toolbar .filter-panel-toggle,
.dark-theme .detail-toolbar .filter-panel-toggle,
.dark-theme .management-tools .filter-panel-toggle {
  border-color: rgba(191, 214, 197, .16);
  color: #c6d8cc;
  background: rgba(24, 39, 29, .92);
}

.modal form > footer.student-create-footer,
.student-create-modal form > footer.student-create-footer {
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.student-create-footer .primary-button {
  margin-inline-end: 0;
}

.student-create-modal {
  contain: none;
}

.student-create-modal .sirb-dropdown.open {
  z-index: 760;
}

.student-create-modal .sirb-dropdown-menu {
  z-index: 1200;
}

.guardian-settings-grid {
  align-items: end;
}

.student-create-modal .guardian-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-create-modal .guardian-settings-grid sirb-dropdown:only-child {
  grid-column: 1 / 2;
}

.student-guardian-mode-switch button,
.relation-mode-switch button,
.student-support-choice {
  position: relative;
  border-color: var(--sirb-border);
  color: var(--sirb-text-soft);
  background: color-mix(in srgb, var(--sirb-bg-elevated) 88%, var(--sirb-surface-muted));
}

.student-guardian-mode-switch button:not(.active):hover,
.relation-mode-switch button:not(.active):hover,
.student-support-choice:not(.active):hover {
  border-color: color-mix(in srgb, var(--sirb-brand) 24%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-brand-soft) 24%, var(--sirb-bg-elevated));
}

.student-guardian-mode-switch button.active,
.relation-mode-switch button.active,
.student-support-choice.active {
  border-color: color-mix(in srgb, var(--sirb-brand) 76%, var(--sirb-border));
  color: var(--sirb-text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--sirb-brand-soft) 84%, var(--sirb-bg-elevated)), color-mix(in srgb, var(--sirb-brand-soft) 58%, var(--sirb-bg-elevated)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sirb-brand) 30%, transparent);
}

.student-guardian-mode-switch button.active::after,
.relation-mode-switch button.active::after,
.student-support-choice.active::after {
  content: 'check';
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--sirb-brand);
  font-family: 'Material Symbols Rounded';
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.student-guardian-mode-switch button.active > .material-symbols-rounded,
.relation-mode-switch button.active > .material-symbols-rounded,
.student-support-choice.active > .material-symbols-rounded,
.student-create-step-heading > .material-symbols-rounded,
.guardian-mode-heading > .material-symbols-rounded,
.student-review-section > header > .material-symbols-rounded,
.student-review-screen .modal-icon {
  color: #fff;
  background: var(--sirb-brand);
  box-shadow: none;
}

.student-support-choice > .material-symbols-rounded,
.student-create-note > .material-symbols-rounded,
.student-review-status > .material-symbols-rounded,
.student-review-empty > .material-symbols-rounded {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--sirb-brand);
  font-size: 20px;
  line-height: 1;
  box-shadow: none;
}

.student-create-note.compact > .material-symbols-rounded {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 19px;
}

.student-review-status,
.student-create-note.success,
.student-review-hero {
  border-color: color-mix(in srgb, var(--sirb-brand) 42%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-brand-soft) 66%, var(--sirb-bg-elevated));
}

.student-review-status {
  min-height: 40px;
  padding: 0 14px;
  color: var(--sirb-brand-hover);
  font-size: 14px;
  font-weight: 800;
}

.student-create-footer .student-skip-button {
  color: #7a5708;
  border-color: color-mix(in srgb, #b98005 44%, var(--sirb-border));
  background: color-mix(in srgb, #fff0bf 74%, var(--sirb-bg-elevated));
}

.student-create-footer .student-skip-button .material-symbols-rounded {
  color: currentColor;
}

.dark-theme .student-create-footer .student-skip-button {
  color: #f4d474;
  border-color: rgba(244, 212, 116, .38);
  background: rgba(67, 54, 17, .72);
}

.dark-theme .student-guardian-mode-switch button,
.dark-theme .relation-mode-switch button,
.dark-theme .student-support-choice {
  border-color: rgba(191, 214, 197, .16);
  color: #a8bbae;
  background: rgba(18, 31, 22, .72);
}

.dark-theme .student-guardian-mode-switch button.active,
.dark-theme .relation-mode-switch button.active,
.dark-theme .student-support-choice.active {
  border-color: rgba(25, 176, 0, .78);
  color: #effaf1;
  background: rgba(21, 67, 28, .72);
  box-shadow: inset 0 0 0 1px rgba(25, 176, 0, .28);
}

.dark-theme .student-review-status,
.dark-theme .student-create-note.success,
.dark-theme .student-review-hero {
  border-color: rgba(25, 176, 0, .5);
  background: rgba(20, 58, 27, .64);
}

.dark-theme .student-review-guardian > header .guardian-number,
.dark-theme .student-review-guardian > header em {
  color: #dff8e3;
  background: rgba(25, 176, 0, .24);
  border: 1px solid rgba(91, 238, 82, .34);
  box-shadow: none;
}

.dark-theme .student-review-guardian > header .guardian-number {
  font-size: 13px;
  font-weight: 800;
}

.dark-theme .student-review-guardian > header em {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
}

.dark-theme .student-review-guardian > header small,
.dark-theme .student-review-details dt,
.dark-theme .student-review-section > header small,
.dark-theme .student-review-hero p {
  color: #abc2b2;
}

.dark-theme .student-review-guardian > header strong,
.dark-theme .student-review-details dd,
.dark-theme .student-review-section > header strong {
  color: #f0faf2;
}

.dark-theme .student-review-details div,
.dark-theme .student-review-guardian {
  border-color: rgba(191, 214, 197, .16);
  background: rgba(13, 27, 18, .42);
}

@media (max-width: 700px) {
  .student-create-modal .guardian-settings-grid {
      grid-template-columns: 1fr;
    }

  .student-create-modal .guardian-settings-grid sirb-dropdown:only-child {
      grid-column: auto;
    }

}

.trip-scheduler-modal {
  width: min(940px, calc(100vw - 48px));
}

.trip-scheduler-modal form {
  gap: 18px;
}

.trip-modal-section {
  padding: 20px;
  border-color: var(--sirb-border);
  border-radius: 24px;
  background: color-mix(in srgb, var(--sirb-bg-elevated) 84%, var(--sirb-surface-muted));
}

.trip-modal-section > header {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sirb-border);
}

.trip-modal-section > header .material-symbols-rounded,
.trip-scheduler-note > .material-symbols-rounded {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--sirb-brand);
  box-shadow: none;
}

.trip-modal-section strong,
.trip-scheduler-note strong {
  color: var(--sirb-text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.trip-modal-section small,
.trip-scheduler-note p {
  color: var(--sirb-muted);
  font-size: 14px;
  font-weight: 700;
}

.trip-scheduler-modal .form-row {
  align-items: end;
  gap: 18px;
}

.trip-schedule-main-row {
  align-items: end;
}

.trip-schedule-main-row .sirb-dropdown-trigger,
.schedule-time-field {
  min-height: 58px;
}

.schedule-time-field {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 16px;
  border-color: var(--sirb-border);
  border-radius: 20px;
  color: var(--sirb-text);
  background: color-mix(in srgb, var(--sirb-bg-elevated) 88%, var(--sirb-surface-muted));
  box-shadow: none;
}

.schedule-time-field:hover {
  border-color: color-mix(in srgb, var(--sirb-brand) 28%, var(--sirb-border));
  box-shadow: none;
}

.schedule-time-field:focus-within {
  border-color: color-mix(in srgb, var(--sirb-brand) 54%, var(--sirb-border));
  background: var(--sirb-bg-elevated);
  box-shadow: var(--sirb-focus);
}

.schedule-time-field.field-invalid {
  border-color: color-mix(in srgb, var(--sirb-danger) 48%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-danger) 6%, var(--sirb-bg-elevated));
  box-shadow: none;
}

.schedule-time-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--sirb-brand);
  background: var(--sirb-brand-soft);
  font-size: 26px;
}

.schedule-time-copy {
  align-content: center;
  gap: 3px;
}

.schedule-time-copy small {
  color: var(--sirb-muted);
  font-size: 12px;
  font-weight: 800;
}

.schedule-time-copy input {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--sirb-text) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.trip-scheduler-modal .schedule-time-copy input,
.trip-scheduler-modal .schedule-time-copy input:focus,
.trip-scheduler-modal .schedule-time-copy input:hover {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.trip-schedule-main-row .sirb-dropdown-trigger {
  min-height: 70px;
}

.trip-schedule-main-row .schedule-time-field {
  min-height: 70px;
}

.trip-schedule-main-row .sirb-dropdown-trigger {
  border-radius: 18px;
}

.weekday-selector {
  border-color: var(--sirb-border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--sirb-bg-elevated) 72%, var(--sirb-surface-muted));
}

.weekday-selector-header small {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--sirb-brand-hover);
  background: var(--sirb-brand-soft);
  font-weight: 800;
}

.dark-theme .trip-modal-section,
.dark-theme .weekday-selector {
  border-color: rgba(191, 214, 197, .16);
  background: rgba(20, 36, 25, .82);
}

.dark-theme .schedule-time-field {
  border-color: rgba(191, 214, 197, .16);
  color: var(--sirb-text);
  background: rgba(20, 36, 25, .82);
}

.dark-theme .schedule-time-field:hover {
  border-color: rgba(25, 176, 0, .38);
  box-shadow: none;
}

.dark-theme .schedule-time-field:focus-within {
  border-color: rgba(25, 176, 0, .58);
  background: rgba(23, 42, 29, .96);
  box-shadow: var(--sirb-focus);
}

.dark-theme .schedule-time-icon {
  color: #fff;
  background: var(--sirb-brand);
}

.dark-theme .schedule-time-copy input {
  color: var(--sirb-text);
  background: transparent;
}

@media (max-width: 700px) {
  .trip-scheduler-modal {
      width: min(100%, calc(100vw - 24px));
    }

  .trip-modal-section {
      padding: 16px;
    }

}

.organization-workspace > .organization-toolbar:first-child,
.organization-workspace > .management-tools:first-child,
.panel > .organization-toolbar:first-child,
.panel > .management-tools:first-child {
  border-top-left-radius: calc(var(--radius) - 1px);
  border-top-right-radius: calc(var(--radius) - 1px);
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  background-clip: padding-box;
}

.panel > .table-wrap:first-child,
.organizations-panel > .table-wrap:first-child,
.schools-panel > .table-wrap:first-child,
.students-panel > .table-wrap:first-child,
.users-panel > .table-wrap:first-child,
.drivers-panel > .table-wrap:first-child,
.fleet-panel > .table-wrap:first-child,
.trips-panel > .table-wrap:first-child {
  border-top-left-radius: calc(var(--radius) - 1px);
  border-top-right-radius: calc(var(--radius) - 1px);
  overflow: hidden;
  background-clip: padding-box;
}

.organization-workspace > .organization-toolbar:first-child + .table-wrap,
.organization-workspace > .organization-toolbar:first-child ~ .table-wrap,
.organization-workspace > .management-tools:first-child + .table-wrap,
.organization-workspace > .management-tools:first-child ~ .table-wrap,
.panel > .organization-toolbar:first-child + .table-wrap,
.panel > .organization-toolbar:first-child ~ .table-wrap,
.panel > .management-tools:first-child + .table-wrap,
.panel > .management-tools:first-child ~ .table-wrap {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.relation-modal .student-field,
.modal .student-field {
  align-content: start;
  align-self: start;
  grid-auto-rows: max-content;
  min-height: 0;
}

.relation-modal .student-field input,
.modal .student-field input {
  height: 56px;
}

.relation-modal .student-field .stable-error,
.modal .student-field .stable-error {
  min-height: 22px;
  align-items: center;
}

.student-edit-modal {
  width: min(980px, calc(100vw - 40px));
}

.student-edit-modal .student-create-body {
  padding: 28px 34px 28px;
}

.student-edit-modal .student-create-step {
  gap: 24px;
}

.student-edit-modal .student-create-step-heading {
  padding-bottom: 18px;
}

.student-edit-modal .student-form-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 22px;
  align-items: start;
}

.student-edit-modal .edit-name-field {
  grid-column: 1 / -1;
}

.student-edit-modal .edit-school-field,
.student-edit-modal .edit-grade-field,
.student-edit-modal .edit-section-field,
.student-edit-modal .edit-date-field,
.student-edit-modal .edit-number-field,
.student-edit-modal .edit-id-field {
  grid-column: span 2;
}

.student-edit-modal .student-field-spacer {
  display: none;
}

.student-edit-modal .student-support-panel {
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.student-edit-modal .student-support-choice-group {
  gap: 16px;
}

.student-edit-modal .student-support-choice {
  min-height: 76px;
  padding: 14px 16px;
  border-radius: 18px;
}

.student-edit-modal .student-support-choice > .material-symbols-rounded {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

.student-edit-modal .student-support-panel .student-form-grid {
  margin-top: 0;
}

.student-edit-modal .student-support-panel .student-field.full {
  grid-column: 1 / -1;
}

.dark-theme .student-edit-modal .student-support-panel {
  background: transparent;
}

@media (max-width: 980px) {
  .student-edit-modal .student-form-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

  .student-edit-modal .edit-school-field,
    .student-edit-modal .edit-grade-field,
    .student-edit-modal .edit-section-field,
    .student-edit-modal .edit-date-field,
    .student-edit-modal .edit-number-field,
    .student-edit-modal .edit-id-field {
      grid-column: span 1;
    }

}

@media (max-width: 700px) {
  .student-edit-modal .student-form-grid,
    .student-edit-modal .student-support-choice-group {
      grid-template-columns: 1fr;
    }

  .student-edit-modal .edit-school-field,
    .student-edit-modal .edit-grade-field,
    .student-edit-modal .edit-section-field,
    .student-edit-modal .edit-date-field,
    .student-edit-modal .edit-number-field,
    .student-edit-modal .edit-id-field {
      grid-column: 1 / -1;
    }

}

.primary-button,
.modal form > footer .primary-button,
.modal footer .primary-button,
.student-create-footer .primary-button,
.page-heading > .primary-button,
.topbar-actions > .primary-button,
.topbar-actions > .quick-actions-trigger {
  color: #fff;
  border: 1px solid var(--sirb-brand-solid);
  background: var(--sirb-brand-solid);
  box-shadow: 0 10px 22px rgba(18, 183, 0, .16);
  text-shadow: none;
}

.primary-button:hover,
.modal form > footer .primary-button:hover,
.modal footer .primary-button:hover,
.student-create-footer .primary-button:hover,
.page-heading > .primary-button:hover,
.topbar-actions > .primary-button:hover,
.topbar-actions > .quick-actions-trigger:hover,
.topbar-actions > .quick-actions-trigger.active {
  color: #fff;
  border-color: var(--sirb-brand-solid-hover);
  background: var(--sirb-brand-solid-hover);
  box-shadow: 0 12px 26px rgba(18, 183, 0, .2);
  transform: translateY(-1px);
}

.primary-button:active,
.modal form > footer .primary-button:active,
.modal footer .primary-button:active,
.student-create-footer .primary-button:active {
  background: var(--sirb-brand-solid-active);
  box-shadow: 0 7px 16px rgba(18, 183, 0, .18);
  transform: translateY(0);
}

.panel,
.organization-workspace,
.detail-lists,
.table-wrap {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.panel,
.organization-workspace,
.detail-lists {
  overflow: hidden;
}

.organization-toolbar,
.detail-toolbar,
.management-tools,
.detail-list-tools {
  border-color: var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-surface-solid) 88%, var(--sirb-surface-muted));
}

.organization-workspace > .organization-toolbar:first-child,
.organization-workspace > .management-tools:first-child,
.panel > .organization-toolbar:first-child,
.panel > .management-tools:first-child {
  border-top-left-radius: calc(var(--sirb-radius-lg) - 1px);
  border-top-right-radius: calc(var(--sirb-radius-lg) - 1px);
}

.organization-workspace > .organization-toolbar:first-child + .table-wrap,
.organization-workspace > .organization-toolbar:first-child ~ .table-wrap,
.organization-workspace > .management-tools:first-child + .table-wrap,
.organization-workspace > .management-tools:first-child ~ .table-wrap,
.panel > .organization-toolbar:first-child + .table-wrap,
.panel > .organization-toolbar:first-child ~ .table-wrap,
.panel > .management-tools:first-child + .table-wrap,
.panel > .management-tools:first-child ~ .table-wrap {
  border-top-width: 0;
}

.org-monogram,
.hero-monogram,
.student-monogram,
.driver-monogram,
.avatar,
.relation-person .student-monogram,
.guardian-readonly-card .student-monogram,
.guardian-selected-card .student-monogram,
.guardian-candidate-list .student-monogram,
.roster-candidate-list .student-monogram {
  color: #087200;
  background: #d9f9dc;
  box-shadow: inset 0 0 0 1px rgba(18, 183, 0, .08);
  font-weight: 950;
}

.dark-theme .org-monogram,
.dark-theme .hero-monogram,
.dark-theme .student-monogram,
.dark-theme .driver-monogram,
.dark-theme .avatar,
.dark-theme .relation-person .student-monogram,
.dark-theme .guardian-readonly-card .student-monogram,
.dark-theme .guardian-selected-card .student-monogram,
.dark-theme .guardian-candidate-list .student-monogram,
.dark-theme .roster-candidate-list .student-monogram {
  color: #caffc6;
  background: rgba(34, 201, 24, .22);
  box-shadow: inset 0 0 0 1px rgba(126, 244, 118, .22);
}

.modal,
.student-create-modal,
.relation-modal,
.school-grade-modal,
.trip-scheduler-modal,
.roster-modal,
.school-access-modal,
.driver-modal {
  overflow: hidden;
}

.modal form,
.relation-modal form,
.school-grade-modal form,
.trip-scheduler-modal form,
.roster-modal form {
  max-width: 100%;
  box-sizing: border-box;
}

.modal form > footer,
.modal footer,
.student-create-footer,
.relation-modal footer,
.school-grade-modal footer,
.roster-modal footer {
  border-color: var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-surface-solid) 90%, var(--sirb-surface-muted));
}

.modal form > footer,
.student-create-modal form > footer.student-create-footer {
  width: auto;
  margin-inline: -28px;
  padding-inline: 28px;
  overflow-x: clip;
}

.student-create-footer .primary-button {
  margin-inline-end: 0;
}

.student-guardian-mode-switch button.active,
.relation-mode-switch button.active,
.student-support-choice.active {
  border-color: color-mix(in srgb, var(--sirb-brand-solid) 60%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-brand-soft) 72%, var(--sirb-control-bg));
}

.student-guardian-mode-switch button:not(.active),
.relation-mode-switch button:not(.active),
.student-support-choice:not(.active) {
  border-color: var(--sirb-border);
  background: var(--sirb-control-bg);
  box-shadow: none;
}

.student-create-note,
.student-review-section,
.guardian-form-card,
.guardian-candidate-panel,
.student-guardian-candidate-panel,
.student-support-panel {
  border-color: var(--sirb-border);
  background: color-mix(in srgb, var(--sirb-surface-solid) 82%, transparent);
}

.dark-theme .table-wrap,
.dark-theme .organization-toolbar,
.dark-theme .detail-toolbar,
.dark-theme .management-tools,
.dark-theme .detail-list-tools,
.dark-theme .modal form > footer,
.dark-theme .modal footer,
.dark-theme .student-create-footer,
.dark-theme .relation-modal footer,
.dark-theme .school-grade-modal footer,
.dark-theme .roster-modal footer,
.dark-theme .relation-confirm-modal > footer,
.dark-theme .confirm-modal > footer,
.dark-theme .status-modal footer {
  border-color: var(--sirb-border);
  background: rgba(15, 28, 19, .94);
}

@media (max-width: 760px) {
  .modal form > footer,
    .student-create-modal form > footer.student-create-footer {
      margin-inline: -20px;
      padding-inline: 20px;
    }

}

.organization-workspace {
  max-width: 100%;
  overflow: hidden;
}

.organization-toolbar,
.detail-lists .organization-toolbar,
.management-tools,
.detail-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.organization-toolbar {
  min-height: 88px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--sirb-border);
}

.detail-lists .organization-toolbar,
.detail-list-tools {
  min-height: 76px;
}

.organization-search,
.organization-toolbar .filter-search,
.management-tools .filter-search,
.detail-list-tools .filter-search {
  flex: 1 1 420px;
  width: min(100%, 420px);
  max-width: 460px;
  min-width: 260px;
}

.organization-toolbar .filter-panel-toggle,
.management-tools .filter-panel-toggle,
.detail-list-tools .filter-panel-toggle {
  flex: 0 0 auto;
  width: auto;
  min-width: 136px;
}

.organization-workspace > .table-wrap,
.panel > .table-wrap,
.detail-lists > section > .table-wrap,
.detail-lists > div > .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.organizations-table,
.schools-table,
.drivers-table,
.trips-table,
.students-table,
.student-detail-table,
.student-relation-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
}

.organizations-table th:first-child,
.organizations-table td:first-child {
  width: 30%;
}

.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) {
  min-width: 1180px;
}

.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) th:nth-child(1),
.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) td:nth-child(1) {
  width: 340px;
}

.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) th:nth-child(2),
.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) td:nth-child(2) {
  width: 200px;
}

.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) th:nth-child(3),
.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) td:nth-child(3) {
  width: 140px;
}

.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) th:nth-child(4),
.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) td:nth-child(4),
.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) th:nth-child(5),
.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) td:nth-child(5) {
  width: 120px;
}

.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) th:nth-child(6),
.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) td:nth-child(6) {
  width: 125px;
}

.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) th:nth-child(7),
.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) td:nth-child(7) {
  width: 170px;
}

.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) th:nth-child(8),
.organization-workspace > .table-wrap > .organizations-table:not(.schools-table):not(.users-table):not(.invitations-table) td:nth-child(8) {
  width: 135px;
}

.drivers-table th:first-child,
.drivers-table td:first-child {
  width: 24%;
}

.drivers-table th:nth-child(2),
.drivers-table td:nth-child(2) {
  width: 18%;
}

.drivers-table th:nth-child(3),
.drivers-table td:nth-child(3),
.drivers-table th:nth-child(4),
.drivers-table td:nth-child(4) {
  width: 16%;
}

.drivers-table th:last-child,
.drivers-table td:last-child,
.organizations-table th:last-child,
.organizations-table td:last-child,
.schools-table th:last-child,
.schools-table td:last-child,
.trips-table th:last-child,
.trips-table td:last-child,
.students-table th:last-child,
.students-table td:last-child,
.student-detail-table th:last-child,
.student-detail-table td:last-child,
.student-relation-table th:last-child,
.student-relation-table td:last-child {
  width: 88px;
  padding-inline-start: 14px;
  padding-inline-end: 22px;
  text-align: center;
}

.organizations-table td:last-child .row-action,
.schools-table td:last-child .row-action,
.drivers-table td:last-child .row-action,
.trips-table td:last-child .row-action,
.students-table td:last-child .row-action,
.student-detail-table td:last-child .row-action,
.student-relation-table td:last-child .row-action {
  margin-inline: auto;
}

.org-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
  color: var(--sirb-text);
  text-decoration: none;
}

.org-link > span:last-child {
  display: grid;
  min-width: 0;
}

.org-link strong,
.org-link small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-link strong {
  color: var(--sirb-text);
  font-size: 15px;
  font-weight: 950;
}

.org-link small {
  max-width: 260px;
  color: var(--sirb-muted);
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .organization-toolbar,
  .detail-lists .organization-toolbar,
  .management-tools,
  .detail-list-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .organization-search,
  .organization-toolbar .filter-search,
  .management-tools .filter-search,
  .detail-list-tools .filter-search,
  .organization-toolbar .filter-panel-toggle,
  .management-tools .filter-panel-toggle,
  .detail-list-tools .filter-panel-toggle {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}

.floating-filter-panel {
  position: fixed !important;
  z-index: 260;
  width: min(460px, calc(100vw - 24px));
  max-height: min(720px, calc(100dvh - 24px));
  overflow: auto;
  overscroll-behavior: contain;
}

.floating-filter-panel.trip-filter-panel,
.floating-filter-panel.student-filter-panel {
  width: min(540px, calc(100vw - 24px));
}

.filter-panel .filter-grid {
  display: grid;
  gap: 14px;
  padding: 18px 22px;
}

.filter-panel .filter-grid > *,
.filter-panel sirb-dropdown {
  display: block;
  min-width: 0;
}

.filter-panel .sirb-dropdown-trigger {
  min-height: 58px;
  border-width: 1px;
  box-shadow: none;
}

.filter-panel .sirb-dropdown.open .sirb-dropdown-trigger,
.filter-panel .sirb-dropdown-trigger:hover,
.filter-panel .sirb-dropdown-trigger:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sirb-brand-soft) 48%, transparent);
}

.filter-panel-toggle,
.organization-toolbar .filter-panel-toggle,
.management-tools .filter-panel-toggle,
.detail-list-tools .filter-panel-toggle {
  min-width: 126px;
  min-height: 48px;
  gap: 8px;
  border: 1px solid var(--sirb-border);
  border-radius: 15px;
  color: var(--sirb-text-soft);
  background: color-mix(in srgb, var(--sirb-surface-solid) 78%, transparent);
  box-shadow: none !important;
  outline: 0;
  transform: none;
}

.filter-panel-toggle:hover,
.filter-panel-toggle.active,
.filter-panel-toggle:focus-visible {
  color: var(--sirb-brand-hover);
  border-color: color-mix(in srgb, var(--sirb-brand-solid) 34%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-brand-soft) 48%, var(--sirb-surface-solid));
  box-shadow: none !important;
  outline: 0;
  transform: none;
}

.filter-panel-toggle .material-symbols-rounded {
  flex: 0 0 auto;
  font-size: 21px;
  line-height: 1;
}

.filter-panel-toggle .chevron {
  margin-inline-start: 2px;
  font-size: 19px;
}

.pagination {
  min-height: 74px;
}

.pagination > div {
  gap: 12px;
}

.pagination button {
  min-width: 96px;
  min-height: 44px;
  border: 1px solid var(--sirb-border);
  border-radius: 14px;
  color: var(--sirb-text-soft);
  background: color-mix(in srgb, var(--sirb-surface-solid) 68%, transparent);
  box-shadow: none !important;
  opacity: 1;
}

.pagination button:not(:disabled):hover {
  color: var(--sirb-brand-hover);
  border-color: color-mix(in srgb, var(--sirb-brand-solid) 28%, var(--sirb-border));
  background: color-mix(in srgb, var(--sirb-brand-soft) 42%, var(--sirb-surface-solid));
  box-shadow: none !important;
}

.pagination button:disabled {
  color: color-mix(in srgb, var(--sirb-muted) 76%, transparent);
  border-color: color-mix(in srgb, var(--sirb-border) 64%, transparent);
  background: color-mix(in srgb, var(--sirb-surface-solid) 42%, transparent);
  box-shadow: none !important;
  cursor: default;
}

.pagination button .material-symbols-rounded {
  font-size: 20px;
}

.detail-tabs button {
  min-height: 50px;
  gap: 7px;
  padding-inline: 16px;
}

.detail-tabs button > .material-symbols-rounded {
  flex: 0 0 auto;
  margin: 0;
  font-size: 23px;
}

.detail-tabs button b {
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  margin-inline-start: 4px;
  padding-inline: 8px;
  font-size: 11px;
}

.filter-panel-toggle,
.organization-toolbar .filter-panel-toggle,
.management-tools .filter-panel-toggle,
.detail-list-tools .filter-panel-toggle {
  gap: 12px;
}

.filter-panel-toggle .material-symbols-rounded:first-child {
  margin-inline-end: 2px;
}

.filter-panel-toggle .chevron {
  margin-inline-start: 4px;
}

.filter-panel .sirb-dropdown-menu {
  z-index: 10060;
}

.sirb-dropdown-menu {
  z-index: 10060;
}

.primary-button,
.modal form > footer .primary-button,
.modal footer .primary-button,
.student-create-footer .primary-button,
.page-heading > .primary-button,
.topbar-actions > .primary-button,
.topbar-actions > .quick-actions-trigger {
  color: #fff;
  border-color: var(--sirb-brand-solid);
  background: var(--sirb-brand-solid);
  box-shadow: none !important;
  transform: none;
}

.primary-button:hover,
.modal form > footer .primary-button:hover,
.modal footer .primary-button:hover,
.student-create-footer .primary-button:hover,
.page-heading > .primary-button:hover,
.topbar-actions > .primary-button:hover,
.topbar-actions > .quick-actions-trigger:hover,
.topbar-actions > .quick-actions-trigger.active {
  color: #fff;
  border-color: var(--sirb-brand-solid-hover);
  background: var(--sirb-brand-solid-hover);
  box-shadow: none !important;
  transform: none;
}

.primary-button:active,
.modal form > footer .primary-button:active,
.modal footer .primary-button:active,
.student-create-footer .primary-button:active,
.page-heading > .primary-button:active,
.topbar-actions > .primary-button:active,
.topbar-actions > .quick-actions-trigger:active {
  border-color: var(--sirb-brand-solid-active);
  background: var(--sirb-brand-solid-active);
  box-shadow: none !important;
  transform: none;
}

.detail-lists .detail-list-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 18px;
}

.detail-lists .detail-list-heading > div,
.detail-lists .detail-list-heading > h2,
.detail-lists .detail-list-heading > p {
  grid-column: 1;
  min-width: 0;
}

.detail-lists .detail-list-heading h2 {
  margin: 0;
}

.detail-lists .detail-list-heading p {
  margin: 8px 0 0;
}

.detail-lists .detail-list-heading > .primary-button,
.detail-lists .detail-list-heading > .secondary-button,
.detail-lists .detail-list-heading > .detail-add-button {
  grid-column: 2;
  grid-row: 1;
  align-self: start !important;
  justify-self: end;
  margin: 0 !important;
  margin-block-start: 0 !important;
}

@media (max-width: 760px) {
  .detail-lists .detail-list-heading {
    grid-template-columns: 1fr;
  }

  .detail-lists .detail-list-heading > .primary-button,
  .detail-lists .detail-list-heading > .secondary-button,
  .detail-lists .detail-list-heading > .detail-add-button {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
  }
}

.organization-workspace > .table-wrap > .schools-table {
  min-width: 1360px;
}

.organization-workspace > .table-wrap > .schools-table th:nth-child(1),
.organization-workspace > .table-wrap > .schools-table td:nth-child(1) {
  width: 320px;
}

.organization-workspace > .table-wrap > .schools-table th:nth-child(2),
.organization-workspace > .table-wrap > .schools-table td:nth-child(2) {
  width: 240px;
}

.organization-workspace > .table-wrap > .schools-table th:nth-child(3),
.organization-workspace > .table-wrap > .schools-table td:nth-child(3),
.organization-workspace > .table-wrap > .schools-table th:nth-child(4),
.organization-workspace > .table-wrap > .schools-table td:nth-child(4),
.organization-workspace > .table-wrap > .schools-table th:nth-child(5),
.organization-workspace > .table-wrap > .schools-table td:nth-child(5) {
  width: 110px;
}

.organization-workspace > .table-wrap > .schools-table th:nth-child(6),
.organization-workspace > .table-wrap > .schools-table td:nth-child(6) {
  width: 230px;
}

.organization-workspace > .table-wrap > .schools-table th:nth-child(7),
.organization-workspace > .table-wrap > .schools-table td:nth-child(7) {
  width: 180px;
}

.organization-workspace > .table-wrap > .schools-table th:nth-child(8),
.organization-workspace > .table-wrap > .schools-table td:nth-child(8) {
  width: 150px;
  padding-inline-end: 22px;
  text-align: center;
}

.organization-workspace > .table-wrap > .schools-table .state,
.organization-workspace > .table-wrap > .schools-table .date-chip-small {
  max-width: 100%;
  white-space: nowrap;
}

.filter-panel-toggle,
.organization-toolbar .filter-panel-toggle,
.management-tools .filter-panel-toggle,
.detail-list-tools .filter-panel-toggle {
  column-gap: 12px;
}

.filter-panel-toggle .material-symbols-rounded:first-child {
  margin-inline-end: 4px;
}

.organization-workspace > .table-wrap > .students-table .student-col-actions {
  width: 96px;
}

.organization-workspace > .table-wrap > .students-table th:last-child,
.organization-workspace > .table-wrap > .students-table td:last-child {
  width: 96px;
  padding-inline: 22px 28px;
  text-align: center;
}

.organization-workspace > .table-wrap > .students-table td:last-child .row-action {
  margin-inline: auto;
}

.detail-lists > section > .table-wrap > .student-relation-table th:last-child,
.detail-lists > section > .table-wrap > .student-relation-table td:last-child {
  width: 156px;
  padding-inline: 22px 28px;
  text-align: center;
}

.detail-lists > section > .table-wrap > .student-relation-table .relation-actions {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.filter-panel-toggle .filter-panel-label {
  display: inline-flex;
  margin-inline: 8px 2px;
  white-space: nowrap;
}

.filter-panel-toggle > .material-symbols-rounded:first-child {
  margin-inline-end: 8px !important;
}

.relation-confirm-modal > footer,
.confirm-modal > footer,
.status-modal footer {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin-inline: 0 !important;
  padding-inline: clamp(22px, 2.3vw, 34px) !important;
  overflow: hidden;
}

.modal form > footer .primary-button,
.modal form > footer .secondary-button {
  flex: 0 1 auto;
  max-width: 100%;
}

.modal form > footer:not(.student-create-footer) {
  box-sizing: border-box;
  width: auto;
  max-width: none;
  margin-inline: -28px !important;
  padding-inline: 28px !important;
  overflow-x: clip;
  overflow-y: visible;
  justify-content: flex-end;
}

[dir="rtl"] .modal form > footer:not(.student-create-footer) {
  justify-content: flex-start;
}

[dir="rtl"] .modal form > footer:not(.student-create-footer) .primary-button {
  order: -1;
}

.detail-tabs button b {
  display: inline-grid !important;
  flex: 0 0 auto;
  width: auto;
  min-width: 30px;
  height: 26px;
  min-height: 26px;
  place-items: center;
  align-self: center;
  margin-inline-start: 6px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--sirb-brand-solid) 26%, var(--sirb-border));
  border-radius: 10px;
  color: var(--sirb-brand-hover);
  background: color-mix(in srgb, var(--sirb-brand-soft) 58%, var(--sirb-surface-solid));
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}

.detail-tabs button.active b {
  color: #fff;
  border-color: var(--sirb-brand-hover);
  background: var(--sirb-brand-hover);
}

.dark-theme .detail-tabs button b {
  color: #b8dcc0;
  border-color: rgba(184, 220, 192, .18);
  background: rgba(184, 220, 192, .08);
}

.dark-theme .detail-tabs button.active b {
  color: #052108;
  border-color: #86f17c;
  background: #86f17c;
}

.school-grade-section-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(120px, .5fr) 64px;
  align-items: end;
  gap: 12px;
}

.school-grade-section-row > .icon-button.small.danger {
  align-self: end;
  justify-self: stretch;
  width: 100%;
  height: 58px;
  min-height: 58px;
  margin: 0;
  border-radius: 16px;
}

@media (max-width: 900px) {
  .school-grade-section-row {
    grid-template-columns: 1fr;
  }

  .school-grade-section-row > .icon-button.small.danger {
    justify-self: end;
    width: 58px;
  }
}

/* Page-specific legacy selectors retained during the CSS split. */
.legend-current {
  background: var(--brand);
}

.legend-previous {
  background: #dce5dd;
}

.radial-wrap {
  display: grid;
  place-items: center;
  padding: 20px 0 16px;
}

.radial {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--brand) 0 96%, #e8eee9 96% 100%);
}

.radial::before {
  content: '';
  grid-area: 1/1;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--surface);
}

.radial div {
  z-index: 1;
  grid-area: 1/1;
  text-align: center;
}

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

.radial strong {
  font-size: 20px;
  direction: ltr;
}

.radial span {
  color: var(--muted);
  font-size: 11px;
}

.dot {
  width: 5px;
  height: 5px;
  margin-top: 4px;
  border-radius: 50%;
}

.dot.green {
  background: var(--brand);
}

.dot.orange {
  background: #f59e0b;
}

.dot.red {
  background: #ef4444;
}

.not-found-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, .7fr) minmax(0, 1fr);
  gap: 28px;
  min-height: 470px;
  padding: 42px;
  overflow: hidden;
  align-items: center;
  background:
    radial-gradient(circle at 18% 20%, rgba(25, 176, 0, .12), transparent 30%),
    var(--surface);
}

.not-found-card::after {
  content: '';
  position: absolute;
  inset-inline-end: -120px;
  bottom: -150px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(25, 176, 0, .12);
  border-radius: 50%;
  pointer-events: none;
}

.not-found-art {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
}

.not-found-code {
  color: color-mix(in srgb, var(--brand) 22%, transparent);
  font-size: clamp(86px, 13vw, 168px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.08em;
}

.not-found-orbit {
  position: absolute;
  width: min(240px, 48vw);
  aspect-ratio: 1;
  border: 1px dashed rgba(25, 176, 0, .28);
  border-radius: 50%;
  animation: notFoundOrbit 15s linear infinite;
}

.not-found-orbit::before {
  content: '';
  position: absolute;
  top: 17px;
  inset-inline-start: 34px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 8px rgba(25, 176, 0, .1);
}

.not-found-icon {
  position: absolute;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 22px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  box-shadow: 0 18px 42px rgba(25, 176, 0, .16);
  font-size: 38px;
}

.not-found-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.not-found-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.15;
  letter-spacing: -.05em;
}

.not-found-copy p {
  max-width: 540px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 760px) {
  .not-found-card {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
    padding: 28px 20px;
    text-align: center;
  }

  .not-found-art {
    min-height: 190px;
  }

  .not-found-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 31px;
  }

  .not-found-copy p {
    margin-inline: auto;
    font-size: 14px;
  }

  .not-found-actions {
    justify-content: center;
  }
}

@keyframes notFoundOrbit {
  to {
    transform: rotate(360deg);
  }
}

/* Authoritative trip-plan dialog viewport containment. */
section.modal.school-modal.trip-scheduler-modal {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(940px, calc(100vw - 32px)) !important;
  max-width: 940px;
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - 32px) !important;
  padding: 0;
  overflow: hidden;
}

section.modal.trip-scheduler-modal > header {
  flex: 0 0 auto;
}

section.modal.trip-scheduler-modal > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  max-height: none !important;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

section.modal.trip-scheduler-modal > form > footer {
  position: sticky;
  inset-block-end: 0;
  z-index: 6;
  flex: 0 0 auto;
  margin-top: 0;
}

@media (max-width: 720px) {
  section.modal.school-modal.trip-scheduler-modal {
    width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
  }
}
