:root {
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-blue: #eef4ff;
    --border: #dfe5ee;
    --border-strong: #c6d0dd;
    --text: #101828;
    --muted: #667085;
    --muted-strong: #344054;
    --brand: #530086;
    --brand-dark: #3d0066;
    --brand-soft: #f4ecff;
    --primary: #2857d9;
    --primary-dark: #1f45b5;
    --success: #16803c;
    --success-dark: #116331;
    --warning: #b45309;
    --danger: #b42318;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 12px 30px rgba(16, 24, 40, 0.07);
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover { color: var(--primary-dark); }

.topbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand,
.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
}

.brand small,
.login-brand small,
.userbox small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.userbox {
    text-align: right;
    font-size: 14px;
}

.shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: calc(100vh - 64px);
}

.sidebar {
    background: #fbfcfe;
    border-right: 1px solid var(--border);
    padding: 16px 12px;
}

.nav {
    min-height: calc(100vh - 96px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nav-section {
    display: grid;
    gap: 5px;
}

.nav-account { margin-top: auto; }

.nav-label {
    margin: 0 10px 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.nav-link {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted-strong);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.nav-link:hover {
    background: var(--surface-blue);
    border-color: #dbeafe;
    color: var(--primary-dark);
}

.nav-link.disabled,
.nav-link.disabled:hover {
    background: transparent;
    border-color: transparent;
    color: #98a2b3;
    cursor: default;
}

.nav-accordion {
    display: grid;
    gap: 4px;
}

.nav-accordion > summary {
    list-style: none;
}

.nav-accordion > summary::-webkit-details-marker {
    display: none;
}

.nav-accordion > summary::after {
    content: "▾";
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    transition: transform 0.16s ease;
}

.nav-accordion[open] > summary::after {
    transform: rotate(180deg);
}

.nav-submenu {
    display: grid;
    gap: 3px;
    margin-left: 34px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

.nav-sublink {
    display: block;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--muted-strong);
    font-size: 14px;
}

.nav-sublink:hover {
    background: var(--surface-blue);
    color: var(--primary-dark);
}

.nav-sublink.active {
    background: var(--surface-blue);
    color: var(--primary-dark);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #eef2f6;
    color: var(--muted-strong);
    font-size: 14px;
    flex: 0 0 auto;
}

.button-link { appearance: none; }

.main {
    width: 100%;
    max-width: none;
    padding: 28px;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.page-head h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 750;
}

.page-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.split { align-items: center; }

.back-link {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
}

.button-row,
.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.module-card,
.summary-row div,
.panel,
.stats a,
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.module-card {
    min-height: 132px;
    padding: 18px;
    color: var(--text);
    border-top: 4px solid var(--primary);
}

.module-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    color: var(--text);
}

.module-card strong {
    display: block;
    margin: 14px 0 5px;
    font-size: 18px;
}

.module-card small { color: var(--muted); }

.module-count {
    min-width: 38px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--surface-blue);
    color: var(--primary);
    font-weight: 800;
}

.accent-blue { border-top-color: var(--primary); }
.accent-orange { border-top-color: var(--warning); }
.accent-green { border-top-color: var(--success); }
.accent-orange .module-count { background: #fff7ed; color: var(--warning); }
.accent-green .module-count { background: #ecfdf3; color: var(--success); }

.summary-row {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.summary-row div { padding: 16px; }
.summary-row span { color: var(--muted); }
.summary-row strong {
    display: block;
    margin-top: 4px;
    font-size: 28px;
}

/* Learning module */
.learning-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.learning-stats div {
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.learning-stats span,
.muted-text {
    color: var(--muted);
    font-size: 13px;
}

.learning-stats strong {
    display: block;
    margin-top: 4px;
    font-size: 28px;
}

.learning-toolbar-panel {
    margin-bottom: 16px;
}

.learning-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1.2fr) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.learning-toolbar.materials-toolbar {
    grid-template-columns: minmax(140px, 0.7fr) minmax(170px, 1fr) minmax(140px, 0.7fr) minmax(160px, 0.8fr) minmax(220px, 1.2fr) auto;
}

.learning-toolbar.my-learning-toolbar {
    grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) auto;
}

.learning-toolbar label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.scope-note {
    margin: 12px 0 0;
    color: var(--muted);
}

.stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.stats a {
    padding: 12px;
    color: var(--text);
    box-shadow: none;
}

.stats a.active {
    border-color: #bfdbfe;
    background: var(--surface-blue);
}

/* Selected filter tiles use the same visual language as status badges. */
.stats a.status-new,
.stats a.status-progress,
.stats a.status-done,
.stats a.status-rejected {
    background: var(--surface);
}

.stats a.status-new.active {
    border-color: #bfdbfe;
    background: var(--surface-blue);
}

.stats a.status-progress.active {
    border-color: #fed7aa;
    background: #fff7ed;
}

.stats a.status-done.active {
    border-color: #bbf7d0;
    background: #ecfdf3;
}

.stats a.status-rejected.active {
    border-color: #fecaca;
    background: #fef2f2;
}

.stats strong {
    display: block;
    font-size: 22px;
}

.stats span {
    color: var(--muted);
    font-size: 13px;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 240px) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.toolbar.compact {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.input,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(37, 99, 235, 0.14);
    border-color: var(--primary);
}

.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.btn:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn.success {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.btn.success:hover {
    background: var(--success-dark);
    border-color: var(--success-dark);
    color: #fff;
}

.btn.secondary {
    background: var(--surface-blue);
    border-color: #bfdbfe;
    color: var(--primary-dark);
}

.btn.ghost {
    background: #fff;
    border-color: var(--border);
    color: var(--muted-strong);
}

.btn.ghost:hover {
    border-color: #bfdbfe;
    background: var(--surface-blue);
    color: var(--primary-dark);
}

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

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

.btn.small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
}

.btn.disabled {
    opacity: 0.55;
    cursor: default;
}

.btn:disabled,
.action-menu-item:disabled,
button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background: inherit;
}

.icon-button {
    width: 40px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
}

.actions-menu {
    position: relative;
}

.actions-menu summary {
    list-style: none;
}

.actions-menu summary::-webkit-details-marker {
    display: none;
}

.actions-menu-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    min-width: 220px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.actions-menu-list a {
    display: block;
    padding: 10px 11px;
    border-radius: 6px;
    color: var(--text);
    font-weight: 650;
    text-decoration: none;
}

.actions-menu-list a:hover {
    background: var(--surface-soft);
}

.actions-menu-list .danger-link {
    color: #b91c1c;
}

.actions-menu-list .danger-link:hover {
    background: #fef2f2;
}

.export-menu {
    display: inline-flex;
}

.export-menu-trigger {
    min-width: 122px;
}

.menu-chevron {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.15s ease;
}

.export-menu[open] .menu-chevron {
    transform: rotate(180deg);
}

.export-menu-list {
    min-width: 122px;
}

.export-menu-list a {
    text-align: center;
}

.table-wrap { overflow-x: auto; }

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

.data-table th,
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.data-table tr:hover td { background: #fbfdff; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.program-table-title {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 260px;
}

.program-table-cover {
    width: 88px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.program-table-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.status-new {
    background: var(--surface-blue);
    color: var(--primary-dark);
}

.status-progress {
    background: #fff7ed;
    color: var(--warning);
}

.status-done {
    background: #ecfdf3;
    color: var(--success);
}

.status-rejected {
    background: #fef3f2;
    color: var(--danger);
}

.publication-draft {
    background: var(--surface-blue);
    color: var(--primary-dark);
}

.publication-ready {
    background: #f5f3ff;
    color: #6d28d9;
}

.publication-published {
    background: #ecfdf3;
    color: var(--success);
}

.publication-hidden {
    background: #fff7ed;
    color: var(--warning);
}

.publication-archived {
    background: #f1f5f9;
    color: var(--muted-strong);
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.panel { padding: 18px; }

.panel h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-head h2 { margin: 0; }
.panel-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.management-grid .wide { grid-column: 1 / -1; }

.record-list {
    display: grid;
    gap: 10px;
}

.record-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.record-item small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.record-item.compact {
    padding: 10px;
}

.bulk-actions {
    display: grid;
    grid-template-columns: minmax(220px, 320px) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}

.bulk-actions label {
    display: grid;
    gap: 6px;
    margin: 0;
}

/* Learning cards */
.learning-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.learning-card-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.learning-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.learning-card-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    background: #eef2f6;
}

.learning-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
}

.learning-card p {
    margin: 0;
    color: var(--muted);
}

.learning-card-top,
.learning-card-meta,
.learning-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.learning-card-top {
    justify-content: space-between;
}

.learning-card-meta {
    margin-top: auto;
    color: var(--muted);
    font-size: 13px;
}

.assignment-line {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--surface-blue);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 750;
}

.assignment-line.required {
    background: #fff7ed;
    color: #c2410c;
}

.assignment-line.overdue {
    background: #fef2f2;
    color: #b91c1c;
}

.learning-card-actions {
    justify-content: flex-start;
}

.program-category-list {
    display: grid;
    gap: 26px;
}

.program-category-section {
    display: grid;
    gap: 12px;
}

.program-category-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.program-category-head h3 {
    margin: 0;
    font-size: 17px;
}

.program-category-head span {
    min-width: 28px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2f6;
    color: var(--muted-strong);
    font-weight: 800;
    font-size: 13px;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 8px;
    background: #eef2f6;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 750;
}

.course-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    margin-bottom: 24px;
}

.course-cover {
    width: 320px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #eef2f6;
}

.course-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-cover-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}

.course-hero h1 {
    margin: 4px 0 8px;
}

.preview-ribbon {
    width: fit-content;
    margin: 8px 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f5f3ff;
    color: #6d28d9;
    font-weight: 700;
}

.readiness-panel {
    margin-bottom: 24px;
}

.readiness-list {
    display: grid;
    gap: 8px;
}

.readiness-item {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.readiness-item span {
    color: var(--muted);
}

.readiness-blocker {
    border-color: #fecaca;
    background: #fff7f7;
}

.readiness-warning {
    border-color: #fed7aa;
    background: #fffbeb;
}

.readiness-ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.action-menu {
    position: relative;
    justify-self: end;
}

.action-menu > summary {
    list-style: none;
}

.action-menu > summary::after {
    content: "▾";
    margin-left: 2px;
    font-size: 13px;
    transition: transform 0.16s ease;
}

.action-menu[open] > summary::after {
    transform: rotate(180deg);
}

.action-menu > summary::-webkit-details-marker {
    display: none;
}

.action-menu-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    width: min(280px, 90vw);
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.action-menu-item {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.action-menu-item:hover {
    background: var(--surface-blue);
    color: var(--primary-dark);
}

.action-menu-item.success-action {
    color: var(--success);
}

.action-menu-item.danger-action {
    color: var(--danger);
}

.action-menu-hint {
    margin: 4px 4px 0;
    color: var(--muted);
    font-size: 13px;
}

.field-title {
    margin-bottom: 6px;
    color: var(--muted-strong);
    font-weight: 800;
}

.combo-field {
    position: relative;
}

.combo-field .input {
    padding-right: 42px;
}

.combo-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-left: 1px solid var(--border-strong);
    border-radius: 0 8px 8px 0;
    background: #fff;
    color: var(--muted-strong);
    font: inherit;
    cursor: pointer;
}

.combo-toggle:hover {
    background: var(--surface-blue);
    color: var(--primary-dark);
}

.combo-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    display: none;
    max-height: 240px;
    overflow: auto;
    padding: 5px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.combo-field.open .combo-menu {
    display: grid;
    gap: 3px;
}

.combo-menu button,
.combo-empty {
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 650;
    text-align: left;
}

.combo-menu button {
    cursor: pointer;
}

.combo-menu button:hover {
    background: var(--surface-blue);
    color: var(--primary-dark);
}

.combo-empty {
    color: var(--muted);
}

.program-group-picker {
    display: grid;
    gap: 10px;
}

.course-layout {
    align-items: start;
}

.course-step-list {
    display: grid;
    gap: 10px;
}

.course-step {
    min-height: 92px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.course-step.done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.course-step.failed {
    border-color: #fecaca;
    background: #fff7f7;
}

.course-step:target {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}

.course-step.locked {
    opacity: 0.58;
    background: var(--surface-soft);
}

.course-step-index {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-blue);
    color: var(--primary-dark);
    font-weight: 800;
}

.course-step.failed .course-step-index {
    background: #fee2e2;
    color: var(--danger);
}

.course-step-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.course-step-cover {
    width: 82px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.course-step-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-step h3,
.course-step p {
    margin: 4px 0 0;
}

.course-step-body {
    min-width: 0;
}

.course-step-body h3 {
    overflow-wrap: anywhere;
}

.step-publication {
    margin-left: 6px;
}

.program-about-collapse {
    display: flex;
    flex-direction: column;
}

.program-about-collapse summary {
    order: 2;
    width: fit-content;
    margin-top: 10px;
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.program-about-collapse summary::-webkit-details-marker {
    display: none;
}

.program-about-collapse summary::marker {
    content: "";
}

.program-about-collapse .summary-open {
    display: inline;
}

.program-about-collapse .summary-closed {
    display: none;
}

.program-about-collapse:not([open]) .summary-open {
    display: none;
}

.program-about-collapse:not([open]) .summary-closed {
    display: inline;
}

.program-about-text {
    order: 1;
    position: relative;
    line-height: 1.55;
}

.program-about-collapse:not([open]) .program-about-text {
    max-height: 15.5em;
    overflow: hidden;
}

.program-about-collapse:not([open]) .program-about-text::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3.5em;
    background: linear-gradient(180deg, rgb(255 255 255 / 0), var(--surface) 82%);
}

.course-step-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.step-order-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.step-order-control > span {
    padding: 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.step-order-form {
    display: inline-flex;
    gap: 4px;
}

.course-side-nav {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.course-side-nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted-strong);
}

.course-side-nav a.active,
.course-side-nav a:hover {
    background: var(--surface-blue);
    color: var(--primary-dark);
}

.course-access-summary {
    max-width: 760px;
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.course-access-summary summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}

.course-access-summary summary::-webkit-details-marker {
    display: none;
}

.course-access-summary summary strong {
    color: var(--text);
}

.course-access-summary summary span {
    color: var(--muted);
    font-size: 13px;
}

.course-access-summary .scope-note {
    margin: 8px 0 0;
}

.course-access-summary .group-chip-list {
    max-height: 150px;
    margin-top: 8px;
    overflow: auto;
}

.course-assignment-summary {
    max-width: 760px;
    margin-top: 10px;
    padding: 10px 11px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #f8fbff;
    display: grid;
    gap: 8px;
}

.course-assignment-summary > div:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.course-assignment-summary strong {
    color: var(--text);
}

.course-assignment-summary p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.course-assignment-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 78px;
    overflow: hidden;
}

.muted-chip {
    color: var(--muted-strong);
}

.locked-step-note {
    display: inline-flex;
    max-width: 100%;
    margin-top: 8px !important;
    padding: 7px 9px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
}

.learning-step-hero {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.learning-step-cover {
    width: 170px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 800;
}

.learning-step-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.learning-step-hero-body h1 {
    margin: 6px 0;
}

.learning-step-layout {
    align-items: start;
}

.learning-step-content,
.learning-step-actions-panel,
.learning-step-side {
    border-radius: 8px;
}

.learning-step-section-head {
    margin-bottom: 14px;
}

.learning-step-section-head h2 {
    margin: 0 0 4px;
}

.learning-step-section-head p {
    margin: 0;
    color: var(--muted);
}

.learning-video,
.pdf-frame iframe {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: #111827;
}

.learning-video {
    aspect-ratio: 16 / 9;
}

.pdf-frame iframe {
    min-height: 720px;
    background: #fff;
}

.lesson-text {
    font-size: 16px;
    line-height: 1.65;
}

.learning-test-form {
    margin-top: 10px;
}

.wide-action {
    width: 100%;
}

.step-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.step-mini-list {
    display: grid;
    gap: 8px;
}

.step-mini-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    background: #fff;
}

.step-mini-item span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-blue);
    color: var(--primary-dark);
    font-weight: 800;
}

.step-mini-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.step-mini-item.active {
    border-color: #bfdbfe;
    background: var(--surface-blue);
}

.step-mini-item.done {
    border-color: #bbf7d0;
}

.step-mini-item.done span {
    background: #dcfce7;
    color: var(--success);
}

.step-mini-item.failed span {
    background: #fee2e2;
    color: var(--danger);
}

.step-mini-item.locked {
    opacity: 0.62;
    cursor: not-allowed;
    background: var(--surface-soft);
}

.step-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 920px) minmax(280px, 360px);
    gap: 18px;
    align-items: start;
}

.step-edit-panel {
    min-width: 0;
}

.file-dropzone {
    display: grid;
    gap: 10px;
    min-height: 92px;
    padding: 16px;
    border: 1px dashed #9fc5ff;
    border-radius: 8px;
    background: #f8fbff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.file-dropzone.large {
    min-height: 118px;
}

.file-dropzone:hover,
.file-dropzone.drag-over {
    border-color: var(--primary);
    background: #eef6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.file-dropzone.has-file {
    border-style: solid;
    border-color: #86efac;
    background: #f0fdf4;
}

.file-dropzone input[type="file"] {
    width: 100%;
}

.file-dropzone-name {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.upload-progress-panel {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 12px;
}

.upload-progress-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f6;
}

.upload-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.2s ease;
}

.upload-progress-panel.active {
    border-color: #bfdbfe;
    background: #fbfdff;
}

.strong-note {
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
}

.test-form {
    display: grid;
    gap: 16px;
}

.step-type-fields[hidden] {
    display: none;
}

.test-builder {
    display: grid;
    gap: 12px;
}

.test-builder-head,
.test-question-builder-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.test-builder-head small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
}

.test-question-builder-list {
    display: grid;
    gap: 12px;
}

.test-question-builder {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.answer-builder-list {
    display: grid;
    gap: 8px;
}

.answer-builder-row {
    display: grid;
    grid-template-columns: 18px 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.test-question {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.test-question legend {
    padding: 0 6px;
    font-weight: 750;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.correct-answer-row {
    padding: 8px 10px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
}

.answer-key-badge {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.answer-selected-badge,
.answer-wrong-badge {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.answer-selected-badge {
    background: #e0f2fe;
    color: #075985;
}

.answer-wrong-badge {
    background: #fee2e2;
    color: #991b1b;
}

.wrong-answer-row,
.selected-answer-row {
    padding: 8px 10px;
    border-radius: 8px;
}

.wrong-answer-row {
    border: 1px solid #fecaca;
    background: #fef2f2;
}

.selected-answer-row {
    border: 1px solid #bae6fd;
    background: #f0f9ff;
}

.test-result-panel {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.test-result-list,
.test-result-question,
.test-result-answers,
.question-editor-list {
    display: grid;
    gap: 10px;
}

.test-result-question {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.test-result-question.correct {
    border-color: #bbf7d0;
}

.test-result-question.wrong {
    border-color: #fecaca;
}

.test-result-answer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attempt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.attempt-result-list {
    margin-top: 4px;
}

.attempt-question-head {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    align-items: flex-start;
}

.attempt-status-text {
    font-size: 22px !important;
}

.compact-stat-value {
    font-size: 20px !important;
}

.success-text {
    color: #047857;
}

.danger-text {
    color: #b91c1c;
}

.warning-note {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.question-editor-card {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.question-editor-card summary {
    cursor: pointer;
    font-weight: 750;
}

/* Learning analytics */
.learning-toolbar.analytics-toolbar {
    grid-template-columns:
        minmax(280px, 1.25fr)
        minmax(220px, 1.2fr)
        minmax(200px, 1fr)
        minmax(160px, 0.8fr)
        minmax(280px, 1.3fr)
        auto;
}

.learning-toolbar.user-analytics-toolbar {
    grid-template-columns: minmax(240px, 1.2fr) minmax(180px, 0.8fr) minmax(260px, 1.3fr) auto;
}

.learning-toolbar.team-toolbar {
    grid-template-columns:
        minmax(240px, 1.2fr)
        minmax(220px, 1.1fr)
        minmax(180px, 0.8fr)
        minmax(260px, 1.3fr)
        auto;
}

.analytics-table {
    width: 100%;
    table-layout: fixed;
    min-width: 0;
}

.analytics-table th,
.analytics-table td {
    min-width: 0;
    padding: 10px 12px;
    overflow-wrap: normal;
    word-break: normal;
}

.analytics-table small {
    line-height: 1.35;
}

.analytics-table .status {
    white-space: normal;
    text-align: center;
}

.analytics-table-wrap {
    overflow-x: visible;
}

.analytics-action-cell {
    text-align: right;
}

.analytics-action-cell .btn {
    min-width: 74px;
    white-space: nowrap;
}

.analytics-user-table .analytics-col-person { width: 22%; }
.analytics-user-table .analytics-col-manager { width: 16%; }
.analytics-user-table .analytics-col-status { width: 14%; }
.analytics-user-table .analytics-col-programs { width: 11%; }
.analytics-user-table .analytics-col-tests { width: 7%; }
.analytics-user-table .analytics-col-progress { width: 12%; }
.analytics-user-table .analytics-col-activity { width: 12%; }
.analytics-user-table .analytics-col-action { width: 96px; }

.analytics-program-table .analytics-col-program { width: 24%; }
.analytics-program-table .analytics-col-status { width: 13%; }
.analytics-program-table .analytics-col-progress { width: 12%; }
.analytics-program-table .analytics-col-stop { width: 23%; }
.analytics-program-table .analytics-col-failed { width: 14%; }
.analytics-program-table .analytics-col-activity { width: 10%; }
.analytics-program-table .analytics-col-action { width: 96px; }

.program-analytics-stats {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.program-detail-analytics-table .program-detail-col-user { width: 22%; }
.program-detail-analytics-table .program-detail-col-status { width: 14%; }
.program-detail-analytics-table .program-detail-col-progress { width: 11%; }
.program-detail-analytics-table .program-detail-col-stop { width: 22%; }
.program-detail-analytics-table .program-detail-col-failed { width: 13%; }
.program-detail-analytics-table .program-detail-col-activity { width: 12%; }
.program-detail-analytics-table .program-detail-col-action { width: 96px; }

.program-analytics-panel .panel-head {
    gap: 16px;
}

.program-analytics-panel .button-row {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.analytics-row-danger td {
    background: #fff7f7;
}

.analytics-row-danger:hover td {
    background: #fff1f1;
}

@media (max-width: 1180px) {
    .analytics-table-wrap {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .analytics-table,
    .analytics-table thead,
    .analytics-table tbody,
    .analytics-table tr,
    .analytics-table th,
    .analytics-table td {
        display: block;
        width: 100%;
    }

    .analytics-table colgroup,
    .analytics-table thead {
        display: none;
    }

    .analytics-table tbody {
        display: grid;
        gap: 10px;
    }

    .analytics-table tr {
        border: 1px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .analytics-table td {
        display: grid;
        grid-template-columns: minmax(130px, 0.42fr) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        border-bottom: 1px solid var(--border);
    }

    .analytics-table tr:last-child td {
        border-bottom: 1px solid var(--border);
    }

    .analytics-table td:last-child {
        border-bottom: 0;
    }

    .analytics-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .analytics-action-cell {
        display: flex !important;
        justify-content: flex-end;
        padding-top: 12px;
        background: #fbfdff;
    }

    .analytics-action-cell::before {
        display: none;
    }

    .analytics-action-cell .btn {
        width: auto;
    }

    .analytics-table .status {
        justify-self: start;
        text-align: left;
    }
}

.progress-meter {
    width: 120px;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f6;
}

.progress-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.failed-test-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin: 0 4px 4px 0;
    padding: 4px 8px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

a.failed-test-chip:hover {
    border-color: #f87171;
    background: #fee2e2;
}

.compact-actions {
    justify-content: flex-start;
}

.learning-tree-panel {
    overflow-x: auto;
}

.tree-list {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.root-tree {
    min-width: 620px;
}

.tree-list .tree-list {
    margin-top: 8px;
    padding-left: 28px;
    border-left: 1px solid var(--border);
}

.tree-item details {
    display: grid;
    gap: 8px;
}

.tree-row {
    min-height: 48px;
    display: grid;
    grid-template-columns: 24px minmax(220px, 1fr) 44px auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    cursor: pointer;
}

.tree-row::-webkit-details-marker {
    display: none;
}

.tree-row:hover {
    border-color: #bfdbfe;
    background: var(--surface-blue);
}

.tree-row.context-manager {
    background: #fff7ed;
    border-color: #fed7aa;
}

.tree-row.group-match {
    border-color: #abefc6;
    background: #ecfdf3;
}

.tree-toggle {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #eef2f6;
    color: var(--muted-strong);
}

.tree-toggle::before {
    content: "+";
    font-weight: 800;
}

details[open] > .tree-row .tree-toggle::before {
    content: "-";
}

.tree-person {
    min-width: 0;
}

.tree-person strong,
.tree-person small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-person small {
    margin-top: 3px;
    color: var(--muted);
}

.tree-group-line {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.tree-group-chip {
    max-width: 220px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-group-chip.muted {
    background: #f8fafc;
    color: var(--muted);
    font-weight: 500;
}

.tree-count {
    min-width: 32px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef2f6;
    color: var(--muted-strong);
    font-weight: 750;
}

.tree-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.group-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.group-chip-list.vertical {
    display: grid;
    gap: 8px;
}

.group-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 13px;
}

.group-chip:hover {
    border-color: #bfdbfe;
    background: var(--surface-blue);
    color: var(--primary-dark);
}

.multi-select {
    min-height: 160px;
}

.detail-main-column,
.group-management-side {
    display: grid;
    gap: 22px;
}

.detail-card-block {
    margin-top: 0;
}

.group-management-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.group-management-main {
    min-width: 0;
}

.compact-panel {
    max-width: none;
}

.group-picker {
    display: grid;
    gap: 8px;
    max-height: 520px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.group-option {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px !important;
    align-items: start;
    margin: 0 !important;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
}

.group-option:hover {
    border-color: #bfdbfe;
    background: var(--surface-blue);
}

.group-option input {
    width: auto;
    min-height: auto;
    margin-top: 3px;
}

.group-option strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
}

.group-option small {
    color: var(--muted);
}

.group-tree-picker {
    max-height: 620px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.group-tree-list {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.group-tree-list.nested {
    margin: 8px 0 0 28px;
    padding-left: 14px;
    border-left: 1px solid var(--border);
}

.group-tree-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
}

.group-tree-row.compact {
    grid-template-columns: 22px minmax(0, 1fr) auto;
}

.group-tree-picker.compact {
    max-height: 360px;
}

.group-tree-row:hover {
    border-color: #bfdbfe;
    background: var(--surface-blue);
}

.group-tree-row::-webkit-details-marker {
    display: none;
}

.group-tree-check {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px !important;
    align-items: start;
    margin: 0 !important;
}

.group-tree-check input {
    width: auto;
    min-height: auto;
    margin-top: 3px;
}

.group-tree-check strong,
.group-tree-check small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-tree-check small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.group-user-count {
    min-width: 34px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef2f6;
    color: var(--muted-strong);
    font-weight: 750;
}

.selected-parent-note,
.field-help {
    color: var(--muted);
    font-size: 13px;
}

.selected-parent-note {
    margin: -4px 0 12px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.form-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.assignment-list {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.assignment-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.assignment-item.required {
    border-color: #fed7aa;
    background: #fff7ed;
}

.assignment-item strong,
.assignment-item small,
.assignment-item p {
    display: block;
}

.assignment-item small,
.assignment-item p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.assignment-form {
    margin-top: 12px;
}

.program-edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 18px;
    align-items: start;
}

.assignment-editor-panel {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
}

.assignment-editor-panel .assignment-list {
    max-height: 360px;
    overflow: auto;
}

.assignment-editor-panel .assignment-form {
    display: grid;
    gap: 12px;
    margin-top: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.assignment-editor-panel .assignment-form label {
    display: grid;
    gap: 6px;
}

.assignment-editor-panel .assignment-form .btn {
    width: 100%;
}

.assignment-program-panel {
    display: grid;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.assignment-intro h2 {
    margin: 0 0 8px;
}

.assignment-intro p {
    margin: 0;
    color: var(--muted);
}

.assignment-collapse {
    display: flex;
    flex-direction: column;
}

.assignment-collapse summary {
    order: 2;
    width: fit-content;
    margin-top: 10px;
    list-style: none;
    cursor: pointer;
    color: var(--primary);
    font-weight: 750;
}

.assignment-collapse summary::-webkit-details-marker {
    display: none;
}

.assignment-collapse summary::marker {
    content: "";
}

.assignment-collapse .summary-open {
    display: inline;
}

.assignment-collapse .summary-closed {
    display: none;
}

.assignment-collapse:not([open]) .summary-open {
    display: none;
}

.assignment-collapse:not([open]) .summary-closed {
    display: inline;
}

.assignment-collapse-body {
    order: 1;
    display: grid;
    gap: 12px;
}

.assignment-current {
    display: grid;
    gap: 8px;
}

.assignment-message {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
}

.assignment-program-panel .assignment-form {
    max-width: 720px;
}

.panel-head.compact {
    margin-bottom: 10px;
}

.panel-head.compact h2 {
    font-size: 16px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.detail-layout.wide-left {
    grid-template-columns: minmax(0, 1fr) 420px;
}

.detail-layout.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.course-side {
    display: grid;
    gap: 16px;
}

.course-side .form-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.detail-list {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 8px 14px;
    margin: 0 0 18px;
}

.detail-list dt {
    color: var(--muted);
    font-size: 13px;
}

.detail-list dd { margin: 0; }

.detail-list.compact {
    margin: 0;
}

.note {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.compact-note {
    margin: 10px 0 0;
    font-size: 14px;
}

.dealer-response-summary small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.dealer-response-form form {
    display: grid;
    gap: 12px;
}

.dealer-response-form label {
    margin-bottom: 0;
}

.dealer-response-form .btn {
    width: 100%;
}

.choice-details {
    margin: 12px 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.choice-details summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 700;
}

.choice-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.choice-list ul {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.choice-list > div,
.choice-list li {
    margin: 0;
    list-style: none;
}

.choice-list label,
.choice-list li label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.choice-list input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px;
    height: 16px;
    min-height: 16px !important;
    flex: 0 0 16px;
    margin: 2px 0 0 !important;
    padding: 0;
}

.danger-note {
    border-color: #fecaca;
    background: #fef2f2;
    color: #7f1d1d;
}

.danger-panel {
    border-color: #fecaca;
}

.danger-note p {
    margin: 6px 0 0;
}

.danger-text {
    color: #b91c1c !important;
}

.access-panel {
    margin-top: 16px;
}

.card-subsection {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.card-subsection .group-chip-list {
    margin-top: 0;
}

.access-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.access-actions {
    display: grid;
    gap: 10px;
}

.access-actions .btn {
    width: 100%;
}

.access-actions.inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    margin-top: 14px;
}

.role-form {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.role-form.inline {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.role-form.inline label {
    margin-bottom: 0;
}

.access-secret {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
}

.card-subsection .access-secret {
    grid-template-columns: 1fr;
}

.access-secret p {
    margin: 5px 0 0;
    color: var(--muted);
}

code {
    padding: 2px 5px;
    border-radius: 5px;
    background: var(--surface-soft);
    color: var(--text);
    font-family: "Consolas", "Monaco", monospace;
}

.action-panel label,
.login-panel label,
.form-grid label,
.form-panel label {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid .wide { grid-column: 1 / -1; }

.form-panel {
    max-width: 720px;
}

.form-panel.compact-panel {
    max-width: none;
}

.form-panel small {
    color: var(--muted);
}

.check-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.check-row span { order: 2; }
.check-row input {
    order: 1;
    width: auto;
    min-height: auto;
}

.file-list {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.record-list.spaced {
    margin-top: 14px;
}

.file-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.file-list span {
    color: var(--muted);
    font-size: 13px;
}

.training-section {
    margin-bottom: 16px;
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.empty-state {
    text-align: center;
}

.empty-state p { color: var(--muted); }

.lead-text {
    margin-top: 0;
    color: var(--muted);
    font-size: 17px;
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.message {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 13px;
    background: #fff;
}

.message-success {
    background: #ecfdf3;
    border-color: #abefc6;
    color: var(--success);
}

.message-warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: var(--warning);
}

.message-error {
    background: #fef3f2;
    border-color: #fecdca;
    color: var(--danger);
}

.message-info {
    background: var(--surface-blue);
    border-color: #bfdbfe;
    color: var(--primary-dark);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.page-indicator {
    color: var(--muted);
    font-size: 14px;
}

.empty {
    color: var(--muted);
    text-align: center;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--bg);
}

.login-panel {
    width: min(410px, 100%);
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-brand { margin-bottom: 22px; }
.login-panel .btn { width: 100%; }

.attention-panel {
    margin-top: 16px;
    margin-bottom: 16px;
}

.attention-panel-collapsible {
    padding: 0;
}

.attention-summary {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px;
    cursor: pointer;
    list-style: none;
}

.attention-summary::-webkit-details-marker {
    display: none;
}

.attention-summary h2 {
    margin: 0;
}

.attention-summary p {
    margin: 4px 0 0;
    color: var(--muted);
}

.attention-summary-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex: 0 0 auto;
}

.attention-toggle-label {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--primary);
    font-weight: 800;
    font-size: 13px;
}

.attention-panel-collapsible[open] .attention-toggle-label {
    background: var(--surface-blue);
}

.attention-panel-collapsible[open] .attention-toggle-label::before {
    content: "Скрыть";
}

.attention-panel-collapsible[open] .attention-toggle-label {
    font-size: 0;
}

.attention-panel-collapsible[open] .attention-toggle-label::before {
    font-size: 13px;
}

.attention-panel-collapsible .attention-list,
.attention-panel-collapsible .attention-empty {
    margin: 0 18px 18px;
}

.attention-count {
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: var(--primary);
    font-weight: 800;
}

.attention-list {
    display: grid;
    gap: 10px;
}

.attention-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.attention-item.danger {
    border-color: #fecaca;
    background: #fff7f7;
}

.attention-item.warning {
    border-color: #fed7aa;
    background: #fff8ed;
}

.attention-item.info {
    border-color: #bfdbfe;
    background: #f7fbff;
}

.attention-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}

.attention-line span,
.attention-line small {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 8px;
    background: #eef2f7;
    color: var(--muted);
    font-weight: 800;
    font-size: 12px;
}

.attention-item.danger .attention-line span { color: #b91c1c; background: #fee2e2; }
.attention-item.warning .attention-line span { color: #b45309; background: #ffedd5; }
.attention-item.info .attention-line span { color: #1d4ed8; background: #dbeafe; }

.attention-item strong {
    display: block;
    margin-bottom: 4px;
}

.attention-item p {
    margin: 0;
    color: var(--muted);
}

.attention-empty {
    margin: 0;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

/* Global visual refresh */
body {
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.topbar {
    height: 72px;
    padding: 0 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.06);
    backdrop-filter: blur(10px);
    justify-content: flex-end;
}

.topbar-spacer {
    flex: 1 1 auto;
}

.brand,
.login-brand {
    color: var(--text);
}

.login-brand strong {
    color: var(--text);
    font-size: 16px;
    letter-spacing: 0;
}

.login-logo {
    width: 190px;
    height: 48px;
    object-fit: contain;
    object-position: left center;
}

.userbox {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-align: right;
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 800;
}

.shell {
    grid-template-columns: 256px minmax(0, 1fr);
    min-height: calc(100vh - 72px);
}

.sidebar {
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c7ccd6 transparent;
    padding: 18px 14px 22px;
    background: #ffffff;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #c7ccd6;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #9aa4b2;
}

.nav {
    min-height: calc(100vh - 108px);
    gap: 22px;
}

.nav-section {
    gap: 6px;
}

.nav-label {
    margin: 0 12px 8px;
    color: #667085;
    letter-spacing: 0.04em;
}

.nav-link {
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 10px;
    color: var(--muted-strong);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active,
.nav-accordion[open] > summary.nav-link {
    background: var(--brand-soft);
    border-color: #e7d5ff;
    color: var(--brand);
}

.nav-link.active {
    font-weight: 750;
    box-shadow: inset 3px 0 0 var(--brand);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon,
.nav-accordion[open] > summary .nav-icon {
    background: #ffffff;
    color: var(--brand);
}

.nav-accordion > summary::after {
    color: currentColor;
}

.nav-submenu {
    margin: 4px 0 0 22px;
    padding: 4px 0 4px 14px;
    border-left-color: #eadcff;
}

.nav-sublink {
    padding: 8px 10px;
    border: 1px solid transparent;
}

.nav-sublink:hover,
.nav-sublink.active {
    background: var(--brand-soft);
    border-color: #e3d1ff;
    color: var(--brand);
}

.nav-sublink.active {
    box-shadow: inset 3px 0 0 var(--brand);
}

.nav-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #f0f3f8;
    color: #667085;
    font-size: 13px;
    font-weight: 750;
}

.main {
    padding: 32px;
}

.page-head {
    margin-bottom: 22px;
}

.page-head h1 {
    color: var(--text);
    font-size: 30px;
    line-height: 1.15;
}

.page-head p {
    max-width: 920px;
    line-height: 1.5;
}

.module-card,
.summary-row div,
.panel,
.stats a,
.table-wrap,
.learning-stats div,
.login-panel {
    border-color: var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.module-grid,
.summary-row,
.learning-stats,
.learning-card-grid {
    gap: 14px;
}

.module-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 20px;
    border-top: 0;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.module-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--primary);
}

.module-card.accent-orange::before { background: var(--warning); }
.module-card.accent-green::before { background: var(--success); }
.module-card.accent-purple::before { background: var(--brand); }

.module-card:hover {
    transform: translateY(-2px);
    border-color: #c9d3e2;
    box-shadow: 0 2px 4px rgba(16, 24, 40, 0.08), 0 18px 38px rgba(16, 24, 40, 0.1);
}

.module-count {
    border-radius: 10px;
}

.accent-purple .module-count {
    background: var(--brand-soft);
    color: var(--brand);
}

.panel {
    padding: 20px;
}

.learning-stats div,
.stats a {
    min-height: 92px;
    padding: 16px;
}

.learning-stats strong,
.stats strong,
.summary-row strong {
    color: var(--text);
    font-weight: 800;
}

.input,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="date"],
input[type="number"],
select,
textarea {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(40, 87, 217, 0.14);
}

.btn {
    min-height: 42px;
    border-radius: 10px;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn.secondary {
    background: var(--surface-blue);
    border-color: #c8d8ff;
}

.btn.ghost {
    color: var(--muted-strong);
}

.data-table th,
.data-table td {
    padding: 13px 14px;
}

.data-table th {
    background: #f8fafc;
    color: #667085;
}

.data-table tr:hover td {
    background: #fbfcff;
}

.learning-card {
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.learning-card:hover {
    transform: translateY(-2px);
    border-color: #cfd8e7;
    box-shadow: var(--shadow);
}

.learning-card-cover,
.program-table-cover,
.course-cover,
.learning-step-cover,
.course-step-cover {
    background: linear-gradient(135deg, var(--brand), #7c3aed);
}

.status {
    border-radius: 999px;
}

.messages {
    position: sticky;
    top: 84px;
    z-index: 15;
}

.message {
    border-radius: 12px;
}

.login-screen {
    background: #f4f6fa;
}

.login-panel {
    width: min(440px, 100%);
    padding: 28px;
}

.login-brand {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.login-brand div {
    display: grid;
    gap: 2px;
}

/* Dashboard */
.dashboard-head {
    align-items: center;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-kpi {
    position: relative;
    overflow: hidden;
    min-height: 124px;
    display: grid;
    gap: 6px;
    align-content: start;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow);
    color: var(--text);
}

.dashboard-kpi::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--primary);
}

.dashboard-kpi.accent-orange::before { background: var(--warning); }
.dashboard-kpi.accent-purple::before { background: var(--brand); }
.dashboard-kpi.accent-green::before { background: var(--success); }

.dashboard-kpi span,
.dashboard-kpi small {
    color: var(--muted);
}

.dashboard-kpi strong {
    color: var(--text);
    font-size: 32px;
    line-height: 1.05;
    font-weight: 850;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.dashboard-main,
.dashboard-side {
    display: grid;
    gap: 18px;
}

.dashboard-attention-head {
    padding: 4px 2px 0;
}

.dashboard-attention-head h2 {
    margin: 0 0 5px;
}

.dashboard-attention-head p {
    margin: 0;
    color: var(--muted);
}

.attention-domain {
    margin: 0;
}

.attention-domain-learning { border-top: 3px solid #7c3aed; }
.attention-domain-crm { border-top: 3px solid #2563eb; }
.attention-domain-reclamations { border-top: 3px solid #d97706; }

.dashboard-attention-list,
.compact-list,
.activity-list,
.quick-actions {
    display: grid;
    gap: 10px;
}

.dashboard-attention-item,
.compact-list-item,
.quick-action {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
}

.dashboard-attention-item {
    border-left-width: 4px;
}

.dashboard-attention-item:hover,
.compact-list-item:hover,
.quick-action:hover {
    border-color: #c9d3e2;
    background: #fbfcff;
    color: var(--text);
}

.dashboard-attention-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-attention-item small,
.compact-list-item small,
.activity-item small {
    color: var(--muted);
}

.severity-danger { border-left-color: var(--danger); background: #fffafa; }
.severity-warning { border-left-color: var(--warning); background: #fffdf8; }
.severity-info { border-left-color: var(--primary); }

.dashboard-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-columns h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.quick-action {
    font-weight: 750;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.empty-state {
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--muted);
}

@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .nav {
        min-height: auto;
        display: grid;
        gap: 10px;
    }
    .nav-section { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .nav-account { margin-top: 0; }
    .nav-label,
    .nav-link.disabled { display: none; }
    .main { padding: 18px; }
    .module-grid,
    .summary-row,
    .dashboard-kpi-grid,
    .dashboard-layout,
    .dashboard-columns,
    .learning-stats,
    .management-grid,
    .lesson-grid,
    .detail-layout,
    .program-edit-layout,
    .group-management-layout,
    .access-grid,
    .access-secret,
    .access-actions.inline,
    .role-form.inline,
    .form-grid,
    .learning-toolbar,
    .learning-toolbar.materials-toolbar,
    .learning-toolbar.analytics-toolbar,
    .learning-toolbar.user-analytics-toolbar,
    .learning-toolbar.team-toolbar,
    .learning-toolbar.my-learning-toolbar,
    .learning-card-grid,
    .learning-card-grid.compact,
    .attempt-layout,
    .step-form-layout,
    .bulk-actions { grid-template-columns: 1fr; }
    .management-grid .wide,
    .form-grid .wide { grid-column: auto; }
    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .learning-step-hero {
        grid-template-columns: 140px minmax(0, 1fr);
    }
    .course-hero {
        grid-template-columns: 240px minmax(0, 1fr);
    }
    .course-cover {
        width: 240px;
    }
    .course-hero .action-menu {
        grid-column: 1 / -1;
        justify-self: start;
    }
    .assignment-editor-panel {
        position: static;
    }
    .learning-step-hero .button-row {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .topbar {
        height: auto;
        min-height: 72px;
        padding: 10px 14px;
    }
    .brand-logo {
        width: 132px;
        height: 34px;
    }
    .brand-copy {
        display: none;
    }
    .userbox { display: none; }
    .nav-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-head,
    .toolbar,
    .toolbar.compact {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .button-row,
    .form-actions {
        justify-content: stretch;
    }
    .button-row .btn,
    .form-actions .btn,
    .attention-item .btn {
        width: 100%;
    }
    .attention-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .page-head h1 { font-size: 24px; }
    .course-hero {
        grid-template-columns: 1fr;
    }
    .course-cover {
        width: 100%;
    }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-list { grid-template-columns: 1fr; }
    .learning-step-hero {
        grid-template-columns: 1fr;
    }
    .learning-step-cover {
        width: 100%;
        max-width: 360px;
    }
    .step-nav-buttons {
        align-items: stretch;
    }
    .step-nav-buttons .btn,
    .step-nav-buttons .inline-form,
    .step-nav-buttons .inline-form .btn {
        width: 100%;
    }
    .course-step {
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: start;
    }
    .course-step-main {
        grid-template-columns: 72px minmax(0, 1fr);
    }
    .course-step-cover {
        width: 72px;
    }
    .course-step-actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }
    .tree-row {
        grid-template-columns: 24px minmax(0, 1fr);
    }
    .tree-count,
    .tree-actions {
        grid-column: 2;
        justify-content: flex-start;
    }
    .pagination {
        justify-content: stretch;
        flex-wrap: wrap;
    }
}

/* Portal workspace: shared hierarchy for navigation, operational lists and forms. */
.topbar {
    justify-content: flex-start;
    gap: 18px;
    padding: 0 28px;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--text);
}

.topbar-brand:hover { color: var(--text); }

.topbar-logo {
    width: 154px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
}

.topbar-brand-copy {
    display: grid;
    gap: 2px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    font-weight: 800;
    line-height: 1.15;
}

.topbar-brand-copy small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.sidebar { padding-top: 18px; }
.nav { min-height: calc(100vh - 90px); }

.nav-link.active,
.nav-accordion > summary.active {
    border-color: #ddd0ff;
    background: #f4f0ff;
    color: #5726b7;
}

.nav-sublink.active {
    border-left-color: #6d38d4;
    background: #f7f4ff;
    color: #5726b7;
}

.page-head,
.panel-head {
    position: relative;
}

.page-head > div:first-child > h1 + p,
.panel-head p {
    max-width: 900px;
}

.work-table-wrap {
    overflow: visible;
    padding: 2px 0;
}

.work-table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.work-table thead th {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #f7f8fb;
}

.work-table thead th:first-child {
    border-left: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
}

.work-table thead th:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 8px 8px 0;
}

.work-table tbody td {
    border-top: 1px solid #e5e9f0;
    border-bottom: 1px solid #e5e9f0;
    background: var(--surface);
    vertical-align: middle;
}

.work-table tbody td:first-child {
    border-left: 1px solid #e5e9f0;
    border-radius: 9px 0 0 9px;
}

.work-table tbody td:last-child {
    border-right: 1px solid #e5e9f0;
    border-radius: 0 9px 9px 0;
    text-align: right;
    white-space: nowrap;
}

.work-table tbody tr:hover td {
    background: #fbfaff;
    border-color: #dcd0fb;
}

.work-table .status { white-space: normal; }

.pagination {
    justify-content: space-between;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.initial-assignment-panel {
    border: 1px solid #ded4f6;
    border-radius: 10px;
    background: #fcfbff;
}

.initial-assignment-panel > summary {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.initial-assignment-panel > summary::-webkit-details-marker { display: none; }

.initial-assignment-panel > summary::after {
    content: "⌄";
    margin-left: auto;
    color: #6d38d4;
    font-size: 18px;
}

.initial-assignment-panel[open] > summary::after { transform: rotate(180deg); }

.initial-assignment-panel summary span { display: grid; gap: 3px; }
.initial-assignment-panel summary small { color: var(--muted); }

.initial-assignment-body {
    display: grid;
    gap: 14px;
    padding: 0 16px 16px;
    border-top: 1px solid #e9e2f8;
}

.assignment-enable {
    margin-top: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ece7f7;
}

.assignment-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.assignment-fields label:last-child { grid-column: 1 / -1; }

.disk-launch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
    gap: 34px;
    align-items: center;
    min-height: 310px;
    padding: 42px;
    border-color: #dcd0fb;
    background: #fcfbff;
}

.disk-launch-copy { display: grid; gap: 14px; max-width: 660px; }
.disk-launch-copy h2 { margin: 0; font-size: 28px; }
.disk-launch-copy p { margin: 0; color: var(--muted-strong); font-size: 16px; line-height: 1.6; }
.disk-launch-copy small { color: var(--muted); }

.section-kicker {
    color: #6530c9;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.disk-launch-note {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid #e3dafa;
    border-radius: 10px;
    background: #f5f1ff;
    color: #4a3a73;
    line-height: 1.55;
}

.disk-launch-note strong { color: #34225c; }

/* Reclamation editor: long forms remain scannable without nested cards. */
.reclamation-editor {
    max-width: 1180px;
    margin: 0 auto;
    border: 1px solid #e4d9f3;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.reclamation-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px 24px;
    border-bottom: 1px solid #ece5f5;
}

.reclamation-editor-head h1 {
    margin: 10px 0 6px;
    color: var(--brand);
    font-size: 24px;
}

.reclamation-editor-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.editor-close {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    color: #7c7390;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}

.editor-close:hover { background: var(--brand-soft); color: var(--brand); }

.reclamation-editor-form { padding: 0 32px; }

.reclamation-editor-form > .message { margin-top: 24px; }

.reclamation-form-section {
    margin: 20px 0;
    padding: 24px;
    border: 1px solid #e6deef;
    border-radius: 8px;
    background: #fdfcff;
}

.reclamation-form-section:nth-of-type(even) { background: #fbfdff; border-color: #dfe8f4; }

.reclamation-form-section h2 {
    margin: 0 0 20px;
    padding-left: 12px;
    border-left: 3px solid var(--brand);
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.reclamation-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.reclamation-fields-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.reclamation-field,
.reclamation-conditional.reclamation-field,
.reclamation-conditional.reclamation-field > label {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.reclamation-field > span,
.reclamation-field-label,
.reclamation-conditional.reclamation-field > label > span {
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 700;
}

.reclamation-conditional[hidden] { display: none !important; }
.reclamation-rule[hidden],
.reclamation-field[data-product-field][hidden] { display: none !important; }

.required-mark { color: var(--danger); }

.reclamation-fields .field-wide { grid-column: 1 / -1; }

.reclamation-defect-groups {
    display: grid;
    gap: 12px;
}

.reclamation-section-note {
    margin: -10px 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.reclamation-rule {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding: 20px;
    border: 1px solid #e4d8f0;
    border-radius: 8px;
    background: #fbf9fe;
}

.reclamation-rule-inner {
    border-left: 3px solid #b78ae4;
    background: #fdfcff;
}

.reclamation-rule h3 {
    margin: 0;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.reclamation-contact-fields input[disabled] {
    border-color: #ddd5e7;
    background: #f5f3f8;
    color: #5e5770;
    cursor: not-allowed;
}

.reclamation-defect-groups .reclamation-conditional {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid #e4d8f0;
    border-radius: 8px;
    background: #fbf9fe;
}

.reclamation-description-fields { margin-top: 16px; }

.product-defect-title {
    margin: 0;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.choice-group { min-width: 0; }

.choice-group-label {
    margin: 0 0 8px;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 750;
}

.choice-group-label span {
    color: var(--muted);
    font-weight: 500;
}

.reclamation-editor .choice-details {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-color: #d8c8ec;
    background: #fbf8ff;
}

.reclamation-editor .choice-details summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 15px;
    color: var(--brand-dark);
    font-size: 14px;
    list-style: none;
}

.reclamation-editor .choice-details summary::-webkit-details-marker { display: none; }

.reclamation-editor .choice-details summary::before {
    content: "+";
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border: 1px solid #bea2dc;
    border-radius: 5px;
    color: var(--brand);
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}

.reclamation-editor .choice-details[open] summary {
    border-bottom: 1px solid #e2d6f0;
    background: #f4edff;
}

.reclamation-editor .choice-details[open] summary::before { content: "−"; }

.choice-details-rich summary span { font-weight: 750; }

.choice-details-rich summary small {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.choice-option-list {
    display: grid;
    gap: 2px;
    padding: 10px;
}

.choice-option-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 20px;
    padding: 0;
}

.choice-option {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    line-height: 1.42;
}

.choice-option:hover { background: #f0e7fb; }

.choice-option input[type="checkbox"] {
    width: 17px !important;
    min-width: 17px;
    height: 17px;
    min-height: 17px !important;
    flex: 0 0 17px;
    margin: 2px 0 0 !important;
    padding: 0;
    accent-color: var(--brand);
}

.choice-option span { min-width: 0; }

.choice-group-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.choice-group-columns .choice-option-grid {
    grid-template-columns: 1fr;
}

.reclamation-file-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.reclamation-file-field { display: grid; gap: 8px; }

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

.reclamation-dropzone {
    display: grid;
    min-height: 148px;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 20px;
    border: 2px dashed #b78ae4;
    border-radius: 8px;
    background: #fcfaff;
    color: var(--brand-dark);
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.reclamation-dropzone:hover,
.reclamation-dropzone.is-dragging {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 0 0 3px rgba(83, 0, 134, 0.12);
}

.reclamation-dropzone.has-files {
    border-style: solid;
    border-color: #70ba8d;
    background: #f0fdf4;
    color: var(--success-dark);
}

.reclamation-dropzone-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: #eee2ff;
    color: var(--brand);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.reclamation-dropzone small { color: var(--muted); }

.reclamation-editor-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px -32px 0;
    padding: 16px 32px;
    border-top: 1px solid #e8e0f1;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 18px rgba(16, 24, 40, 0.04);
}

.reclamation-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    max-width: 520px;
    color: var(--muted-strong);
    font-size: 13px;
    line-height: 1.4;
}

.reclamation-consent input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin: 1px 0 0;
    accent-color: var(--brand);
}

.reclamation-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 900px) {
    .work-table-wrap { overflow-x: auto; }
    .work-table { min-width: 760px; }
    .disk-launch { grid-template-columns: 1fr; gap: 20px; padding: 28px; }
    .reclamation-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reclamation-file-grid { grid-template-columns: 1fr; }
    .choice-option-grid,
    .choice-group-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .topbar { padding: 10px 14px; }
    .topbar-logo { width: 132px; height: 36px; }
    .topbar-brand-copy { display: none; }
    .assignment-fields { grid-template-columns: 1fr; }
    .disk-launch { min-height: auto; padding: 22px; }
    .disk-launch-copy h2 { font-size: 22px; }
    .reclamation-editor { margin: -8px; border-radius: 0; border-left: 0; border-right: 0; }
    .reclamation-editor-head { padding: 22px 18px 18px; }
    .reclamation-editor-form { padding: 0 18px; }
    .reclamation-fields,
    .reclamation-fields-two { grid-template-columns: 1fr; }
    .reclamation-fields .field-wide { grid-column: auto; }
    .reclamation-form-section { margin: 14px 0; padding: 20px 16px; }
    .choice-details-rich summary small { display: none; }
    .reclamation-defect-groups .reclamation-conditional { padding: 16px; }
    .choice-option-grid,
    .choice-group-columns { grid-template-columns: 1fr; }
    .reclamation-editor-actions { margin: 0 -18px; padding: 14px 18px; }
    .reclamation-editor-actions { align-items: stretch; flex-direction: column; }
    .reclamation-actions-buttons { width: 100%; }
    .reclamation-actions-buttons .btn { flex: 1; }
}

/* Mobile workspace: touch-first navigation, forms and operational lists. */
.mobile-nav-toggle,
.mobile-nav-close,
.mobile-nav-brand,
.mobile-nav-backdrop {
    display: none;
}

@media (max-width: 980px) {
    .topbar {
        position: sticky;
        top: 0;
        z-index: 60;
        height: 64px;
        min-height: 64px;
        padding: 0 16px;
        gap: 12px;
    }

    .mobile-nav-toggle {
        display: inline-grid;
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        place-content: center;
        gap: 5px;
        padding: 0;
        border: 1px solid var(--border-strong);
        border-radius: 10px;
        background: var(--surface);
        cursor: pointer;
    }

    .mobile-nav-toggle:hover,
    .mobile-nav-toggle:focus-visible {
        border-color: #cdb7ed;
        background: var(--brand-soft);
        outline: 0;
    }

    .mobile-nav-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: var(--brand);
    }

    .shell {
        display: block;
        min-height: calc(100vh - 64px);
    }

    .sidebar {
        position: fixed;
        z-index: 70;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(332px, calc(100vw - 32px));
        height: 100dvh;
        padding: 16px 14px 28px;
        overflow-y: auto;
        border: 0;
        box-shadow: 18px 0 38px rgba(16, 24, 40, 0.18);
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        scrollbar-width: thin;
    }

    .sidebar.is-open { transform: translateX(0); }

    .mobile-nav-brand {
        display: inline-flex;
        align-items: center;
        min-height: 48px;
        gap: 10px;
        max-width: calc(100% - 58px);
        margin: 0 0 26px 4px;
        color: var(--text);
    }

    .mobile-nav-brand img {
        width: 132px;
        height: 40px;
        object-fit: contain;
        object-position: left center;
    }

    .mobile-nav-brand span {
        display: grid;
        gap: 2px;
        min-width: 0;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.1;
    }

    .mobile-nav-brand small {
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
    }

    .mobile-nav-close {
        position: absolute;
        top: 16px;
        right: 14px;
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        padding: 0;
        border: 1px solid var(--border-strong);
        border-radius: 10px;
        background: var(--surface);
        color: var(--muted-strong);
        cursor: pointer;
        font-size: 28px;
        font-weight: 300;
        line-height: 1;
    }

    .mobile-nav-close:hover,
    .mobile-nav-close:focus-visible {
        border-color: #cdb7ed;
        background: var(--brand-soft);
        color: var(--brand);
        outline: 0;
    }

    .mobile-nav-backdrop {
        position: fixed;
        z-index: 65;
        inset: 0;
        width: 100%;
        border: 0;
        background: rgba(16, 24, 40, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.navigation-open { overflow: hidden; }
    body.navigation-open .mobile-nav-backdrop { opacity: 1; pointer-events: auto; }

    .nav,
    .nav-section {
        display: grid;
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .nav { gap: 26px; }
    .nav-section { gap: 7px; }
    .nav-label { display: block; margin: 0 10px 8px; }
    .nav-link.disabled { display: flex; }
    .nav-account { margin-top: 0; padding-top: 18px; border-top: 1px solid var(--border); }
    .nav-submenu { margin-left: 20px; padding-left: 13px; }

    .main { padding: 24px; }
}

@media (max-width: 720px) {
    html { font-size: 16px; }

    .main { padding: 18px 14px 28px; }
    .messages { top: 76px; }

    .page-head,
    .page-head.split,
    .panel-head.split {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 16px;
    }

    .page-head h1 { font-size: 25px; }
    .page-head p { font-size: 15px; }
    .page-head .button-row,
    .page-head > .btn { justify-self: stretch; }
    .page-head > .btn { width: 100%; text-align: center; }

    .panel,
    .table-wrap,
    .module-card,
    .learning-card,
    .dashboard-kpi,
    .learning-stats div,
    .stats a { border-radius: 10px; }

    .panel { padding: 16px; }
    .stats,
    .dashboard-kpi-grid,
    .learning-stats,
    .summary-row,
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .stats a,
    .learning-stats div,
    .dashboard-kpi { min-height: 94px; padding: 14px; }
    .stats strong,
    .learning-stats strong,
    .dashboard-kpi strong { font-size: 27px; }

    .toolbar,
    .toolbar.compact,
    .learning-toolbar,
    .learning-toolbar.analytics-toolbar,
    .learning-toolbar.team-toolbar,
    .learning-toolbar.my-learning-toolbar,
    .learning-toolbar.materials-toolbar,
    .learning-toolbar.user-analytics-toolbar,
    .form-grid,
    .management-grid,
    .lesson-grid,
    .detail-layout,
    .program-edit-layout,
    .group-management-layout,
    .access-grid,
    .attempt-layout,
    .step-form-layout,
    .dashboard-layout,
    .dashboard-columns,
    .assignment-fields,
    .reclamation-fields,
    .reclamation-fields-two,
    .reclamation-file-grid,
    .choice-option-grid,
    .choice-group-columns { grid-template-columns: 1fr; }

    .toolbar > *,
    .learning-toolbar > *,
    .form-grid > *,
    .button-row > *,
    .form-actions > * { min-width: 0; }

    .toolbar .btn,
    .learning-toolbar .btn,
    .button-row .btn,
    .form-actions .btn,
    .bulk-actions .btn { width: 100%; }

    .button-row,
    .form-actions,
    .bulk-actions { display: grid; grid-template-columns: 1fr; }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td { display: block; width: 100%; }

    .responsive-table colgroup,
    .responsive-table thead { display: none; }

    .table-wrap,
    .work-table-wrap,
    .analytics-table-wrap { overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }

    .responsive-table { border-collapse: separate; border-spacing: 0 10px; min-width: 0; }

    .responsive-table tbody { display: grid; gap: 10px; }
    .responsive-table tbody tr {
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface);
        box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    }

    .responsive-table tbody td,
    .work-table tbody td,
    .analytics-table tbody td {
        display: grid;
        grid-template-columns: minmax(105px, 38%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        min-height: 0;
        padding: 11px 12px;
        border: 0 !important;
        border-bottom: 1px solid #edf0f4 !important;
        border-radius: 0 !important;
        background: transparent !important;
        text-align: left !important;
        white-space: normal !important;
    }

    .responsive-table tbody td:last-child,
    .work-table tbody td:last-child,
    .analytics-table tbody td:last-child { border-bottom: 0 !important; }

    .responsive-table tbody td[data-label]::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        font-weight: 750;
        line-height: 1.4;
    }

    .responsive-table tbody td[data-label=""] { display: block; padding-top: 4px; }
    .responsive-table tbody td[data-label=""]::before { display: none; }
    .responsive-table .btn { width: 100%; }
    .responsive-table td small { margin-top: 3px; }
    .responsive-table .analytics-action-cell { display: block; }
    .responsive-table .progress-meter { width: 100%; }

    .course-hero,
    .learning-step-hero { grid-template-columns: 1fr; padding: 16px; }
    .course-cover,
    .learning-step-cover { width: 100%; max-width: none; }
    .course-hero h1,
    .learning-step-hero h1 { font-size: 26px; }
    .course-step { grid-template-columns: 36px minmax(0, 1fr); padding: 14px; }
    .course-step-main { grid-template-columns: 66px minmax(0, 1fr); gap: 12px; }
    .course-step-cover { width: 66px; height: 48px; }
    .course-step-actions { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr; }
    .course-step-actions .btn { width: 100%; }

    .learning-video,
    .pdf-frame,
    .pdf-frame iframe { max-width: 100%; }
    .pdf-frame { min-height: 420px; }

    .pagination { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 12px; }
    .pagination .btn { width: 100%; text-align: center; }

    .disk-launch { padding: 22px; }
    .disk-launch-copy h2 { font-size: 22px; }

    .reclamation-editor { margin: -18px -14px; }
    .reclamation-editor-head { padding: 20px 18px 16px; }
    .reclamation-editor-form { padding: 0 14px; }
    .reclamation-form-section { padding: 18px 14px; }
    .reclamation-editor-actions { margin: 0 -14px; padding: 12px 14px; }
    .reclamation-editor-actions .btn { min-width: 0; }
}

@media (max-width: 420px) {
    .topbar { padding: 0 12px; }
    .topbar-logo { width: 126px; height: 34px; }
    .main { padding-inline: 12px; }
    .stats,
    .dashboard-kpi-grid,
    .learning-stats,
    .summary-row,
    .module-grid { grid-template-columns: 1fr; }
    .responsive-table tbody td,
    .work-table tbody td,
    .analytics-table tbody td { grid-template-columns: 1fr; gap: 4px; }
    .responsive-table tbody td[data-label]::before { font-size: 11px; }
    .reclamation-editor { margin-inline: -12px; }
    .reclamation-editor-actions { margin-inline: -14px; }
}
