/* awesome-planner v2 — page-specific styles.
 *
 * This file is a thin overlay on top of MIA's design system
 * (mia-tokens.css + mia-components.css). It contains only the
 * patterns that don't exist in MIA's component library:
 *
 *   - Calendar grid (.calendar, .day, .month-heading, .day-spacer, .weekday-label)
 *   - Assignment cells inside calendar days
 *   - Edit popover (positioned modal)
 *   - Edit badges on calendar cells (pre/post-publish)
 *   - Cell history list
 *   - Schedule draft / published visual treatment
 *   - Infeasibility / relaxed-constraints report
 *   - Solve-progress polling fragment
 *
 * Everything else (buttons, inputs, cards, pills, tables, sidebar,
 * header, login card, layout helpers) lives in mia-components.css.
 */

/* Universal box-sizing — the MIA stylesheet uses width:100% on
   .mia-content combined with padding:24px, which under the browser
   default `content-box` adds the padding on top, producing 48px of
   horizontal overflow that pushed page-head actions past the right
   edge. Standard reset. */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Reset browser defaults. The shell handles the height itself. */
html, body {
    margin: 0;
    padding: 0;
}

/* Shell layout overrides:
 *
 * MIA's stylesheet uses height: 100% on .mia-shell which only works
 * when the page fits in the viewport. On long pages (16-row doctors
 * table, multi-month calendar) the shell stays viewport-tall while
 * the document grows, and the sidebar's brand + nav block scrolls
 * out of view because the sidebar's `position: sticky` is relative
 * to the (short) shell.
 *
 * Fix: stretch the shell to at least viewport height, pin the
 * sidebar to viewport (sticky + 100vh height) so the brand + nav
 * follow the scroll, and make the header sticky so the breadcrumb
 * + user menu stay accessible. */
.mia-shell {
    min-height: 100vh;
    height: auto;
}

.mia-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    /* Allow long sidebars to scroll internally rather than overflow
       the viewport. Stays invisible on most viewports — only kicks
       in if we ever grow the nav past ~700px tall. */
    overflow-y: auto;
}

.mia-header {
    position: sticky;
    top: 0;
    z-index: 5;
}

/* Keep page-head actions from shrinking when the left-side lede
   text is long — they wrap inside their flex column instead of
   compressing the action button. */
.mia-page-head > div:first-child {
    min-width: 0;
}
.mia-page-head .mia-page-actions {
    flex-shrink: 0;
}

/* --- Schedule page header --- */

.schedule-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.2rem;
}

.schedule-header h1 {
    margin: 0;
}

.status-pill {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: var(--r-pill);
    font-size: var(--text-caption);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-pill.status-draft {
    background: var(--accent-soft);
    color: var(--accent-700);
}

.status-pill.status-published {
    background: var(--success-soft);
    color: var(--success-700);
}

/* --- Draft styling on the schedule card ---
 *
 * Subtle: a dashed top border + a tinted background, plus a banner
 * below the title. A manager glancing at the page can tell at once
 * whether they're looking at a draft. Too aggressive would feel
 * like an error; goal is "not yet final".
 */
.schedule-card.is-draft {
    border-top: 3px dashed var(--accent-500);
    background: linear-gradient(180deg, var(--accent-soft) 0%, var(--canvas-elevated) 80px);
}

.schedule-card.is-draft .calendar .day {
    border-style: dashed;
}

.draft-banner {
    background: var(--accent-soft);
    border-left: 3px solid var(--accent-500);
    padding: 0.6rem 1rem;
    border-radius: var(--r-sm);
    margin: 0.8rem 0;
    color: var(--accent-700);
}

.draft-banner strong {
    margin-right: 0.4rem;
}

.publish-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    background: var(--brand-soft);
    border-radius: var(--r-md);
}

.publish-form small {
    color: var(--ink-muted);
    flex: 1;
}

/* --- Schedule filters (location + role dropdowns) --- */

.filters {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters label {
    margin: 0;
    flex: 0 0 auto;
}

.filters select {
    width: auto;
    min-width: 140px;
}

/* --- Calendar grid (one per month) --- */

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.month-heading {
    /* Sticky so the month name stays visible while scrolling
       through that month's weeks. z-index 1 stays below the edit
       popover (z-index 100 in MIA). */
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--canvas-elevated);
    margin: 1.5rem 0 0.3rem;
    padding: 0.5rem 0;
    font-size: var(--text-h3);
    font-weight: 600;
    color: var(--brand-700);
    border-bottom: 1px solid var(--line);
}

.month-heading:first-of-type {
    margin-top: 0.8rem;
}

.weekday-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--ink-subtle);
    text-align: center;
    padding: 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.day-spacer {
    /* Empty grid cell so the first day of a month lines up under
       its correct weekday column. Borderless and invisible. */
    min-height: 0;
}

.day {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 0.6rem;
    min-height: 110px;
    background: var(--canvas-elevated);
}

.day.weekend {
    background: var(--canvas-sunken);
}

.day-header {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.4rem;
    font-variant-numeric: tabular-nums;
}

.day-empty {
    color: var(--ink-subtle);
    text-align: center;
    margin-top: 1.5rem;
    font-size: var(--text-caption);
}

/* --- Assignment cells inside calendar days --- */

.assignment-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
}

.assignment,
.assignment-editable {
    font-size: 11px;
    display: flex;
    flex-direction: column;
    padding: 4px 8px;
    margin-bottom: 0;
    border-radius: 6px;
    background: var(--shift-touring-soft);
    border-left: 2px solid var(--shift-touring);
    line-height: 1.3;
    font-weight: 500;
}

.assignment-editable {
    cursor: pointer;
    width: 100%;
    text-align: left;
    border: none;
    border-left: 2px solid var(--shift-touring);
    font-family: inherit;
    color: inherit;
    transition: background-color var(--dur-fast) var(--ease-standard);
}

.assignment-editable:hover {
    background: var(--brand-50);
}

.assignment-editable:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 1px;
}

/* Shift-type colour modifiers — applied as a second class on
   .assignment / .assignment-editable to colour the chip. */
.assignment.shift--touring,        .assignment-editable.shift--touring        { background: var(--shift-touring-soft);        border-left-color: var(--shift-touring); }
.assignment.shift--oncall-weekday, .assignment-editable.shift--oncall-weekday { background: var(--shift-oncall-weekday-soft); border-left-color: var(--shift-oncall-weekday); }
.assignment.shift--oncall-weekend, .assignment-editable.shift--oncall-weekend { background: var(--shift-oncall-weekend-soft); border-left-color: var(--shift-oncall-weekend); }
.assignment.shift--permanence-pm,  .assignment-editable.shift--permanence-pm  { background: var(--shift-permanence-pm-soft);  border-left-color: var(--shift-permanence-pm); }
.assignment.shift--sleep-in,       .assignment-editable.shift--sleep-in       { background: var(--shift-sleep-in-soft);       border-left-color: var(--shift-sleep-in); }
.assignment.shift--consult,        .assignment-editable.shift--consult        { background: var(--shift-consult-soft);        border-left-color: var(--shift-consult); }
.assignment.shift--free,           .assignment-editable.shift--free           { background: var(--shift-free-soft);           border-left-color: var(--shift-free); color: var(--ink-muted); }
.assignment.shift--time-off,       .assignment-editable.shift--time-off       { background: var(--shift-time-off-soft);       border-left-color: var(--shift-time-off); }
.assignment.shift--late,           .assignment-editable.shift--late           { background: var(--shift-late-soft);           border-left-color: var(--shift-late); }

.assignment .doctor,
.assignment-editable .doctor {
    font-weight: 600;
    color: var(--ink);
}

.assignment .shift,
.assignment .location,
.assignment-editable .shift,
.assignment-editable .location {
    color: var(--ink-muted);
    font-size: 10.5px;
}

/* --- Roster-view (loc-spec) tweaks layered on the MIA team-schedule CSS --- */

/* Collapsible <details> sections — used for both location panels
   (Genk / Maaseik) and specialty bands (Peds / Neos) inside them.
   Hides the default disclosure triangle and swaps in a chevron icon
   that rotates 0deg → -180deg on toggle. */
.ts-collapsible > summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.ts-collapsible > summary::-webkit-details-marker {
    display: none;
}
.ts-collapsible > summary > .ts-collapsible-chevron {
    width: 16px;
    height: 16px;
    color: var(--ink-muted);
    transition: transform var(--dur-fast) var(--ease-standard);
    flex-shrink: 0;
}
.ts-collapsible[open] > summary > .ts-collapsible-chevron {
    transform: rotate(180deg);
}
.ts-collapsible > summary:hover > .ts-collapsible-chevron {
    color: var(--ink);
}

/* Specialty-band summary needs to keep the icon + title + rule on
   one flex row, mirroring the non-summary version. */
.ts-spec-band.ts-collapsible > summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Disabled prev/next week buttons render as muted ghosts. */
.mia-icon-btn.is-disabled,
.mia-icon-btn[aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Edit-mark dot in the corner of a shift chip — surfaces that an
   edit was applied. Manager view uses a button parent so the dot
   inherits no special positioning. */
.ts-cell-edit-mark {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-500);
    box-shadow: 0 0 0 2px var(--canvas-elevated);
}
.ts-cell-edit-mark.edit-badge-pre_publish {
    background: var(--ink-subtle);
}
.ts-cell { position: relative; }

/* --- Edit popover (modal-style fragment) --- */

/* Backdrop catches clicks outside the popover and closes it.
 * Without this, clicks on the calendar cells behind the popover
 * either land on .edit-popover (silently) or on cells visually
 * not under it (counter-intuitively), depending on the cell's
 * position relative to the centered fixed popover. */
.edit-popover-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 46, 39, 0.18);
    z-index: 99;
    cursor: pointer;
    animation: edit-popover-fade-in var(--dur-fast) var(--ease-standard);
}

@keyframes edit-popover-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.edit-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, 92vw);
    max-height: 80vh;
    overflow-y: auto;
    background: var(--canvas-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    box-shadow: var(--e-4);
    z-index: 100;
    cursor: default;
}

.edit-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.edit-popover-header h3 {
    margin: 0;
    font-size: var(--text-h3);
}

.edit-popover-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.3rem 1rem;
    margin: 1rem 0;
    padding: 0.8rem;
    background: var(--canvas-sunken);
    border-radius: var(--r-sm);
    font-size: var(--text-body-sm);
}

.edit-popover-meta dt {
    color: var(--ink-muted);
    font-weight: 500;
    margin: 0;
}

.edit-popover-meta dd {
    margin: 0;
    font-family: var(--font-mono);
}

.edit-popover-violations {
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    background: var(--danger-soft);
    border-left: 3px solid var(--danger-500);
    border-radius: var(--r-sm);
}

.edit-popover-violations .lede {
    margin: 0 0 0.5rem;
    color: var(--danger-700);
}

.edit-popover-violations ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.edit-popover-violations li {
    padding: 0.3rem 0;
    font-size: var(--text-body-sm);
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem;
    align-items: start;
}

.edit-popover-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

/* --- Edit badges on calendar cells ---
 *
 * Pre-publish edits (manager-only view): subtle, gray.
 * Post-publish edits (visible to doctors too): more prominent —
 * doctors need to notice "this changed since last time I looked".
 */

.edit-badge {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
    font-size: 10.5px;
    padding: 0.2rem 0.4rem;
    border-radius: var(--r-sm);
    text-decoration: none;
    color: var(--ink-muted);
    cursor: pointer;
    line-height: 1.2;
}

.edit-badge:hover {
    text-decoration: underline;
}

.edit-badge-pre_publish {
    background: var(--canvas-sunken);
    border-left: 2px solid var(--line-strong);
}

.edit-badge-post_publish {
    background: var(--accent-soft);
    border-left: 2px solid var(--accent-500);
    color: var(--accent-700);
    font-weight: 500;
}

.edit-badge-when {
    font-weight: 500;
}

.edit-badge-was {
    color: var(--ink-muted);
    flex-basis: 100%;
    font-style: italic;
}

/* --- Cell history page --- */

.back-link {
    display: inline-block;
    color: var(--brand-700);
    text-decoration: none;
    font-size: var(--text-body-sm);
    margin-bottom: 1rem;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.history-entry {
    display: grid;
    grid-template-columns: max-content max-content 1fr max-content;
    gap: 0.8rem 1.2rem;
    align-items: baseline;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 0.6rem;
    background: var(--canvas-elevated);
}

.history-entry-post_publish {
    border-left: 3px solid var(--accent-500);
    background: var(--accent-soft);
}

.history-entry-when {
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    color: var(--ink-muted);
    font-size: var(--text-body-sm);
}

.history-entry-who {
    font-weight: 500;
}

.history-entry-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: var(--text-body-sm);
}

.history-entry-change .arrow {
    color: var(--ink-subtle);
}

.history-entry-change .from-empty,
.history-entry-change .to-removed {
    color: var(--ink-subtle);
    font-style: italic;
}

.history-entry-kind {
    background: var(--accent-soft);
    color: var(--accent-700);
    padding: 0.15rem 0.5rem;
    border-radius: var(--r-pill);
    font-size: var(--text-caption);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Infeasibility / relaxed constraints --- */

.relaxed-list {
    list-style: none;
    padding: 0;
}

.relaxed-list li {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1rem 1.2rem;
    margin: 0.6rem 0;
    background: var(--canvas-elevated);
}

.severity {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: var(--r-sm);
    font-size: var(--text-caption);
    margin-left: 0.5rem;
    font-weight: 500;
}

.severity-soft {
    background: var(--accent-soft);
    color: var(--accent-700);
}

.severity-hard {
    background: var(--danger-soft);
    color: var(--danger-700);
}

/* --- Solve-progress polling fragment --- */

.solve-progress {
    text-align: center;
    padding: 4rem 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--canvas-sunken);
    border-radius: var(--r-pill);
    overflow: hidden;
    margin: 1rem auto;
    max-width: 480px;
}

.progress-fill {
    height: 100%;
    background: var(--brand-500);
    transition: width 0.4s ease;
}

/* --- Empty state full page (manager: no schedules, doctor: nothing published) --- */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--canvas-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    max-width: 560px;
    margin: 2rem auto;
}

.empty-state h1 {
    margin: 0 0 0.5rem;
    color: var(--brand-700);
}

/* Illustration only — scoped to direct-child img/svg so lucide
   icons inside nested buttons or pills aren't accidentally
   blown up to 200px and centered (which broke the "Generate"
   CTA's inline icon+text layout). */
.empty-state > img,
.empty-state > svg {
    display: block;
    max-width: 200px;
    margin: 0 auto 1.5rem;
}

/* Inline empty marker — for "no rows yet" inside a list/card where
   the surrounding chrome (heading, CTA) is already shown. */
.empty {
    color: var(--ink-muted);
    padding: 1.5rem 0;
    text-align: center;
    font-style: italic;
}

/* --- Pending drafts list on /generate ---
 * One row per unpublished draft. Each row links to /schedule?id=…
 * which opens the draft in the calendar view for review/edit/publish. */
.drafts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.draft-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.8rem 1rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--canvas);
}

.draft-row-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: inherit;
    text-decoration: none;
}

.draft-row-main * {
    text-decoration: none;
}

.draft-row-main:hover .draft-row-period {
    color: var(--brand-700);
}

.draft-row-period {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ink);
}

.draft-row-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.draft-row-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Trash button on the draft row: pad it tight so the icon stays
   centered and the danger colour comes from the inline style. */
.draft-row-actions form button[title="Delete draft"] {
    padding: 5px 8px;
}
.draft-row-actions form button[title="Delete draft"]:hover {
    background: var(--danger-soft);
    border-color: var(--danger-100);
}

/* --- Page-level error message --- */

.error {
    color: var(--danger-700);
    background: var(--danger-soft);
    border: 1px solid var(--danger-100);
    padding: 0.6rem 0.8rem;
    border-radius: var(--r-sm);
    margin: 1rem 0;
    font-size: var(--text-body-sm);
}

.field-error {
    color: var(--danger-700);
    font-size: var(--text-caption);
    margin: 0.2rem 0 0;
}

/* --- Conflict card on overlap-rejection page --- */

.conflict-card {
    border: 1px solid var(--line);
    background: var(--accent-soft);
    border-left: 3px solid var(--accent-500);
    border-radius: var(--r-md);
    padding: 1rem 1.2rem;
    margin: 1.2rem 0;
}

.conflict-card p {
    margin: 0.3rem 0;
}

/* --- Avatar dropdown (topbar user menu) ---
 *
 * <details> + <summary> — keyboard accessible, no JS for open/close.
 * A small inline script in layout.templ closes it on outside-click
 * via document.addEventListener; not needed for keyboard users (they
 * can press Escape or Tab away). */
.mia-user-menu {
    position: relative;
}
.mia-user-menu > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--r-md);
}
.mia-user-menu > summary::-webkit-details-marker {
    display: none;
}
.mia-user-menu > summary:hover {
    background: var(--canvas-sunken);
}
.mia-user-menu-caret {
    width: 14px;
    height: 14px;
    color: var(--ink-muted);
    transition: transform var(--dur-fast) var(--ease-standard);
}
.mia-user-menu[open] .mia-user-menu-caret {
    transform: rotate(180deg);
}
.mia-user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 220px;
    background: var(--canvas-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--e-3);
    padding: 4px;
    z-index: 50;
}
.mia-user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    text-decoration: none;
    color: var(--ink);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.mia-user-menu-item:hover {
    background: var(--canvas-sunken);
}
.mia-user-menu-item.is-disabled,
.mia-user-menu-item[aria-disabled="true"] {
    color: var(--ink-subtle);
    cursor: not-allowed;
    opacity: 0.6;
}
.mia-user-menu-item.is-disabled:hover,
.mia-user-menu-item[aria-disabled="true"]:hover {
    background: transparent;
}
.mia-user-menu-item svg {
    width: 14px;
    height: 14px;
    color: var(--ink-muted);
    flex-shrink: 0;
}
.mia-user-menu-divider {
    height: 1px;
    background: var(--line);
    margin: 4px 8px;
}
.mia-user-menu-form {
    margin: 0;
    padding: 0;
}

/* --- Doctor edit form ---
 *
 * Free-day picker has two modes: a single weekday select (default)
 * and a pair of selects when "alternating" is toggled on. The
 * container carries a data-alternating attribute that flips
 * which sub-block is visible. The `<input onchange>` mirrors
 * the checkbox state to the parent attribute live so this is
 * one toggle, no JS framework. */
.doctor-edit-freeday .doctor-edit-freeday-alt {
    display: none;
}
.doctor-edit-freeday[data-alternating="true"] .doctor-edit-freeday-single {
    display: none;
}
.doctor-edit-freeday[data-alternating="true"] .doctor-edit-freeday-alt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: var(--canvas-sunken);
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
}
.doctor-edit-freeday-single {
    /* The default (no alternation) — no special framing, sits
       inline like the other fields. */
}

/* Qualifications checklist: tidy multi-column layout so the
   eight options fit without dominating the form. */
.doctor-edit-quals {
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 0.75rem 1rem 0.85rem;
    background: var(--canvas-sunken);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1.2rem;
}
.doctor-edit-quals legend {
    grid-column: 1 / -1;
    font-weight: 600;
    padding: 0 0.4rem;
}
.doctor-edit-quals .mia-subtle {
    grid-column: 1 / -1;
    margin-bottom: 0.2rem;
}

/* === Banner variants (success / warn) ====================================
 * MIA ships a default `.mia-banner` styled as brand-teal. The password
 * reset confirmation needs an amber "this is one-time" warning; the
 * change-password success state needs a sage "saved" affirmation.
 */
.mia-banner-success {
    background: var(--success-50);
    border-color: var(--success-100);
    color: var(--success-700);
}
.mia-banner-success svg { color: var(--success-500); }

.mia-banner-warn {
    background: var(--accent-50);
    border-color: var(--accent-100);
    color: var(--accent-700);
}
.mia-banner-warn svg { color: var(--accent-500); }

/* === Password reset confirmation =========================================
 * The temp password is shown once. Render it large + monospace so the
 * manager can read it out, and offset visually so it doesn't get lost
 * in surrounding copy.
 */
.password-reset-temp {
    background: var(--canvas-sunken);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 12px 16px;
}
.password-reset-code {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.04em;
    user-select: all;
}

/* === Preferences form ====================================================
 * The two date fields sit side-by-side at >= ~520px and stack on narrow
 * viewports. Native <input type=date> picks up MIA's input styling
 * automatically (the .mia-input class on the input handles it).
 */
.preference-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 520px) {
    .preference-date-row { grid-template-columns: 1fr; }
}
