/* ============================================================
   AmbientOs Admin — design system
   Two themes via [data-theme] on .admin-shell:
     light  → clean neutral, blue accent
     dark   → near-black, navy-light accent
   ============================================================ */

.admin-shell {
    /* ── Core palette: ALIASES of the canonical tokens (tokens.css) ──
       One source of truth. These resolve per-element, and because the
       same .admin-shell carries data-theme, the canonical channels flip
       light↔dark and these aliases flip with them — no duplicate values. */
    /* ── Core palette: ALIASES of the canonical primitives (tokens.css) ──
       One source of truth. Surfaces layer by lightness (--surface-1..3) and
       flip light↔dark with the theme; admin names map onto them. */
    --bg:           hsl(var(--background));
    --panel:        var(--surface-1);
    --panel-2:      var(--surface-2);
    --panel-hover:  var(--surface-2);
    --border:       var(--border-subtle);
    --border-strong:var(--border-strong);
    --text:         var(--text-primary);
    --text-muted:   var(--text-secondary);
    --text-faint:   var(--text-muted);
    --accent:       hsl(var(--primary));
    --accent-fg:    hsl(var(--primary-foreground));
    --accent-hover: var(--accent-hover);
    --accent-soft:  var(--accent-soft);
    --danger:       var(--danger);
    --danger-soft:  var(--danger-soft);
    --success:      var(--success);
    --warn:         var(--warning);
    --ring:         hsl(var(--ui-ring) / 0.35);
    --radius:    12px;
    --radius-sm: 8px;

    /* Content-type accents (Video / Reading / Interactive) */
    --video:      #2563eb; --video-soft:#e8f0ff;
    --read:       #d97706; --read-soft: #fdf1e1;
    --inter:      #0d9488; --inter-soft:#e3f6f3;

    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

.admin-shell[data-theme="dark"] {
    /* ── Admin-only extras — dark overrides. Core vars (surfaces, text,
       semantic, shadow) already flip via the canonical tokens; only the
       content-type accents (no shadcn equivalent) live here. ── */

    /* Content-type accents — dark */
    --video:      #60a5fa; --video-soft:#16233b;
    --read:       #fbbf24; --read-soft: #2a200d;
    --inter:      #2dd4bf; --inter-soft:#10241f;
}

/* ── Page header ───────────────────────────────────────────── */
.ad-page__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.ad-page__title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}
.ad-page__hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Card ──────────────────────────────────────────────────── */
.ad-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.ad-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.ad-card__title { font-size: 15px; font-weight: 700; }
.ad-card__body { padding: 20px; }

/* ── Stat cards ────────────────────────────────────────────── */
.ad-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.ad-stat {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.ad-stat__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.ad-stat__value {
    font-size: 30px;
    font-weight: 800;
    margin-top: 6px;
    color: var(--text);
    letter-spacing: -0.02em;
}
.ad-stat__sub { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.ad-stat__icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent);
    float: right;
}

/* ── Buttons ───────────────────────────────────────────────── */
.ad-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 130ms ease, border-color 130ms ease, transform 90ms ease;
    white-space: nowrap;
}
.ad-btn:active { transform: translateY(1px); }
.ad-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.ad-btn--primary { background: var(--accent); color: var(--accent-fg); }
.ad-btn--primary:hover { background: var(--accent-hover); }
.ad-btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.ad-btn--ghost:hover { background: var(--panel-hover); }
.ad-btn--danger { background: transparent; color: var(--danger); border-color: var(--border-strong); }
.ad-btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.ad-btn--icon { width: 38px; padding: 0; justify-content: center; }
.ad-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }

/* ── Table ─────────────────────────────────────────────────── */
.ad-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ad-table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--panel-2);
}
.ad-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.ad-table tr:last-child td { border-bottom: none; }
.ad-table tbody tr:hover { background: var(--panel-hover); }
.ad-table__actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Forms ─────────────────────────────────────────────────── */
.ad-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ad-label { font-size: 13px; font-weight: 600; color: var(--text); }
.ad-label__hint { font-weight: 400; color: var(--text-faint); }
.ad-input, .ad-select, .ad-textarea {
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--panel);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.ad-textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.ad-input:focus, .ad-select:focus, .ad-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--ring);
}
.ad-input::placeholder, .ad-textarea::placeholder { color: var(--text-faint); }
.ad-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ad-form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.ad-form-row--full { display: block; margin-bottom: 16px; }
.ad-form-row--full > label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; }
.ad-form-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ad-form-error { font-size: 13px; color: var(--danger); background: var(--danger-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; }
.ad-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 16px; }
.ad-check-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 4px 0; }
.ad-check-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); flex: none; cursor: pointer; }

/* ── Badge ─────────────────────────────────────────────────── */
.ad-badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 24px; padding: 0 10px;
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
    background: var(--panel-2); color: var(--text-muted);
}
.ad-badge--ok      { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.ad-badge--warn    { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.ad-badge--danger  { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.ad-badge--accent  { background: var(--accent-soft); color: var(--accent); }
.ad-badge--muted   { background: var(--panel-2); color: var(--text-muted); }
.ad-badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ── Empty / loading ───────────────────────────────────────── */
.ad-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; padding: 48px 24px; text-align: center;
    color: var(--text-muted);
}
.ad-empty svg { opacity: 0.5; }
.ad-skel {
    display: block; border-radius: 6px;
    background: linear-gradient(90deg, var(--panel-2) 25%, var(--panel-hover) 37%, var(--panel-2) 63%);
    background-size: 400% 100%;
    animation: ad-shimmer 1.3s ease-in-out infinite;
}
@keyframes ad-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ── Toast / inline message ────────────────────────────────── */
.ad-note { font-size: 13px; padding: 10px 14px; border-radius: var(--radius-sm); }
.ad-note--ok { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.ad-note--err { background: var(--danger-soft); color: var(--danger); }

/* ── Segmented control ─────────────────────────────────────── */
.ad-seg {
    display: inline-flex;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 3px;
    width: fit-content;
}
.ad-seg__btn {
    height: 32px;
    padding: 0 20px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 120ms ease, background 120ms ease;
}
.ad-seg__btn:hover { color: var(--text); }
.ad-seg__btn.is-on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }

/* ── Scope bar (class + week) ───────────────────────────────── */
.ad-scope {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.ad-weeknav { display: flex; align-items: center; gap: 10px; }
.ad-weeknav__label {
    display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 175px;
}
.ad-weeknav__range { font-size: 14px; font-weight: 700; }

/* ── Day tabs ───────────────────────────────────────────────── */
.ad-daytabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.ad-daytab {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    min-width: 80px; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--panel); color: var(--text-muted);
    cursor: pointer;
    transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.ad-daytab:hover { border-color: var(--border-strong); color: var(--text); }
.ad-daytab__day { font-size: 13px; font-weight: 700; }
.ad-daytab__date { font-size: 11px; }
.ad-daytab.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.ad-daytab.is-today .ad-daytab__day::after { content: " •"; color: var(--accent); }

/* ── Control bar (class + week) as a card ──────────────────── */
.ad-bar {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 16px;
    box-shadow: var(--shadow); margin-bottom: 14px;
}
.ad-bar__sep { width: 1px; align-self: stretch; background: var(--border); margin: 2px 0; }
.ad-bar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ad-weeknav__now {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 700; color: var(--accent); margin-top: 2px;
}
.ad-weeknav__now::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── Day tabs: count badge ─────────────────────────────────── */
.ad-daytab { position: relative; }
.ad-daytab__count {
    position: absolute; top: 7px; right: 8px;
    font-size: 10px; font-weight: 800; line-height: 1;
    color: var(--accent); background: var(--panel);
    border: 1px solid var(--border); border-radius: 20px; padding: 2px 6px;
}
.ad-daytab.is-on .ad-daytab__count { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.ad-daytab__count.is-zero { color: var(--text-faint); }

/* ── Timetable timeline ────────────────────────────────────── */
.ad-sched { padding: 6px 12px 12px; }
.ad-slot { display: grid; grid-template-columns: 92px 1fr; }
.ad-slot__time { padding: 16px 10px 16px 4px; text-align: right; position: relative; }
.ad-slot__from { font-weight: 750; font-size: 13.5px; }
.ad-slot__to { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.ad-slot__time::after { content: ""; position: absolute; right: 0; top: 18px; bottom: -8px; width: 2px; background: var(--border); }
.ad-slot:last-child .ad-slot__time::after { display: none; }
.ad-slot__dot {
    position: absolute; right: -5px; top: 17px; width: 12px; height: 12px;
    border-radius: 50%; background: var(--panel); border: 3px solid var(--subj, var(--accent)); z-index: 2;
}
.ad-slot__body { padding: 10px 4px 10px 22px; }
.ad-slotcard {
    display: flex; align-items: center; gap: 14px; padding: 13px 16px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2);
    border-left: 4px solid var(--subj, var(--accent));
    transition: box-shadow 130ms ease, transform 90ms ease;
}
.ad-slotcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.ad-slotcard__main { min-width: 0; flex: 1; }
.ad-slotcard__subject { font-weight: 750; font-size: 14.5px; }
.ad-slotcard__meta { display: flex; gap: 14px; margin-top: 5px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; align-items: center; }
.ad-slotcard__meta svg { width: 14px; height: 14px; opacity: 0.7; vertical-align: middle; }
.ad-teacher { display: inline-flex; align-items: center; gap: 6px; }
.ad-teacher__av {
    width: 20px; height: 20px; border-radius: 6px; background: var(--subj, var(--accent));
    color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.ad-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.ad-pill--lesson   { color: var(--video); background: var(--video-soft); }
.ad-pill--eat      { color: var(--read); background: var(--read-soft); }
.ad-pill--activity { color: var(--inter); background: var(--inter-soft); }
.ad-pill--break    { color: var(--text-muted); background: var(--panel-hover); }
.ad-rowacts { display: flex; gap: 4px; opacity: 0; transition: opacity 120ms ease; }
.ad-slotcard:hover .ad-rowacts, .ad-res:hover .ad-rowacts { opacity: 1; }
.ad-act {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid transparent;
    background: transparent; color: var(--text-faint); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 120ms, color 120ms;
}
.ad-act:hover { background: var(--panel-hover); color: var(--text); }
.ad-act--danger:hover { background: var(--danger-soft); color: var(--danger); }
.ad-act svg { width: 16px; height: 16px; }

/* ── Coursera resource groups ──────────────────────────────── */
.ad-resgroup { padding: 4px 14px 12px; }
.ad-resgroup__head { display: flex; align-items: center; gap: 10px; padding: 14px 2px 9px; }
.ad-resgroup__time { font-size: 12px; font-weight: 800; color: #fff; background: var(--subj, var(--accent)); border-radius: 7px; padding: 3px 8px; }
.ad-resgroup__subj { font-weight: 750; font-size: 14px; }
.ad-resgroup__cnt { font-size: 12px; color: var(--text-faint); font-weight: 600; margin-left: auto; }
.ad-res {
    display: flex; align-items: center; gap: 13px; padding: 11px 14px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2);
    margin-bottom: 8px; transition: box-shadow 130ms ease, transform 90ms ease;
}
.ad-res:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.ad-res__thumb { width: 52px; height: 40px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; }
.ad-res__thumb svg { width: 22px; height: 22px; }
.ad-res__thumb--video { background: var(--video-soft); color: var(--video); }
.ad-res__thumb--read  { background: var(--read-soft);  color: var(--read); }
.ad-res__thumb--inter { background: var(--inter-soft); color: var(--inter); }
.ad-res__main { min-width: 0; flex: 1; }
.ad-res__title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-res__src { font-size: 12px; color: var(--text-faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-kind { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.ad-kind--video { color: var(--video); background: var(--video-soft); }
.ad-kind--read  { color: var(--read);  background: var(--read-soft); }
.ad-kind--inter { color: var(--inter); background: var(--inter-soft); }

/* ── Legend ────────────────────────────────────────────────── */
.ad-legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: var(--text-muted); }
.ad-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.ad-legend__sw { width: 11px; height: 11px; border-radius: 4px; }
.ad-legend__spacer { margin-left: auto; color: var(--text-faint); }

/* ── Settings list (row + divider) ─────────────────────────── */
.ad-setlist { display: flex; flex-direction: column; }
.ad-setrow {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border);
}
.ad-setrow:first-child { padding-top: 4px; }
.ad-setrow:last-child { border-bottom: none; padding-bottom: 4px; }
.ad-setrow__info { min-width: 0; }
.ad-setrow__title { font-size: 14.5px; font-weight: 700; }
.ad-setrow__hint { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.ad-setrow__control { flex: none; }

/* Text-size sample buttons (A small → large), TV-style */
.ad-sizebtns { display: inline-flex; align-items: center; gap: 7px; }
.ad-sizebtn {
    width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-strong); border-radius: 11px; background: var(--panel);
    color: var(--text-muted); font-weight: 800; line-height: 1; cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.ad-sizebtn:hover { background: var(--panel-hover); color: var(--text); }
.ad-sizebtn.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ── Confirm modal (in-page) ───────────────────────────────── */
.ad-backdrop {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(0, 0, 0, 0.5);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    animation: ad-fade 120ms ease;
}
.ad-modal {
    width: min(440px, 96vw);
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    overflow: hidden; animation: ad-pop 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ad-modal__body { padding: 22px 22px 6px; }
.ad-modal__icon {
    width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent);
}
.ad-modal__title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.ad-modal__text { font-size: 13.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.55; }
.ad-modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px; }
@keyframes ad-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ad-pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ── Pager (ad-pager) ──────────────────────────────────────── */
.ad-pager {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
    flex-wrap: wrap;
}
.ad-pager > span { font-size: 13px; color: var(--text-muted); margin-right: auto; }

/* ── UiSearchBox ───────────────────────────────────────────── */
.ui-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 36px;
    min-width: 160px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--panel);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.ui-search--focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--ring);
}
.ui-search--disabled { opacity: 0.55; pointer-events: none; }
.ui-search__icon {
    flex: none;
    width: 16px; height: 16px;
    margin-left: 10px;
    color: var(--text-muted);
    pointer-events: none;
}
.ui-search__input {
    flex: 1;
    height: 100%;
    padding: 0 8px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    min-width: 0;
}
.ui-search__input::placeholder { color: var(--text-faint); }
.ui-search__input::-webkit-search-cancel-button { display: none; }
.ui-search__clear {
    flex: none;
    width: 28px; height: 28px;
    margin-right: 4px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 100ms ease, color 100ms ease;
}
.ui-search__clear:hover { background: var(--panel-hover); color: var(--text); }

/* ── UiPager ───────────────────────────────────────────────── */
.ui-pager {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
    flex-wrap: wrap;
}
.ui-pager__info {
    font-size: 13px;
    color: var(--text-muted);
    margin-right: auto;
}
.ui-pager__size {
    height: 30px;
    padding: 0 6px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}
.ui-pager__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
    white-space: nowrap;
}
.ui-pager__btn:hover:not(:disabled) { background: var(--panel-hover); }
.ui-pager__btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.ui-pager__btn:disabled { opacity: 0.4; cursor: default; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 720px) {
    .ad-form-row { grid-template-columns: 1fr; }
    .ad-scope { gap: 12px; }
    .ad-slot { grid-template-columns: 70px 1fr; }
    .ad-setrow { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Hub link cards (LearningHub + ManagementHub) ──────────── */
.lr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.lr-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.lr-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.lr-card__priority {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--accent);
    color: var(--accent-fg);
    margin-bottom: 8px;
}

.lr-card__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.lr-card__desc {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.lr-card__route {
    font-size: 12px;
    color: var(--text-faint);
}
