/* ISAAC Pro dashboards — minimal, brand-aligned, mobile-first.
 *
 * NOTE (Brand v2.0 standardization):
 * The canonical token palette now lives in `isaac-tokens.css`. Pages should
 * link both stylesheets, in this order:
 *
 *     <link rel="stylesheet" href="_partials/isaac-tokens.css">
 *     <link rel="stylesheet" href="_partials/dashboard.css">
 *
 * The legacy `--isaac-*` variable names below are kept as aliases that point
 * at the new `--ip-*` Brand v2.0 tokens, so existing inline styles like
 * `style="color:var(--isaac-maroon)"` continue to render. New code should
 * reference `--ip-*` directly.
 */

:root {
    /* Legacy → Brand v2.0 alias map (DO NOT change values here; edit
     * `isaac-tokens.css` instead). */
    --isaac-maroon:      var(--ip-maroon);
    --isaac-maroon-dark: var(--ip-maroon-dark);
    --isaac-gold:        var(--ip-orange);   /* legacy "gold" → v2 orange     */
    --isaac-cream:       var(--ip-brand-cream, var(--ip-app-bg, #FAF6EE));
    --isaac-ink:         var(--ip-grey-900);
    /* AA-friendly muted (was --ip-grey-400; too light for small text) */
    --isaac-ink-soft:    var(--ip-text-muted);
    --isaac-line:        var(--ip-grey-200);
    --isaac-pos:         var(--ip-success);
    --isaac-warn:        var(--ip-orange);
    --isaac-bad:         var(--ip-bright-red);
    --shadow-card:       var(--ip-shadow-card);
    --radius:            var(--ip-radius-card);
}

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

html, body { margin: 0; padding: 0; }

/* Skip to main — WCAG 2.4.1 */
a.ip-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: var(--ip-z-skip, 1400);
}
a.ip-skip-link:focus,
a.ip-skip-link:focus-visible {
    left: var(--ip-space-2);
    top: var(--ip-space-2);
    width: auto;
    height: auto;
    padding: 10px 16px;
    background: var(--ip-maroon);
    color: var(--ip-white);
    border-radius: var(--ip-radius-button);
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--ip-shadow-modal);
}

.dashboard-body {
    font-family: var(--ip-font-family);
    font-size: var(--ip-text-body, 1rem);
    background: var(--ip-app-bg, var(--ip-grey-50));
    color: var(--ip-grey-900);
    line-height: var(--ip-line-body, 1.45);
    transition: background-color var(--ip-duration-medium) var(--ip-ease-standard),
                color var(--ip-duration-medium) var(--ip-ease-standard);
}

.dashboard-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px;
    background: var(--ip-maroon);
    color: var(--ip-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    position: sticky; top: 0; z-index: 10;
    height: 64px;
}
.dashboard-header .brand-lockup {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: inherit;
}
.dashboard-header .brand-lockup img {
    height: 36px; width: auto; display: block;
    background: var(--ip-white); padding: 2px; border-radius: 6px;
}
.brand {
    font-weight: 800; letter-spacing: .04em; font-size: 18px;
    font-family: var(--ip-font-family);
}
.brand .brand-suffix {
    color: var(--ip-brand-orange, #F39200);
    margin-left: 4px;
    font-style: normal;
    font-weight: 800;
}

.dashboard-nav {
    display: flex; align-items: center; gap: 12px;
}
.dashboard-nav a {
    color: rgba(255,255,255,.84); text-decoration: none; font-weight: 600;
    padding: 6px 10px; border-radius: var(--ip-radius-button);
}
.dashboard-nav a.active {
    background: rgba(255,255,255,.12); color: var(--ip-white);
}
.user-chip {
    background: rgba(255,255,255,.08); border-radius: var(--ip-radius-pill);
    padding: 4px 12px; font-size: 13px; color: var(--ip-white);
    text-decoration: none; display: inline-flex; align-items: center;
    min-height: 44px;
}
a.user-chip:hover,
a.user-chip:visited,
a.user-chip:visited:hover {
    background: rgba(255,255,255,.16);
    color: var(--ip-white);
}
.user-chip small { color: var(--ip-grey-200); margin-left: 6px; font-size: 11px; }

.dashboard-main {
    max-width: 1280px; margin: 0 auto; padding: 24px;
}

.dashboard-footer {
    text-align: center; padding: 32px 16px; color: var(--ip-text-muted);
}
.dashboard-footer a { color: var(--ip-info, #1F6FB2); }

h1, h2, h3 {
    color: var(--ip-maroon); margin: 0 0 12px;
    font-weight: 700; font-family: var(--ip-font-title, var(--ip-font-family));
}
h1 { font-size: 28px; letter-spacing: -.01em; }
h2 { font-size: 20px; margin-top: 28px; color: var(--ip-grey-900); font-weight: 600; }
h3 { font-size: 16px; color: var(--ip-grey-900); font-weight: 500; }
.subtitle { color: var(--ip-text-muted); margin: 0 0 24px; font-size: var(--ip-text-body, 1rem); }

.kpi-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.kpi {
    background: var(--ip-white);
    border-radius: var(--ip-radius-card);
    box-shadow: var(--ip-shadow-card);
    padding: 18px 20px;
    border-left: 4px solid var(--ip-maroon);
}
.kpi .label { color: var(--ip-text-muted); font-size: 13px; font-weight: 500; }
.kpi .value {
    font-size: 30px; font-weight: 800; color: var(--ip-grey-900);
    margin-top: 4px; line-height: 1.1;
}
.kpi .delta { font-size: 12px; margin-top: 6px; color: var(--ip-text-muted); }
.kpi.gold  { border-left-color: var(--ip-brand-gold, #FCBF11); }

/* Family highlight gold — badges / status chips (not body text on sand). */
.badge,
.ip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--ip-radius-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.3;
    background: var(--ip-brand-gold, #FCBF11);
    color: var(--ip-maroon-dark, #4D0B13);
    border: 1px solid rgba(77, 11, 19, 0.12);
}
.badge--quiet,
.ip-badge--quiet {
    background: var(--ip-fill-quiet, #F2EAD8);
    color: var(--ip-maroon, #6B0F1A);
    border-color: var(--ip-border-warm, #E8DCC4);
}
.badge--info,
.ip-badge--info {
    background: rgba(31, 111, 178, 0.12);
    color: var(--ip-info, #1F6FB2);
    border-color: rgba(31, 111, 178, 0.28);
}
.kpi.good  { border-left-color: var(--ip-success); }
.kpi.warn  { border-left-color: var(--ip-orange); }
.kpi.bad   { border-left-color: var(--ip-bright-red); }

.row-grid {
    display: grid; gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    margin-top: 24px;
}

.card {
    background: var(--ip-white);
    border-radius: var(--ip-radius-card);
    box-shadow: var(--ip-shadow-card);
    padding: 20px; border: 1px solid var(--ip-border-warm, var(--ip-grey-200));
}
.card h2, .card h3 { margin-top: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
    text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--ip-grey-200);
}
.table th {
    color: var(--ip-text-muted); font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: .04em;
}
.table tbody tr:hover { background: var(--ip-grey-50); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.severity { padding: 2px 8px; border-radius: var(--ip-radius-pill); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.severity-watch    { background: rgba(245, 158, 11, .12); color: var(--ip-orange); }
.severity-at_risk  { background: rgba(255, 0, 13, .10); color: var(--ip-bright-red); }
.severity-critical { background: var(--ip-bright-red); color: var(--ip-white); }

.band { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.band-easy        { background: rgba(75, 181, 67, .14); color: var(--ip-success); }
.band-moderate    { background: rgba(245, 158, 11, .14); color: var(--ip-orange); }
.band-hard        { background: rgba(255, 91, 0, .14);  color: var(--ip-orange); }
.band-very_hard   { background: var(--ip-bright-red); color: var(--ip-white); }
.band-mastered    { background: rgba(75, 181, 67, .14); color: var(--ip-success); }
.band-approaching { background: rgba(245, 158, 11, .14); color: var(--ip-orange); }
.band-developing  { background: rgba(255, 91, 0, .14);  color: var(--ip-orange); }
.band-struggling  { background: var(--ip-bright-red); color: var(--ip-white); }

.empty { color: var(--ip-text-muted); font-style: italic; padding: 12px; }
.err { color: var(--ip-bad, #b91c1c); font-size: 13px; margin-top: 6px; }

/* Toast notifications */
.ip-toast-region {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: var(--ip-z-toast, 1300);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}
.ip-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--ip-grey-200, #e5e7eb);
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: auto;
}
.ip-toast--visible { opacity: 1; transform: translateY(0); }
.ip-toast--leaving { opacity: 0; transform: translateY(4px); }
.ip-toast--success { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.ip-toast--error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.ip-toast--info { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.ip-toast__text { flex: 1; }
.ip-toast__close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: .65;
    padding: 0 2px;
    color: inherit;
}
.ip-toast__close:hover { opacity: 1; }

/* Exam workflow progress strip */
.exam-progress-strip {
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--ip-grey-200, #e5e7eb);
    border-radius: 10px;
    background: #fff;
}
.exam-progress-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.exam-progress-title { font-size: 14px; }
.exam-progress-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}
.exam-progress-step {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--ip-text-muted, #64748b);
    min-height: 44px;
    padding: 4px 0;
}
.exam-progress-step--done { color: var(--ip-success, #047857); font-weight: 600; }
.exam-progress-step--current a { text-decoration: underline; font-weight: 700; color: var(--ip-maroon, #6B0F1A); }
.exam-progress-step a { color: inherit; text-decoration: none; }
.exam-progress-step a:hover { text-decoration: underline; }
.exam-progress-mark { font-size: 12px; }
.exam-progress-hint a {
    color: var(--ip-maroon, #6B0F1A);
    font-weight: 600;
}

/* Inline info tooltip (DepEd jargon) */
.ip-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    border-radius: 50%;
    border: 1px solid var(--ip-grey-300, #d1d5db);
    background: var(--ip-grey-50, #f8fafc);
    font-size: 11px;
    font-weight: 700;
    color: var(--ip-text-muted, #64748b);
    cursor: help;
    vertical-align: middle;
}
.ip-info:focus { outline: 3px solid var(--ip-focus-ring, var(--ip-brand-orange, #F39200)); outline-offset: 2px; }

/* Native dialog modal (override confirmations, etc.) */
.ip-dialog {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: min(420px, calc(100vw - 32px));
    box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
}
.ip-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.ip-dialog__inner { padding: 20px 22px; }
.ip-dialog__title { margin: 0 0 8px; font-size: 1.05rem; color: var(--ip-maroon, #6B0F1A); }
.ip-dialog__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

.heatmap-legend {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 6px;
}
.heatmap-cell {
    border-radius: 8px; padding: 8px 6px; text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 56px; min-width: 44px; cursor: pointer;
    transition: transform .08s ease, box-shadow .08s ease;
    -webkit-tap-highlight-color: rgba(107, 15, 26, 0.12);
}
.heatmap-cell:hover,
.heatmap-cell:focus-visible { transform: translateY(-1px); box-shadow: 0 0 0 2px rgba(107, 15, 26, 0.2); }
.heatmap-cell .hm-q   { font-size: 11px; font-weight: 600; opacity: .85; }
.heatmap-cell .hm-pct { font-size: 18px; font-weight: 800; line-height: 1.1; margin-top: 2px; }
.heatmap-cell .hm-pct-unit { font-size: 11px; font-weight: 700; margin-left: 1px; }
.heatmap-cell .hm-band {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .03em; margin-top: 4px; opacity: .9;
}
a.heatmap-cell { text-decoration: none; color: inherit; cursor: pointer; }
a.heatmap-cell:focus { outline: 3px solid var(--ip-focus-ring, var(--ip-brand-orange, #F39200)); outline-offset: 2px; }

/* Heatmap drill-down drawer */
.hm-drawer { position: fixed; inset: 0; z-index: 9999; }
.hm-drawer-shade {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.45);
}
.hm-drawer-panel {
    position: absolute; right: 0; top: 0; bottom: 0;
    width: min(720px, 96vw);
    background: var(--ip-white);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
    display: flex; flex-direction: column;
    animation: hm-slide .18s ease-out;
}
@keyframes hm-slide { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.hm-drawer-panel header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--ip-grey-200);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--ip-grey-50);
}
.hm-drawer-panel header h3 { margin: 0; font-size: 16px; }
.hm-close {
    background: none; border: 0; font-size: 24px; cursor: pointer;
    color: var(--ip-text-muted); line-height: 1; padding: 0 4px;
    border-radius: var(--ip-radius-button);
}
.hm-close:focus-visible {
    outline: 3px solid var(--ip-focus-ring, var(--ip-brand-orange, #F39200));
    outline-offset: 2px;
}
.hm-drawer-body { padding: 16px 18px; overflow-y: auto; flex: 1 1 auto; }
.hm-drawer-body h4 { margin: 14px 0 6px; }
.hm-drawer-panel footer {
    padding: 10px 18px; border-top: 1px solid var(--ip-grey-200);
    display: flex; justify-content: flex-end;
    background: var(--ip-grey-50);
}
.hm-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hm-summary .kpi { padding: 8px 10px; }
.hm-summary .kpi .value { font-size: 20px; }
.btn-link {
    color: var(--ip-info, #1F6FB2);
    text-decoration: none; font-weight: 600;
    background: none; border: 0; cursor: pointer; padding: 0; font: inherit;
}
.btn-link:hover { text-decoration: underline; }

/* Quizaac family: primary / CTA = maroon (not bright red). */
.btn-primary,
.btn-cta,
a.btn-primary,
a.btn-cta {
    background: var(--ip-cta, var(--ip-maroon)); color: var(--ip-white);
    border: 0; padding: 10px 16px; border-radius: var(--ip-radius-button);
    font-weight: 600; cursor: pointer;
    transition: background .12s ease;
    font-family: var(--ip-font-family);
    text-decoration: none;
}
.btn-primary:hover,
.btn-cta:hover,
a.btn-primary:hover,
a.btn-cta:hover,
a.btn-primary:visited,
a.btn-cta:visited,
a.btn-primary:visited:hover,
a.btn-cta:visited:hover {
    background: var(--ip-cta-hover, var(--ip-maroon-dark));
    color: var(--ip-white);
}

/* Secondary = orange fill; tertiary = maroon outline (.btn-outline-primary). */
.btn-secondary,
a.btn-secondary {
    background: var(--ip-secondary, var(--ip-brand-orange, #F39200));
    color: var(--ip-white);
    border: 0;
    padding: 10px 16px; border-radius: var(--ip-radius-button);
    font-weight: 600; cursor: pointer;
    font-family: var(--ip-font-family);
    text-decoration: none;
}
.btn-secondary:hover,
a.btn-secondary:hover,
a.btn-secondary:visited,
a.btn-secondary:visited:hover {
    background: var(--ip-secondary-hover, #D97E00);
    color: var(--ip-white);
}

.btn-tertiary,
a.btn-tertiary {
    background: var(--ip-white); color: var(--ip-maroon);
    border: 1.5px solid var(--ip-maroon);
    padding: 10px 16px; border-radius: var(--ip-radius-button);
    font-weight: 600; cursor: pointer;
    font-family: var(--ip-font-family);
    text-decoration: none;
}
.btn-tertiary:hover,
a.btn-tertiary:hover,
a.btn-tertiary:visited,
a.btn-tertiary:visited:hover {
    background: var(--ip-fill-quiet, var(--ip-grey-50));
    color: var(--ip-maroon);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ip-font-family);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border-radius: var(--ip-radius-button);
    line-height: 1.25;
    box-sizing: border-box;
}
a.btn:visited { text-decoration: none; }
.btn-sm {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px;
    font-size: 13px;
    box-sizing: border-box;
}

/* Shared answer chips (exam editor) — ≥44px touch targets */
.ans-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.ans-chip {
    min-width: 44px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--ip-grey-300, var(--isaac-line, #d1d5db));
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
    font-family: var(--ip-font-family);
}
.ans-chip.sel {
    background: var(--ip-maroon, #6B0F1A);
    color: var(--ip-white, #fff);
    border-color: var(--ip-maroon, #6B0F1A);
}
.ans-chip:focus-visible {
    outline: 3px solid var(--ip-focus-ring, var(--ip-brand-orange, #F39200));
    outline-offset: 2px;
}
.btn-outline-primary {
    background: var(--ip-white);
    color: var(--ip-maroon);
    border: 1.5px solid var(--ip-maroon);
}
.btn-outline-primary:hover { background: var(--ip-fill-quiet, var(--ip-grey-50)); }
.btn-outline-secondary {
    background: var(--ip-white);
    color: var(--ip-text);
    border: 1.5px solid var(--ip-grey-300, #d1d5db);
}
.btn-outline-secondary:hover { background: var(--ip-grey-50); }
.btn-outline-danger {
    background: var(--ip-white);
    color: var(--ip-bright-red);
    border: 1.5px solid var(--ip-bright-red);
}
.btn-outline-danger:hover { background: #fef2f2; }

.btn-danger {
    background: var(--ip-bright-red); color: var(--ip-white);
    border: 0; padding: 10px 16px; border-radius: var(--ip-radius-button);
    font-weight: 600; cursor: pointer;
}
.btn-disabled,
button:disabled,
.btn-primary:disabled {
    background: var(--ip-grey-200); color: var(--ip-grey-400);
    cursor: not-allowed;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px; align-items: end;
}
.form-grid label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 12px; color: var(--ip-grey-400);
}
.form-grid input, .form-grid select {
    padding: 8px 10px; border: 1px solid var(--ip-grey-200);
    border-radius: var(--ip-radius-button); font-size: 14px;
    font-family: var(--ip-font-family);
}
.form-grid input:focus, .form-grid select:focus {
    outline: none; border-color: var(--ip-focus-ring, var(--ip-brand-orange, #F39200));
    box-shadow: 0 0 0 3px rgba(243, 146, 0, 0.28);
}

/* ECR / large tables — horizontal scroll on narrow viewports */
.ip-table-mobile-scroll {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--ip-space-2) 0;
}
.ip-table-mobile-scroll table {
    min-width: 640px;
}

/* Card-list fallback for touch (pair with .ip-hide-sm / .ip-show-sm) */
.ip-card-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ip-card-list__item {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--ip-border-warm, #E8DCC4);
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    min-height: 44px;
}
.ip-card-list__body {
    flex: 1 1 200px;
    min-width: 0;
}
.ip-card-list__title {
    font-weight: 700;
    font-size: 16px;
    color: var(--ip-maroon, #6B0F1A);
    text-decoration: none;
    display: block;
    overflow-wrap: anywhere;
}
a.ip-card-list__title:hover,
a.ip-card-list__title:visited {
    color: var(--ip-maroon, #6B0F1A);
    text-decoration: underline;
}
.ip-card-list__meta {
    font-size: 13px;
    color: var(--ip-text-muted, #5B6470);
    margin-top: 4px;
    line-height: 1.4;
}
.ip-card-list__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0;
    flex: 0 0 auto;
}
@media (max-width: 520px) {
    .ip-card-list__item {
        align-items: stretch;
    }
    .ip-card-list__actions {
        width: 100%;
        justify-content: flex-start;
    }
}
.ip-show-sm { display: none !important; }
.ip-hide-sm { display: block; }
@media (max-width: 767px) {
    .ip-show-sm { display: flex !important; }
    ul.ip-show-sm { display: flex !important; }
    .ip-hide-sm { display: none !important; }
}

/* Heatmap drawer: bottom sheet on narrow widths */
@media (max-width: 900px) {
    .hm-drawer-panel {
        right: 0; left: 0; top: auto; bottom: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
        animation: hm-slide-up .18s ease-out;
    }
    @keyframes hm-slide-up {
        from { transform: translateY(24px); opacity: 0; }
        to { transform: none; opacity: 1; }
    }
}

@media (max-width: 960px) {
    .dashboard-main { padding: 16px; }
    .row-grid { grid-template-columns: 1fr; }
    .dashboard-header { padding: 10px 16px; flex-wrap: wrap; gap: 10px; height: auto; }
    .dashboard-header .brand-lockup img { height: 28px; }
}
