/*
 * Component-level overrides for the values the purchased theme hardcoded
 * instead of reading from --bs-* (bootstrap-extended.css, sidebar-layout.css
 * define these with literal hex, so setting the variable in design-tokens.css
 * alone does not reach them). Scoped to the component families the 43
 * designed screens use: buttons, cards, badges, tables, sidebar, toasts,
 * pagination, dropdowns. Load after design-tokens.css.
 *
 * Full rationale: backend/docs/design-tokens.md
 */

/* Buttons — Figma uses an 8px radius for buttons, not the 6px default */
.btn {
    --bs-btn-border-radius: var(--bs-border-radius-lg);
}
.btn-primary,
.btn-primary:hover,
.btn-check:active + .btn-primary,
.btn-check:checked + .btn-primary,
.btn-primary.active,
.btn-primary:active,
.btn-primary.disabled,
.btn-primary:disabled,
.show > .btn-primary.dropdown-toggle {
    color: var(--dn-primary-fg);
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-check:focus + .btn-primary,
.btn-primary:focus,
.btn-check:active + .btn-primary:focus,
.btn-check:checked + .btn-primary:focus,
.btn-primary.active:focus,
.btn-primary:active:focus,
.show > .btn-primary.dropdown-toggle:focus {
    color: var(--dn-primary-fg);
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.5);
}
.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-outline-primary:hover,
.btn-check:active + .btn-outline-primary,
.btn-check:checked + .btn-outline-primary,
.btn-outline-primary.active,
.btn-outline-primary.dropdown-toggle.show,
.btn-outline-primary:active {
    color: var(--dn-primary-fg);
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-outline-primary.disabled,
.btn-outline-primary:disabled {
    color: var(--bs-primary);
}

/* Cards / typography inside cards — .card's background and radius already
   read --bs-body-bg / --bs-border-radius from design-tokens.css; its border
   is separately forced to 0/transparent by bootstrap-extended.css's own
   .card{border:0 solid transparent} (and every card on the dashboard also
   carries .border-0), so --bs-border-color-translucent never actually
   paints a border either way — no override needed for any of the three.
   .text-muted is re-pointed here because bootstrap-extended.css hardcodes it
   to #6c757d, overriding bootstrap.min.css's own var(--bs-secondary-color). */
.text-muted {
    color: var(--bs-secondary-color) !important;
}
.shadow-sm {
    box-shadow: var(--bs-box-shadow-sm) !important;
}
/* Measured card chrome (1px border, ~12px radius), applied LOCALLY to the two
   client-profile cards only — --bs-border-radius stays untouched, it drives every
   card/button/input in the panel including #220's screens. */
.dn-card-bordered {
    border: 1px solid var(--dn-border-faint);
    border-radius: 12px;
}

/* WHY these two colours cannot ride on an SVG presentation attribute or on
   currentColor: var() is not substituted inside stroke="...", and app.css:36
   sets body{color:#b7c532}, so an inherited currentColor would paint the glyph
   olive. Same two values the icon-*.svg exports carry. */
.dn-glyph {
    stroke: var(--bs-body-color);
}
.dn-glyph-frame {
    stroke: var(--dn-border-faint);
}

/* Badges — status chip pattern (dark bg + bright text) used for Active / New
   enrollment badges; not the same slot as .text-bg-success (white text on
   the AJAX toast in layouts/super-admin.blade.php, the only .text-bg-success
   usage in this retheme's 5-screen reach), so kept as its own pair of
   --dn-* tokens rather than repointing --bs-success. */
.dn-status-success {
    background-color: var(--dn-badge-success-bg);
    color: var(--dn-badge-success-fg);
}
.dn-status-muted {
    background-color: var(--bs-secondary-bg-subtle);
    color: var(--bs-secondary-text-emphasis);
}
/* Inactive pill corrected to the measured mock, SCOPED to the client-profile screen
   only (resources/views/ad-clients/profile.blade.php) — .dn-status-muted above stays
   untouched so the ads landing (#220) and the super-admin dashboard keep the grey pill. */
.dn-status-danger {
    --dn-status-danger-bg: #7f1d1d;
    --dn-status-danger-fg: #fecaca;
    background-color: var(--dn-status-danger-bg);
    color: var(--dn-status-danger-fg);
}
/* Measured pill box (24px tall) — the vendor .badge px-3/py-2 utilities render taller. */
.dn-status-pill {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

/* success-alt toast (showToast variant option) — bg/border have no existing token, declared once here. */
.sa-toast-success-alt {
    --sa-toast-bg: #f9fbeb;
    --sa-toast-border: #8e966b;
    width: 402px;
    max-width: calc(100vw - 76px);
    background-color: var(--sa-toast-bg);
    border: 1px solid var(--sa-toast-border);
    border-radius: var(--bs-border-radius-lg);
}
.sa-toast-success-alt .toast-body {
    padding: 16px;
}
.sa-toast-success-alt .sa-toast-check {
    color: var(--bs-body-color);
    font-size: 1rem;
    line-height: 20px;
}
.sa-toast-success-alt .fw-bold {
    color: var(--bs-body-color);
    font-size: 0.875rem;
    line-height: 20px;
}
.sa-toast-success-alt .sa-toast-subtitle {
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    line-height: 20px;
}
.sa-toast-bottom-end {
    top: auto;
    bottom: 43px;
    right: 38px;
    left: auto;
}

/* Instructor review screen (school/instructors/review.blade.php) — fixed pixel circles
   Bootstrap's own utilities don't provide; colours stay on existing utility classes
   (bg-body-tertiary / bg-dark / text-white), so no new --dn-* token is declared here. */
.dn-avatar-circle {
    width: 64px;
    height: 64px;
    font-size: 1.1rem;
}
.dn-tile-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

/* Supervising Driver profile (school/supervising-drivers/profile.blade.php) — Progress
   column bar, drawn as two SVG rects instead of Bootstrap's .progress (which needs
   style="width:%" for a percentage fill, banned by the no-inline-style CSSOM test).
   --dn-border-strong was declared but had zero consumers before this. */
.dn-progress-track {
    fill: var(--dn-border-strong);
}
.dn-progress-fill {
    fill: var(--bs-body-color);
}

/* Supervising Drivers list (school/supervising-drivers/index.blade.php) — the search
   box's width. Bootstrap's .form-control declares width:100%, which resolves against a
   shrink-to-fit form and leaves the input at its intrinsic 193px box, clipping the
   longest placeholder of the four list screens, "Search Supervising Drivers". 320px is
   the width the Figma frame draws for this box. */
.dn-search-field {
    width: 320px;
}

/* Tables — .table itself already reads --bs-border-color / --bs-body-color /
   --bs-body-bg from design-tokens.css; no component-level override needed. */

/* Sidebar — sidebar-layout.css hardcodes every color; !important is required
   only where the vendor rule itself uses !important. */
.sidebar,
.sidebar-logo {
    background: var(--dn-sidebar-bg) !important;
}
.sidebar-section-label {
    color: var(--bs-secondary-color);
}
.sidebar-nav a,
.sidebar-nav button.sidebar-group-toggle,
.sidebar-submenu a {
    color: var(--dn-sidebar-fg);
}
.sidebar-nav a:hover,
.sidebar-nav button.sidebar-group-toggle:hover,
.sidebar-submenu a:hover {
    background: var(--dn-primary-200);
    color: var(--dn-sidebar-fg);
}
.sidebar-nav a.active {
    background: var(--bs-primary);
    color: var(--dn-sidebar-accent-fg);
}
.sidebar-user {
    border-top-color: var(--dn-border-faint);
}
.sidebar-user-avatar {
    background: var(--dn-primary-200);
    color: var(--dn-sidebar-accent-fg);
}
.sidebar-user-info .user-name {
    color: var(--dn-sidebar-fg);
}
.sidebar-user-info .user-email,
.sidebar-user-more {
    color: var(--bs-secondary-color);
}
.sidebar-user-more:hover {
    color: var(--dn-sidebar-fg);
}
.admin-shell,
.main-area {
    background: var(--bs-tertiary-bg);
}
.main-topbar {
    border-bottom-color: var(--bs-border-color);
}

/* Toasts — the default .text-bg-success variant still reads --bs-body-bg-rgb /
   --bs-border-color-translucent / --bs-secondary-color from design-tokens.css with no
   override needed; the success-alt variant does need one — see .sa-toast-success-alt
   beside the status badges above. */

/* Pagination — the active-page background/border is a literal in
   bootstrap.min.css itself (`.active>.page-link,.page-link.active{
   background-color:#b7c532;border-color:#b7c532}`, the vendor's own
   near-lime, not Bootstrap's stock blue) that never reads
   --bs-pagination-active-bg, only the text color does — so the
   custom-property override alone is a silent no-op and the selector
   must be re-targeted directly. */
.pagination {
    --bs-pagination-active-color: var(--dn-primary-fg);
}
.active > .page-link,
.page-link.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* School dashboard (BE-BRIEF-035-002) — a screen with its own designed header
   (page-header-hidden) manages its own horizontal insets per child, matching
   the Figma "Right Container" (no left/right padding at the column level,
   only padding-bottom semantic/2xl). .main-content itself is never restyled,
   since 17 other screens still rely on its 24px inset — this is an additive
   modifier, applied only when page-header-hidden is set. */
.main-content--designed {
    padding: 0 0 32px;
}

/* This frame's KPI card is Fixed 352x150 with its own shadow-xs, not the
   flexible/wrap layout the eight GH #218 screens ship under the shared
   dn-kpi-row/dn-kpi-card rules below. Scoped under this screen's own
   main-content--designed wrapper rather than renamed or duplicated as a
   plain class — SchoolDashboardScreenTest asserts the literal bare
   class="dn-kpi-row"/"dn-kpi-card" markup, so the shared class names must
   stay exactly as they render today. dn-page-header, dn-kpi-data,
   dn-kpi-label, dn-kpi-value and dn-kpi-sub ARE the same measured typography
   as that kit, so this screen reuses those shared classes unchanged too. */
.main-content--designed .dn-kpi-row {
    margin-top: 24px;
}
.main-content--designed .dn-kpi-card {
    box-sizing: border-box;
    flex: 0 0 352px;
    width: 352px;
    height: 150px; /* The border is drawn inside the frame's own 150, so the measured 20/32/20/58/20 interior renders an 18px bottom inset. */
    box-shadow: var(--bs-box-shadow-sm); /* Reuses the measured shadow-xs: design-tokens.css redefines this Bootstrap variable to BRIEF-033 §13.5's value. */
}
.dn-kpi-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dn-kpi-icon {
    display: block;
    width: 32px;
    height: 32px;
}
/* The icon-*.svg export already is the measured 32x32 icon button, faint border and shadow included, drawn inside a 40-unit canvas that holds the shadow bleed. */
.dn-kpi-icon img,
.dn-kpi-icon svg {
    display: block;
    width: 40px;
    height: 40px;
    margin: -3px -4px -5px -4px;
}
/* A presentation attribute takes no var(), and this shell's own app.css pins the inherited colour to the legacy olive, so an inline glyph gets both strokes from real rules. */
.dn-glyph {
    stroke: var(--bs-body-color);
}
.dn-glyph-frame {
    stroke: var(--dn-border-faint);
}
/* Delta colour indirection — neither candidate (intent/feedback/success
   foreground #15803d vs this token's #22c55e) is measured on this frame; see
   the WHY comment at the Blade call site. */
.dn-kpi-delta-value {
    color: var(--dn-badge-success-fg);
}

.dn-chart-card {
    margin: 24px 32px 0;
}
.dn-chart-canvas {
    height: 300px;
}

/* Dropdowns — active/selected item is hardcoded in both bootstrap.min.css's
   own component variables and bootstrap-extended.css's direct override */
.dropdown-menu {
    --bs-dropdown-link-active-bg: var(--bs-primary);
    --bs-dropdown-link-active-color: var(--dn-primary-fg);
}
.dropdown-item.active,
.dropdown-item:active {
    color: var(--dn-primary-fg);
    background-color: var(--bs-primary);
}

/* Super Admin people-management UI kit (GH #218, BRIEF-033) — page header, KPI
   row and cards, list card, search input, table and status badge for the
   Instructors, Supervising Driver and Students list screens. Every selector
   is scoped under a dn-content-column, dn-page-header, dn-kpi, dn-data-row,
   dn-list-card, dn-table, dn-status-badge or dn-progress class so these rules
   never reach the plain card, table or pagination markup the other admin
   screens already use. */

/* Figma's Right Container (design-spec §7.1/§11): the blocks carry their own
   32px side inset, so the column has bottom padding only. It is a modifier and
   not a change to .main-content because that rule is the content column of
   twelve other admin screens across two shells. */
.dn-content-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 0 32px;
}

.dn-page-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 32px;
    background-color: var(--bs-body-bg);
    box-shadow: inset 0 -1px 0 0 var(--dn-border-faint);
}
.dn-page-header-title {
    margin: 0;
    font-size: 18px;
    line-height: 28px;
    font-weight: 700;
    color: var(--bs-body-color);
}
.dn-page-header-subtitle {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.dn-kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 0 32px;
}
.dn-kpi-card {
    flex: 1 1 0;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--dn-border-faint);
    border-radius: 16px;
    background-color: var(--bs-body-bg);
}
.dn-kpi-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dn-kpi-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 7px;
    border: 1px solid var(--dn-border-faint);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    /* Measured shadow-sm (design-spec §7.3/§13.5) — --bs-box-shadow-sm is Bootstrap's own default and not this value. */
    box-shadow: 0 1px 2px -1px #000000;
}
.dn-kpi-label {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: var(--bs-secondary-color);
}
.dn-kpi-data {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dn-kpi-value {
    font-size: 30px;
    line-height: 30px;
    font-weight: 700;
    color: var(--bs-body-color);
}
/* Student profile ratio KPIs (Hours Completed, Instructed Hours) — the
   denominator is a subscript RUN of the same heading style (design-spec
   §13.7), not a smaller font-size, so only the baseline shifts. The shift is
   a paint-time offset rather than vertical-align because a vertical-aligned
   inline box still grows its line box, which took .dn-kpi-value to 37px
   against the 30/30 of design-spec §7.5. It is expressed in em, not px, so
   that it keeps rescaling with the type scale the way vertical-align did. */
.dn-kpi-value-sub {
    position: relative;
    top: 0.2333em;
}
.dn-kpi-sub {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    letter-spacing: 0.005em;
    color: var(--bs-secondary-color);
}

.dn-data-row {
    padding: 0 32px;
}

/* School dashboard bottom row (BE-BRIEF-035-003) — Students table card and
   Recent Enrollments feed, design-spec.md §5. Card chrome, table and
   progress-bar values are the SAME measured component as
   .aidev/design/BRIEF-033/design-spec.md's own table card/table/progress bar
   (§7.4/§7.5/§13.4/§13.6) — reused verbatim rather than re-derived. */
.dn-data-row-split {
    display: flex;
    align-items: stretch;
    gap: 24px;
    padding: 0 32px;
    margin-top: 24px;
}
.dn-students-card {
    flex: 2 1 0;
    min-width: 0;
}
.dn-enrollments-card {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* School dashboard New students list (GH #523): full width, one line per student. */
.dn-new-students-card {
    margin: 24px 32px 0;
}
.dn-new-students-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 0 16px 12px;
}
.dn-new-students-bulk-credits {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.dn-new-students-bulk-credits .form-control,
.dn-new-students-credits {
    width: 88px;
}
.dn-new-students-check {
    width: 40px;
}
.dn-new-students-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.dn-list-card {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    background-color: var(--bs-body-bg);
    /* Measured shadow-xs (design-spec §7.4/§13.5) — --bs-box-shadow-sm is Bootstrap's own default and not this value. */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.dn-list-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    padding: 24px;
}
.dn-list-card-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dn-list-card-title {
    margin: 0;
    font-size: 20px;
    line-height: 24px;
    font-weight: 700;
    color: var(--bs-body-color);
}
.dn-list-card-description {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    letter-spacing: 0.005em;
    color: var(--bs-secondary-color);
}
/* Inside a button the inherited colour is the button's own, so currentColor here is the label's colour, not app.css's legacy body olive. */
.dn-btn-glyph {
    stroke: currentColor;
}
.dn-list-card-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 24px 32px;
}

.dn-search-form {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.dn-search-icon {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
    pointer-events: none;
}
.dn-search-input {
    height: 36px;
    width: 320px;
    padding: 7.5px 12px 7.5px 40px;
    font-size: 14px;
    line-height: 20px;
    border: 1px solid var(--bs-secondary-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-body-bg);
    /* Measured shadow-xs (design-spec §7.4/§13.5) — --bs-box-shadow-sm is Bootstrap's own default and not this value. */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    color: var(--bs-body-color);
}

/* A table header's search and the table's own buttons ("Add drive"): the buttons sit right of
   the search on its row and wrap under it when the row runs out of room. */
.dn-header-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
/* In the kit's card the button matches the 36px search box, not Bootstrap's 38px. */
.dn-list-card-header .dn-header-tools > .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
}
/* On a phone the search takes the whole row, instead of its fixed width overflowing the card. */
@media (max-width: 575.98px) {
    .dn-header-tools {
        width: 100%;
    }
    .dn-header-tools > form {
        flex: 1 1 100%;
        min-width: 0;
    }
    .dn-header-tools .dn-search-input,
    .dn-header-tools .dn-search-field {
        width: 100%;
        min-width: 0;
    }
}

.dn-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.dn-table thead th {
    height: 36px;
    padding: 8px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    letter-spacing: 0.005em;
    color: var(--bs-body-color);
    box-shadow: inset 0 -1px 0 0 var(--bs-border-color);
    /* A narrow column's realistic content wrapping would break the measured 36/48 row height; scroll via .table-responsive instead. */
    white-space: nowrap;
}
.dn-table tbody td {
    height: 48px;
    padding: 8px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    letter-spacing: 0.005em;
    color: var(--bs-body-color);
    vertical-align: middle;
    box-shadow: inset 0 -1px 0 0 var(--bs-border-color);
    white-space: nowrap;
}
.dn-table-link {
    color: var(--dn-primary-700);
    text-decoration: underline;
}
/* Sortable column headers (GH #607): the header text stays the header, with a sort glyph
   that is faint until its column is the one the list is ordered by. Shared by the dn-table
   lists and the Bootstrap .table rosters of the school portal. */
.dn-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.dn-sort-link:hover,
.dn-sort-link:focus-visible {
    color: inherit;
    text-decoration: underline;
}
.dn-sort-link .bx {
    font-size: 16px;
    opacity: 0.35;
}
.dn-sort-link-active .bx {
    opacity: 1;
}
/* The back arrow of the generic page header (GH #609), the same chevron button the profile
   headers use, sized to the header's 20px title. */
.dn-page-back {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.dn-page-back .dn-back-btn {
    width: 32px;
    height: 32px;
    text-decoration: none;
}
/* Curriculums (GH #410): the options matrix rebuilt — criteria down the side, one column
   per lesson. The matrix scrolls sideways inside its card (a plan can reach 20 lessons),
   with the criteria column pinned so every checkbox keeps its label in view. */
.dn-plan-scroll {
    overflow-x: auto;
}
.dn-plan-matrix th,
.dn-plan-matrix td {
    white-space: nowrap;
}
.dn-plan-criterion {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bs-body-bg, #fff);
    min-width: 260px;
    white-space: normal !important;
}
/* Rename / delete of a criterion (GH #608), beside its name. */
.dn-plan-criterion-actions {
    display: inline-flex;
    gap: 8px;
    margin-left: 8px;
    vertical-align: middle;
}
.dn-plan-lesson {
    min-width: 150px;
    vertical-align: top;
    font-weight: normal;
}
.dn-plan-lesson-number {
    font-weight: 600;
    margin-bottom: 4px;
}
.dn-plan-required {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0;
    font-size: 0.8125rem;
}
.dn-plan-cell {
    text-align: center;
}
@media (max-width: 575.98px) {
    .dn-plan-criterion {
        min-width: 150px;
    }
}
/* Student profile (design-spec §13.2): a Duration cell whose ride was force-ended
   by the safety net (rides.auto_closed) reads in the destructive colour — nothing
   else on the page uses this token. Selector must EXCEED .dn-table tbody td's
   own specificity to win, not match it: (0,0,2,2) against (0,0,1,2). A plain
   .dn-duration-alert is (0,0,1,0) and loses the colour to that rule. */
.dn-table tbody td.dn-duration-alert {
    color: var(--dn-destructive-fg);
}

.dn-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: var(--bs-border-radius-lg);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.015em;
}
/* The Active / Inactive badge that switches an instructor (GH #610): the same pill, as a button. */
.dn-status-toggle {
    cursor: pointer;
}
.dn-status-toggle:focus-visible {
    outline: 2px solid var(--bs-body-color);
    outline-offset: 2px;
}
.dn-status-warning {
    background-color: var(--dn-badge-warning-bg);
    color: var(--dn-badge-warning-fg);
}
/* Skills tests (GH #641): a drive hour split into two 30-minute tests, in its own colour. */
.dn-status-skills {
    background-color: var(--dn-badge-skills-bg);
    color: var(--dn-badge-skills-fg);
}
/* The day view's student combobox keeps a usable width beside its Save button. */
.dn-skills-student {
    min-width: 14rem;
}

/* Scheduling (GH #449) — a car's plate as an outlined pill, as the Figma "Schedule - Cars"
   table draws it; same type ramp as .dn-status-badge, on the border token instead of a fill. */
.dn-plate {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.015em;
    white-space: nowrap;
}

/* A form whose submit sits bottom-right, as the scheduling frames draw it, ends with room for
   the fixed Feedback button (.dn-fb-fab: 24px inset + 44px tall) so scrolling to the end always
   lifts the submit clear of it. */
.dn-form-clear-fab {
    padding-bottom: 48px;
}
/* Field labels in the kit's cards read as body text (the frames' black bold labels), not
   app.css's legacy olive label colour. */
.dn-list-card .form-label {
    color: var(--bs-body-color);
}

/* Status tabs (GH #409) — the All/Active/Inactive segmented control that every list
   screen carries just above its table. The ticket has no Figma frame for it, so the
   shape is taken from the school roster's own Approved/Pending bar (the only tab bar
   already shipped) and rebuilt on the existing tokens instead of that bar's Bootstrap
   utilities: --bs-tertiary-bg for the track, --bs-body-bg + --bs-box-shadow-sm for the
   selected pill, --bs-secondary-color for the resting label. No new token is needed,
   and both bars can now render through the same partial so a screen stacking them
   reads as one component. */
.dn-status-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 16px;
    background-color: var(--bs-tertiary-bg);
    border-radius: var(--bs-border-radius-lg);
}
.dn-status-tab {
    flex: 1 1 0;
    padding: 8px 12px;
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}
.dn-status-tab:hover,
.dn-status-tab:focus-visible {
    color: var(--bs-body-color);
}
.dn-status-tab-selected {
    background-color: var(--bs-body-bg);
    box-shadow: var(--bs-box-shadow-sm);
    color: var(--bs-body-color);
}

.dn-table-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--dn-sidebar-accent-fg); /* WHY: not measured, design-spec §5.1 names only the icon+word; reused the existing on-light text token */
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    letter-spacing: 0.005em;
    text-decoration: none;
}

/* Progress bar (Students list / profile tables, #218 pieces -005/-006, and
   the School dashboard's Students card Progress column). Width is driven by
   a [data-step] attribute rounded to the nearest 1%, never inline style, so
   the "zero style= attributes" rule holds for a value that is inherently
   per-row dynamic while still matching the exact measured percentage. */
.dn-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dn-progress-track {
    position: relative;
    width: 112px;
    height: 8px;
    border-radius: 12px;
    background-color: var(--dn-border-strong);
}
.dn-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 8px;
    width: 0%;
    border-radius: 12px;
    background-color: var(--dn-progress-fill);
}
.dn-progress-fill[data-step="0"] { width: 0%; }
.dn-progress-fill[data-step="1"] { width: 1%; }
.dn-progress-fill[data-step="2"] { width: 2%; }
.dn-progress-fill[data-step="3"] { width: 3%; }
.dn-progress-fill[data-step="4"] { width: 4%; }
.dn-progress-fill[data-step="5"] { width: 5%; }
.dn-progress-fill[data-step="6"] { width: 6%; }
.dn-progress-fill[data-step="7"] { width: 7%; }
.dn-progress-fill[data-step="8"] { width: 8%; }
.dn-progress-fill[data-step="9"] { width: 9%; }
.dn-progress-fill[data-step="10"] { width: 10%; }
.dn-progress-fill[data-step="11"] { width: 11%; }
.dn-progress-fill[data-step="12"] { width: 12%; }
.dn-progress-fill[data-step="13"] { width: 13%; }
.dn-progress-fill[data-step="14"] { width: 14%; }
.dn-progress-fill[data-step="15"] { width: 15%; }
.dn-progress-fill[data-step="16"] { width: 16%; }
.dn-progress-fill[data-step="17"] { width: 17%; }
.dn-progress-fill[data-step="18"] { width: 18%; }
.dn-progress-fill[data-step="19"] { width: 19%; }
.dn-progress-fill[data-step="20"] { width: 20%; }
.dn-progress-fill[data-step="21"] { width: 21%; }
.dn-progress-fill[data-step="22"] { width: 22%; }
.dn-progress-fill[data-step="23"] { width: 23%; }
.dn-progress-fill[data-step="24"] { width: 24%; }
.dn-progress-fill[data-step="25"] { width: 25%; }
.dn-progress-fill[data-step="26"] { width: 26%; }
.dn-progress-fill[data-step="27"] { width: 27%; }
.dn-progress-fill[data-step="28"] { width: 28%; }
.dn-progress-fill[data-step="29"] { width: 29%; }
.dn-progress-fill[data-step="30"] { width: 30%; }
.dn-progress-fill[data-step="31"] { width: 31%; }
.dn-progress-fill[data-step="32"] { width: 32%; }
.dn-progress-fill[data-step="33"] { width: 33%; }
.dn-progress-fill[data-step="34"] { width: 34%; }
.dn-progress-fill[data-step="35"] { width: 35%; }
.dn-progress-fill[data-step="36"] { width: 36%; }
.dn-progress-fill[data-step="37"] { width: 37%; }
.dn-progress-fill[data-step="38"] { width: 38%; }
.dn-progress-fill[data-step="39"] { width: 39%; }
.dn-progress-fill[data-step="40"] { width: 40%; }
.dn-progress-fill[data-step="41"] { width: 41%; }
.dn-progress-fill[data-step="42"] { width: 42%; }
.dn-progress-fill[data-step="43"] { width: 43%; }
.dn-progress-fill[data-step="44"] { width: 44%; }
.dn-progress-fill[data-step="45"] { width: 45%; }
.dn-progress-fill[data-step="46"] { width: 46%; }
.dn-progress-fill[data-step="47"] { width: 47%; }
.dn-progress-fill[data-step="48"] { width: 48%; }
.dn-progress-fill[data-step="49"] { width: 49%; }
.dn-progress-fill[data-step="50"] { width: 50%; }
.dn-progress-fill[data-step="51"] { width: 51%; }
.dn-progress-fill[data-step="52"] { width: 52%; }
.dn-progress-fill[data-step="53"] { width: 53%; }
.dn-progress-fill[data-step="54"] { width: 54%; }
.dn-progress-fill[data-step="55"] { width: 55%; }
.dn-progress-fill[data-step="56"] { width: 56%; }
.dn-progress-fill[data-step="57"] { width: 57%; }
.dn-progress-fill[data-step="58"] { width: 58%; }
.dn-progress-fill[data-step="59"] { width: 59%; }
.dn-progress-fill[data-step="60"] { width: 60%; }
.dn-progress-fill[data-step="61"] { width: 61%; }
.dn-progress-fill[data-step="62"] { width: 62%; }
.dn-progress-fill[data-step="63"] { width: 63%; }
.dn-progress-fill[data-step="64"] { width: 64%; }
.dn-progress-fill[data-step="65"] { width: 65%; }
.dn-progress-fill[data-step="66"] { width: 66%; }
.dn-progress-fill[data-step="67"] { width: 67%; }
.dn-progress-fill[data-step="68"] { width: 68%; }
.dn-progress-fill[data-step="69"] { width: 69%; }
.dn-progress-fill[data-step="70"] { width: 70%; }
.dn-progress-fill[data-step="71"] { width: 71%; }
.dn-progress-fill[data-step="72"] { width: 72%; }
.dn-progress-fill[data-step="73"] { width: 73%; }
.dn-progress-fill[data-step="74"] { width: 74%; }
.dn-progress-fill[data-step="75"] { width: 75%; }
.dn-progress-fill[data-step="76"] { width: 76%; }
.dn-progress-fill[data-step="77"] { width: 77%; }
.dn-progress-fill[data-step="78"] { width: 78%; }
.dn-progress-fill[data-step="79"] { width: 79%; }
.dn-progress-fill[data-step="80"] { width: 80%; }
.dn-progress-fill[data-step="81"] { width: 81%; }
.dn-progress-fill[data-step="82"] { width: 82%; }
.dn-progress-fill[data-step="83"] { width: 83%; }
.dn-progress-fill[data-step="84"] { width: 84%; }
.dn-progress-fill[data-step="85"] { width: 85%; }
.dn-progress-fill[data-step="86"] { width: 86%; }
.dn-progress-fill[data-step="87"] { width: 87%; }
.dn-progress-fill[data-step="88"] { width: 88%; }
.dn-progress-fill[data-step="89"] { width: 89%; }
.dn-progress-fill[data-step="90"] { width: 90%; }
.dn-progress-fill[data-step="91"] { width: 91%; }
.dn-progress-fill[data-step="92"] { width: 92%; }
.dn-progress-fill[data-step="93"] { width: 93%; }
.dn-progress-fill[data-step="94"] { width: 94%; }
.dn-progress-fill[data-step="95"] { width: 95%; }
.dn-progress-fill[data-step="96"] { width: 96%; }
.dn-progress-fill[data-step="97"] { width: 97%; }
.dn-progress-fill[data-step="98"] { width: 98%; }
.dn-progress-fill[data-step="99"] { width: 99%; }
.dn-progress-fill[data-step="100"] { width: 100%; }
.dn-progress-label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    letter-spacing: 0.005em;
    color: var(--bs-body-color);
}

/* Recent Enrollments feed — card/row/avatar chrome is (N) in
   .aidev/design/BRIEF-035/design-spec.md §7 (not measured); derived from
   this shell's own border/radius scale rather than invented. The avatar
   background reuses --bs-tertiary-bg #f5f5f5, which §6.bis's pixel sample
   of the Figma avatar matched exactly. The list's bounded height + scroll
   (design-spec §5.2, "clipped by the frame's bottom edge") is expressed by
   stretching this card to the Students card's own rendered height (the flex
   row's align-items: stretch above) and letting only the list scroll,
   rather than a guessed pixel cap. */
.dn-enrollments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 0;
    min-height: 0;
    padding: 0 24px 24px;
    overflow-y: auto;
}
.dn-enrollment-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
}
.dn-enrollment-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bs-tertiary-bg);
    font-size: 12px;
    font-weight: 700;
    color: var(--bs-body-color);
}
.dn-enrollment-text {
    flex: 1;
    min-width: 0;
}
.dn-enrollment-name {
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--bs-body-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dn-enrollment-role {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: var(--bs-secondary-color);
}

/* Designed paginator (BE-BRIEF-035-003) — built at the SAME path, name and
   root class as .aidev/design/BRIEF-033's own super-admin/partials/
   pagination.blade.php (§7.6) so that brief's eventual merge is a single
   trivial conflict, not a rename. Labelled Previous/Next with NO chevron
   and NO border/background except on the current chip — measured directly
   off this frame at 3x (design-spec.md §5.1), which diverges from
   BRIEF-033's own shipped partial on exactly those points; centred under
   the table, page numbers in the palette instead of Bootstrap's link blue.
   The classes deliberately avoid .page-link so bootstrap.min.css's
   hardcoded .active>.page-link literal never enters the cascade. */
.dn-pagination-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dn-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    color: var(--dn-pagination-fg);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    letter-spacing: 0.005em;
    text-decoration: none;
}
.dn-pagination-page {
    min-width: 34px;
    padding: 0 8px;
}
.dn-pagination-current {
    border: 1px solid var(--bs-primary);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-primary);
    color: var(--dn-primary-fg);
}
.dn-pagination-ellipsis {
    width: 36px;
    padding: 0;
}
.dn-pagination-disabled {
    color: var(--bs-secondary-color);
}

/* Super Admin profile shell (Instructors/Supervising Driver/Student profiles,
   GH #218, BRIEF-033) — header back button and identity card, on top of the
   dn-page-header/dn-kpi/dn-list-card/dn-table kit above. */
.dn-profile-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dn-profile-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dn-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 2.5px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    /* Measured shadow-sm, two layers (design-spec §11/§13.5) — distinct from the single-layer KPI icon shadow above. */
    box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.07), 0 1px 3px 0 rgba(0, 0, 0, 0.07);
}
.dn-identity-row {
    padding: 0 32px;
}
.dn-identity-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border: 1px solid var(--dn-border-faint);
    border-radius: 16px;
    background-color: var(--bs-body-bg);
}
.dn-identity-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--dn-primary-200);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    letter-spacing: 0.005em;
    color: var(--bs-body-color);
}
.dn-identity-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}
.dn-identity-name {
    margin: 0;
    font-size: 20px;
    line-height: 24px;
    font-weight: 700;
    color: var(--bs-body-color);
}
.dn-identity-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.dn-identity-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.005em;
    color: var(--bs-body-color);
}

/* Ride-map modal (shared partial reused across #218's -002/-004/-006 profiles). */
.dn-ride-map-canvas {
    width: 100%;
    height: 400px;
}

/* Feedback widget (GH issue 435) — the landing's widget rebuilt on this kit's tokens, so the
   three annotation colours and every surface come from the design system instead of the hex
   literals the landing hardcodes. Mounted from layouts/super-admin.blade.php, which both the
   Super Admin screens and the Driving School portal extend.
   The button sits above any dialog of the page (Bootstrap's modal 1055 and its backdrop 1050,
   SweetAlert 1060), and the widget's own dialog above the button, so feedback can be sent with a
   modal open (GH #639). */
.dn-fb-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1065;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--bs-border-radius-xl);
    background-color: var(--bs-primary);
    color: var(--dn-primary-fg);
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    cursor: pointer;
}
.dn-fb-fab svg { width: 18px; height: 18px; }
.dn-fb-fab.is-busy { opacity: .7; cursor: progress; }

body.dn-fb-open { overflow: hidden; }

.dn-fb-modal { position: fixed; inset: 0; z-index: 1070; display: flex; align-items: center; justify-content: center; padding: 24px; }
.dn-fb-backdrop { position: absolute; inset: 0; background-color: rgba(10, 10, 10, .55); }
.dn-fb-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1000px, 100%);
    max-height: 90vh;
    overflow: hidden;
    border-radius: var(--bs-border-radius-xl);
    background-color: var(--bs-body-bg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.dn-fb-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--bs-border-color); }
.dn-fb-heading { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--bs-body-color); }
.dn-fb-x { display: inline-flex; padding: 6px; border: none; border-radius: var(--bs-border-radius); background: transparent; color: var(--bs-secondary-color); cursor: pointer; }
.dn-fb-x svg { width: 20px; height: 20px; }

.dn-fb-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 24px; overflow: auto; }
.dn-fb-shot { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dn-fb-canvas-wrap { position: relative; display: grid; min-height: 160px; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); background-color: var(--bs-tertiary-bg); overflow: hidden; }
.dn-fb-canvas-wrap canvas { grid-area: 1 / 1; display: block; max-width: 100%; height: auto; }
.dn-fb-canvas-wrap #dn-fb-draw { cursor: crosshair; touch-action: none; }
.dn-fb-shot-empty { grid-area: 1 / 1; align-self: center; justify-self: center; padding: 24px; color: var(--bs-secondary-color); font-size: 14px; text-align: center; }

.dn-fb-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.dn-fb-tools-label { margin-right: 4px; color: var(--bs-secondary-color); font-size: 12px; }
.dn-fb-colors { display: inline-flex; gap: 6px; }
.dn-fb-color { width: 22px; height: 22px; padding: 0; border: 2px solid var(--bs-border-color); border-radius: 50%; cursor: pointer; }
.dn-fb-color.is-active { border-color: var(--bs-body-color); }
.dn-fb-color--danger { background-color: var(--dn-destructive-fg); }
.dn-fb-color--brand { background-color: var(--bs-primary); }
.dn-fb-color--light { background-color: var(--bs-body-bg); }
.dn-fb-tool { padding: 4px 10px; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background-color: var(--bs-body-bg); color: var(--bs-body-color); font-size: 12px; cursor: pointer; }

.dn-fb-form { display: flex; flex-direction: column; min-width: 0; }
.dn-fb-type-row { display: flex; gap: 8px; margin-bottom: 16px; }
.dn-fb-type-btn { flex: 1 1 0; padding: 8px 10px; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background-color: var(--bs-body-bg); color: var(--bs-body-color); font-size: 13px; cursor: pointer; }
.dn-fb-type-btn.is-active { background-color: var(--bs-primary); border-color: transparent; color: var(--dn-primary-fg); font-weight: 700; }
.dn-fb-label { margin-bottom: 6px; color: var(--bs-body-color); font-size: 13px; font-weight: 600; }
.dn-fb-textarea { width: 100%; padding: 12px; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background-color: var(--bs-body-bg); color: var(--bs-body-color); font-size: 14px; resize: vertical; }
.dn-fb-note { margin: 12px 0 0; color: var(--bs-secondary-color); font-size: 12px; line-height: 18px; }

.dn-fb-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--bs-border-color); }
.dn-fb-status { margin: 0; font-size: 13px; color: var(--bs-secondary-color); }
.dn-fb-status.is-error { color: var(--dn-destructive-fg); }
.dn-fb-status.is-ok { color: var(--bs-success-text-emphasis); }
.dn-fb-actions { display: flex; gap: 8px; }
.dn-fb-btn { padding: 10px 18px; border: none; border-radius: var(--bs-border-radius); background-color: var(--bs-primary); color: var(--dn-primary-fg); font-size: 14px; font-weight: 700; cursor: pointer; }
.dn-fb-btn--ghost { background-color: var(--bs-body-bg); border: 1px solid var(--bs-border-color); color: var(--bs-body-color); font-weight: 600; }
.dn-fb-btn[disabled] { opacity: .6; cursor: default; }

@media (max-width: 768px) {
    .dn-fb-body { grid-template-columns: 1fr; }
    .dn-fb-fab span { display: none; }
    .dn-fb-fab { padding: 14px; border-radius: 50%; }
}

/* Scheduling calendar (GH #449, Figma "Calendar - Empty / Dates Selected / Filled"): a month
   grid whose days carry one olive chip per published car window, a light primary wash on the
   range being selected, and a floating hint while nothing is selected. */
.dn-calendar {
    overflow-x: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    background-color: var(--bs-body-bg);
}
.dn-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
}
.dn-calendar-month {
    min-width: 132px;
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    text-align: center;
}
.dn-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 720px; /* narrow screens scroll the month inside its card, not the page */
}
.dn-calendar-weekday {
    padding: 6px 4px;
    border-top: 1px solid var(--bs-border-color);
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}
.dn-calendar-day {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    min-height: 112px;
    padding: 8px;
    border-top: 1px solid var(--bs-border-color);
    border-left: 1px solid var(--bs-border-color);
    cursor: pointer;
}
.dn-calendar-day:nth-child(7n + 1) {
    border-left: 0;
}
.dn-calendar-day.is-outside {
    background-color: var(--dn-sidebar-bg);
    color: var(--bs-secondary-color);
}
.dn-calendar-day.is-past {
    cursor: default;
}
.dn-calendar-day.is-selected {
    background-color: rgba(var(--bs-primary-rgb), 0.12);
}
.dn-calendar-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 12px;
    line-height: 16px;
}
.dn-calendar-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}
.dn-calendar-day-number:hover {
    text-decoration: underline;
}
.dn-calendar-day.is-today .dn-calendar-day-number,
.dn-calendar-day.is-range-edge .dn-calendar-day-number {
    background-color: var(--bs-primary);
    color: var(--dn-primary-fg);
}
.dn-calendar-chips {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
}
.dn-calendar-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 2px 6px;
    border: 1px solid var(--dn-primary-700);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-primary);
    color: var(--dn-primary-fg);
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}
.dn-calendar-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}
.dn-calendar-chip:hover {
    color: var(--dn-primary-fg);
    filter: brightness(0.95);
}
.dn-calendar-chip.is-cancelled {
    border-color: var(--dn-destructive-fg);
    background-color: var(--bs-body-bg);
    color: var(--dn-destructive-fg);
    text-decoration: line-through;
}
.dn-calendar-slots {
    color: var(--bs-secondary-color);
    font-size: 11px;
    line-height: 16px;
    text-decoration: none;
}
.dn-calendar-slots:hover {
    color: var(--bs-body-color);
}
.dn-calendar-booked {
    color: var(--dn-badge-warning-bg);
    font-weight: 700;
}
/* The month cell's hours of skills tests (GH #641): their own purple chip, as on the week and the
   day, never the drives' colour. One piece: it moves to the next line rather than breaking. */
.dn-calendar-skills {
    display: inline-block;
    max-width: 100%;
    padding: 0 4px;
    border-radius: var(--bs-border-radius);
    background-color: var(--dn-badge-skills-bg);
    color: var(--dn-badge-skills-fg);
    font-weight: 700;
}
/* Week view (GH #451): each day lists its shifts per car, with the hours already taken. */
.dn-calendar-week .dn-calendar-day {
    min-height: 220px;
}
.dn-week-car {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dn-week-car-name {
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dn-week-shift {
    display: flex;
    flex-direction: column;
    padding: 4px 6px;
    border: 1px solid var(--dn-primary-700);
    border-left-width: 3px;
    border-radius: var(--bs-border-radius);
    color: var(--bs-body-color);
    font-size: 11px;
    line-height: 16px;
    text-decoration: none;
}
.dn-week-shift.is-waiting {
    border-color: var(--dn-badge-warning-bg);
    border-style: dashed;
}
.dn-week-shift:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-body-color);
}
.dn-week-drive {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dn-week-drive.is-requested {
    font-style: italic;
}
.dn-week-drive.is-skills-test {
    padding: 0 4px;
    border-radius: var(--bs-border-radius);
    background-color: var(--dn-badge-skills-bg);
    color: var(--dn-badge-skills-fg);
}
/* Busy calendar days (GH #555): a day shows up to four items (car windows, shifts or drive
   hours); a busier one shows three and "+N more". Expanding grows that day and its row, so the
   rows below move down; the other days of the row stretch with it but keep their content in
   place. */
.dn-calendar-day:not(.is-expanded) .is-folded {
    display: none;
}
.dn-calendar-day.is-beside-expanded {
    padding-bottom: calc(8px + var(--dn-row-growth, 0px));
}
.dn-day-more {
    flex-shrink: 0;
    height: 20px;
    padding: 0 6px;
    border: 0;
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    font-size: 11px;
    line-height: 20px;
    font-weight: 600;
    text-align: left;
}
.dn-day-more:hover {
    background-color: var(--dn-border-faint);
}
.dn-day-more:focus-visible {
    outline: 2px solid var(--dn-primary-700);
    outline-offset: 1px;
}
/* Drives calendar (GH #555): every drive hour of the approved shifts as a pill, outlined in
   green while it can still be booked and in the day view's badge colours once something holds
   it. A day is tall enough for four pills. */
.dn-calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    column-gap: 16px;
}
.dn-calendar-toolbar > .dn-status-tabs {
    flex: 1 1 280px;
}
.dn-drive-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
    margin: 0;
    padding: 0 12px 12px;
    list-style: none;
    color: var(--bs-secondary-color);
    font-size: 12px;
    line-height: 16px;
}
.dn-drive-legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.dn-drive-swatch {
    width: 16px;
    height: 12px;
    border: 1px solid transparent;
    border-radius: 3px;
}
.dn-calendar-drives {
    --dn-drive-pill: 20px;
}
.dn-calendar-drives.dn-calendar-week {
    --dn-drive-pill: 36px;
}
.dn-calendar-drives .dn-calendar-day {
    min-height: calc(16px + 24px + 4 * (var(--dn-drive-pill) + 4px));
    cursor: default;
}
.dn-drive-day-note {
    overflow: hidden;
    color: var(--bs-secondary-color);
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dn-drive-list {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dn-drive-pill {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 4px;
    min-width: 0;
    height: var(--dn-drive-pill);
    padding: 1px 6px;
    border: 1px solid transparent;
    border-radius: var(--bs-border-radius);
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
    cursor: pointer;
}
.dn-drive-pill.is-detailed {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    column-gap: 6px;
}
.dn-drive-time {
    flex-shrink: 0;
    font-weight: 700;
}
.dn-drive-state {
    overflow: hidden;
    font-weight: 500;
    text-align: right;
    text-overflow: ellipsis;
}
.dn-drive-who {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dn-drive-pill.is-detailed .dn-drive-who {
    grid-column: 1 / -1;
}
.dn-drive-pill.is-available,
.dn-drive-swatch.is-available {
    border-color: var(--dn-badge-success-fg);
    background-color: var(--bs-success-bg-subtle);
    color: var(--dn-badge-success-bg);
}
.dn-drive-pill.is-requested,
.dn-drive-swatch.is-requested {
    border-style: dashed;
    border-color: var(--dn-badge-warning-fg);
}
.dn-drive-pill.is-past,
.dn-drive-swatch.is-past {
    border-style: dashed;
    border-color: var(--dn-border-strong);
    color: var(--bs-secondary-color);
}
.dn-calendar-hint {
    position: sticky;
    bottom: 16px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.dn-calendar-hint > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--dn-border-strong);
    border-radius: var(--bs-border-radius-lg);
    background-color: var(--dn-border-faint);
    box-shadow: var(--bs-box-shadow-sm);
    font-size: 13px;
    line-height: 20px;
}

/* "New Schedule" dialog (Figma "Calendar - Modal"): wide enough for a day + two times per row. */
.dn-schedule-dialog {
    --bs-modal-width: 600px;
}
.dn-range-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
}
.dn-range-row input[type="date"] {
    width: auto;
    border: 0;
    padding: 0;
    color: var(--bs-secondary-color);
}
.dn-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--bs-border-radius);
    background-color: var(--dn-progress-fill);
    color: var(--bs-body-bg);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
}
.dn-count-badge.is-light {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}
.dn-modal-section {
    padding: 16px 0;
    border-top: 1px solid var(--bs-border-color);
}
.dn-modal-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
}
.dn-vehicle-list {
    max-height: 168px;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
}
.dn-vehicle-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 12px;
    border-top: 1px solid var(--bs-border-color);
    font-size: 14px;
    cursor: pointer;
}
.dn-vehicle-option:first-child {
    border-top: 0;
}

/* Adult drives read apart from ordinary drives at a glance (AC: calendar + slot list). */
.dn-type-adult {
    background-color: var(--dn-badge-warning-bg);
    color: var(--dn-badge-warning-fg);
}
.dn-type-drive {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}
/* A school's location names run long ("…Old Bank Facility just inside North entrance…"):
   they wrap in their cell instead of pushing the row's actions off the table. */
.dn-table tbody td.dn-cell-wrap {
    min-width: 180px;
    max-width: 240px;
    white-space: normal;
}
.dn-table tbody td.dn-cell-wrap.dn-cell-narrow {
    min-width: 120px;
    max-width: 180px;
}
/* Figma's dark "Scheduled" pill. */
.dn-status-dark {
    background-color: var(--dn-progress-fill);
    color: var(--bs-body-bg);
}

/* Report dashboards in the redesigned panel (resources/views/panel/dashboard.blade.php):
   the scripted drive lists keep the fixed scroll height they had on the legacy view. */
.dn-dashboard-list {
    min-height: 420px;
    max-height: 420px;
    overflow-y: auto;
}
/* In the report grid the chart cards line up with the column; the 24px/32px margin of
   .dn-chart-card is for the school dashboard's single full-width chart. */
.dn-dashboard-grid .dn-chart-card {
    margin: 0;
}

/* Student records and account screens of the redesigned panel (resources/views/panel/records,
   resources/views/panel/account). */
/* Skill names and notification texts run long: they wrap in the wide first column. */
.dn-table tbody td.dn-skill-cell {
    width: 60%;
    min-width: 240px;
    white-space: normal;
}
.dn-signature-pad,
.dn-signature-saved {
    display: block;
    width: 100%;
    height: 200px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-body-bg);
}
.dn-signature-pad {
    touch-action: none;
}
.dn-signature-saved {
    object-fit: contain;
}
/* A table action that posts a form (mark as read), drawn like the table's links. */
.dn-link-button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
}
/* End of student records and account screens. */

/* ---- Ride screens of the redesigned panel (resources/views/panel/rides) ---- */
/* The filter bar is a list card without a header, so its content needs the header's top padding. */
.dn-filter-card-content {
    padding-top: 24px;
}
/* Grand-total row of Instructor Utilization: same cell metrics as the table body. */
.dn-table tfoot th {
    height: 48px;
    padding: 8px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--bs-body-color);
    white-space: nowrap;
}
.dn-ride-breakdown {
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: normal;
}
/* Google Places suggestions of the add-ride dialog must sit above the modal. */
.pac-container {
    z-index: 2000;
}
/* ---- end ride screens ---- */

/* Sign-in screens (resources/views/layouts/guest.blade.php): a single centred card on the
   panel's neutral backdrop, with the redesigned panel's tokens and form controls. */
body.dn-auth {
    min-height: 100vh;
    margin: 0;
    background-color: var(--dn-sidebar-bg);
    color: var(--bs-body-color);
}
.dn-auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px 16px;
}
.dn-auth-card {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
    border: 1px solid var(--dn-border-faint);
    border-radius: var(--bs-border-radius-xl);
    background-color: var(--bs-body-bg);
    box-shadow: var(--bs-box-shadow-sm);
}
.dn-auth-logo img {
    height: 28px;
    width: auto;
}
.dn-auth-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dn-auth-title {
    margin: 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}
.dn-auth-subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--bs-secondary-color);
}
.dn-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.dn-auth-form .btn-primary {
    width: 100%;
    font-weight: 600;
}
.dn-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}
.dn-auth-link {
    color: var(--bs-body-color);
    text-decoration: underline;
}
.dn-password-toggle .btn {
    border-color: var(--bs-border-color);
    color: var(--bs-secondary-color);
}
.dn-auth-footer {
    margin: 0;
    font-size: 12px;
    color: var(--bs-secondary-color);
}

/* School dashboard Overview (Oct 27): the free report charts, under the dashboard's own
   blocks and on the same 24px/32px insets. */
/* The app theme colours body text lime; these blocks read as the panel's other cards. */
.dn-overview {
    margin: 24px 32px 0;
    color: var(--bs-body-color);
}
.dn-overview-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.dn-overview-range {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}
.dn-overview-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 8px 0 0;
}
.dn-overview-stats dt {
    font-size: 12px;
    font-weight: 400;
    color: var(--bs-secondary-color);
}
.dn-overview-stats dd {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.dn-overview-chart {
    height: 320px;
}
.dn-overview-heatmap {
    height: 380px;
}

/* Advanced reports (resources/views/panel/partials/advanced-reports.blade.php): the section
   stacks its blocks with the content column's own 16px gap. */
.dn-advanced-reports {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--bs-body-color);
}
.dn-advanced-chart {
    height: 320px;
}
