/* ==========================================================================
   Epsilon AI — Instructor Scheduling
   Hand-written CSS, no build step and no external requests, so the app works
   on shared hosting exactly as it does locally.
   ========================================================================== */

:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #fafbfc;
    --border: #e3e6ea;
    --border-strong: #cdd3da;
    --text: #16202c;
    --muted: #5f6c7b;

    --brand: #1f4fd8;
    --brand-dark: #163ba6;
    --brand-soft: #eaf0ff;

    --ok: #12805c;
    --ok-soft: #e4f6ef;
    --warn: #a35b00;
    --warn-soft: #fdf1e0;
    --danger: #c02626;
    --danger-soft: #fdeaea;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-lg: 0 4px 16px rgba(16, 24, 40, .08);

    --sidebar-w: 244px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f141b;
        --surface: #161d26;
        --surface-2: #1b2430;
        --border: #26313f;
        --border-strong: #35424f;
        --text: #e7edf4;
        --muted: #93a1b1;

        --brand: #5b8cff;
        --brand-dark: #7ba3ff;
        --brand-soft: #1a2540;

        --ok: #34c896;
        --ok-soft: #12291f;
        --warn: #e0a35a;
        --warn-soft: #2b2114;
        --danger: #ff7b7b;
        --danger-soft: #2c1717;

        --shadow: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow-lg: 0 4px 16px rgba(0, 0, 0, .4);
    }
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 .75rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
small { font-size: 12px; }

/* --- Environment ribbon --------------------------------------------------- */
.env-ribbon {
    background: repeating-linear-gradient(45deg, var(--warn) 0 12px, #8f4f00 12px 24px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: center;
    padding: 4px 8px;
}

/* --- Shell ---------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1rem; border-bottom: 1px solid var(--border); }
.brand-mark {
    width: 32px; height: 32px; flex: 0 0 32px;
    display: grid; place-items: center;
    background: var(--brand); color: #fff;
    border-radius: 8px; font-weight: 700; font-size: 18px;
}
.brand-mark-lg { width: 48px; height: 48px; font-size: 26px; margin: 0 auto .75rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 14px; }
.brand-text small { color: var(--muted); font-size: 11px; }

.nav { flex: 1; overflow-y: auto; padding: .6rem .5rem; }
.nav-link {
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem .65rem; margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--text); font-weight: 500;
}
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-divider { padding: 1rem .65rem .3rem; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }

.sidebar-foot { padding: .75rem; border-top: 1px solid var(--border); display: grid; gap: .5rem; }
.user-chip { display: flex; align-items: center; gap: .55rem; color: var(--text); padding: .3rem; border-radius: var(--radius-sm); }
.user-chip:hover { background: var(--surface-2); text-decoration: none; }
.user-chip span { display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.user-chip strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip small { color: var(--muted); }
.avatar {
    width: 30px; height: 30px; flex: 0 0 30px;
    display: grid !important; place-items: center;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 50%; font-weight: 700; font-size: 13px;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; gap: .75rem;
    padding: .85rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; flex: 1; min-width: 0; }
.topbar-actions { display: flex; gap: .5rem; }

.icon-btn {
    display: none;
    background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .35rem; cursor: pointer; color: var(--text);
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.content { flex: 1; padding: 1.5rem; max-width: 1400px; width: 100%; }

.footer {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.5rem; color: var(--muted); font-size: 12px;
    border-top: 1px solid var(--border);
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .5rem .85rem;
    font: inherit; font-weight: 550; font-size: 13.5px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    cursor: pointer; white-space: nowrap;
    transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.link { color: var(--brand); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link-danger { color: var(--danger); }

/* --- Alerts --------------------------------------------------------------- */
.alert {
    padding: .75rem 1rem; margin-bottom: 1rem;
    border: 1px solid var(--border); border-left-width: 3px;
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.alert-success { border-left-color: var(--ok); background: var(--ok-soft); }
.alert-error   { border-left-color: var(--danger); background: var(--danger-soft); }
.alert-warning { border-left-color: var(--warn); background: var(--warn-soft); }
.alert-info    { border-left-color: var(--brand); background: var(--brand-soft); }
.alert ul { margin: .5rem 0 .25rem; padding-left: 1.2rem; }
.alert ul.tight li { margin-bottom: .2rem; }

/* --- Panels & layout ------------------------------------------------------ */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.15rem 1.15rem;
    margin-bottom: 1.25rem;
}
.panel-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    padding-bottom: .7rem; margin-bottom: .9rem;
    border-bottom: 1px solid var(--border);
}
.panel-head h2 { font-size: 14.5px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.25rem; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.toolbar p { margin: 0; max-width: 60ch; }

/* --- Stats ---------------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
    display: flex; flex-direction: column; gap: .15rem;
    padding: 1rem 1.1rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    color: var(--text);
}
a.stat:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.stat-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 680; line-height: 1.15; letter-spacing: -.02em; }
.stat-value-sm { font-size: 17px; }
.stat-note { font-size: 12px; color: var(--muted); }
.stat-ok .stat-value { color: var(--ok); }
.stat-danger .stat-value { color: var(--danger); }
.stat-warn .stat-value { color: var(--warn); }
.stat-static { cursor: default; }

/* --- Tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel .table-wrap { border: 0; box-shadow: none; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); font-weight: 650;
    padding: .6rem .85rem; border-bottom: 1px solid var(--border);
    background: var(--surface-2); white-space: nowrap;
}
.table td { padding: .65rem .85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table td small { display: block; color: var(--muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .num small { text-align: right; }
.table-compact td, .table-compact th { padding: .45rem .7rem; }
.nowrap { white-space: nowrap; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions form { display: inline; margin-left: .5rem; }
.row-warn { background: var(--warn-soft); }

.result-count { color: var(--muted); font-size: 12.5px; margin-bottom: .5rem; }

/* --- Badges --------------------------------------------------------------- */
.badge {
    display: inline-block; padding: .1rem .45rem;
    font-size: 11px; font-weight: 650; text-transform: capitalize;
    border-radius: 4px; border: 1px solid var(--border-strong);
    background: var(--surface-2); color: var(--muted);
}
.badge-confirmed, .badge-active { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.badge-draft { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.badge-cancelled, .badge-inactive { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.badge-completed, .badge-archived { background: var(--surface-2); color: var(--muted); }

/* --- Forms ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; border: 0; padding: 0; }
.field > span, .field legend { font-size: 12.5px; font-weight: 600; color: var(--text); padding: 0; }
.field input, .field select, .field textarea, .filters input, .filters select {
    font: inherit; font-size: 13.5px;
    padding: .5rem .6rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
.filters input:focus, .filters select:focus {
    outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand);
}
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.hint { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.field-error { color: var(--danger); font-size: 12px; margin: 0; font-weight: 550; }

.check-inline { display: flex; align-items: center; gap: .4rem; font-size: 13.5px; white-space: nowrap; }
.check-inline input { width: auto; }

.stack { display: grid; gap: 0; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.form-main { min-width: 0; }
.form-aside { min-width: 0; }
.sticky { position: sticky; top: 5rem; }
.form-narrow { max-width: 780px; }
.form-actions { display: flex; gap: .6rem; margin-bottom: 1.5rem; }

.filters {
    display: flex; flex-wrap: wrap; gap: .55rem; align-items: center;
    margin-bottom: 1.25rem; padding: .85rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.filters input[type="search"] { flex: 1 1 220px; width: auto; }
.filters select { width: auto; flex: 0 1 190px; }
.push-right { margin-left: auto; }

.inline-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; }
.inline-form .field { margin-bottom: 0; flex: 0 1 150px; }

.danger-zone {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 1rem 1.15rem; margin-bottom: 2rem;
    border: 1px solid var(--danger); border-radius: var(--radius);
    background: var(--danger-soft);
}
.danger-zone small { display: block; color: var(--muted); }

/* --- Day picker ----------------------------------------------------------- */
.day-picker { display: flex; flex-wrap: wrap; gap: .35rem; }
.day-picker label { position: relative; }
.day-picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.day-picker span {
    display: block; padding: .4rem .7rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 550; cursor: pointer; user-select: none;
    background: var(--surface);
}
.day-picker input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.day-picker input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.day-presets { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.chip {
    font: inherit; font-size: 11.5px; padding: .2rem .55rem;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface-2); color: var(--muted); cursor: pointer;
}
.chip:hover { color: var(--brand); border-color: var(--brand); }

/* --- Conflict panel ------------------------------------------------------- */
.conflict-body { display: grid; gap: .6rem; font-size: 13px; }
.conflict-item {
    padding: .6rem .7rem; border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
}
.conflict-item.blocking { background: var(--danger-soft); border-left-color: var(--danger); }
.conflict-item.warning  { background: var(--warn-soft); border-left-color: var(--warn); }
.conflict-item.ok       { background: var(--ok-soft); border-left-color: var(--ok); }
.conflict-item strong { display: block; margin-bottom: .15rem; }
.conflict-item .dates { color: var(--muted); font-size: 11.5px; }

.conflict-summary { display: grid; gap: .3rem; padding: .6rem .7rem; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 12.5px; }
.conflict-summary div { display: flex; justify-content: space-between; gap: 1rem; }
.conflict-summary strong { font-variant-numeric: tabular-nums; }

.checking { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: .4rem; }
.spinner {
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid var(--border-strong); border-top-color: var(--brand);
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.conflict-card .panel-head h2 { color: var(--danger); }
.conflict-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .75rem; }
.conflict-side {
    display: grid; gap: .2rem; padding: .75rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 12.5px;
}
.conflict-side:hover { border-color: var(--brand); text-decoration: none; }
.conflict-side .badge { justify-self: start; margin-top: .25rem; }
.conflict-dates { margin-top: .75rem; font-size: 12.5px; color: var(--muted); }
.conflict-dates summary { cursor: pointer; color: var(--brand); }

/* --- Lists ---------------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.timeline li { display: grid; grid-template-columns: 62px 1fr auto; gap: .75rem; align-items: start; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.timeline .time { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.timeline .time small { font-weight: 400; color: var(--muted); }
.timeline .body { display: flex; flex-direction: column; min-width: 0; }
.timeline .body small { color: var(--muted); }

.load-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.load-list li { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; gap: .7rem; align-items: center; font-size: 13px; }
.load-num { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.bar { height: 7px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); }
.bar span.warn { background: var(--warn); }
.bar span.over { background: var(--danger); }
.bar-cell { min-width: 130px; }

.date-list { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; display: grid; gap: 1px; }
.date-list li { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem; border-radius: 4px; font-size: 13px; }
.date-list li:nth-child(odd) { background: var(--surface-2); }
.date-list li.past { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.date-list li.today { background: var(--brand-soft); font-weight: 600; }
.date-list .n { width: 26px; color: var(--muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.date-list em { color: var(--brand); font-style: normal; font-size: 11px; font-weight: 700; }

.definition { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: .35rem 1rem; margin: 0; font-size: 13.5px; }
.definition dt { color: var(--muted); font-size: 12.5px; }
.definition dd { margin: 0; }

.notes { white-space: pre-wrap; font-size: 13.5px; color: var(--text); background: var(--surface-2); padding: .75rem; border-radius: var(--radius-sm); }

/* --- Detail header -------------------------------------------------------- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.detail-head h2 { font-size: 20px; margin: .3rem 0 .15rem; }
.detail-actions { display: flex; gap: .5rem; }

/* --- Calendar ------------------------------------------------------------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cal-nav, .cal-switch { display: flex; gap: .35rem; }
.cal-title { font-size: 16px; }

.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.cal-day {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .5rem; min-height: 150px;
}
.cal-day.is-today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.cal-day header { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: .4rem; margin-bottom: .4rem; border-bottom: 1px solid var(--border); }
.cal-day header strong { font-size: 12px; }
.cal-day header span { font-size: 11px; color: var(--muted); }
.cal-empty { color: var(--border-strong); text-align: center; margin: 1rem 0; }

.cal-event {
    display: block; padding: .35rem .45rem; margin-bottom: .3rem;
    border-radius: var(--radius-sm); border-left: 3px solid var(--brand);
    background: var(--brand-soft); color: var(--text); font-size: 11.5px; line-height: 1.35;
}
.cal-event:hover { text-decoration: none; filter: brightness(.97); }
.cal-event strong { display: block; font-variant-numeric: tabular-nums; }
.cal-event span { display: block; font-weight: 600; }
.cal-event small { display: block; color: var(--muted); }
.cal-event.cal-draft { background: var(--warn-soft); border-left-color: var(--warn); }
.cal-event.cal-completed { background: var(--surface-2); border-left-color: var(--border-strong); }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-month-head { background: var(--surface-2); padding: .45rem; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: center; }
.cal-cell { background: var(--surface); min-height: 100px; padding: .35rem; }
.cal-cell.is-outside { background: var(--surface-2); opacity: .55; }
.cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-cell-date { display: block; font-size: 11.5px; font-weight: 650; color: var(--muted); margin-bottom: .25rem; }
.cal-pill {
    display: block; padding: .12rem .3rem; margin-bottom: 2px;
    font-size: 10.5px; border-radius: 3px;
    background: var(--brand-soft); color: var(--brand);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-pill:hover { text-decoration: none; filter: brightness(.96); }
.cal-pill.cal-draft { background: var(--warn-soft); color: var(--warn); }
.cal-pill.cal-completed { background: var(--surface-2); color: var(--muted); }
.cal-more { color: var(--muted); font-size: 10px; }

.legend { display: flex; gap: 1rem; margin-top: 1rem; color: var(--muted); font-size: 12px; }
.legend-item { display: flex; align-items: center; gap: .35rem; }
.dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.dot-confirmed { background: var(--brand); }
.dot-draft { background: var(--warn); }
.dot-completed { background: var(--border-strong); }

/* --- Empty states --------------------------------------------------------- */
.empty-state {
    text-align: center; padding: 3rem 1.5rem;
    background: var(--surface); border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}
.empty-state h2 { font-size: 17px; margin-bottom: .4rem; }
.empty-state p { color: var(--muted); max-width: 48ch; margin: 0 auto 1rem; }
.empty-ok h2 { color: var(--ok); }
.empty { color: var(--muted); text-align: center; padding: 1.25rem 0; margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.quick-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }

/* --- Centered pages (login, setup) --------------------------------------- */
body.centered { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; align-content: center; }
body.centered .env-ribbon { position: fixed; top: 0; left: 0; right: 0; }
.card-centered { width: 100%; max-width: 420px; }
.login { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 2rem 1.75rem; }
.login-brand { text-align: center; margin-bottom: 1.5rem; }
.login-brand h1 { font-size: 19px; }
.login-brand p { color: var(--muted); font-size: 12.5px; margin: .2rem 0 0; }
.login-foot { text-align: center; color: var(--muted); font-size: 11.5px; margin: 1rem 0 0; }

.setup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.75rem; }
.card-centered:has(.setup) { max-width: 620px; }
.setup h1 { font-size: 19px; margin-bottom: .6rem; }
.setup-steps { padding-left: 1.2rem; display: grid; gap: .5rem; margin: 1rem 0; }
.setup code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: .05rem .3rem; font-size: 12.5px; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1080px) {
    .form-layout { grid-template-columns: minmax(0, 1fr); }
    .sticky { position: static; }
}

@media (max-width: 860px) {
    .icon-btn { display: block; }
    .sidebar {
        position: fixed; z-index: 40; left: 0; top: 0;
        transform: translateX(-100%); transition: transform .2s ease;
        box-shadow: var(--shadow-lg);
    }
    .sidebar.is-open { transform: translateX(0); }
    .content { padding: 1rem; }
    .topbar { padding: .75rem 1rem; }
    .cal-week { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .cal-month { font-size: 10px; }
    .cal-cell { min-height: 72px; }
}

@media print {
    .sidebar, .topbar, .filters, .footer, .form-actions, .danger-zone, .quick-actions, .env-ribbon { display: none !important; }
    body { background: #fff; }
    .panel, .table-wrap { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}

/* --- Quick scheduler ------------------------------------------------------ */
.quick-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.quick-main { min-width: 0; }
.quick-aside { min-width: 0; }

.step .panel-head h2 { display: flex; align-items: center; gap: .5rem; }
.step-n {
    display: grid; place-items: center;
    width: 20px; height: 20px; flex: 0 0 20px;
    background: var(--brand); color: #fff;
    border-radius: 50%; font-size: 11px; font-weight: 700;
}

.slot-grid-wrap { overflow-x: auto; }
.slot-grid { width: 100%; border-collapse: separate; border-spacing: 3px; }
.slot-grid th {
    font-size: 11px; font-weight: 650; color: var(--muted);
    text-transform: uppercase; letter-spacing: .04em; padding: .2rem;
    text-align: center; white-space: nowrap;
}
.slot-grid tbody th { text-align: left; min-width: 92px; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text); }
.slot-grid tbody th small { display: block; color: var(--muted); font-weight: 400; font-size: 10.5px; }

.slot-cell {
    width: 100%; min-width: 58px; min-height: 44px;
    display: block; padding: .3rem .2rem;
    font: inherit; font-size: 10px; line-height: 1.2;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    background: var(--ok-soft); color: var(--ok);
    cursor: pointer; overflow: hidden; text-overflow: ellipsis;
}
.slot-cell:hover:not(:disabled) { border-color: var(--brand); }
.slot-cell.is-taken {
    background: var(--surface-2); color: var(--muted);
    cursor: not-allowed; border-color: var(--border);
}
.slot-cell.is-selected { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 650; }
.slot-cell.is-selected .slot-state::before { content: 'Selected'; }
.slot-cell:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.week-presets { display: flex; flex-wrap: wrap; gap: .3rem; }

.summary-list { display: grid; grid-template-columns: auto 1fr; gap: .3rem .75rem; margin: 0 0 .75rem; font-size: 12.5px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.suggestions { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .6rem; font-size: 12px; }
.suggestions .chip { border-color: var(--brand); color: var(--brand); }

.who-free { margin-top: .9rem; padding: .7rem; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 12.5px; }
.who-free-list { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }

.quick-actions-row { margin: 1rem 0 .5rem; }

/* --- Availability grid on the instructor page ---------------------------- */
.avail-grid { width: 100%; border-collapse: separate; border-spacing: 3px; }
.avail-grid th { font-size: 11px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; padding: .2rem; }
.avail-grid tbody th { text-align: left; text-transform: none; letter-spacing: 0; color: var(--text); font-size: 12px; white-space: nowrap; }
.avail-cell {
    padding: .35rem .3rem; border-radius: var(--radius-sm);
    font-size: 10px; text-align: center; line-height: 1.25;
}
.avail-cell.free { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.avail-cell.busy { background: var(--surface-2); color: var(--muted); }

.free-chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.free-chip {
    display: inline-block; padding: .1rem .4rem;
    background: var(--ok-soft); color: var(--ok);
    border-radius: 4px; font-size: 10.5px; font-weight: 600; white-space: nowrap;
}
.free-none { color: var(--danger); font-size: 11px; }

.branch-tag {
    display: inline-block; padding: .1rem .4rem;
    border: 1px solid var(--border-strong); border-radius: 4px;
    font-size: 10.5px; color: var(--muted); white-space: nowrap;
}

@media (max-width: 1080px) {
    .quick-layout { grid-template-columns: minmax(0, 1fr); }
}

/* --- Timetable board ------------------------------------------------------ */
.tt-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.tt-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.tt-filters select, .tt-filters input {
    font: inherit; font-size: 13px; padding: .4rem .5rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
}
.tt-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

.tt-status {
    padding: .6rem .85rem; margin-bottom: .85rem;
    border-radius: var(--radius-sm); font-size: 13px;
    border-left: 3px solid var(--brand); background: var(--brand-soft);
}
.tt-status.is-ok { border-left-color: var(--ok); background: var(--ok-soft); }
.tt-status.is-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.tt-status.is-error { border-left-color: var(--danger); background: var(--danger-soft); }

.tt-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; align-items: start; }

/* Queue */
.tt-queue {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: .85rem; position: sticky; top: 5rem;
    max-height: calc(100vh - 7rem); overflow-y: auto;
}
.tt-queue-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.tt-queue-head h2 { font-size: 14px; }
.tt-cards { display: grid; gap: .4rem; }
.tt-card {
    display: grid; gap: .1rem; padding: .5rem .6rem;
    border: 1px solid var(--border-strong); border-left-width: 3px; border-left-color: var(--warn);
    border-radius: var(--radius-sm); background: var(--surface-2);
    cursor: grab; font-size: 12px;
}
.tt-card:hover { border-color: var(--brand); border-left-color: var(--brand); }
.tt-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.tt-card strong { font-size: 12.5px; }
.tt-card span { color: var(--text); }
.tt-card small { color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.tt-card.is-held { background: var(--brand); border-color: var(--brand); color: #fff; cursor: grabbing; }
.tt-card.is-held span, .tt-card.is-held small { color: rgba(255, 255, 255, .85); }

/* Grid */
.tt-grid-wrap { overflow-x: auto; }
.tt-grid { width: 100%; border-collapse: separate; border-spacing: 4px; min-width: 720px; }
.tt-grid thead th {
    font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); padding: .3rem; text-align: center;
}
.tt-grid thead th.is-today { color: var(--brand); }
.tt-corner { width: 84px; }
.tt-slot {
    text-align: left; font-size: 12px; font-weight: 650; color: var(--text);
    padding: .4rem; vertical-align: top; white-space: nowrap;
}
.tt-slot small { display: block; color: var(--muted); font-weight: 400; font-size: 10px; line-height: 1.3; }

.tt-cell {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .3rem;
    vertical-align: top; min-width: 92px; height: 84px;
}
.tt-cell.is-today { background: var(--surface-2); }
.tt-cell.is-target { outline: 1px dashed var(--brand); outline-offset: -2px; }
.tt-cell.is-picked { background: var(--brand-soft); outline: 2px solid var(--brand); outline-offset: -2px; }
.tt-cell.is-over { background: var(--brand-soft); outline: 2px dashed var(--brand); outline-offset: -2px; }
.tt-cell-custom { background: var(--surface-2); }

.tt-lesson {
    position: relative;
    display: grid; gap: 0; padding: .3rem .4rem; margin-bottom: .25rem;
    border-radius: 4px; border-left: 3px solid var(--brand);
    background: var(--brand-soft); font-size: 10.5px; line-height: 1.3;
    cursor: grab;
}
.tt-lesson:last-child { margin-bottom: 0; }
.tt-lesson strong { font-size: 11px; }
.tt-lesson span { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-lesson small { color: var(--muted); font-size: 9.5px; }
.tt-lesson.tt-draft { background: var(--warn-soft); border-left-color: var(--warn); }
.tt-lesson.tt-completed { background: var(--surface-2); border-left-color: var(--border-strong); }
.tt-lesson.tt-cancelled { opacity: .5; text-decoration: line-through; }
.tt-lesson.is-selected { outline: 2px solid var(--brand); }
.tt-lesson:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.tt-open {
    position: absolute; top: 2px; right: 3px;
    font-size: 10px; color: var(--muted); text-decoration: none; line-height: 1;
}
.tt-open:hover { color: var(--brand); }

/* Add-lesson dialog */
.tt-modal {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(16, 24, 40, .45);
    display: grid; place-items: center; padding: 1rem;
}
.tt-modal[hidden] { display: none; }
.tt-modal-box {
    background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 1.1rem;
    width: 100%; max-width: 760px; max-height: 90vh; overflow-y: auto;
}

@media (max-width: 900px) {
    .tt-layout { grid-template-columns: minmax(0, 1fr); }
    .tt-queue { position: static; max-height: none; }
    .tt-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 560px) {
    .tt-grid { min-width: 620px; }
    .tt-cell { min-width: 80px; height: 76px; }
}

@media print {
    .tt-queue, .tt-bar, .tt-status, .tt-modal { display: none !important; }
    .tt-layout { grid-template-columns: 1fr; }
    .tt-grid { min-width: 0; }
    .tt-cell { height: auto; }
}

/* --- Cohorts -------------------------------------------------------------- */
.cohort-swatch {
    display: inline-block; width: 12px; height: 12px;
    border-radius: 3px; vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, .12);
}
.swatch-cell { width: 26px; padding-right: 0 !important; }
.row-current { background: var(--brand-soft); }
.row-current td { border-bottom-color: var(--brand); }

/* --- Timetable: resource rows, density, drawer ---------------------------- */
.tt-views, .tt-density { display: flex; gap: .2rem; }
.tt-density .btn { padding: .4rem .55rem; font-size: 12px; }
.tt-density .btn.is-on { background: var(--brand-soft); color: var(--brand); }

.tt-grid-resource { border-spacing: 2px; min-width: 1100px; }
.tt-grid-resource .tt-dayhead {
    background: var(--surface-2); border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border-bottom: 2px solid var(--border);
}
.tt-grid-resource .tt-periodhead {
    font-size: 9.5px; font-weight: 600; color: var(--muted);
    padding: .15rem 0; text-transform: none; letter-spacing: 0;
}
.tt-resource {
    text-align: left; position: sticky; left: 0; z-index: 2;
    background: var(--surface); border-right: 2px solid var(--border);
    min-width: 148px; max-width: 148px; padding: .35rem .5rem;
    text-transform: none; letter-spacing: 0;
}
.tt-resource-name { display: flex; align-items: center; gap: .35rem; font-size: 12px; font-weight: 600; color: var(--text); }
.tt-resource small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
.tt-grid-resource .tt-cell { min-width: 40px; width: 40px; height: 40px; padding: 2px; }
.tt-grid-resource .tt-lesson { padding: .15rem .2rem; font-size: 9px; text-align: center; margin-bottom: 1px; }
.tt-grid-resource .tt-lesson strong { font-size: 9px; }

.tt-lesson.is-pinned { border-left-style: double; border-left-width: 4px; cursor: default; }
.tt-pin { position: absolute; top: -1px; right: 1px; font-size: 7px; }

.tt-board[data-density="compact"] .tt-grid-resource .tt-cell { height: 30px; min-width: 32px; width: 32px; }
.tt-board[data-density="compact"] .tt-grid-resource .tt-lesson { font-size: 8px; }
.tt-board[data-density="roomy"] .tt-grid-resource .tt-cell { height: 58px; min-width: 56px; width: 56px; }
.tt-board[data-density="roomy"] .tt-grid-resource .tt-lesson { font-size: 10.5px; padding: .3rem; }
.tt-board[data-density="compact"] .tt-cell { height: 62px; }
.tt-board[data-density="roomy"] .tt-cell { height: 110px; }

/* Details drawer */
.tt-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 55;
    width: min(360px, 92vw); overflow-y: auto;
    background: var(--surface); border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 1rem;
}
.tt-drawer[hidden] { display: none; }
.tt-drawer .panel-head { position: sticky; top: 0; background: var(--surface); }
.tt-drawer .definition { font-size: 12.5px; }
.tt-drawer .form-actions { flex-wrap: wrap; }

@media print {
    .tt-views, .tt-density, .tt-drawer { display: none !important; }
    .tt-grid-resource { min-width: 0; }
    .tt-resource { position: static; }
}

.tt-history { display: flex; gap: .2rem; }
.tt-history .btn { padding: .5rem .6rem; }

/* --- Top-bar clock -------------------------------------------------------- */
.clock {
    display: flex; flex-direction: column; align-items: flex-end;
    line-height: 1.2; padding: 0 .5rem; white-space: nowrap;
    border-right: 1px solid var(--border);
}
.clock-time { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 10.5px; color: var(--muted); }
@media (max-width: 700px) { .clock { display: none; } }
@media print { .clock { display: none; } }

/* --- Per-page guide ------------------------------------------------------- */
.guide {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm); margin-bottom: 1rem;
}
.guide > summary {
    cursor: pointer; padding: .55rem .85rem;
    font-size: 13px; font-weight: 600; color: var(--brand);
    display: flex; align-items: center; gap: .45rem; list-style: none;
}
.guide > summary::-webkit-details-marker { display: none; }
.guide > summary:hover { background: var(--surface-2); }
.guide-icon {
    display: grid; place-items: center;
    width: 16px; height: 16px; flex: 0 0 16px;
    border-radius: 50%; background: var(--brand); color: #fff;
    font-size: 10px; font-weight: 700;
}
.guide[open] > summary { border-bottom: 1px solid var(--border); }
.guide-body { padding: .75rem .85rem .25rem; font-size: 13px; }
.guide-body ol { margin: .5rem 0 .5rem 1.1rem; padding: 0; display: grid; gap: .3rem; }
.guide-body p:last-child { margin-bottom: .5rem; }

@media print { .guide { display: none; } }

/* --- Guide page ----------------------------------------------------------- */
.guide-page { max-width: 900px; }
.guide-toc {
    display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
    padding: .75rem .85rem; margin-bottom: 1.25rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); font-size: 12.5px;
}
.guide-toc strong { margin-right: .35rem; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.guide-toc a { padding: .15rem .5rem; border-radius: 999px; background: var(--surface-2); }
.guide-toc a:hover { background: var(--brand-soft); text-decoration: none; }
.guide-steps { margin: 0 0 .5rem 1.1rem; padding: 0; display: grid; gap: .45rem; font-size: 13.5px; }
.guide-page h3 { font-size: 13px; margin-bottom: .3rem; }
.guide-page section { scroll-margin-top: 5rem; }

/* --- Guide: language switch, screenshots, right-to-left ------------------- */
.guide-langbar {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: .9rem; font-size: 12.5px;
}
.guide-lang {
    padding: .2rem .6rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface);
}
.guide-lang:hover { background: var(--brand-soft); text-decoration: none; }
.guide-lang.is-on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* A screenshot is evidence, so it gets a frame and a caption rather than
   floating in the text. width is set on the element so the space is reserved
   before the image arrives and the page does not jump while reading. */
.guide-shot { margin: 1rem 0 1.15rem; }
.guide-shot img {
    display: block; width: 100%; height: auto;
    border: 1px solid var(--border-strong); border-radius: 8px;
    box-shadow: var(--shadow);
    background: var(--surface-2);
}
.guide-shot figcaption {
    margin-top: .45rem; font-size: 12.5px; color: var(--muted);
}

/* Two-up gallery of screens. Each picture links to the screen it shows, so the
   guide is a way in rather than only something to read. */
.guide-gallery {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.1rem; margin: 1rem 0 1.25rem;
}
.guide-shot-sm { margin: 0; }
.guide-shot-sm img { transition: border-color .12s ease; }
.guide-shot-sm a:hover img { border-color: var(--brand); }

/* Arabic. Only the guide flips: the app itself is not mirrored, and a page
   that reads right-to-left while every screen it describes reads the other way
   is harder to follow than one that simply matches the screenshots. */
.guide-page.is-rtl { text-align: right; }
.guide-page.is-rtl,
.guide-page.is-rtl p,
.guide-page.is-rtl li,
.guide-page.is-rtl dd,
.guide-page.is-rtl dt {
    font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Segoe UI",
                 system-ui, -apple-system, sans-serif;
    line-height: 1.85;
}
.guide-page.is-rtl .guide-steps { margin: 0 1.1rem .5rem 0; }
.guide-page.is-rtl .guide-toc strong { margin-right: 0; margin-left: .35rem; }
.guide-page.is-rtl .definition { grid-template-columns: minmax(110px, auto) 1fr; }
/* Latin fragments -- RELEASE, Ctrl+Z, dd/mm/yy -- must not be reordered by the
   bidi algorithm when they sit at the end of an Arabic sentence. */
/* The per-page help panel in Arabic. */
.guide.is-rtl { text-align: right; }
.guide.is-rtl .guide-body,
.guide.is-rtl summary {
    font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Segoe UI",
                 system-ui, -apple-system, sans-serif;
    line-height: 1.8;
}
.guide.is-rtl .guide-body ol { margin: 0 1.1rem 0 0; padding: 0; }

.guide-page.is-rtl em,
.guide-page.is-rtl code { unicode-bidi: isolate; }

.login-links { text-align: center; margin: .75rem 0 0; font-size: 12.5px; }

/* --- Releases -------------------------------------------------------------- */
.env-card .definition { font-size: 13px; }
.version {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 4px; padding: .05rem .35rem;
}
.text-danger { color: var(--danger); font-weight: 600; }
.rollback-form { display: flex; gap: .3rem; align-items: center; justify-content: flex-end; }
.rollback-form input[type="text"] {
    font: inherit; font-size: 11px; padding: .2rem .35rem;
    border: 1px solid var(--border-strong); border-radius: 4px;
    background: var(--surface); color: var(--text);
}
/* The pre-flight checklist. Each row carries its state in the colour of the
   mark and in a word for screen readers, never in colour alone. */
.preflight { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .1rem; }
.preflight li {
    display: grid; grid-template-columns: 1.4rem 1fr; gap: .55rem;
    align-items: start; padding: .5rem .6rem; border-radius: 6px;
}
.preflight-mark {
    display: grid; place-items: center; width: 1.4rem; height: 1.4rem;
    border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 1;
}
.preflight-body { display: grid; gap: .1rem; font-size: 13px; }
.preflight-body strong { font-weight: 600; }
.preflight-fix { font-size: 12.5px; color: var(--text); opacity: .85; }

.preflight-pass .preflight-mark { background: var(--ok-soft); color: var(--ok); }
.preflight-warn { background: var(--warn-soft); }
.preflight-warn .preflight-mark { background: var(--warn); color: #fff; }
.preflight-fail { background: var(--danger-soft); }
.preflight-fail .preflight-mark { background: var(--danger); color: #fff; }

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

/* Releasing is a deliberate act, so its form is laid out to be read rather
   than skimmed past: fields stacked, confirmation last, button after it. */
.release-form { display: grid; gap: .7rem; max-width: 26rem; margin-top: 1rem; }
.release-form .field { display: grid; gap: .25rem; }
.release-form input[type="text"] {
    font: inherit; padding: .45rem .55rem;
    border: 1px solid var(--border-strong); border-radius: 5px;
    background: var(--surface); color: var(--text);
}
.release-form button { justify-self: start; }
.release-alt { margin-top: 1.4rem; border-top: 1px solid var(--border); padding-top: .8rem; }
.release-alt summary { cursor: pointer; font-size: 13px; }
.release-alt p { margin: .5rem 0 .7rem; }

.config-problem {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
    background: var(--danger-soft); border-left: 3px solid var(--danger);
    padding: .6rem .75rem; border-radius: var(--radius-sm); overflow-wrap: anywhere;
}

/* --- Passkeys ------------------------------------------------------------- */
.login-or {
    display: flex; align-items: center; gap: .6rem;
    margin: .9rem 0 .7rem; color: var(--muted); font-size: 11.5px;
}
.login-or::before, .login-or::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
#passkey-add { padding-top: .75rem; }
#passkey-status { margin-top: .75rem; }
