/* ─── Reset + base ──────────────────────────────────────────────────────── */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    font-size: 14px;
    color: #1e1e2d;
    background: #f0f0f1;
    -webkit-font-smoothing: antialiased;
}

a { color: #2271b1; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Portal app shell ──────────────────────────────────────────────────── */

.qtl-portal {
    background: #f0f0f1;
    min-height: 100vh;
}

.hub-app {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ───────────────────────────────────────────────────────────── */

.hub-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #1e1e2d;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.hub-sidebar__brand {
    padding: 20px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.hub-sidebar__brand img {
    display: block;
    height: 46px;
    width: auto;
    max-width: 100%;
}

.hub-sidebar__nav {
    list-style: none;
    flex: 1;
    padding: 12px 0;
}

.hub-sidebar__nav-item a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.12s, color 0.12s;
    border-left: 3px solid transparent;
}

.hub-sidebar__nav-item a:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.hub-sidebar__nav-item--active a {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #2271b1;
}

.hub-sidebar__footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hub-sidebar__user {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-sidebar__logout {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}

.hub-sidebar__logout:hover {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

/* ─── Content area ──────────────────────────────────────────────────────── */

.hub-content {
    flex: 1;
    padding: 32px 36px;
    min-width: 0;
}

.hub-page-header {
    margin-bottom: 24px;
}

.hub-page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1e1e2d;
}

/* ─── Stat cards ────────────────────────────────────────────────────────── */

.hub-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.hub-stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 22px 20px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.hub-stat-card__value {
    font-size: 30px;
    font-weight: 700;
    color: #1e1e2d;
    line-height: 1;
    margin-bottom: 6px;
}

.hub-stat-card__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #646970;
}

/* ─── Search form ───────────────────────────────────────────────────────── */

.hub-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.hub-search-input {
    padding: 7px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 13px;
    width: 260px;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.hub-search-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
}

.hub-search-clear {
    font-size: 12px;
    color: #646970;
}

/* ─── Table ─────────────────────────────────────────────────────────────── */

.hub-table-wrap {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    overflow: hidden;
}

.hub-table {
    width: 100%;
    border-collapse: collapse;
}

.hub-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #646970;
    padding: 12px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
}

.hub-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 13px;
    color: #1e1e2d;
}

.hub-table tbody tr:last-child td {
    border-bottom: none;
}

.hub-table tbody tr:hover td {
    background: #fafafa;
}

/* ─── Badges ────────────────────────────────────────────────────────────── */

.hub-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hub-badge--managed  { background: #d7f0d7; color: #1a6b1a; }
.hub-badge--observed { background: #f0f0f1; color: #50575e; }

/* ─── Pagination ────────────────────────────────────────────────────────── */

.hub-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.hub-pagination__btn {
    font-size: 13px;
    font-weight: 500;
}

.hub-pagination__info {
    font-size: 12px;
    color: #646970;
}

/* ─── Empty / placeholder states ────────────────────────────────────────── */

.hub-empty {
    background: #fff;
    border-radius: 8px;
    padding: 48px 32px;
    text-align: center;
    color: #646970;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
    text-decoration: none;
}

.btn--primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.btn--primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
    text-decoration: none;
}

.btn--secondary {
    background: #fff;
    color: #2271b1;
    border-color: #c3c4c7;
}

.btn--secondary:hover {
    border-color: #2271b1;
    text-decoration: none;
}

.btn--full { width: 100%; }

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

.qtl-login-page {
    background: #f0f0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-wrap {
    width: 100%;
    max-width: 400px;
    padding: 24px 16px;
}

.login-card {
    background: #fff;
    border-radius: 10px;
    padding: 36px 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-card__brand {
    margin-bottom: 16px;
    text-align: center;
}

.login-card__logo {
    display: inline-flex;
    align-items: center;
    background: #1e1e2d;
    border-radius: 10px;
    padding: 16px 20px;
}

.login-card__logo img {
    display: block;
    height: 46px;
    width: auto;
}

.login-card__heading {
    font-size: 15px;
    font-weight: 500;
    color: #646970;
    margin-bottom: 24px;
}

.login-error {
    background: #fce8e8;
    border: 1px solid #f0a0a0;
    border-radius: 4px;
    padding: 10px 12px;
    color: #8b1a1a;
    font-size: 13px;
    margin-bottom: 18px;
}

.login-success {
    background: #e8f5e9;
    border: 1px solid #a0d8a4;
    border-radius: 4px;
    padding: 10px 12px;
    color: #1e5e22;
    font-size: 13px;
    margin-bottom: 18px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1e1e2d;
    margin-bottom: 5px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.form-group textarea {
    resize: vertical;
}

.form-group input[type="file"] {
    display: block;
    width: 100%;
    margin-top: 2px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
}

.form-group--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-group--inline > a {
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #646970;
    cursor: pointer;
}

.login-form .btn--primary {
    margin-top: 8px;
    padding: 10px 14px;
    font-size: 14px;
}

/* Side-by-side field pairs (register form) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-hint {
    font-size: 12px;
    color: #646970;
    margin: 6px 0 12px;
    line-height: 1.5;
}

/* "Already have an account?" link below form */
.login-card__switch {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #646970;
}

/* ─── Page header row (title + actions side by side) ────────────────────── */

.hub-page-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hub-page-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.hub-seat-count {
    font-size: 12px;
    color: #646970;
    white-space: nowrap;
}

/* ─── Notices ───────────────────────────────────────────────────────────── */

.hub-notice {
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.hub-notice--success {
    background: #edfaed;
    border-color: #7acc7a;
    color: #1a6b1a;
}

.hub-notice--error {
    background: #fce8e8;
    border-color: #f0a0a0;
    color: #8b1a1a;
}

.hub-notice--warn {
    background: #fff8e1;
    border-color: #ffe082;
    color: #795600;
}

/* ─── Active toggle switch ──────────────────────────────────────────────── */

.hub-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.hub-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.hub-toggle__track {
    display: block;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #c3c4c7;
    position: relative;
    transition: background 0.18s;
    flex-shrink: 0;
}

.hub-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.18s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.hub-toggle__input:checked + .hub-toggle__track {
    background: #2271b1;
}

.hub-toggle__input:checked + .hub-toggle__track::after {
    transform: translateX(16px);
}

.hub-text-muted {
    color: #c3c4c7;
    font-size: 14px;
}

/* ─── Modal ─────────────────────────────────────────────────────────────── */

.hub-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-modal[hidden] { display: none; }

.hub-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.hub-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hub-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.hub-modal__title {
    font-size: 16px;
    font-weight: 700;
    color: #1e1e2d;
    margin: 0;
}

.hub-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #646970;
    cursor: pointer;
    padding: 0 4px;
}

.hub-modal__close:hover { color: #1e1e2d; }

.hub-modal__tabs {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.hub-modal__tab {
    flex: 1;
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    font-weight: 500;
    color: #646970;
    cursor: pointer;
    transition: color 0.12s, border-color 0.12s;
}

.hub-modal__tab:hover { color: #1e1e2d; }

.hub-modal__tab--active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.hub-modal__body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.hub-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid #e5e5e5;
    flex-shrink: 0;
}

/* ─── Fieldset inside modal ─────────────────────────────────────────────── */

.hub-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px;
}

.hub-fieldset__legend {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #646970;
    margin-bottom: 14px;
    display: block;
}

/* ─── Generic input / select for use outside the login card ─────────────── */

.hub-input,
.hub-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    color: #1e1e2d;
    background: #fff;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.hub-input:focus,
.hub-select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
}

.hub-select { appearance: auto; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1e1e2d;
    margin-bottom: 5px;
}

.required { color: #cc1818; }

/* ─── Button variants ───────────────────────────────────────────────────────── */

.btn--sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn--danger {
    background: #d63638;
    color: #fff;
    border-color: #d63638;
}

.btn--danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
    color: #fff;
    text-decoration: none;
}

/* Inline danger link (used in table rows for remove actions) */
.hub-link-danger {
    background: none;
    border: none;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    color: #d63638;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.12s;
}

.hub-link-danger:hover { opacity: 1; text-decoration: none; }

/* ─── Details/summary disclosure widgets ────────────────────────────────────── */

.hub-details {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 12px 16px;
}

.hub-details summary {
    font-size: 13px;
    font-weight: 500;
    color: #2271b1;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.hub-details summary::-webkit-details-marker { display: none; }
.hub-details summary::before { content: '▸ '; font-size: 10px; }
.hub-details[open] summary::before { content: '▾ '; }

.hub-details--danger summary { color: #d63638; }

.hub-details__form { margin-top: 10px; }

/* ─── Card (used in task detail sidebar) ────────────────────────────────────── */

.hub-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.hub-card__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #646970;
    margin-bottom: 14px;
}

/* ─── Inline item list (courses/groups inside cards) ────────────────────────── */

.hub-item-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.hub-item-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f1;
    font-size: 13px;
}

.hub-item-list__row:last-child { border-bottom: none; }

.hub-item-list__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Task detail two-column layout ─────────────────────────────────────────── */

.hub-task-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

.hub-task-sidebar { min-width: 0; }
.hub-task-main    { min-width: 0; }

/* ─── Progress group header ──────────────────────────────────────────────────── */

.hub-progress-group { margin-bottom: 28px; }

.hub-progress-group__title {
    font-size: 13px;
    font-weight: 700;
    color: #1e1e2d;
    margin-bottom: 10px;
}

/* ─── Progress table ─────────────────────────────────────────────────────────── */

.hub-table--progress th,
.hub-table--progress td {
    font-size: 12px;
    padding: 8px 12px;
    white-space: nowrap;
}

.hub-table--progress th:not(:first-child) {
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-progress-cell {
    text-align: center;
}

/* ─── Progress dots ──────────────────────────────────────────────────────────── */

.hub-progress-dot {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.hub-progress-dot--done    { color: #1a6b1a; }
.hub-progress-dot--progress { color: #795600; }
.hub-progress-dot--none    { color: #c3c4c7; }

/* ─── Dashboard progress-breakdown charts ────────────────────────────────────── */
/* Status colors match .hub-progress-dot above: green=complete, amber=in progress, gray=not started. */

.hub-progress-charts {
    background: #fff;
    border-radius: 8px;
    padding: 22px 24px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    margin-bottom: 32px;
}

.hub-progress-charts__legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.hub-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #646970;
}

.hub-legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.hub-legend-swatch--complete    { background: #1a6b1a; }
.hub-legend-swatch--in_progress { background: #795600; }
.hub-legend-swatch--not_started { background: #c3c4c7; }

.hub-progress-chart {
    margin-bottom: 24px;
}

.hub-progress-chart:last-child {
    margin-bottom: 0;
}

.hub-progress-chart__title {
    font-size: 13px;
    font-weight: 700;
    color: #1e1e2d;
    margin-bottom: 14px;
}

.hub-progress-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.hub-progress-bar-row:last-child {
    margin-bottom: 0;
}

.hub-progress-bar-row__label {
    flex: 0 0 160px;
    font-size: 12px;
    color: #1e1e2d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-progress-bar-row__pct {
    flex: 0 0 36px;
    font-size: 12px;
    font-weight: 700;
    color: #1a6b1a;
    text-align: right;
}

.hub-progress-bar-row__track {
    flex: 1;
    display: flex;
    height: 18px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f1;
}

.hub-progress-bar-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    box-sizing: border-box;
    border-right: 2px solid #fff;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
}

.hub-progress-bar-seg:last-child {
    border-right: none;
}

.hub-progress-bar-seg--complete    { background: #1a6b1a; }
.hub-progress-bar-seg--in_progress { background: #795600; }
.hub-progress-bar-seg--not_started { background: #c3c4c7; color: #50575e; }

/* ─── Mark-complete button ───────────────────────────────────────────────────── */

.hub-mark-btn {
    display: block;
    margin: 4px auto 0;
    padding: 2px 8px;
    background: none;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    font-size: 11px;
    color: #646970;
    cursor: pointer;
    transition: border-color 0.12s, color 0.12s;
}

.hub-mark-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}

/* ─── Overall progress cell ──────────────────────────────────────────────────── */

.hub-overall-progress {
    font-size: 12px;
    font-weight: 600;
    color: #646970;
}

.hub-overall-progress--done { color: #1a6b1a; }

/* ─── Checkbox list (task create form) ──────────────────────────────────────── */

.hub-checkbox-list {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    padding: 6px 10px;
}

.hub-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    cursor: pointer;
}

.hub-checkbox-row input[type="checkbox"] {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* ─── Section heading (used in student-courses view) ────────────────────────── */

.hub-section-heading {
    font-size: 14px;
    font-weight: 700;
    color: #1e1e2d;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e5e5;
}

/* ─── Course progress bar ────────────────────────────────────────────────────── */

.hub-progress-bar-wrap {
    display: inline-block;
    width: 80px;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    vertical-align: middle;
    overflow: hidden;
}

.hub-progress-bar {
    height: 100%;
    background: #2271b1;
    border-radius: 3px;
    min-width: 0;
    transition: width 0.2s;
}

.hub-progress-pct {
    display: inline-block;
    font-size: 12px;
    color: #646970;
    vertical-align: middle;
    margin-left: 6px;
    min-width: 28px;
}

/* Warn badge variant (in-progress status) */
.hub-badge--warn { background: #fff8e1; color: #795600; }

/* ─── Dashboard activity feed ────────────────────────────────────────────────── */

.hub-activity-feed {
    background: #fff;
    border-radius: 8px;
    padding: 22px 24px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    margin-bottom: 32px;
}

.hub-activity-feed .hub-progress-chart__title {
    margin-bottom: 14px;
}

.hub-activity-feed .hub-table-wrap {
    box-shadow: none;
    border: 1px solid #e5e5e5;
}

/* ─── Slide reader ────────────────────────────────────────────────────────────── */

@keyframes hub-reader-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hub-slide-reader {
    background: #fff;
    border-radius: 14px;
    padding: 34px 40px 30px;
    box-shadow: 0 4px 20px rgba(30,30,45,0.08), 0 1px 3px rgba(30,30,45,0.06);
    overflow: hidden;
    position: relative;
    max-width: 760px;
    margin: 0 auto;
}

/* Slim gradient accent along the top edge — a small, deliberate branding touch instead of
   a flat white card with nothing to distinguish it. */
.hub-slide-reader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2271b1, #6ba6d6 60%, #a3c9e8);
}

/* ─── View-mode tabs (Reading View / Original PowerPoint) ───────────────────────── */

.hub-reader-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
}

.hub-reader-tab {
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #646970;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.hub-reader-tab:hover {
    border-color: #2271b1;
    color: #2271b1;
    text-decoration: none;
}

.hub-reader-tab--active,
.hub-reader-tab--active:hover {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.hub-reader-original {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.hub-reader-original iframe {
    display: block;
    width: 100%;
    height: 640px;
    border: none;
}

/* Slim reading-progress bar + counter, replaces the old plain "Slide X of Y" label */
.hub-slide-reader__progress {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.hub-slide-reader__progress-track {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #eef0f2;
    overflow: hidden;
}

.hub-slide-reader__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #4f93c9);
    border-radius: 4px;
    transition: width 0.2s;
}

.hub-slide-reader__progress-label {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #646970;
    white-space: nowrap;
}

/* A neutral "stage" behind the slide's images, like a photo laid on a table rather than
   loose thumbnails floating in the page. */
.hub-slide-reader__images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f7f8fa;
    border-radius: 10px;
    animation: hub-reader-fade-in 0.35s ease-out;
}

.hub-slide-reader__images img {
    max-width: 100%;
    max-height: 420px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

/* A serif face for the reading copy itself — distinguishes "content" from the app's own
   sans-serif chrome, the way most dedicated reading views do. */
.hub-slide-reader__body {
    font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.8;
    color: #262633;
    min-height: 200px;
    white-space: pre-line;
    animation: hub-reader-fade-in 0.35s ease-out;
}

.hub-slide-reader__narrate {
    margin-top: 24px;
}

/* Pill-shaped, tinted rather than the default button style — reads as an "audio control,"
   not just another action button. */
.hub-narrate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #cfe2f3;
    background: #f3f8fd;
    color: #135e96;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.hub-narrate-btn:hover {
    background: #e5f0fa;
    border-color: #2271b1;
}

.hub-narrate-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.hub-narrate-btn--playing {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(34,113,177,0.15);
}

/* A tinted strip rather than a plain top border — gives the nav its own visual "footer"
   zone instead of just trailing off the bottom of the body text. */
.hub-slide-reader__nav {
    display: flex;
    justify-content: space-between;
    margin: 30px -40px -30px;
    padding: 20px 40px;
    background: #f9fafb;
    border-top: 1px solid #eef0f2;
    border-radius: 0 0 14px 14px;
}

.hub-slide-reader__nav .btn:only-child {
    margin-left: auto;
}

.hub-slide-reader__nav .btn {
    padding: 10px 22px;
    font-size: 14px;
    border-radius: 999px;
}

/* ─── Slide editor (org course edit page) ───────────────────────────────────── */

.hub-slide-editor__item {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    padding: 16px 18px;
    margin-bottom: 12px;
}

.hub-slide-editor__index {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #646970;
    margin-bottom: 10px;
}

.hub-slide-editor__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.hub-slide-editor__thumbs img {
    max-height: 90px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

.hub-slide-editor__item textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
}

.hub-slide-editor__actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* ─── Quiz editor (org course edit page) — deliberately its own classes, not shared
   with .hub-slide-editor__item, so this can look different without touching the slide
   editor above. ───────────────────────────────────────────────────────────────────── */

/* Wraps the heading, intro paragraph, and every question card so the whole section is
   centered as one block, matching the reader/quiz-taking views. */
.hub-quiz-editor {
    max-width: 720px;
    margin: 0 auto;
}

.hub-quiz-editor__item {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    padding: 20px 22px;
    margin-bottom: 16px;
}

.hub-quiz-editor__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.hub-quiz-editor__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef2f7;
    color: #1e1e2d;
    font-size: 12px;
    font-weight: 700;
}

.hub-quiz-editor__heading-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #646970;
}

.hub-quiz-editor__item textarea,
.hub-quiz-editor__item input[type="text"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.hub-quiz-editor__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f1;
}

/* Pushes the destructive action to the far right, away from Save/Move so it can't be
   clicked by reflex while reaching for the others. */
.hub-quiz-editor__actions .btn--danger {
    margin-left: auto;
}

/* The "Add Question" card at the bottom — dashed and muted at rest so it reads as an
   empty slot to fill in, not just another existing question. */
.hub-quiz-editor__item--add {
    border-style: dashed;
    border-color: #c3c4c7;
    background: #fafbfc;
}

.hub-quiz-editor__item--add:focus-within {
    border-color: #2271b1;
    border-style: solid;
    background: #fff;
}

.hub-quiz-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    margin-bottom: 6px;
    transition: background 0.12s, border-color 0.12s;
}

/* Live-highlights whichever choice is currently marked correct — updates instantly as
   the radio selection changes, no JS needed. Purely a progressive enhancement: choices
   stay fully usable in any browser that doesn't support :has(). */
.hub-quiz-choice:has(input[type="radio"]:checked) {
    background: #edfaed;
    border-color: #a3d9a3;
}

.hub-quiz-choice input[type="radio"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.hub-quiz-choice input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

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