/*
 * HelpCounter — Admin Area Stylesheet
 * Used by: /admin  (district admins, district staff, school admins, school staff)
 *
 * Color contrast ratios (text on its background):
 *   --color-primary  #2563eb on white   4.73:1  AA
 *   --color-text     #1f2937 on white  12.60:1  AAA
 *   --color-muted    #4b5563 on white   7.00:1  AAA
 *   success text     #15803d on #f0fdf4 5.30:1  AA
 *   warning text     #92400e on #fffbeb 6.30:1  AA
 *   danger  text     #b91c1c on #fef2f2 5.60:1  AA
 *   badge blue       #1d4ed8 on #dbeafe 5.76:1  AA
 *   badge amber      #92400e on #fef3c7 5.74:1  AA
 */

/* ── Custom properties ─────────────────────────────────────────────────── */

:root {
    /* Brand */
    --color-primary:        #2563eb;
    --color-primary-dark:   #1d4ed8;
    --color-primary-light:  #eff6ff;

    /* Semantic status */
    --color-success:        #15803d;
    --color-success-bg:     #f0fdf4;
    --color-success-border: #86efac;

    --color-warning:        #92400e;
    --color-warning-bg:     #fffbeb;
    --color-warning-border: #fcd34d;

    --color-danger:         #b91c1c;
    --color-danger-bg:      #fef2f2;
    --color-danger-border:  #fca5a5;

    /* Neutrals */
    --color-text:           #1f2937;
    --color-muted:          #4b5563;
    --color-subtle:         #6b7280;   /* decorative labels only — not body text */
    --color-border:         #e5e7eb;
    --color-border-light:   #f3f4f6;
    --color-bg:             #f9fafb;
    --color-white:          #ffffff;

    /* Typography */
    --font-sans:      system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 0.9375rem;   /* 15px */
    --line-height:    1.6;

    /* Spacing scale */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;

    /* Shape */
    --radius-sm:  3px;
    --radius:     6px;
    --radius-lg:  8px;

    /* Shadow */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.06);
    --shadow:    0 1px 3px 0 rgb(0 0 0 / 0.10), 0 1px 2px -1px rgb(0 0 0 / 0.10);

    /* Layout */
    --nav-height:    56px;
    --content-width: 72rem;   /* 1152px */
}


/* ── Reset ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.3; }

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); }


/* ── Accessibility ─────────────────────────────────────────────────────── */

/* Skip-to-main-content link — hidden offscreen, appears on keyboard focus */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    padding: var(--sp-3) var(--sp-5);
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* Focus ring — applied to all interactive elements via :focus-visible.
   Uses a visible outline that works on both light and dark backgrounds. */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
/* Suppress focus ring for mouse/pointer users */
:focus:not(:focus-visible) { outline: none; }

/* Allow <main> to receive focus programmatically from the skip link
   without showing a visible ring */
main:focus { outline: none; }


/* ── Top navigation ────────────────────────────────────────────────────── */

.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 0 var(--sp-6);
}

.topnav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--content-width);
    height: 100%;
    margin: 0 auto;
}

.topnav-brand {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    max-width: 20rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}
.topnav-brand:hover { color: var(--color-primary); }

.topnav-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    font-size: 0.875rem;
}

.topnav-username {
    color: var(--color-muted);
}

.topnav-username__label {
    font-size: 0.75rem;
    color: var(--color-subtle);
    font-weight: 400;
}

.topnav-link {
    color: var(--color-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.topnav-link:hover { color: var(--color-text); }

/* Sign-out form is inline; strip all default form styling */
.topnav-signout-form { margin: 0; }

.topnav-signout {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.875rem;
    color: var(--color-muted);
    cursor: pointer;
    transition: color 0.15s;
}
.topnav-signout:hover { color: var(--color-text); }


/* ── Main content wrapper ──────────────────────────────────────────────── */

.main-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--sp-8) var(--sp-6);
}


/* ── Flash / alert messages ────────────────────────────────────────────── */

.flash {
    padding: var(--sp-3) var(--sp-4);
    margin-bottom: var(--sp-6);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.875rem;
    line-height: 1.5;
}
.flash p       { margin: 0; }
.flash p + p   { margin-top: var(--sp-1); }
.flash ul      { margin: 0; padding-left: var(--sp-4); }

.flash--success {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}
.flash--warning {
    background: var(--color-warning-bg);
    border-color: var(--color-warning-border);
    color: var(--color-warning);
}
.flash--error {
    background: var(--color-danger-bg);
    border-color: var(--color-danger-border);
    color: var(--color-danger);
}


/* ── Page header ───────────────────────────────────────────────────────── */

.page-header {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--sp-8);
}
/* Title row always renders first visually regardless of DOM order (Pattern A) */
.page-header .page-header-row { order: 1; }
/* Breadcrumb renders below the title (Pattern A) */
.page-header .breadcrumb      { order: 2; margin-bottom: 0; }

/*
 * Pattern B: breadcrumb nested inside .page-header-row > div alongside <h1>.
 * Make that inner div a flex column so order applies within it.
 */
.page-header-row > div {
    display: flex;
    flex-direction: column;
}
.page-header-row > div .page-title { order: 1; }
.page-header-row > div .breadcrumb { order: 2; margin-bottom: 0; }

/* Row with title on the left and an optional action link on the right */
.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

.page-title {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
}

/* Breadcrumb / back-navigation above a page title */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-2);
    padding-bottom: 0.75rem;
    font-size: 0.9rem;
}
.breadcrumb-link {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s;
}
.breadcrumb-link:hover { color: var(--color-primary-dark); text-decoration: underline; }
.breadcrumb-sep   { color: var(--color-border); user-select: none; }
.breadcrumb-current { font-weight: 600; color: var(--color-text); }


/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.card-body       { padding: var(--sp-5) var(--sp-6); }
.card-body--sm   { padding: var(--sp-4) var(--sp-5); }

/* Section label inside a card — small uppercase heading */
.card-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 0 0 var(--sp-3);
}


/* ── Badges / status pills ─────────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}
.badge--blue   { background: #dbeafe; color: #1d4ed8; }
.badge--purple { background: #ede9fe; color: #5b21b6; }
.badge--gray   { background: #f3f4f6; color: #374151; }
.badge--green  { background: #dcfce7; color: #15803d; }
.badge--amber  { background: #fef3c7; color: #92400e; }
.badge--red    { background: #fee2e2; color: #b91c1c; }


/* ── Stat cards (dashboard) ────────────────────────────────────────────── */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-8);
}

.stat-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--sp-4) var(--sp-5);
}
.stat-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 0 0 var(--sp-1);
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
}
.stat-note {
    font-size: 0.75rem;
    color: var(--color-subtle);
    margin: var(--sp-1) 0 0;
}


/* ── Action grid (dashboard three-column) ──────────────────────────────── */

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: var(--sp-6);
}
.action-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--sp-5) var(--sp-6);
}
.action-card-title {
    margin: 0 0 var(--sp-4);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

/* List of text links in a card */
.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.link-list a {
    font-size: 0.875rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s;
}
.link-list a:hover { color: var(--color-primary-dark); }

/* Column of buttons in a card */
.btn-stack {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}


/* ── Data tables ───────────────────────────────────────────────────────── */

.table-wrap {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    font-size: 0.875rem;
}
.data-table thead {
    background: #f9fafb;
    border-bottom: 1px solid var(--color-border);
}
.data-table th {
    padding: var(--sp-3) var(--sp-5);
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    white-space: nowrap;
}
.data-table td {
    padding: var(--sp-3) var(--sp-5);
    border-top: 1px solid var(--color-border-light);
    vertical-align: middle;
    color: var(--color-text);
}
.data-table tbody tr:hover td { background: #fafafa; }
.data-table .col-right { text-align: right; white-space: nowrap; }


/* ── Forms ─────────────────────────────────────────────────────────────── */

/* Constrain form width — prevents inputs stretching to full page on wide screens */
.form-width  { max-width: 28rem; }
.form-width--lg { max-width: 36rem; }

.form-group { margin-bottom: var(--sp-4); }

/* <label> styling — associates label text with its input */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-muted);
    margin-bottom: var(--sp-1);
}
/* Supplementary hint text within a label (e.g. "optional", "minimum 8 characters") */
.form-label-hint {
    font-weight: 400;
    color: var(--color-subtle);
    font-size: 0.8125rem;
}

/* Text inputs, email, password */
.form-input,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: 0.4375rem var(--sp-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-white);
    color: var(--color-text);
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.15);
    outline: none;
}
.form-input.is-invalid,
.form-select.is-invalid  { border-color: var(--color-danger); }

/* Native <select> down-arrow via inline SVG background image */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234b5563'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 1.125rem;
    padding-right: 2.25rem;
    cursor: pointer;
}

/* Field-level error message — placed immediately after the input */
.field-error {
    font-size: 0.8125rem;
    color: var(--color-danger);
    margin-top: var(--sp-1);
}

/* Field-level hint — placed after the input */
.field-hint {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin-top: var(--sp-1);
}

/* Checkbox / radio with associated label text */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 0.875rem;
    color: var(--color-text);
    cursor: pointer;
    line-height: 1.4;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Error summary box at the top of a form */
.error-summary {
    background: var(--color-danger-bg);
    border: 1px solid var(--color-danger-border);
    border-radius: var(--radius);
    padding: var(--sp-3) var(--sp-4);
    margin-bottom: var(--sp-5);
}
.error-summary p       { margin: 0; font-size: 0.875rem; color: var(--color-danger); }
.error-summary p + p   { margin-top: var(--sp-1); }

/* Horizontal rule inside forms */
.form-hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--sp-5) 0;
}

/* Row of action buttons at the bottom of a form */
.form-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
    padding-top: var(--sp-2);
}


/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 0.4375rem var(--sp-5);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
}
.btn--primary:hover { background: var(--color-primary-dark); color: var(--color-white); }

.btn--secondary {
    background: #f3f4f6;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn--secondary:hover { background: #e5e7eb; color: var(--color-text); }

.btn--danger {
    background: var(--color-danger);
    color: var(--color-white);
}
.btn--danger:hover { background: #991b1b; color: var(--color-white); }

/* Ghost-style button — used for non-destructive secondary actions */
.btn--ghost {
    background: none;
    color: var(--color-muted);
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}
.btn--ghost:hover { color: var(--color-text); }

/* Full-width variant */
.btn--full { width: 100%; }


/* ── Login page ────────────────────────────────────────────────────────── */

/* Applied to <body> on the standalone login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-6);
}

.login-box {
    width: 100%;
    max-width: 24rem;
}

.login-header {
    text-align: center;
    margin-bottom: var(--sp-8);
}
.login-app-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}
.login-app-subtitle {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin: var(--sp-1) 0 0;
}
.login-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--sp-8);
}
.login-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 var(--sp-6);
}
.login-card-subtitle {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin: calc(-1 * var(--sp-4)) 0 var(--sp-6);
}
/* "Back to sign in" / "Forgot password?" link below the form card */
.login-card-back {
    text-align: center;
    margin-top: var(--sp-4);
    font-size: 0.875rem;
}
.login-card-back a {
    color: var(--color-primary);
    text-decoration: none;
}
.login-card-back a:hover { text-decoration: underline; }

/* Inline alert — success state (e.g. reset link sent, password changed) */
.alert {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius);
    margin-bottom: var(--sp-5);
    font-size: 0.875rem;
}
.alert--success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}
.alert--warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #78350f;
}
.alert--info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}


/* ── Visitor log ───────────────────────────────────────────────────────── */

/* Filter row on the visitor log page */
.visitor-filters {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

/* Photo thumbnail shown in the visitor log table */
.visitor-photo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-border-light);
    flex-shrink: 0;
}

/* Pagination wrapper — centres Laravel's default pagination links */
.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: var(--sp-4);
    font-size: 0.875rem;
}


/* ── Admin user management ─────────────────────────────────────────────── */

/* Temporary password shown once after account creation */
.temp-password-display {
    display: inline-block;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    border-radius: var(--radius);
    padding: var(--sp-2) var(--sp-4);
    color: var(--color-warning);
}

/* Small button variant for inline table actions */
.btn--sm {
    padding: 0.25rem var(--sp-3);
    font-size: 0.8125rem;
}


/* ── Settings page ─────────────────────────────────────────────────────── */

/* Outer wrapper for each settings group (Volunteer Lookup, Photo Capture…) */
.settings-section {
    margin-bottom: var(--sp-6);
}

/* Section heading above each card */
.settings-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 0 0 var(--sp-2);
}

/* Vertical stack of checkbox / radio rows inside a settings card */
.settings-check-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}


/* ── Utility ───────────────────────────────────────────────────────────── */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.text-muted    { color: var(--color-muted); }
.text-right    { text-align: right; }
.mt-6          { margin-top: var(--sp-6); }
.mt-8          { margin-top: var(--sp-8); }
.mb-4          { margin-bottom: var(--sp-4); }
.mb-6          { margin-bottom: var(--sp-6); }

/* ── Badge-printing settings row ──────────────────────────────────────── */

/* Wraps one sign-in type: checkbox label on top, roll selector below. */
.settings-badge-row {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

/* Inline roll radio buttons, indented to align with the checkbox label text. */
.badge-roll-select {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding-left: 1.5rem;
    flex-wrap: wrap;
}

/* Hide when the parent badge-printing checkbox is unchecked. */
.badge-roll-select[hidden] {
    display: none;
}

/* Tab bar — used on list pages to filter by applicant type, etc. */
.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
}

.tab-bar-link {
    padding: var(--sp-2) var(--sp-4);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.1s, border-color 0.1s;
}

.tab-bar-link:hover {
    color: var(--color-text);
}

.tab-bar-link.is-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ── Multi-select dropdown ──────────────────────────────────────────────── */
/* Searchable checkbox-based multi-select used on the Volunteer Hours report  */
/* filter form (activities, classrooms). Vanilla JS — no library dependency.  */

.multi-select {
    position: relative;
    display: inline-block;
    min-width: 200px;
}

.multi-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    user-select: none;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.multi-select__trigger:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

.multi-select__trigger.is-active {
    border-color: #3b82f6;
}

.multi-select__label { flex: 1; }

.multi-select__arrow {
    color: #9ca3af;
    font-size: 0.75rem;
}

.multi-select__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 50;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 100%;
    width: max-content;
    max-width: 320px;
}

.multi-select__search {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    border-radius: 6px 6px 0 0;
    outline: none;
    box-sizing: border-box;
}

.multi-select__options {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.multi-select__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.multi-select__option:hover { background: #f9fafb; }

.multi-select__option input { cursor: pointer; }

.multi-select__footer {
    padding: 0.375rem 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.multi-select__clear {
    font-size: 0.75rem;
    color: #6b7280;
    text-decoration: none;
}

.multi-select__clear:hover { color: #374151; }

.multi-select__option--hidden { display: none; }

/* ── Print styles ───────────────────────────────────────────────────── */

@media print {
    /* Hide chrome — nav, filters, buttons, pagination */
    /* Actual nav element: <header> > <nav class="topnav"> in admin/layout.blade.php */
    header,
    nav,
    .topnav,
    .topbar,
    .admin-nav,
    .admin-topbar,
    .admin-header,
    .breadcrumb,
    .skip-link,
    form,
    .btn,
    .pagination,
    .page-actions { display: none !important; }

    body { font-size: 11pt; color: #000; background: white; }

    .page-header { margin-bottom: 0.5rem; }

    /* Report description — shown prominently as the print title */
    .report-description {
        font-size: 12pt;
        color: #000 !important;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    /* Summary bar */
    .report-summary {
        font-size: 10pt;
        margin-bottom: 1rem;
        border-bottom: 1pt solid #000;
        padding-bottom: 0.5rem;
        /* Override the screen blue background for print */
        background: none !important;
        border: none !important;
        border-bottom: 1pt solid #000 !important;
        border-radius: 0 !important;
        color: #000 !important;
    }

    /* Table */
    .table-wrap { overflow: visible; }
    table { width: 100%; border-collapse: collapse; font-size: 10pt; }
    th {
        background: #f3f4f6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border-bottom: 1.5pt solid #000;
        padding: 4pt 6pt;
        text-align: left;
        font-weight: 700;
    }
    td {
        border-bottom: 0.5pt solid #ddd;
        padding: 4pt 6pt;
    }
    tfoot td {
        border-top: 1.5pt solid #000;
        font-weight: 700;
    }

    /* Prevent rows from splitting across pages; repeat header + footer */
    tr { page-break-inside: avoid; }
    thead { display: table-header-group; }
    tfoot { display: table-footer-group; }

    /* Printed-at timestamp in the bottom-right corner */
    main.main-content::after {
        content: "Printed " attr(data-printed-at);
        display: block;
        font-size: 8pt;
        color: #666;
        margin-top: 1rem;
        text-align: right;
    }
}
