:root {
    --primary-color: #602b7a;
    --primary-light: #8e52aa;
    --primary-dark: #1d1633;
    --accent-color: #7b4bc7;
    --secondary-color: #ffffff;
    --text-color: #162033;
    --text-light: #5b6577;
    --bg-color: #eef3f7;
    --bg-strong: #dce7f0;
    --card-bg: rgba(255, 255, 255, 0.82);
    --card-solid: #ffffff;
    --border-color: rgba(22, 32, 51, 0.08);
    --border-strong: rgba(22, 32, 51, 0.16);
    --success-color: #16a34a;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --primary-rgb: 96, 43, 122;
    --accent-rgb: 123, 75, 199;
    --surface-neutral: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.76));
    --surface-muted: linear-gradient(135deg, rgba(123, 44, 191, 0.12), rgba(15, 28, 44, 0.06));
    --surface-success: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(134, 239, 172, 0.18));
    --surface-warning: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.18));
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
    --radius: 24px;
    --radius-sm: 18px;
    --radius-xs: 14px;
}

.parent-report-group-list,
.parent-report-chip-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.parent-report-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    background: rgba(255, 255, 255, 0.62);
}

.parent-report-group-item strong,
.parent-report-table td strong {
    display: block;
    color: var(--text-color);
}

.parent-report-group-item small,
.parent-report-table td small {
    display: block;
    margin-top: 4px;
    color: var(--text-light);
}

.parent-report-group-item span {
    color: var(--text-light);
    font-size: 0.92rem;
    text-align: right;
}

.report-month-filter {
    min-width: 220px;
}

.parent-report-confirmation-text {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-xs);
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.5;
}

.parent-report-confirmation-text i {
    margin-top: 3px;
    color: var(--primary-color);
}

.parent-report-chip-list {
    flex-direction: row;
    flex-wrap: wrap;
}

.parent-report-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1.15;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.86rem;
    white-space: nowrap;
}

.status-success {
    color: #166534;
    background: rgba(22, 163, 74, 0.12);
}

.status-warning {
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
}

.parent-report-missing td {
    background: rgba(245, 158, 11, 0.035);
}

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

.main-content .parent-report-admin-container {
    width: 100%;
    max-width: 1180px;
    padding: 0;
}

.parent-report-admin-container .parent-report-hero,
.parent-report-admin-container .parent-report-stats-grid,
.parent-report-admin-container .parent-report-status-card {
    width: 100%;
}

.admin-stats-grid.parent-report-stats-grid .stat-card {
    min-height: 0;
    padding: 11px 14px;
    border-radius: 16px;
}

.admin-stats-grid.parent-report-stats-grid .stat-card::after {
    width: 70px;
    height: 70px;
    right: -28px;
    bottom: -34px;
}

.admin-stats-grid.parent-report-stats-grid .stat-card h3 {
    margin-bottom: 3px;
    font-size: 1.35rem;
    line-height: 1;
}

.admin-stats-grid.parent-report-stats-grid .stat-card p {
    font-size: 0.78rem;
    line-height: 1.16;
}

.parent-report-status-card {
    padding: 16px;
}

.parent-report-status-card .section-header {
    gap: 12px;
    margin-bottom: 12px;
}

.parent-report-status-card .section-header h3 {
    margin-bottom: 2px;
    font-size: 1.12rem;
}

.parent-report-status-card .section-header p {
    display: none;
}

.parent-report-status-card .report-month-filter {
    min-width: 170px;
}

.parent-report-table {
    table-layout: fixed;
}

.parent-report-table th,
.parent-report-table td {
    padding: 8px 10px;
    vertical-align: middle;
    line-height: 1.25;
}

.parent-report-table th {
    font-size: 0.76rem;
}

.parent-report-table td {
    font-size: 0.88rem;
}

.parent-report-table th:nth-child(1),
.parent-report-table td:nth-child(1) {
    width: 22%;
}

.parent-report-table th:nth-child(2),
.parent-report-table td:nth-child(2) {
    width: 35%;
}

.parent-report-table th:nth-child(3),
.parent-report-table td:nth-child(3) {
    width: 8%;
    text-align: center;
}

.parent-report-table th:nth-child(4),
.parent-report-table td:nth-child(4) {
    width: 15%;
}

.parent-report-table th:nth-child(5),
.parent-report-table td:nth-child(5) {
    width: 20%;
}

.parent-report-table td strong {
    line-height: 1.18;
}

.parent-report-table .parent-report-chip-list {
    gap: 4px;
    overflow: visible;
    padding-right: 0;
}

.parent-report-table .parent-report-chip {
    border-radius: 10px;
}

.python-lab-shell {
    padding: 28px;
}

.python-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 18px;
}

.python-code-editor {
    min-height: 420px;
    resize: vertical;
}

.python-output-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.python-output-card,
.python-checklist-card {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(112, 68, 186, 0.06), rgba(112, 68, 186, 0.02));
    border: 1px solid rgba(112, 68, 186, 0.14);
}

.python-output-card {
    min-height: 120px;
    color: var(--text-color);
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.65;
}

.python-checklist-card strong {
    display: block;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.python-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.python-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.45;
}

.python-checklist li i {
    margin-top: 3px;
    color: rgba(112, 68, 186, 0.55);
}

.python-checklist li.is-passed {
    color: #1f7a42;
}

.python-checklist li.is-passed i {
    color: #1f7a42;
}

.python-checklist li.is-missing {
    color: #a54848;
}

.python-checklist li.is-missing i {
    color: #d15d5d;
}

.python-checklist li.is-heading {
    margin-top: 8px;
    font-weight: 700;
    color: var(--primary-color);
}

.python-checklist li.is-heading:first-child {
    margin-top: 0;
}

.python-practice-shell .visual-practice-layout {
    grid-template-columns: 1fr;
}

.python-practice-code {
    display: block;
    margin: 0;
    padding: 16px 18px;
    border-radius: 20px;
    background: #15172b;
    color: #f4f7ff;
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.python-practice-code span {
    display: block;
}

@media (max-width: 992px) {
    .python-editor-grid {
        grid-template-columns: 1fr;
    }
}

.development-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.development-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 14px;
    align-items: stretch;
    padding: 14px 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.18), transparent 32%),
        linear-gradient(140deg, rgba(29, 22, 51, 0.98), rgba(96, 43, 122, 0.94) 60%, rgba(142, 82, 170, 0.88));
    box-shadow: var(--shadow);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.development-hero::after {
    content: "";
    position: absolute;
    inset: auto -52px -92px auto;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.development-hero > * {
    position: relative;
    z-index: 1;
}

.development-hero-copy h1 {
    margin-bottom: 5px;
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    color: #fff;
}

.development-hero-copy p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.9rem;
    line-height: 1.45;
}

.development-eyebrow {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 6px;
}

.development-hero-side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
}

.development-hero-badge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 58px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.development-hero-badge strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1;
}

.development-hero-badge span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.82rem;
}

.development-hero-badge-muted {
    background: rgba(255, 255, 255, 0.08);
}

.development-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.development-toggle-copy h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.development-toggle-copy p {
    margin: 0;
    color: var(--text-light);
    max-width: 720px;
}

.development-switch {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    min-width: 270px;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.06);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.development-switch:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.development-switch-track {
    position: relative;
    flex: 0 0 64px;
    width: 64px;
    height: 34px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.16);
    transition: background 0.2s ease;
}

.development-switch-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    transition: transform 0.22s ease;
}

.development-switch.is-on {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.18);
}

.development-switch.is-on .development-switch-track {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.development-switch.is-on .development-switch-thumb {
    transform: translateX(30px);
}

.development-switch-labels {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.development-switch-state {
    font-weight: 800;
    color: var(--text-color);
}

.development-switch-note {
    color: var(--text-light);
    font-size: 0.92rem;
}

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

.development-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-height: 240px;
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.development-card::before {
    content: "";
    position: absolute;
    inset: auto -40px -70px auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.08);
    transition: transform 0.22s ease, background 0.22s ease;
}

.development-card > * {
    position: relative;
    z-index: 1;
}

.development-card.is-live:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 54px rgba(96, 43, 122, 0.18);
    border-color: rgba(var(--accent-rgb), 0.22);
}

.development-card.is-live:hover::before {
    transform: scale(1.08);
    background: rgba(var(--accent-rgb), 0.14);
}

.development-card.is-complete {
    border-color: rgba(22, 163, 74, 0.18);
    box-shadow: 0 24px 48px rgba(22, 163, 74, 0.1);
}

.development-card.is-locked {
    opacity: 0.88;
    cursor: default;
}

.development-card.is-locked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(238, 243, 247, 0.26));
    pointer-events: none;
}

.development-card-icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(96, 43, 122, 0.14), rgba(123, 75, 199, 0.12));
    color: var(--primary-color);
    font-size: 1.35rem;
}

.development-card-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.development-card-copy h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.45rem;
}

.development-card-copy p {
    margin: 0;
    color: var(--text-light);
}

.development-card-status {
    margin-top: auto;
}

.development-card-check {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.14);
    color: var(--success-color);
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.14);
    font-size: 0.95rem;
}

.development-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.development-status-live {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success-color);
}

.development-status-soon {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-light);
}

.development-modules-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.development-grid:not(.development-modules-grid) {
    gap: 14px;
}

.development-grid:is(.development-modules-grid) .development-card,
.development-grid:not(.development-modules-grid) .development-card {
    gap: 11px;
    min-height: 165px;
    padding: 18px 20px;
    border-radius: 22px;
}

.development-grid:is(.development-modules-grid) .development-card::before,
.development-grid:not(.development-modules-grid) .development-card::before {
    inset: auto -28px -54px auto;
    width: 112px;
    height: 112px;
}

.development-grid:is(.development-modules-grid) .development-card-icon,
.development-grid:not(.development-modules-grid) .development-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 17px;
    font-size: 1.05rem;
}

.development-grid:is(.development-modules-grid) .development-card-copy,
.development-grid:not(.development-modules-grid) .development-card-copy {
    gap: 6px;
}

.development-grid:is(.development-modules-grid) .development-card-copy h3,
.development-grid:not(.development-modules-grid) .development-card-copy h3 {
    font-size: 1.18rem;
    line-height: 1.15;
}

.development-grid:is(.development-modules-grid) .development-card-copy p,
.development-grid:not(.development-modules-grid) .development-card-copy p {
    font-size: 0.9rem;
    line-height: 1.35;
}

.development-grid:is(.development-modules-grid) .development-status,
.development-grid:not(.development-modules-grid) .development-status {
    min-width: 78px;
    padding: 6px 11px;
    font-size: 0.72rem;
}

.development-grid:is(.development-modules-grid) .development-card-check {
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
}

.development-back-link {
    align-self: flex-start;
}

.development-tool-header > .development-back-link,
.trainer-header-actions .development-back-link {
    margin-top: 37px;
}

.trainer-header-card {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
}

.trainer-header-copy h1 {
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.trainer-header-copy p {
    margin: 0;
    max-width: 760px;
    color: var(--text-light);
}

.trainer-header-eyebrow {
    margin-bottom: 12px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--primary-color);
}

.trainer-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.trainer-hero-actions {
    justify-content: flex-start;
}

.trainer-mode-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 26px 28px;
    border: 1px solid rgba(var(--accent-rgb), 0.16);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 238, 252, 0.96));
    box-shadow: 0 20px 44px rgba(96, 43, 122, 0.1);
}

.trainer-mode-intro h2 {
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 1.45rem;
}

.trainer-mode-intro p {
    margin: 0;
    color: var(--text-light);
}

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

.trainer-mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--text-color);
    border-radius: 22px;
    min-height: 74px;
    padding: 18px 22px;
    font-weight: 800;
    font-size: 1.02rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.trainer-mode-tab:hover {
    transform: translateY(-1px);
}

.trainer-mode-tab.is-active {
    background: linear-gradient(135deg, rgba(29, 22, 51, 0.96), rgba(123, 75, 199, 0.92));
    color: #fff;
    box-shadow: 0 16px 30px rgba(96, 43, 122, 0.18);
}

.trainer-mode-note {
    margin: 0;
    color: var(--text-color);
    font-weight: 600;
}

.typing-trainer-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.trainer-panel {
    display: none;
    gap: 26px;
}

.trainer-panel.is-active {
    display: flex;
    flex-direction: column;
}

.trainer-panel-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.55rem;
}

.trainer-panel-header p {
    margin: 0;
    color: var(--text-light);
}

.trainer-setup,
.trainer-session {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trainer-choice-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trainer-choice-label {
    font-weight: 800;
    color: var(--text-color);
}

.trainer-choice-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.trainer-choice-pill {
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    background: rgba(var(--primary-rgb), 0.06);
    color: var(--text-color);
    border-radius: 16px;
    padding: 10px 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.trainer-choice-pill:hover {
    transform: translateY(-1px);
}

.trainer-choice-pill.is-active {
    background: rgba(var(--accent-rgb), 0.14);
    border-color: rgba(var(--accent-rgb), 0.24);
    color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(96, 43, 122, 0.08);
}

.trainer-inline-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 18px;
    border-radius: 18px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--text-color);
    font-weight: 600;
}

.trainer-start-button {
    align-self: flex-start;
}

.trainer-stat-bar,
.trainer-results-grid,
.trainer-level-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.trainer-stat-box,
.trainer-result-card,
.trainer-level-badge {
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 233, 248, 0.94));
    border: 1px solid rgba(var(--primary-rgb), 0.08);
}

.trainer-level-badge-wide {
    grid-column: span 2;
}

.trainer-stat-label,
.trainer-result-card span,
.trainer-level-badge span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.88rem;
}

.trainer-stat-box strong,
.trainer-result-card strong,
.trainer-level-badge strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    color: var(--text-color);
}

.trainer-typebox {
    position: relative;
    min-height: 210px;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 239, 250, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: text;
}

.trainer-typebox:focus-within {
    border-color: rgba(var(--accent-rgb), 0.34);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.08);
}

.trainer-typebox-text {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 6px 2px;
    font-size: 1.34rem;
    line-height: 1.95;
    color: rgba(22, 32, 51, 0.78);
    font-weight: 600;
}

.trainer-char {
    position: relative;
    display: inline-flex;
    min-width: 0.72ch;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.12s ease, color 0.12s ease;
}

.trainer-char.is-correct {
    color: var(--success-color);
    background: rgba(22, 163, 74, 0.08);
}

.trainer-char.is-incorrect {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.trainer-char.is-current {
    color: var(--text-color);
    background: rgba(var(--accent-rgb), 0.14);
    box-shadow: inset 0 -2px 0 rgba(var(--accent-rgb), 0.24);
}

.trainer-char.is-space::after {
    content: "·";
    opacity: 0.26;
}

.trainer-hidden-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    resize: none;
}

.trainer-keyboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(29, 22, 51, 0.97), rgba(57, 36, 90, 0.96));
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
}

.trainer-keyboard-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
}

.trainer-key {
    min-width: 46px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.76);
    font-size: 1rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.trainer-key.is-wide {
    min-width: 170px;
}

.trainer-key.is-active {
    background: linear-gradient(135deg, #f8f4ff, #ffffff);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 255, 255, 0.12);
}

.trainer-results {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 40px);
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(10px);
}

.trainer-results[hidden] {
    display: none !important;
}

.trainer-results-dialog {
    width: min(980px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 238, 252, 0.96));
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    box-shadow: 0 36px 80px rgba(15, 23, 42, 0.24);
}

.trainer-results-heading {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.trainer-results-heading h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: clamp(1.55rem, 2.6vw, 2rem);
}

.trainer-results-eyebrow {
    align-self: flex-start;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--primary-color);
}

.trainer-results-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 18px;
}

.trainer-results-panel {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 239, 250, 0.88));
    border: 1px solid rgba(var(--primary-rgb), 0.08);
}

.trainer-results-panel h3 {
    margin-bottom: 14px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.trainer-results-panel p {
    color: var(--text-light);
}

.trainer-error-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trainer-error-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text-color);
    font-weight: 700;
}

.trainer-error-chip strong {
    color: var(--danger-color);
}

.trainer-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

body.trainer-overlay-open {
    overflow: auto;
}

.trainer-page {
    gap: 12px;
}

.trainer-page .trainer-mode-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(360px, 0.8fr);
    align-items: center;
    gap: 10px 16px;
    padding: 14px 18px;
}

.trainer-page .trainer-mode-intro h2 {
    margin-bottom: 0;
    font-size: 1.18rem;
}

.trainer-page .trainer-mode-intro p,
.trainer-page .trainer-mode-note,
.trainer-page .trainer-panel-header p {
    display: none;
}

.trainer-page .trainer-mode-tabs {
    gap: 10px;
}

.trainer-page .trainer-mode-tab {
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 16px;
}

.trainer-page .typing-trainer-shell {
    gap: 12px;
}

.trainer-page .trainer-panel {
    gap: 14px;
    padding: 18px;
}

.trainer-page .trainer-panel-header h2 {
    margin-bottom: 0;
    font-size: 1.24rem;
}

.trainer-page .trainer-setup {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    align-items: end;
    gap: 12px;
}

.trainer-page [data-trainer-panel="levels"] .trainer-setup {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.trainer-page .trainer-choice-group {
    gap: 7px;
}

.trainer-page .trainer-choice-pills {
    gap: 8px;
}

.trainer-page .trainer-choice-pill {
    padding: 8px 12px;
    border-radius: 12px;
}

.trainer-page .trainer-start-button {
    align-self: end;
    min-height: 42px;
    white-space: nowrap;
}

.trainer-page .trainer-session {
    gap: 12px;
}

.trainer-page .trainer-stat-bar,
.trainer-page .trainer-level-meta {
    gap: 10px;
}

.trainer-page .trainer-stat-box,
.trainer-page .trainer-level-badge {
    padding: 10px 12px;
    border-radius: 16px;
}

.trainer-page .trainer-stat-label,
.trainer-page .trainer-level-badge span {
    margin-bottom: 4px;
    font-size: 0.78rem;
}

.trainer-page .trainer-stat-box strong,
.trainer-page .trainer-level-badge strong {
    font-size: 1.05rem;
}

.trainer-page .trainer-typebox {
    min-height: 150px;
    padding: 16px;
    border-radius: 20px;
}

.trainer-page .trainer-typebox-text {
    font-size: 1.15rem;
    line-height: 1.62;
}

.trainer-page .trainer-inline-note {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.92rem;
}

.trainer-page .trainer-keyboard {
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
}

.trainer-page .trainer-keyboard-row {
    gap: 7px;
}

.trainer-page .trainer-key {
    min-width: 38px;
    height: 40px;
    padding: 0 9px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.trainer-page .trainer-key.is-wide {
    min-width: 132px;
}

.trainer-page .trainer-results {
    align-items: flex-start;
    overflow-y: auto;
    padding: 16px;
}

.trainer-page .trainer-results-dialog {
    width: min(860px, 100%);
    max-height: none;
    margin: auto 0;
    overflow: visible;
    padding: 18px;
    border-radius: 22px;
}

.trainer-page .trainer-results-heading {
    gap: 6px;
    margin-bottom: 14px;
}

.trainer-page .trainer-results-heading h3 {
    font-size: 1.35rem;
}

.trainer-page .trainer-results-grid {
    gap: 10px;
}

.trainer-page .trainer-result-card {
    padding: 10px 12px;
    border-radius: 16px;
}

.trainer-page .trainer-result-card span {
    margin-bottom: 4px;
    font-size: 0.78rem;
}

.trainer-page .trainer-result-card strong {
    font-size: 1.05rem;
}

.trainer-page .trainer-results-detail {
    gap: 12px;
}

.trainer-page .trainer-results-panel {
    padding: 14px;
    border-radius: 16px;
}

.trainer-page .trainer-results-panel h3 {
    margin-bottom: 8px;
    font-size: 1.02rem;
}

.trainer-page .trainer-results-panel p {
    margin-bottom: 12px;
}

.trainer-results-portal {
    align-items: flex-start;
    overflow-y: auto;
    padding: 16px;
}

.trainer-results-portal .trainer-results-dialog {
    width: min(860px, 100%);
    max-height: none;
    margin: auto 0;
    overflow: visible;
    padding: 18px;
    border-radius: 22px;
}

.trainer-results-portal .trainer-results-heading {
    gap: 6px;
    margin-bottom: 14px;
}

.trainer-results-portal .trainer-results-heading h3 {
    font-size: 1.35rem;
}

.trainer-results-portal .trainer-results-grid {
    gap: 10px;
}

.trainer-results-portal .trainer-result-card {
    padding: 10px 12px;
    border-radius: 16px;
}

.trainer-results-portal .trainer-result-card span {
    margin-bottom: 4px;
    font-size: 0.78rem;
}

.trainer-results-portal .trainer-result-card strong {
    font-size: 1.05rem;
}

.trainer-results-portal .trainer-results-detail {
    gap: 12px;
}

.trainer-results-portal .trainer-results-panel {
    padding: 14px;
    border-radius: 16px;
}

.trainer-results-portal .trainer-results-panel h3 {
    margin-bottom: 8px;
    font-size: 1.02rem;
}

.trainer-results-portal .trainer-results-panel p {
    margin-bottom: 12px;
}

@media (max-width: 980px) {
    .development-hero,
    .trainer-results-detail {
        grid-template-columns: 1fr;
    }

    .development-grid,
    .development-modules-grid,
    .trainer-stat-bar,
    .trainer-results-grid,
    .trainer-level-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trainer-level-badge-wide {
        grid-column: auto;
    }

    .development-toggle-card,
    .trainer-mode-card,
    .trainer-header-card {
        flex-direction: column;
        align-items: stretch;
    }

    .trainer-header-actions {
        justify-content: flex-start;
    }

    .development-tool-header > .development-back-link,
    .trainer-header-actions .development-back-link {
        margin-top: 0;
    }
}

@media (max-width: 680px) {
    .development-grid,
    .development-modules-grid,
    .trainer-stat-bar,
    .trainer-results-grid,
    .trainer-level-meta {
        grid-template-columns: 1fr;
    }

    .development-hero,
    .development-card,
    .trainer-typebox {
        padding: 22px;
    }

    .development-grid:is(.development-modules-grid) .development-card,
    .development-grid:not(.development-modules-grid) .development-card {
        min-height: 145px;
        padding: 18px;
    }

    .development-hero {
        padding: 14px 16px;
    }

    .development-switch {
        width: 100%;
        min-width: 0;
    }

    .trainer-choice-pills,
    .trainer-actions-row {
        flex-direction: column;
    }

    .trainer-mode-tabs {
        grid-template-columns: 1fr;
    }

    .trainer-choice-pill,
    .trainer-mode-tab,
    .trainer-start-button,
    .trainer-actions-row .btn {
        width: 100%;
        justify-content: center;
    }

    .trainer-typebox-text {
        font-size: 1.16rem;
        line-height: 1.7;
    }

    .trainer-keyboard {
        padding: 18px 14px;
    }

    .trainer-key {
        min-width: 40px;
        height: 46px;
        font-size: 0.9rem;
    }

    .trainer-key.is-wide {
        min-width: 146px;
    }

    .trainer-results-dialog {
        padding: 22px 18px;
    }
}

.development-tool-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
}

.development-tool-header h1 {
    margin-bottom: 4px;
    color: var(--primary-color);
    font-size: clamp(1.35rem, 2.1vw, 1.85rem);
    line-height: 1.08;
}

.development-tool-header p {
    max-width: 820px;
    margin: 0;
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.42;
}

.development-tool-eyebrow {
    margin-bottom: 6px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--primary-color);
}

.hotkeys-trainer,
.hotkeys-reference,
.course-quiz-shell {
    padding: 28px;
}

.practice-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.practice-panel-heading h2 {
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.practice-panel-heading p {
    margin: 0;
    color: var(--text-light);
}

.development-task-brief {
    margin: 14px 0 18px;
    padding: 16px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 236, 250, 0.92));
    border: 1px solid rgba(var(--accent-rgb), 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.development-task-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.development-task-prompt {
    margin: 0;
    color: var(--text-color);
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    font-weight: 800;
    line-height: 1.45;
}

.development-task-help {
    margin: 12px 0 0;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.55;
}

.practice-scoreboard {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.practice-score {
    min-width: 120px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(29, 22, 51, 0.94), rgba(123, 75, 199, 0.9));
    color: #fff;
    box-shadow: 0 14px 28px rgba(96, 43, 122, 0.16);
}

.practice-score span {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.practice-score strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
}

.hotkeys-task-card,
.quiz-question-card,
.quiz-result-card {
    padding: 24px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 239, 250, 0.9));
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.hotkeys-task-card {
    margin-bottom: 20px;
}

.hotkeys-task-card > span,
.quiz-question-card > span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hotkeys-task-card h3,
.quiz-question-card h3,
.quiz-result-card h3 {
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.course-quiz-shell .quiz-question-card > span,
.course-quiz-shell .quiz-question-card h3 {
    display: table;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.course-quiz-shell .quiz-question-card h3 {
    max-width: 760px;
}

.hotkeys-task-card p,
.quiz-result-card p {
    margin: 0;
    color: var(--text-light);
}

.hotkeys-options,
.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.hotkey-option,
.quiz-option {
    min-height: 70px;
    padding: 16px 18px;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text-color);
    font-weight: 900;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.hotkey-option {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    text-align: center;
}

.hotkey-option:hover,
.quiz-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(var(--accent-rgb), 0.24);
}

.hotkey-option:disabled,
.quiz-option:disabled {
    cursor: default;
}

.hotkey-option.is-correct,
.quiz-option.is-correct {
    border-color: rgba(22, 163, 74, 0.34);
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.hotkey-option.is-wrong,
.quiz-option.is-wrong {
    border-color: rgba(239, 68, 68, 0.36);
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.practice-feedback {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    font-weight: 700;
}

.practice-feedback.is-success {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.practice-feedback.is-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.practice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hotkeys-category-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.hotkeys-category-block:first-of-type {
    margin-top: 0;
}

.hotkeys-category-block h3 {
    color: var(--primary-color);
    font-size: 1.08rem;
}

.hotkeys-reference-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.hotkey-reference-card {
    min-height: 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(var(--primary-rgb), 0.08);
}

.hotkey-reference-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-color);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
}

.hotkey-reference-card span {
    color: var(--text-light);
    font-size: 0.82rem;
    line-height: 1.35;
}

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

.quiz-module-card {
    position: relative;
    min-height: 150px;
    padding: 20px;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.12), transparent 34%),
        rgba(255, 255, 255, 0.86);
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quiz-module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(96, 43, 122, 0.14);
    border-color: rgba(var(--accent-rgb), 0.24);
}

.quiz-module-card span {
    display: block;
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.quiz-module-card strong {
    color: var(--text-color);
    font-size: 1.08rem;
}

.quiz-module-check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.14);
    color: var(--success-color);
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.12);
    font-size: 0.9rem;
}

.quiz-question-card,
.quiz-result-card {
    margin-top: 20px;
}

.visual-practice-shell {
    padding: 28px;
}

.visual-practice-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.visual-practice-task {
    padding: 24px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 239, 250, 0.88));
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.visual-practice-task .development-task-brief {
    margin-top: 12px;
}

.visual-practice-badge {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.visual-code-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(29, 22, 51, 0.94);
    color: #fff;
}

.visual-code-card span {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 9px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(123, 75, 199, 0.92), rgba(96, 43, 122, 0.92));
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.visual-code-card span.is-nested {
    margin-left: 28px;
    background: linear-gradient(135deg, rgba(168, 125, 224, 0.92), rgba(123, 75, 199, 0.92));
}

.visual-scene-card {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.visual-scene-grid {
    position: relative;
    height: 260px;
    border-radius: 20px;
    overflow: hidden;
    background:
        linear-gradient(rgba(96, 43, 122, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 43, 122, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 30% 20%, rgba(var(--accent-rgb), 0.16), transparent 32%),
        #f8fbff;
    background-size: 32px 32px, 32px 32px, auto, auto;
}

.visual-scene-axis {
    position: absolute;
    background: rgba(22, 32, 51, 0.22);
}

.visual-scene-axis-x {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
}

.visual-scene-axis-y {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
}

.visual-scene-sprite,
.visual-scene-target {
    position: absolute;
    transform: translate(-50%, -50%);
}

.visual-scene-sprite {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 16px 30px rgba(96, 43, 122, 0.24);
}

.visual-scene-target {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 5px solid var(--warning-color);
    background: rgba(245, 158, 11, 0.18);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.12);
    color: var(--text-color);
    font-size: 0.64rem;
    font-weight: 900;
}

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

.visual-option {
    min-height: 78px;
    padding: 16px 18px;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-color);
    font-weight: 900;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.visual-option:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(96, 43, 122, 0.12);
    border-color: rgba(var(--accent-rgb), 0.26);
}

.visual-option.is-correct {
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(22, 163, 74, 0.34);
}

.visual-option.is-wrong {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.34);
}

.visual-block-sequence {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.visual-block-sequence li {
    position: relative;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.1);
}

.visual-block-sequence li.is-nested {
    margin-left: 26px;
    background: rgba(var(--accent-rgb), 0.16);
}

.visual-block-sequence li.is-nested::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 50%;
    width: 10px;
    height: 2px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.35);
}

.website-lab-shell {
    padding: 28px;
}

.website-lab-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
}

.website-lab-sidebar {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 239, 250, 0.78));
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.website-lab-sidebar h3 {
    margin-bottom: 14px;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.website-lab-task-list {
    display: grid;
    gap: 10px;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 4px;
}

.website-lab-task-button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.website-lab-task-button:hover,
.website-lab-task-button.is-active {
    transform: translateY(-1px);
    border-color: rgba(var(--accent-rgb), 0.32);
    background: rgba(var(--accent-rgb), 0.1);
}

.website-lab-task-button.is-locked {
    cursor: not-allowed;
    opacity: 0.52;
}

.website-lab-task-button.is-locked:hover {
    transform: none;
    border-color: rgba(var(--primary-rgb), 0.1);
    background: rgba(255, 255, 255, 0.88);
}

.website-lab-task-button.is-passed span {
    background: rgba(22, 163, 74, 0.14);
    color: var(--success-color);
}

.website-lab-task-button span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    font-weight: 900;
}

.website-lab-task-button strong {
    font-size: 0.92rem;
    line-height: 1.25;
}

.website-lab-workspace {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.website-lab-task-card {
    padding: 20px 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 239, 250, 0.88));
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.website-lab-task-card .visual-practice-badge {
    margin-bottom: 10px;
}

.website-lab-task-card .development-task-brief {
    margin: 0;
    background: rgba(255, 255, 255, 0.78);
}

.website-lab-task-card .development-task-prompt {
    font-size: clamp(1.15rem, 1.85vw, 1.45rem);
}

.website-lab-task-card .development-task-help {
    font-size: 0.94rem;
}

.development-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
}

.development-confirm-modal[hidden] {
    display: none !important;
}

.development-confirm-dialog {
    width: min(520px, 100%);
    padding: 24px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 238, 252, 0.96));
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
}

.development-confirm-dialog h3 {
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-size: 1.45rem;
}

.development-confirm-dialog p {
    margin-bottom: 18px;
    color: var(--text-color);
    line-height: 1.6;
}

.website-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.website-editor-panel,
.website-preview-panel {
    min-width: 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    overflow: hidden;
}

.website-editor-tabs {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(var(--primary-rgb), 0.06);
}

.website-editor-tab {
    flex: 1;
    padding: 10px 12px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-light);
    font-weight: 900;
    cursor: pointer;
}

.website-editor-tab.is-active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
}

.website-code-editor {
    width: 100%;
    min-height: 390px;
    padding: 18px;
    border: 0;
    outline: none;
    resize: vertical;
    background: #151827;
    color: #f8fafc;
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 0.96rem;
    line-height: 1.55;
}

.website-preview-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(var(--primary-rgb), 0.06);
}

.website-preview-heading strong {
    color: var(--primary-color);
}

.website-preview-heading span {
    color: var(--text-light);
    font-size: 0.86rem;
}

.website-code-preview {
    width: 100%;
    min-height: 390px;
    border: 0;
    background: #fff;
}

.website-check-group {
    margin-top: 12px;
}

.website-check-group ul {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding-left: 0;
    list-style: none;
}

.website-check-group li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.website-check-group li.is-passed {
    color: var(--success-color);
}

.website-check-group li.is-missing {
    color: var(--danger-color);
}

@media (min-width: 981px) {
    .development-page:has(.website-lab-shell),
    .development-page:has(.python-practice-shell),
    .development-page:has(.quiz-module-grid) {
        gap: 12px;
    }

    .development-page:has(.website-lab-shell) .development-tool-header,
    .development-page:has(.python-practice-shell) .development-tool-header,
    .development-page:has(.quiz-module-grid) .development-tool-header {
        padding: 12px 16px;
        border-radius: 18px;
    }

    .development-page:has(.website-lab-shell) .development-tool-header h1,
    .development-page:has(.python-practice-shell) .development-tool-header h1,
    .development-page:has(.quiz-module-grid) .development-tool-header h1 {
        margin-bottom: 3px;
        font-size: 1.35rem;
    }

    .development-page:has(.website-lab-shell) .development-tool-header p,
    .development-page:has(.python-practice-shell) .development-tool-header p,
    .development-page:has(.quiz-module-grid) .development-tool-header p {
        display: none;
    }

    .website-lab-shell {
        padding: 16px;
    }

    .website-lab-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 14px;
    }

    .website-lab-sidebar {
        padding: 12px;
        border-radius: 18px;
    }

    .website-lab-sidebar h3 {
        margin-bottom: 8px;
        font-size: 0.98rem;
    }

    .website-lab-task-list {
        gap: 7px;
        max-height: 438px;
    }

    .website-lab-task-button {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 8px;
        padding: 7px 8px;
        border-radius: 12px;
    }

    .website-lab-task-button span {
        width: 28px;
        height: 28px;
        border-radius: 9px;
        font-size: 0.82rem;
    }

    .website-lab-task-button strong {
        font-size: 0.84rem;
        line-height: 1.18;
    }

    .website-lab-workspace {
        gap: 10px;
    }

    .website-lab-task-card {
        padding: 12px 14px;
        border-radius: 16px;
    }

    .website-lab-task-card .visual-practice-badge {
        margin-bottom: 6px;
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    .website-lab-task-card .development-task-label,
    .website-lab-task-card .development-task-help {
        display: none;
    }

    .website-lab-task-card .development-task-prompt {
        font-size: 1.02rem;
        line-height: 1.28;
    }

    .website-editor-grid,
    .python-editor-grid {
        gap: 12px;
    }

    .website-editor-tabs {
        padding: 8px;
    }

    .website-editor-tab {
        padding: 8px 10px;
        border-radius: 11px;
    }

    .website-preview-heading {
        padding: 9px 12px;
    }

    .website-preview-heading span {
        display: none;
    }

    .website-code-editor,
    .website-code-preview,
    .python-code-editor {
        min-height: 285px;
    }

    .website-code-editor,
    .python-code-editor {
        padding: 12px;
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .python-output-panel {
        gap: 10px;
    }

    .python-output-card,
    .python-checklist-card {
        padding: 12px;
        border-radius: 16px;
    }

    .python-output-card {
        min-height: 74px;
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .python-checklist-card strong {
        margin-bottom: 8px;
    }

    .python-checklist {
        gap: 5px;
    }

    .python-checklist li {
        font-size: 0.84rem;
        line-height: 1.28;
    }

    .practice-actions {
        gap: 8px;
    }

    .practice-actions .btn {
        min-height: 34px;
        padding: 8px 12px;
    }

    .practice-panel-heading {
        gap: 12px;
        margin-bottom: 12px;
    }

    .practice-panel-heading h2 {
        font-size: 1.22rem;
    }

    .practice-panel-heading p {
        display: none;
    }

    .practice-score {
        min-width: 96px;
        padding: 9px 12px;
        border-radius: 14px;
    }

    .practice-score strong {
        font-size: 1.05rem;
    }

    .python-practice-shell {
        padding: 16px;
    }

    .python-practice-shell .visual-practice-layout {
        gap: 12px;
    }

    .python-practice-shell .visual-practice-task {
        padding: 14px;
        border-radius: 18px;
    }

    .python-practice-shell .development-task-brief {
        margin: 8px 0 10px;
        padding: 10px 12px;
        border-radius: 14px;
    }

    .python-practice-shell .development-task-label {
        margin-bottom: 6px;
        padding: 5px 9px;
        font-size: 0.7rem;
    }

    .python-practice-shell .development-task-prompt {
        font-size: 0.96rem;
        line-height: 1.32;
    }

    .python-practice-code {
        max-height: 178px;
        padding: 12px;
        border-radius: 14px;
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .python-practice-shell .visual-options {
        gap: 10px;
        margin-bottom: 12px;
    }

    .python-practice-shell .visual-option {
        min-height: 54px;
        padding: 10px 12px;
        border-radius: 14px;
    }

    .quiz-module-grid {
        gap: 10px;
    }

    .quiz-module-card {
        min-height: 108px;
        padding: 14px 16px;
        border-radius: 16px;
    }

    .quiz-module-card span {
        margin-bottom: 8px;
        padding: 6px 9px;
        font-size: 0.7rem;
    }

    .quiz-module-card strong {
        font-size: 1rem;
    }
}

@media (max-width: 980px) {
    .development-tool-header,
    .practice-panel-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .practice-scoreboard {
        width: 100%;
    }

    .practice-score {
        flex: 1;
    }

    .hotkeys-reference-grid,
    .visual-options,
    .quiz-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .website-lab-layout,
    .website-editor-grid {
        grid-template-columns: 1fr;
    }

    .website-lab-task-list {
        max-height: none;
    }
}

@media (max-width: 680px) {
    .development-tool-header,
    .hotkeys-trainer,
    .hotkeys-reference,
    .course-quiz-shell,
    .visual-practice-shell,
    .website-lab-shell,
    .visual-practice-task,
    .hotkeys-task-card,
    .quiz-question-card,
    .quiz-result-card {
        padding: 20px;
    }

    .development-tool-header {
        padding: 14px 16px;
    }

    .development-task-brief {
        padding: 14px 15px;
        border-radius: 18px;
    }

    .development-task-prompt {
        font-size: 1.04rem;
    }

    .development-confirm-dialog {
        padding: 20px;
        border-radius: 24px;
    }

    .practice-scoreboard,
    .practice-actions {
        flex-direction: column;
    }

    .hotkeys-options,
    .quiz-options,
    .visual-options,
    .hotkeys-reference-grid,
    .quiz-module-grid {
        grid-template-columns: 1fr;
    }

    .hotkey-option,
    .quiz-option,
    .visual-option,
    .practice-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .visual-scene-grid {
        height: 220px;
    }

    .website-code-editor,
    .website-code-preview {
        min-height: 300px;
    }
}

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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    background: linear-gradient(180deg, #f9fbfd 0%, var(--bg-color) 100%);
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    overflow-x: hidden;
}

body.guest {
    display: flex;
    flex-direction: column;
}

::selection {
    background: rgba(59, 130, 246, 0.32);
    color: var(--text-color);
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.32);
    color: var(--text-color);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

p {
    margin: 0 0 1rem;
}

.app-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.bg-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
}

.orb-a {
    width: 380px;
    height: 380px;
    top: -120px;
    left: -80px;
    background: rgba(123, 44, 191, 0.16);
}

.orb-b {
    width: 340px;
    height: 340px;
    top: 80px;
    right: -100px;
    background: rgba(15, 28, 44, 0.12);
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at center, black 28%, transparent 82%);
    opacity: 0.45;
}

.container {
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
}

.main-content .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 14px 0 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
}

.navbar-container {
    display: block;
}

body.guest .navbar-container {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

body.auth {
    --auth-ui-scale: 1;
}

.auth-workspace {
    width: 100%;
    margin: 0 auto;
}

body.auth .navbar-container {
    width: min(1568px, calc(100% - 64px));
    max-width: none;
    margin: 0 20px 0 44px;
    padding-left: 266px;
}

body.auth .navbar-shell {
    width: 100%;
}

.navbar-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
    padding: 12px 18px;
    border-radius: 26px;
    background:
        radial-gradient(circle at left top, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(135deg, rgba(29, 22, 51, 0.98), rgba(96, 43, 122, 0.94) 58%, rgba(142, 82, 170, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 48px rgba(29, 22, 51, 0.26);
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 4px 2px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
}

.logo-mark {
    display: block;
    width: clamp(176px, 16vw, 248px);
}

.logo-mark img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 22px rgba(14, 18, 34, 0.26));
}

.sidebar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--secondary-color);
    cursor: pointer;
    z-index: 2;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.22);
}

.sidebar-toggle-line {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.sidebar-open .sidebar-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.sidebar-open .sidebar-toggle-line:nth-child(2) {
    opacity: 0;
}

body.sidebar-open .sidebar-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    min-width: 0;
}

.user-account {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.student-session-timer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 94px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--secondary-color);
}

.student-session-timer-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1;
}

.student-session-timer-value {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1;
    color: #fff3b3;
}

.user-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--secondary-color);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.22);
}

.user-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.user-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.user-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}

.auth-decoy-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--secondary-color);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 14px rgba(15, 23, 42, 0.1);
}

.role-pill-admin {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.role-pill-teacher {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #3b2400;
}

.role-pill-student {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.user-points {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    color: var(--secondary-color);
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.btn-logout {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: none;
    color: var(--secondary-color);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-logout span {
    font-size: 0.88rem;
    font-weight: 800;
}

.btn-logout:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--secondary-color);
}

.app-frame {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 18px;
    width: min(1568px, calc(100% - 64px));
    margin: 28px 20px 36px 44px;
    align-items: start;
}

@media (min-width: 1640px) {
    .app-frame {
        margin: 28px auto 36px;
        transform: translateX(-132px);
    }

    body.auth .navbar-container {
        margin: 0 auto;
        transform: translateX(-132px);
    }
}

@media (max-width: 1600px) and (min-width: 1401px) {
    body {
        font-size: 14.1px;
    }

    .container {
        width: min(1380px, calc(100% - 40px));
    }

    .navbar-shell {
        min-height: 62px;
        gap: 18px;
        padding: 11px 15px;
        border-radius: 24px;
    }

    .logo-mark {
        width: clamp(162px, 14vw, 222px);
    }

    .user-menu {
        gap: 15px;
    }

    .user-account {
        gap: 10px;
        padding: 8px 12px;
        border-radius: 16px;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .user-name {
        font-size: 0.92rem;
    }

    .user-role {
        font-size: 0.76rem;
    }

    .user-points {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .btn-logout {
        min-height: 40px;
        padding: 0 14px;
    }

    .app-frame {
        grid-template-columns: 224px minmax(0, 1fr);
        width: min(1360px, calc(100% - 56px));
        margin: 22px auto 32px;
        gap: 15px;
    }

    body.auth .navbar-container {
        width: min(1360px, calc(100% - 56px));
        margin: 0 auto;
        padding-left: 239px;
    }

    .main-content,
    .main-content.main-content-wide,
    .main-content.main-content-rating {
        width: 100%;
        justify-self: stretch;
    }

    .sidebar-panel {
        padding: 20px 10px;
        border-radius: 26px;
    }

    .sidebar-header h3 {
        font-size: 1.16rem;
    }

    .nav-section-title {
        font-size: 0.71rem;
    }

    .sidebar-nav a {
        padding: 10px 11px;
        font-size: 0.92rem;
    }

    .card {
        padding: 20px;
        border-radius: 22px;
    }

    .dashboard-hero {
        gap: 16px;
        padding: 24px;
        border-radius: 26px;
    }

    .hero-text h1 {
        margin: 10px 0 10px;
        font-size: clamp(1.82rem, 2.8vw, 2.55rem);
    }

    .hero-text p {
        margin-bottom: 14px;
        font-size: 0.92rem;
    }

    .admin-hero-compact .hero-balance,
    .teacher-hero-compact .hero-balance {
        min-width: 204px;
        padding: 15px 17px;
    }

    .stat-mini {
        padding: 14px;
    }
}

@media (max-width: 1760px) {
    .container {
        width: min(1440px, calc(100% - 48px));
    }

    .navbar-shell {
        min-height: 64px;
        gap: 20px;
        padding: 12px 16px;
        border-radius: 24px;
    }

    .logo-mark {
        width: clamp(168px, 14vw, 232px);
    }

    .user-menu {
        gap: 16px;
    }

    .user-account {
        gap: 10px;
        padding: 9px 13px;
        border-radius: 16px;
    }

    .user-name {
        font-size: 0.93rem;
    }

    .user-role {
        font-size: 0.77rem;
    }

    .user-points {
        padding: 9px 12px;
        font-size: 0.84rem;
    }

    .btn-logout {
        min-height: 40px;
        padding: 0 14px;
    }

    .app-frame {
        grid-template-columns: 232px minmax(0, 1fr);
        width: min(1440px, calc(100% - 48px));
        margin: 24px auto 34px;
        gap: 16px;
    }

    .main-content,
    .main-content.main-content-wide,
    .main-content.main-content-rating {
        width: 100%;
        justify-self: stretch;
    }

    .sidebar-panel {
        padding: 22px 10px;
        border-radius: 26px;
    }

    .sidebar-header h3 {
        font-size: 1.22rem;
    }

    .nav-section-title {
        font-size: 0.72rem;
    }

    .sidebar-nav a {
        padding: 11px 12px;
        font-size: 0.96rem;
    }

    .card {
        padding: 22px;
        border-radius: 24px;
    }

    .dashboard-hero {
        gap: 18px;
        padding: 26px;
        border-radius: 28px;
    }

    .hero-text h1 {
        margin: 12px 0 10px;
        font-size: clamp(1.95rem, 3.2vw, 2.95rem);
    }

    .hero-text p {
        margin-bottom: 16px;
        font-size: 0.96rem;
    }

    .admin-hero-compact .hero-text h1 {
        font-size: clamp(1.78rem, 2.6vw, 2.45rem);
    }

    .teacher-hero-compact .hero-text h1 {
        font-size: clamp(1.82rem, 2.75vw, 2.55rem);
    }

    .student-hero-compact .hero-text h1 {
        font-size: clamp(1.64rem, 2.2vw, 2.08rem);
    }

    .admin-hero-compact .hero-balance,
    .teacher-hero-compact .hero-balance {
        min-width: 210px;
        padding: 16px 18px;
    }
}

.sidebar {
    position: sticky;
    top: 104px;
}

.sidebar-close {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-panel,
.sidebar-footer {
    background: rgba(15, 23, 42, 0.92);
    color: var(--secondary-color);
    border-radius: 28px;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-panel {
    padding: 24px 12px;
}

.sidebar-footer {
    padding: 18px;
}

.sidebar-header {
    position: relative;
    padding: 0 6px 20px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-header .eyebrow {
    display: flex;
    width: fit-content;
    margin: 0 auto 14px;
}

.sidebar-header h3 {
    font-size: 1.3rem;
    margin: 0;
}

.sidebar-subtitle {
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
    font-size: 0.92rem;
}

.nav-section {
    margin-bottom: 18px;
}

.nav-section-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li + li {
    margin-top: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.76);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    text-align: left;
}

.sidebar-nav a i {
    width: 18px;
    text-align: center;
}

.sidebar-nav a:hover {
    transform: translateY(-1px);
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a.active {
    color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.26), rgba(161, 92, 255, 0.18));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.sidebar-nav .badge {
    margin-left: auto;
}

.badge-alert {
    color: #ffffff;
    background: linear-gradient(135deg, #ff4b47, #e53935 58%, #cf2e2a);
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.18);
    box-shadow:
        0 0 0 1px rgba(255, 120, 120, 0.16),
        0 0 16px rgba(229, 57, 53, 0.42),
        0 0 34px rgba(229, 57, 53, 0.4),
        0 18px 34px rgba(185, 28, 28, 0.24);
    animation: pending-orders-glow 1.9s ease-in-out infinite;
}

.purchases-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-inline-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    font-size: 0.76rem;
}

.sidebar-note .note-kicker {
    display: block;
    color: var(--primary-light);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-note p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.92rem;
}

.main-content {
    min-width: 0;
    width: min(100%, 1240px);
    justify-self: center;
}

.main-content.main-content-wide {
    width: min(100%, 1320px);
}

.main-content.main-content-rating {
    width: min(100%, 1280px);
}

.main-content.full-width {
    width: min(1200px, calc(100% - 48px));
    margin: 32px auto 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.page-header-actions,
.stack-on-mobile {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.page-top {
    width: 100%;
    margin-bottom: 16px;
}

.page-content {
    width: 100%;
    padding-bottom: 24px;
}

.breadcrumbs {
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.breadcrumbs .container {
    width: 100%;
    max-width: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.breadcrumbs a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 800;
}

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

.breadcrumbs a::after {
    content: '/';
    margin-left: 8px;
    color: var(--text-light);
    font-weight: 500;
}

.flash-messages {
    position: fixed;
    top: 88px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1100;
}

.flash-message {
    min-width: 280px;
    max-width: min(360px, calc(100vw - 40px));
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--secondary-color);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-success {
    background: rgba(22, 163, 74, 0.96);
}

.flash-error {
    background: rgba(239, 68, 68, 0.96);
}

.flash-warning {
    background: rgba(245, 158, 11, 0.96);
}

.card {
    margin-bottom: 20px;
    padding: 24px;
    background: var(--surface-neutral);
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    white-space: nowrap;
}

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

.btn:disabled,
.btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--secondary-color);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.84);
    color: var(--primary-dark);
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.btn-secondary:hover {
    background: var(--card-solid);
    border-color: rgba(var(--primary-rgb), 0.28);
}

.btn-success {
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: var(--secondary-color);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: var(--secondary-color);
}

.btn-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: var(--secondary-color);
}

.btn-sm {
    padding: 9px 14px;
    font-size: 0.82rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: var(--primary-dark);
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 800;
}

.form-control,
.select-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-color);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus,
.select-control:focus,
.reason-select:focus,
.username-input:focus {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.44);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23162033' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 42px;
}

.table-responsive {
    overflow: auto;
    border-radius: 22px;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.table th {
    padding: 16px 18px;
    background: rgba(15, 23, 42, 0.92);
    color: var(--secondary-color);
    text-align: left;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.06);
}

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

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.page-link {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-link:hover,
.page-link.active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: transparent;
    color: var(--secondary-color);
}

.page-ellipsis {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text-light, #64748b);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 2px;
    user-select: none;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col,
.col-3,
.col-4,
.col-5,
.col-6,
.col-7,
.col-9,
.col-8,
.col-12 {
    min-width: 0;
    padding: 0 12px;
}

.col {
    flex: 1;
}

.col-3 {
    width: 25%;
}

.col-4 {
    width: 33.333%;
}

.col-5 {
    width: 41.666%;
}

.col-6 {
    width: 50%;
}

.col-7 {
    width: 58.333%;
}

.col-9 {
    width: 75%;
}

.col-8 {
    width: 66.666%;
}

.col-12 {
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.admin-stats-grid .stat-card {
    padding: 16px 18px;
    border-radius: 22px;
}

.admin-stats-grid .stat-card h3 {
    margin-bottom: 4px;
    font-size: 1.7rem;
    line-height: 1.05;
}

.admin-stats-grid .stat-card p {
    font-size: 0.84rem;
    line-height: 1.24;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 26px;
    color: var(--secondary-color);
    background: linear-gradient(160deg, rgba(15, 28, 44, 0.98), rgba(123, 44, 191, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.22);
}

.stat-card:nth-child(2n) {
    background: linear-gradient(160deg, rgba(15, 28, 44, 0.96), rgba(91, 52, 214, 0.88));
}

.stat-card:nth-child(3n) {
    background: linear-gradient(160deg, rgba(15, 28, 44, 0.96), rgba(161, 92, 255, 0.88));
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -36px;
    bottom: -36px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.stat-card h3 {
    margin-bottom: 6px;
    font-size: 2rem;
}

.stat-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.93rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: var(--surface-neutral);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.product-image-container {
    position: relative;
    height: 214px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.14), rgba(15, 28, 44, 0.08));
}

.product-image-trigger {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image {
    transform: scale(1.06);
}

.product-image-trigger:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: -3px;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(15, 23, 42, 0.42);
    font-size: 3rem;
}

.product-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.72);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

.product-quantity-badge {
    position: absolute;
    top: 16px;
    right: 16px;
}

.product-quantity-badge span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--secondary-color);
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.sold-out-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.64);
    pointer-events: none;
}

.sold-out-overlay span {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.92);
    color: var(--secondary-color);
    font-weight: 800;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 18px 16px;
    gap: 10px;
}

.product-title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.28;
    color: var(--primary-dark);
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 52px;
}

.product-description {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.45;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    min-height: 18px;
}

.product-description-empty {
    display: block;
    visibility: hidden;
    min-height: 18px;
}

.product-copy {
    display: grid;
    grid-template-rows: 52px 18px;
    row-gap: 6px;
    min-height: 76px;
}

.product-footer {
    margin-top: auto;
    display: grid;
    grid-template-rows: 48px 22px 52px;
    row-gap: 8px;
}

.product-price-block {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    min-height: 48px;
}

.product-price-main {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    color: var(--primary-dark);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.05;
}

.product-price-main .currency {
    color: var(--text-light);
    font-size: 0.88rem;
    font-weight: 600;
}

.product-price-main-sale {
    color: var(--danger-color);
}

.product-price-main-sale .currency {
    color: currentColor;
}

.product-price-compare {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.1;
}

.product-price-compare .currency {
    text-decoration: line-through;
    font-size: 0.84rem;
    color: currentColor;
}

.product-stock,
.product-quantity {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 0.84rem;
    font-weight: 600;
    min-height: 22px;
}

.product-stock-badge {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    color: var(--warning-color);
    font-weight: 700;
    min-width: max-content;
    white-space: nowrap;
}

.product-stock-badge-empty {
    color: var(--danger-color);
}

.product-actions {
    margin-top: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
}

.product-balance-note {
    text-align: center;
}

.product-balance-note small {
    color: var(--danger-color);
    font-weight: 700;
}

.shop-header,
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.shop-toolbar p {
    margin: 10px 0 0;
    color: var(--text-light);
}

.shop-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px 200px;
    gap: 14px;
    width: min(100%, 760px);
}

.shop-filters.shop-filters-compact {
    grid-template-columns: 220px;
    width: auto;
}

.balance-card {
    min-width: 280px;
    padding: 20px 24px;
    border-radius: 26px;
    color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(15, 28, 44, 0.98), rgba(123, 44, 191, 0.88));
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.22);
}

.balance-card-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.balance-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    flex: 0 0 60px;
}

.balance-card-icon i {
    font-size: 1.8rem;
}

.balance-card-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

.balance-card-value {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.balance-card-value strong {
    color: #fff;
    font-weight: 800;
}

.balance-card-unit {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    font-weight: 700;
}

body.page-shop .bg-orb {
    filter: blur(10px);
}

body.page-shop .bg-grid {
    mask-image: none;
    opacity: 0.16;
}

body.page-shop .shop-toolbar.fade-in,
body.page-shop .card.fade-in,
body.page-shop .product-card.fade-in {
    animation: none !important;
}

body.page-shop .product-card {
    content-visibility: auto;
    contain: layout paint style;
    contain-intrinsic-size: 420px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

body.page-shop .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.16);
}

body.page-shop .product-image {
    transition: transform 0.25s ease;
}

body.page-shop .product-card:hover .product-image {
    transform: scale(1.02);
}

body.page-shop .balance-card {
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
}

html.performance-mode .bg-orb {
    filter: blur(10px);
}

html.performance-mode .bg-grid {
    mask-image: none;
    opacity: 0.14;
}

html.performance-mode .navbar,
html.performance-mode .card,
html.performance-mode .trainer-results,
html.performance-mode .development-confirm-modal,
html.performance-mode .modal,
html.performance-mode .hero-balance,
html.performance-mode .auth-copy,
html.performance-mode .auth-card,
html.performance-mode .sidebar-backdrop,
html.performance-mode .development-mentor-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html.performance-mode .navbar-shell,
html.performance-mode .sidebar-panel,
html.performance-mode .sidebar-footer,
html.performance-mode .flash-message,
html.performance-mode .card,
html.performance-mode .product-card,
html.performance-mode .balance-card,
html.performance-mode .modal-content,
html.performance-mode .auth-copy,
html.performance-mode .auth-card,
html.performance-mode .development-mentor-panel {
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
}

html.performance-mode .product-card,
html.performance-mode .category-admin-item,
html.performance-mode .order-item,
html.performance-mode .report-group-card,
html.performance-mode .development-card,
html.performance-mode .quiz-module-card {
    content-visibility: auto;
    contain: layout paint style;
    contain-intrinsic-size: 320px;
}

html.performance-mode .fade-in,
html.performance-mode .slide-in {
    animation: none !important;
}

html.performance-mode .card:hover,
html.performance-mode .product-card:hover,
html.performance-mode .development-card.is-live:hover,
html.performance-mode .quiz-module-card:hover {
    transform: translateY(-1px);
}

html.performance-mode .product-card:hover {
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
}

html.performance-mode .product-card:hover .product-image {
    transform: scale(1.02);
}

html.performance-mode .hero-balance-value.hero-balance-value-alert {
    animation: none;
    box-shadow:
        0 0 0 1px rgba(255, 120, 120, 0.14),
        0 0 12px rgba(229, 57, 53, 0.24),
        0 10px 22px rgba(185, 28, 28, 0.18);
}

.step-card,
.info-card,
.instruction-card,
.tip-card,
.tip-preview-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    background: var(--surface-muted);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
}

.reason-card {
    padding: 12px 14px;
    border-radius: 20px;
    background: var(--surface-muted);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.reason-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.16), rgba(91, 52, 214, 0.1));
}

.step-number,
.instruction-number,
.tip-icon,
.info-icon,
.tip-preview-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--secondary-color);
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.tip-icon,
.info-icon {
    border-radius: 50%;
}

.stats-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
}

.stat-mini {
    padding: 16px;
    text-align: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.stat-number-mini {
    color: var(--primary-dark);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-label-mini {
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.84rem;
}

.student-profile-stats {
    margin-bottom: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 4px;
}

.student-profile-stat-card {
    height: 108px;
    display: grid;
    grid-template-rows: 24px 1fr 24px;
    align-items: center;
    gap: 2px;
    padding: 9px 12px;
}

.student-profile-stat-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 0.86rem;
    line-height: 1.12;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.student-profile-stat-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    font-size: 1.75rem;
    line-height: 1;
}

.student-profile-stat-number-success {
    color: var(--success-color);
}

.student-profile-stat-number-danger {
    color: var(--danger-color);
}

.student-profile-stat-label {
    margin: 0;
    max-width: 100%;
    line-height: 1.12;
    overflow-wrap: anywhere;
    font-size: 0.74rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

.student-profile-stat-status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}

.student-profile-stat-status .user-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    font-size: 0.76rem;
    line-height: 1;
    border-radius: 999px;
}

.user-history-table-wrap {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

.user-history-table-responsive {
    overflow: visible;
    margin-bottom: 0;
    border-radius: 0;
    width: 100%;
}

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

.user-history-table col:nth-child(1) {
    width: 16% !important;
}

.user-history-table col:nth-child(2) {
    width: 13% !important;
}

.user-history-table col:nth-child(3) {
    width: 34% !important;
}

.user-history-table col:nth-child(4) {
    width: 17% !important;
}

.user-history-table col:nth-child(5) {
    width: 20% !important;
}

.user-history-table th,
.user-history-table td {
    padding: 12px 14px;
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: top;
}

.user-history-table th {
    text-align: center;
    vertical-align: middle;
    line-height: 1.15;
    padding-top: 10px;
    padding-bottom: 10px;
}

.user-history-table th:nth-child(2),
.user-history-table td:nth-child(2) {
    white-space: nowrap;
    padding-right: 18px;
}

.user-history-table th:nth-child(2),
.user-history-table td:nth-child(2) {
    text-align: center;
}

.user-history-table th:nth-child(3),
.user-history-table td:nth-child(3) {
    padding-left: 18px;
}

.history-date-cell {
    white-space: normal;
}

.history-date,
.history-time {
    display: block;
    white-space: nowrap;
}

.history-time {
    margin-top: 2px;
    color: var(--text-light);
    font-size: 0.8rem;
}

.history-user-cell {
    text-align: center;
}

.history-user-last,
.history-user-first {
    display: block;
}

.history-user-first {
    margin-top: 2px;
    color: var(--text-light);
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .student-profile-stats {
        grid-template-columns: 1fr;
    }
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.status-pending {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.22);
}

.status-completed {
    color: #166534;
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(22, 163, 74, 0.22);
}

.status-cancelled {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.22);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    padding: 24px;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(10px);
}

.modal-content {
    max-width: 560px;
    margin: 5vh auto 0;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 40px 80px rgba(15, 23, 42, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-body {
    padding: 24px;
}

body.modal-open {
    overflow: hidden;
}

body.announcement-open {
    overflow: hidden;
}

.announcements-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
    gap: 24px;
    align-items: start;
}

.category-admin-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.94fr) minmax(0, 1.06fr);
    gap: 24px;
    align-items: start;
}

.product-editor-row-centered {
    justify-content: center;
}

.product-form-column-centered {
    flex: 0 1 860px;
    max-width: 860px;
}

.category-admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-admin-item {
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--surface-muted);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
}

.category-admin-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px 14px;
    flex-wrap: wrap;
}

.category-admin-main h4 {
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.category-admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--text-light);
    font-size: 0.82rem;
}

.category-admin-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.category-admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.category-admin-actions form {
    margin: 0;
}

.surface-note.category-admin-note {
    margin-top: 6px;
    padding: 6px 9px;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.25;
}

.announcements-form-title {
    color: var(--primary-color);
    margin-bottom: 18px;
}

.announcements-textarea {
    min-height: 190px;
    resize: vertical;
}

.announcement-form-note {
    margin-top: 8px;
}

.announcements-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

.announcement-admin-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.announcement-admin-item {
    padding: 18px;
    border-radius: 24px;
    background: var(--surface-muted);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
}

.announcement-admin-item-inactive {
    opacity: 0.78;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(148, 163, 184, 0.03));
    border-color: rgba(148, 163, 184, 0.28);
}

.announcement-admin-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.announcement-admin-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.announcement-audience-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.announcement-state-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
    font-size: 0.8rem;
    font-weight: 800;
}

.announcement-state-pill-inactive {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.announcement-admin-date {
    color: var(--text-light);
    font-size: 0.86rem;
}

.announcement-admin-item h4 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.announcement-admin-item p {
    margin-bottom: 12px;
    color: var(--text-color);
    white-space: pre-line;
    line-height: 1.6;
}

.announcement-admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    color: var(--text-light);
    font-size: 0.88rem;
}

.announcement-admin-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.announcement-admin-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.announcement-admin-footnote {
    color: var(--text-light);
    font-size: 0.85rem;
}

.announcement-admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.announcement-admin-actions form {
    margin: 0;
}

.announcement-guide-card {
    margin-top: 24px;
}

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

.announcement-guide-item {
    padding: 18px;
    border-radius: 22px;
    background: var(--surface-muted);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
}

.announcement-guide-item h4 {
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.announcement-guide-item p {
    margin-bottom: 0;
    color: var(--text-color);
    line-height: 1.65;
}

.announcement-guide-note {
    margin-top: 18px;
}

.announcement-modal {
    z-index: 1700;
}

.announcement-modal-content {
    max-width: 620px;
    margin-top: 6vh;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.97);
}

.announcement-modal-header {
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.12);
}

.announcement-modal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 800;
}

.announcement-modal-close {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-light);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.announcement-modal-close:hover {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-dark);
    transform: scale(1.04);
}

.announcement-modal-body {
    padding: 28px 26px 30px;
    text-align: center;
}

.announcement-modal-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: #ffffff;
    font-size: 2rem;
    box-shadow: 0 24px 44px rgba(var(--primary-rgb), 0.28);
}

.announcement-modal-title {
    margin-bottom: 14px;
    color: var(--primary-dark);
    font-size: clamp(1.55rem, 3vw, 2rem);
}

.announcement-modal-text {
    max-width: 500px;
    margin: 0 auto 20px;
    color: var(--text-color);
    line-height: 1.72;
    font-size: 1rem;
}

.announcement-modal-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.announcement-modal-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--primary-dark);
    font-weight: 700;
}

.announcement-modal-lock {
    margin: 0 auto 22px;
    max-height: 72px;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease, margin 0.25s ease;
}

.announcement-modal-lock-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.announcement-modal-lock-chip strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.02rem;
}

.announcement-modal-lock-hidden {
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0;
    margin: 0;
}

.announcement-modal-actions {
    display: flex;
    justify-content: center;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.announcement-modal-actions .btn {
    min-width: 180px;
}

.announcement-dismiss-control {
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.announcement-dismiss-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
}

.product-image-modal {
    z-index: 1650;
}

.product-image-modal-content {
    max-width: min(960px, calc(100vw - 48px));
    margin-top: 4vh;
    padding: 18px;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 32px 70px rgba(15, 23, 42, 0.34);
    position: relative;
}

.product-image-modal-frame {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
}

.product-image-modal-image {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #ffffff;
}

.product-image-modal-caption {
    margin-top: 14px;
    text-align: center;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.product-image-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.product-image-modal-close:hover {
    background: rgba(88, 28, 135, 0.92);
    transform: scale(1.04);
}

.close {
    color: var(--text-light);
    font-size: 1.9rem;
    cursor: pointer;
    line-height: 1;
}

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

.quick-action-btn,
.quick-action-card {
    display: block;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-action-btn:hover,
.quick-action-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--primary-rgb), 0.26);
    box-shadow: var(--shadow-soft);
}

.history-item {
    padding: 14px 0;
}

.hidden-item {
    display: none;
}

.mini-product-card {
    height: 100%;
    padding: 18px;
    text-align: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.72);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.preview-art {
    height: 110px;
    margin-bottom: 14px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: var(--surface-muted);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    color: var(--primary-dark);
    font-size: 2rem;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 32px;
    border-radius: 32px;
    color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(15, 28, 44, 0.98), rgba(123, 44, 191, 0.88));
    box-shadow: 0 36px 64px rgba(15, 23, 42, 0.24);
}

.admin-hero-compact {
    gap: 18px;
    margin-bottom: 20px;
    padding: 24px 28px;
}

.admin-hero-compact .hero-text {
    max-width: 560px;
}

.admin-hero-compact .hero-text h1 {
    margin: 10px 0 8px;
    font-size: clamp(1.9rem, 3.2vw, 2.7rem);
}

.admin-hero-compact .hero-text p {
    max-width: 480px;
    margin-bottom: 0;
}

.admin-hero-compact .hero-balance {
    min-width: 220px;
    padding: 18px 20px;
}

.teacher-hero-compact {
    gap: 18px;
    margin-bottom: 20px;
    padding: 24px 28px;
}

.teacher-hero-compact .hero-text {
    max-width: 600px;
}

.teacher-hero-compact .hero-text h1 {
    margin: 10px 0 8px;
    font-size: clamp(1.95rem, 3.3vw, 2.8rem);
}

.teacher-hero-compact .hero-text p {
    max-width: 520px;
    margin-bottom: 12px;
}

.teacher-hero-compact .hero-badges {
    gap: 8px;
}

.teacher-hero-compact .hero-badge {
    padding: 8px 12px;
    font-size: 0.82rem;
}

.teacher-hero-compact .hero-balance {
    min-width: 220px;
    padding: 18px 20px;
}

.parent-report-hero {
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    padding: 16px 20px;
    border-radius: 24px;
}

.parent-report-hero .hero-text {
    max-width: 720px;
}

.parent-report-hero .eyebrow {
    font-size: 0.72rem;
}

.parent-report-hero .hero-text h1 {
    margin: 6px 0 6px;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    line-height: 1.08;
}

.parent-report-hero .hero-text p {
    max-width: 680px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.42;
}

.parent-report-hero .hero-badges {
    gap: 6px;
}

.parent-report-hero .hero-badge {
    padding: 6px 10px;
    font-size: 0.76rem;
}

.parent-report-hero .hero-balance {
    min-width: 170px;
    padding: 12px 14px;
    border-radius: 20px;
    gap: 5px;
}

.parent-report-hero .hero-balance-label {
    font-size: 0.7rem;
}

.parent-report-hero .hero-balance-value {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.parent-report-hero .hero-balance-value.hero-balance-value-alert {
    min-width: 58px;
    padding: 7px 12px;
    border-radius: 16px;
}

.parent-report-hero .hero-balance-note {
    margin-bottom: 0;
    font-size: 0.82rem;
    line-height: 1.25;
}

.student-hero-compact {
    gap: 16px;
    margin-bottom: 20px;
    padding: 22px 26px;
}

.student-hero-compact .hero-text {
    max-width: 700px;
}

.student-hero-compact .hero-text h1 {
    margin: 8px 0 6px;
    font-size: clamp(1.72rem, 2.6vw, 2.3rem);
    line-height: 1.08;
    white-space: nowrap;
}

.student-hero-compact .hero-text p {
    max-width: 460px;
    margin-bottom: 10px;
    font-size: 0.94rem;
    line-height: 1.45;
}

.student-hero-compact .hero-badges {
    gap: 6px;
}

.student-hero-compact .hero-group-stack {
    gap: 6px;
}

.student-hero-compact .hero-badge {
    padding: 6px 10px;
    font-size: 0.76rem;
}

.student-hero-compact .hero-group-stack .hero-badge {
    min-width: 156px;
    min-height: 40px;
    padding: 8px 13px;
    font-size: 0.82rem;
}

.student-hero-compact .hero-balance {
    min-width: 210px;
    padding: 16px 18px;
    gap: 6px;
}

.student-hero-compact .hero-balance-label {
    font-size: 0.78rem;
}

.student-hero-compact .hero-balance-value {
    font-size: clamp(2.35rem, 3.6vw, 3.1rem);
}

.student-hero-compact .hero-balance-note {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.student-hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.student-hero-actions .btn {
    padding: 10px 14px;
    min-height: 40px;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: 32%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(161, 92, 255, 0.12);
}

.dashboard-hero > * {
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 700px;
}

.hero-text h1 {
    margin: 14px 0 12px;
    font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.hero-text p {
    max-width: 620px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-group-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-badge-group {
    align-items: center;
}

.hero-badge-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hero-badge-rank {
    background: rgba(255, 255, 255, 0.08);
    border-style: dashed;
    color: rgba(255, 255, 255, 0.92);
}

.hero-balance {
    min-width: 260px;
    padding: 22px 24px;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.hero-balance.hero-balance-alert {
    border-color: rgba(248, 113, 113, 0.34);
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.08);
}

.hero-balance-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-balance-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.8rem, 4vw, 4rem);
    line-height: 1;
}

.hero-balance-value.hero-balance-value-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 10px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff4b47, #e53935 58%, #cf2e2a);
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.18);
    box-shadow:
        0 0 0 1px rgba(255, 120, 120, 0.16),
        0 0 16px rgba(229, 57, 53, 0.42),
        0 0 34px rgba(229, 57, 53, 0.4),
        0 18px 34px rgba(185, 28, 28, 0.24);
    animation: pending-orders-glow 1.9s ease-in-out infinite;
}

@keyframes pending-orders-glow {
    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 0 0 1px rgba(255, 120, 120, 0.16),
            0 0 16px rgba(229, 57, 53, 0.42),
            0 0 34px rgba(229, 57, 53, 0.4),
            0 18px 34px rgba(185, 28, 28, 0.24);
    }

    50% {
        transform: scale(1.05);
        box-shadow:
            0 0 0 1px rgba(255, 138, 138, 0.22),
            0 0 24px rgba(229, 57, 53, 0.58),
            0 0 42px rgba(229, 57, 53, 0.46),
            0 20px 38px rgba(185, 28, 28, 0.28);
    }
}

.hero-balance-note {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.78);
}

.panel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.student-dashboard-panels {
    align-items: stretch;
}

.student-dashboard-column {
    display: flex;
}

.student-dashboard-subrow {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    margin: 0;
    align-items: stretch;
}

.student-dashboard-subrow > .student-dashboard-column {
    width: auto;
    padding: 0;
}

.student-dashboard-card {
    width: 100%;
    height: 540px;
    display: flex;
    flex-direction: column;
}

.student-dashboard-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.student-history-row {
    flex-wrap: wrap;
}

.student-history-main {
    flex: 1 1 220px;
    min-width: 0;
}

.student-history-main strong {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.student-history-meta {
    flex: 0 0 auto;
    min-width: 88px;
    margin-left: auto;
    text-align: right;
}

.student-dashboard-card .empty-state {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.74);
}

.panel-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.panel-meta > div:last-child {
    flex: 1 1 auto;
    min-width: 0;
}

.panel-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--secondary-color);
}

.panel-list-item strong,
.leaderboard-item strong {
    display: block;
    margin-bottom: 2px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.panel-list-item small,
.leaderboard-item small {
    color: var(--text-light);
    font-size: 0.84rem;
    line-height: 1.2;
}

.student-purchases-link {
    margin-top: 12px;
    min-height: 42px;
    padding: 10px 14px;
}

.order-status-text {
    display: inline-block;
    font-weight: 800;
}

.order-status-pending {
    color: var(--warning-color);
}

.order-status-completed {
    color: var(--success-color);
}

.order-status-cancelled {
    color: var(--danger-color);
}

.panel-score {
    color: var(--primary-dark);
    font-weight: 800;
    white-space: nowrap;
}

.detail-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.student-reward-reasons {
    gap: 8px;
}

.student-reward-reasons .tip-card {
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 16px;
}

.student-reward-reasons .tip-icon {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.student-reward-reasons h4 {
    margin-bottom: 1px !important;
    font-size: 0.92rem;
    line-height: 1.15;
}

.student-reward-reasons p {
    font-size: 0.84rem;
    line-height: 1.15;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    color: var(--text-light);
}

.detail-label.order-status-pending {
    color: var(--warning-color);
}

.detail-label.order-status-completed {
    color: var(--success-color);
}

.detail-label.order-status-cancelled {
    color: var(--danger-color);
}

.empty-state {
    padding: 32px 20px;
    text-align: center;
    color: var(--text-light);
}

.empty-state i {
    display: block;
    margin-bottom: 14px;
    color: rgba(var(--primary-rgb), 0.6);
    font-size: 2.6rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.section-header h2,
.section-header h3 {
    margin: 0;
}

.section-header p {
    margin: 0;
    color: var(--text-light);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.info-tile {
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.74);
}

.info-tile strong {
    display: block;
    color: var(--primary-dark);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
}

.info-tile span {
    color: var(--text-light);
    font-size: 0.88rem;
}

.surface-note {
    padding: 20px;
    border-radius: 24px;
    background: var(--surface-muted);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
}

.surface-note.success {
    background: var(--surface-success);
    border-color: rgba(22, 163, 74, 0.18);
}

.surface-note.warning {
    background: var(--surface-warning);
    border-color: rgba(245, 158, 11, 0.18);
}

.reports-filter-form {
    display: flex;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
}

.reports-filter-field {
    flex: 0 0 240px;
    margin-bottom: 0;
}

.reports-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.reports-seen-form {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.reports-mark-seen-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.reports-mark-seen-btn:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(0.08);
}

.reports-seen-hint {
    margin: 0;
    max-width: 720px;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.45;
}

.reports-summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.reports-summary-card {
    padding: 16px 18px;
    text-align: left;
    border-radius: 20px;
}

.reports-summary-card .stat-number-mini {
    font-size: 1.7rem;
    line-height: 1.05;
}

.reports-summary-card .stat-label-mini {
    margin-top: 4px;
    font-size: 0.84rem;
    line-height: 1.22;
}

.reports-summary-card-success {
    background: var(--surface-success);
    border-color: rgba(22, 163, 74, 0.18);
}

.reports-summary-card-warning {
    background: var(--surface-warning);
    border-color: rgba(245, 158, 11, 0.18);
}

.reports-summary-card-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(254, 202, 202, 0.18));
    border-color: rgba(239, 68, 68, 0.18);
}

.reports-summary-card-muted {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(226, 232, 240, 0.34));
    border-color: rgba(148, 163, 184, 0.18);
}

.admin-reports-table {
    table-layout: fixed;
    width: 100%;
}

.admin-reports-table th,
.admin-reports-table td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
    line-height: 1.35;
}

.admin-report-teacher strong {
    display: block;
}

.admin-report-teacher span {
    display: block;
    margin-top: 4px;
    color: var(--text-light);
    font-size: 0.84rem;
}

.admin-report-note {
    margin-top: 4px;
    color: var(--text-light);
    font-size: 0.82rem;
    line-height: 1.28;
}

.admin-report-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    border: 1px solid transparent;
}

.admin-report-status-active {
    color: #166534;
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(22, 163, 74, 0.2);
}

.admin-report-status-inactive {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.22);
}

.admin-report-status-deductions_only {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.22);
}

.admin-report-status-no_groups {
    color: #475569;
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.22);
}

.admin-report-row-inactive {
    background: rgba(239, 68, 68, 0.035);
}

.admin-report-row-deductions_only {
    background: rgba(245, 158, 11, 0.04);
}

.rating-reset-banner {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(255, 152, 0, 0.08);
    border-left: 4px solid var(--warning-color);
}

.rating-reset-banner__content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-reset-banner__icon {
    color: var(--warning-color);
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.rating-reset-banner__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
}

.rating-reset-banner__text strong {
    font-size: 0.98rem;
    color: var(--primary-dark);
}

.rating-reset-banner__text small {
    color: var(--text-light);
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.rule-tile {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.74);
}

.rule-tile strong {
    display: block;
    color: var(--primary-dark);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
}

.rule-tile span {
    color: var(--text-light);
    font-size: 0.88rem;
}

.admin-rules-card {
    margin-bottom: 0;
}

.admin-rules-card .section-header p {
    margin-bottom: 0;
}

.admin-rules-note {
    padding: 16px 18px;
    border-radius: 20px;
}

.admin-rules-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    margin: 14px 0 10px;
}

.admin-rules-tile {
    padding: 12px 12px 10px;
    border-radius: 16px;
}

.admin-rules-tile strong {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.admin-rules-tile span {
    font-size: 0.82rem;
    line-height: 1.35;
}

.admin-rules-footnote {
    font-size: 0.88rem;
    line-height: 1.45;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    background: var(--surface-muted);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
}

.leaderboard-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leaderboard-rank {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--secondary-color);
    font-weight: 800;
}

.leaderboard-rank.gold {
    background: linear-gradient(135deg, #f59e0b, #facc15);
    color: #78350f;
}

.leaderboard-rank.silver {
    background: linear-gradient(135deg, #cbd5e1, #e2e8f0);
    color: #475569;
}

.leaderboard-rank.bronze {
    background: linear-gradient(135deg, #d97706, #fdba74);
}

.leaderboard-points {
    color: var(--primary-dark);
    font-weight: 800;
    white-space: nowrap;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.74);
}

.event-date {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--secondary-color);
    font-weight: 800;
}

.event-date span {
    font-size: 0.72rem;
    text-transform: uppercase;
    opacity: 0.82;
}

.event-card h4 {
    margin-bottom: 4px;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.2fr 0.85fr;
    gap: 24px;
    align-items: stretch;
}

.auth-shell.auth-shell-single {
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
}

.auth-copy,
.auth-card {
    padding: 32px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.auth-copy {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 28, 44, 0.98), rgba(123, 44, 191, 0.88));
    color: var(--secondary-color);
}

.auth-copy::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(161, 92, 255, 0.14);
}

.auth-copy > * {
    position: relative;
    z-index: 1;
}

.auth-copy h1 {
    margin: 16px 0;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
}

.auth-copy p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.auth-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.auth-metric {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-metric strong {
    display: block;
    margin-bottom: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
}

.auth-metric span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

.auth-card {
    background: var(--surface-neutral);
}

.auth-card h2 {
    margin-bottom: 8px;
}

.auth-card p {
    color: var(--text-light);
}

.auth-credentials {
    margin-top: 20px;
    padding: 18px;
    border-radius: 22px;
    background: var(--surface-muted);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
}

.auth-credentials strong {
    display: block;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.auth-credentials code {
    display: block;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.76);
    font-size: 0.92rem;
}

.stats-circle {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.circle-progress {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: conic-gradient(
        var(--primary-color) 0% calc(var(--percent) * 1%),
        rgba(15, 23, 42, 0.08) calc(var(--percent) * 1%) 100%
    );
}

.circle-progress::before {
    content: '';
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
}

.circle-value,
.circle-label {
    position: relative;
    z-index: 1;
}

.circle-value {
    color: var(--primary-dark);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.circle-label {
    color: var(--text-light);
    font-size: 0.88rem;
}

.selected-points {
    padding: 6px 10px;
    text-align: center;
    background: rgba(22, 163, 74, 0.1);
    border-radius: 14px;
}

.current-user-row {
    background: rgba(var(--primary-rgb), 0.08) !important;
    border-left: 4px solid var(--primary-color);
}

.rating-place,
.rating-place-teacher,
.rating-place-admin {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--primary-dark);
    font-weight: 800;
}

.rating-place-teacher,
.rating-place-admin {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

.position-circle {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 8px solid rgba(var(--primary-rgb), 0.18);
    background: rgba(255, 255, 255, 0.78);
}

.position-number {
    color: var(--primary-dark);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.position-label {
    margin-top: 6px;
    color: var(--text-light);
}

.group-rating-table {
    width: max(100%, 720px);
    min-width: 720px;
    table-layout: auto;
}

.group-rating-table th {
    padding: 14px 12px;
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

.group-rating-table td {
    padding: 10px 12px;
    line-height: 1.35;
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: normal;
}

.group-rating-table .student-mini-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
}

.group-rating-table .student-mini-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--secondary-color);
}

.group-rating-table .student-mini-name {
    min-width: 0;
    white-space: normal;
}

.group-rating-table .student-mini-name strong {
    display: block;
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: break-word;
}

.group-rating-table .score-value {
    font-weight: 800;
}

.group-rating-table .score-value.current {
    color: var(--primary-color);
}

.group-rating-table .score-value.total {
    color: var(--success-color);
}

.group-rating-table .score-value.group {
    color: var(--warning-color);
}

.group-rating-table th:nth-child(4),
.group-rating-table td:nth-child(4) {
    display: none;
}

.group-rating-table th:nth-child(1),
.group-rating-table td:nth-child(1) {
    width: 56px;
    min-width: 56px;
    text-align: center;
}

.group-rating-table th:nth-child(2),
.group-rating-table td:nth-child(2) {
    min-width: 220px;
}

.group-rating-table th:nth-child(3),
.group-rating-table th:nth-child(5),
.group-rating-table td:nth-child(3),
.group-rating-table td:nth-child(5) {
    min-width: 92px;
    text-align: center;
}

.group-rating-table th:nth-child(6),
.group-rating-table td:nth-child(6) {
    width: 64px;
    min-width: 64px;
    text-align: center;
}

.group-rating-table td:nth-child(1),
.group-rating-table td:nth-child(3),
.group-rating-table td:nth-child(5),
.group-rating-table td:nth-child(6) {
    white-space: nowrap;
}

.group-rating-table .table-action-btn,
.teacher-students-table .table-action-btn {
    width: 36px;
    height: 36px;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 50%;
}

.group-rating-table .table-action-btn.btn-sm,
.teacher-students-table .table-action-btn.btn-sm {
    width: 36px !important;
}

.group-rating-panels {
    align-items: stretch;
}

.group-rating-panel-col {
    display: flex;
}

.group-rating-panel-card {
    width: 100%;
    height: 100%;
    margin-bottom: 0;
}

.rating-place,
.rating-place-teacher,
.rating-place-admin,
.group-rating-table .student-mini-avatar {
    aspect-ratio: 1 / 1;
}

.history-row:hover,
.order-item:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

#sortable tr:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

.order-number {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--secondary-color);
    font-size: 0.82rem;
    font-weight: 800;
}

.loading {
    min-height: 160px;
    display: grid;
    place-items: center;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 4px solid rgba(var(--primary-rgb), 0.12);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.footer {
    margin-top: auto;
    padding: 24px 0 36px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.reports-page-header,
.reports-live-alerts-header,
.reports-filter-header,
.reports-results-header {
    margin-bottom: 18px;
}

.reports-live-alerts-card {
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(255, 248, 248, 0.96), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(239, 68, 68, 0.14);
}

.reports-live-alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.reports-live-alert-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(255, 255, 255, 0.94));
    border: 1px solid rgba(239, 68, 68, 0.12);
}

.reports-live-alert-teacher strong {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-dark);
    font-size: 0.98rem;
    line-height: 1.25;
}

.reports-live-alert-teacher span {
    color: var(--text-light);
    font-size: 0.84rem;
}

.reports-live-alert-lessons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reports-live-alert-lesson {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(239, 68, 68, 0.1);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.reports-live-alert-lesson:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(123, 44, 191, 0.18);
}

.reports-live-alert-group {
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.28;
}

.reports-live-alert-meta {
    color: var(--text-light);
    font-size: 0.82rem;
    line-height: 1.35;
}

.group-edit-card .form-group {
    margin-bottom: 14px;
}

.group-edit-card .form-label {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.group-edit-card .form-control {
    padding: 11px 14px;
    border-radius: 16px;
}

.profile-info-card .form-group {
    margin-bottom: 14px;
}

.profile-info-card .form-label {
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.profile-info-card .form-control,
.profile-info-card .select-control {
    padding: 11px 14px;
    border-radius: 16px;
}

.profile-points-management .form-group {
    margin-bottom: 14px;
}

.profile-points-management h3 {
    margin-bottom: 16px !important;
}

.profile-points-management .form-label {
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.profile-points-form {
    padding: 16px !important;
    border-radius: 20px !important;
}

.profile-points-form h4 {
    margin-bottom: 12px !important;
    font-size: 1rem;
    line-height: 1.25;
}

.profile-points-management .form-control,
.profile-points-management .select-control {
    padding: 11px 14px;
    border-radius: 16px;
}

.profile-points-form input.form-control {
    padding: 7px 12px;
    border-radius: 14px;
}

.profile-points-form select.form-control {
    padding-top: 7px;
    padding-bottom: 7px;
    padding-right: 36px;
    border-radius: 14px;
    background-position: right 12px center;
}

.group-edit-card small {
    margin-top: 4px !important;
    font-size: 0.84rem;
    line-height: 1.45;
}

.reports-filter-card {
    margin-bottom: 20px;
}

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

.reports-schedule-table {
    width: 100%;
    min-width: 1140px;
    table-layout: fixed;
}

.reports-schedule-table th,
.reports-schedule-table td {
    padding: 14px 12px;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.report-teacher-head,
.report-teacher-cell {
    width: 220px;
    min-width: 220px;
}

.report-slot-column,
.report-slot-cell {
    width: 150px;
    min-width: 150px;
}

.report-slot-column-extra,
.report-slot-cell-extra {
    width: 176px;
    min-width: 176px;
}

.report-slot-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.2;
}

.report-slot-head span {
    font-size: 0.84rem;
    font-weight: 800;
}

.report-slot-head small {
    color: var(--text-light);
    font-size: 0.74rem;
    font-weight: 700;
}

.report-row-muted td {
    background: rgba(148, 163, 184, 0.04);
}

.report-teacher-cell strong {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-dark);
    font-size: 0.98rem;
    line-height: 1.25;
}

.report-teacher-cell > span {
    display: block;
    color: var(--text-light);
    font-size: 0.84rem;
}

.report-teacher-note {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.35;
}

.report-group-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-group-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    background: rgba(255, 255, 255, 0.86);
}

.report-group-card-done {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(240, 253, 244, 0.9));
    border-color: rgba(22, 163, 74, 0.18);
}

.report-group-card-missing {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.07), rgba(254, 242, 242, 0.94));
    border-color: rgba(239, 68, 68, 0.16);
}

.report-group-name {
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.28;
}

.report-group-link {
    text-decoration: none;
}

.report-group-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.report-group-time,
.report-group-meta {
    color: var(--text-light);
    font-size: 0.76rem;
    line-height: 1.3;
}

.report-group-status {
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.report-group-status-done {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.report-group-status-missing {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.reports-criteria-note {
    margin-top: 18px;
}

.fade-in {
    animation: fadeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.slide-in {
    animation: slideIn 0.4s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1400px) {
    body {
        font-size: 13.55px;
    }

    .container {
        width: min(1240px, calc(100% - 48px));
    }

    .navbar-shell {
        min-height: 60px;
        gap: 15px;
        padding: 10px 14px;
        border-radius: 23px;
    }

    .logo-mark {
        width: clamp(152px, 14vw, 206px);
    }

    .user-menu {
        gap: 13px;
    }

    .user-account {
        gap: 9px;
        padding: 8px 11px;
        border-radius: 15px;
    }

    .student-session-timer {
        min-width: 84px;
        padding: 7px 10px;
    }

    .student-session-timer-label {
        font-size: 0.61rem;
    }

    .student-session-timer-value {
        font-size: 0.92rem;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
    }

    .user-name {
        font-size: 0.9rem;
    }

    .user-role {
        font-size: 0.74rem;
    }

    .user-points {
        padding: 8px 11px;
        font-size: 0.8rem;
    }

    .btn-logout {
        min-height: 38px;
        padding: 0 13px;
    }

    .app-frame {
        grid-template-columns: 210px minmax(0, 1fr);
        width: min(1220px, calc(100% - 48px));
        margin: 20px auto 28px;
        gap: 12px;
    }

    body.auth .navbar-container {
        width: min(1220px, calc(100% - 48px));
        margin: 0 auto;
        padding-left: 222px;
    }

    .sidebar-panel {
        padding: 18px 10px;
        border-radius: 24px;
    }

    .sidebar-header h3 {
        font-size: 1.1rem;
    }

    .sidebar-nav a {
        padding: 10px 11px;
        font-size: 0.9rem;
    }

    .card {
        padding: 18px;
        border-radius: 20px;
    }

    .dashboard-hero {
        gap: 14px;
        padding: 22px;
        border-radius: 24px;
    }

    .hero-text h1 {
        font-size: clamp(1.66rem, 2.55vw, 2.26rem);
    }

    .hero-text p {
        font-size: 0.89rem;
    }

    .reports-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat-mini {
        padding: 13px;
    }

    .stat-number-mini {
        font-size: 1.85rem;
    }

    .breadcrumbs {
        padding: 12px 16px;
        border-radius: 18px;
    }
}

@media (max-width: 1280px) {
    body {
        font-size: 12.95px;
    }

    body.guest .navbar-container,
    .container,
    .main-content.full-width {
        width: min(1120px, calc(100% - 48px));
    }

    .navbar-shell {
        gap: 12px;
        padding: 10px 12px;
        border-radius: 22px;
    }

    .user-menu {
        gap: 12px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }

    .student-session-timer {
        min-width: 78px;
        padding: 7px 9px;
    }

    .student-session-timer-label {
        font-size: 0.58rem;
    }

    .student-session-timer-value {
        font-size: 0.88rem;
    }

    .user-name {
        font-size: 0.88rem;
    }

    .user-role {
        font-size: 0.72rem;
    }

    .user-points {
        padding: 8px 11px;
        font-size: 0.78rem;
    }

    .btn-logout {
        min-height: 36px;
        padding: 0 12px;
    }

    .app-frame {
        width: min(1120px, calc(100% - 48px));
        margin: 18px auto 26px;
        grid-template-columns: 198px minmax(0, 1fr);
        gap: 12px;
    }

    body.auth .navbar-container {
        width: min(1120px, calc(100% - 48px));
        margin: 0 auto;
        padding-left: 210px;
    }

    .main-content.main-content-wide,
    .main-content.main-content-rating {
        width: 100%;
    }

    .sidebar-panel {
        padding: 17px 9px;
        border-radius: 22px;
    }

    .sidebar-header {
        padding-bottom: 16px;
        margin-bottom: 14px;
    }

    .sidebar-header h3 {
        font-size: 1.04rem;
    }

    .sidebar-nav a {
        padding: 9px 10px;
        font-size: 0.88rem;
    }

    .dashboard-hero {
        gap: 12px;
        padding: 20px;
    }

    .student-hero-compact .hero-text h1 {
        font-size: clamp(1.46rem, 1.9vw, 1.8rem);
    }

    .hero-text h1 {
        font-size: clamp(1.54rem, 2.2vw, 1.98rem);
    }

    .hero-text p {
        font-size: 0.86rem;
    }

    .stat-mini {
        padding: 12px;
        border-radius: 18px;
    }

    .stat-number-mini {
        font-size: 1.7rem;
    }

    .breadcrumbs {
        padding: 11px 14px;
    }

    .table th,
    .table td {
        padding: 14px 16px;
    }
}

/* Keep the authenticated desktop layout visually centered while the sidebar
   stays slightly to the left of the header/content column. */
@media (min-width: 861px) {
    body.auth {
        --auth-frame-max: 1568px;
        --auth-sidebar-width: 248px;
        --auth-sidebar-gap: 18px;
        --auth-edge-gutter: 44px;
        --auth-main-gap: 44px;
        --auth-main-max: 1240px;
        --auth-main-wide-max: 1320px;
        --auth-main-rating-max: 1280px;
        --auth-frame-width: min(
            var(--auth-frame-max),
            calc(100% - var(--auth-sidebar-width) - var(--auth-sidebar-gap) - (var(--auth-edge-gutter) * 2))
        );
        --auth-frame-offset: calc((var(--auth-sidebar-width) + var(--auth-sidebar-gap)) / 2);
    }

    body.auth .app-frame {
        grid-template-columns: var(--auth-sidebar-width) minmax(0, 1fr);
        gap: var(--auth-sidebar-gap);
        width: var(--auth-frame-width);
        margin: 28px auto 36px;
        transform: translateX(calc(var(--auth-frame-offset) * -1));
    }

    body.auth .navbar-container {
        width: var(--auth-frame-width);
        margin: 0 auto;
        padding-left: calc(var(--auth-sidebar-width) + var(--auth-sidebar-gap));
        transform: translateX(calc(var(--auth-frame-offset) * -1));
    }

    body.auth .main-content {
        width: min(var(--auth-main-max), calc(100% - var(--auth-main-gap)));
        justify-self: center;
    }

    body.auth .main-content.main-content-wide {
        width: min(var(--auth-main-wide-max), calc(100% - var(--auth-main-gap)));
    }

    body.auth .main-content.main-content-rating {
        width: min(var(--auth-main-rating-max), calc(100% - var(--auth-main-gap)));
    }
}

@media (max-width: 1760px) and (min-width: 1601px) {
    body.auth {
        --auth-frame-max: 1440px;
        --auth-sidebar-width: 232px;
        --auth-sidebar-gap: 16px;
        --auth-edge-gutter: 36px;
        --auth-main-gap: 48px;
        --auth-main-max: 1136px;
        --auth-main-wide-max: 1180px;
        --auth-main-rating-max: 1152px;
    }
}

@media (max-width: 1600px) and (min-width: 1401px) {
    body.auth {
        --auth-frame-max: 1360px;
        --auth-sidebar-width: 224px;
        --auth-sidebar-gap: 15px;
        --auth-edge-gutter: 32px;
        --auth-main-gap: 40px;
        --auth-main-max: 1060px;
        --auth-main-wide-max: 1098px;
        --auth-main-rating-max: 1072px;
    }
}

@media (max-width: 1400px) and (min-width: 1281px) {
    body.auth {
        font-size: 13.2px;
        --auth-frame-max: 1200px;
        --auth-sidebar-width: 210px;
        --auth-sidebar-gap: 12px;
        --auth-edge-gutter: 24px;
        --auth-main-gap: 38px;
        --auth-main-max: 944px;
        --auth-main-wide-max: 972px;
        --auth-main-rating-max: 952px;
    }
}

@media (max-width: 1280px) and (min-width: 861px) {
    body.auth {
        font-size: 12.45px;
        --auth-frame-max: 1100px;
        --auth-sidebar-width: 198px;
        --auth-sidebar-gap: 12px;
        --auth-edge-gutter: 20px;
        --auth-main-gap: 34px;
        --auth-main-max: 860px;
        --auth-main-wide-max: 886px;
        --auth-main-rating-max: 868px;
    }
}

@supports (zoom: 1) {
    @media (min-width: 861px) {
        body.auth.compact-desktop-ui {
            --auth-ui-scale: 0.8;
        }

        body.auth.compact-desktop-ui .auth-workspace {
            width: calc(100% / var(--auth-ui-scale));
            margin: 0 auto;
            zoom: var(--auth-ui-scale);
        }
    }
}

@media (max-width: 860px) {
    body.auth .navbar-container {
        width: calc(100% - 28px);
        margin: 0 auto;
        padding-left: 0;
    }

    .navbar-shell {
        flex-wrap: wrap;
        gap: 14px;
    }

    .sidebar-toggle {
        order: 2;
    }

    .user-menu {
        width: 100%;
        order: 3;
        justify-content: space-between;
    }

    .user-account {
        flex: 1 1 auto;
        flex-wrap: wrap;
    }

    .student-session-timer {
        order: -1;
    }

    .app-frame {
        grid-template-columns: 1fr;
        width: calc(100% - 28px);
        margin: 20px auto 30px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 86vw);
        padding: 16px 12px;
        z-index: 1250;
        transform: translateX(-110%);
        transition: transform 0.28s ease;
    }

    .sidebar-content {
        height: 100%;
        overflow-y: auto;
        padding-right: 2px;
    }

    .sidebar-panel {
        min-height: calc(100dvh - 32px);
        padding: 24px 14px;
        border-radius: 26px;
    }

    .sidebar-header {
        padding-right: 48px;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar-close {
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
        color: var(--secondary-color);
        cursor: pointer;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1240;
        opacity: 0;
        pointer-events: none;
        background: rgba(10, 16, 28, 0.36);
        backdrop-filter: blur(10px);
        transition: opacity 0.25s ease;
    }

    body.sidebar-open {
        overflow: hidden;
    }

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

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .main-content,
    .main-content.main-content-wide,
    .main-content.main-content-rating {
        width: 100%;
        justify-self: stretch;
    }

    .dashboard-hero {
        flex-direction: column;
    }

    .hero-balance {
        width: 100%;
        min-width: 0;
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stats-grid.parent-report-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        flex-direction: column;
    }

    .hero-balance {
        width: 100%;
    }
    .shop-filters,
    .shop-filters.shop-filters-compact {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .col-3,
    .col-4,
    .col-5,
    .col-6,
    .col-7,
    .col-9,
    .col-8 {
        width: 100%;
    }

    .student-hero-compact .hero-text h1 {
        white-space: normal;
    }

    .student-dashboard-card {
        height: 500px;
    }

    .student-dashboard-subrow {
        display: flex;
        gap: 0;
    }

    .student-dashboard-subrow > .student-dashboard-column {
        padding: 0 12px;
    }

    .reports-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .announcements-layout {
        grid-template-columns: 1fr;
    }

    .announcement-guide-grid {
        grid-template-columns: 1fr;
    }

    .category-admin-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 24px;
    }

    .page-header-actions,
    .stack-on-mobile {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .page-header-actions > div,
    .stack-on-mobile > div {
        width: 100% !important;
    }

    .page-header .btn,
    .page-header .btn-back,
    .page-header .form-control,
    .page-header-actions .btn,
    .page-header-actions .btn-back,
    .page-header-actions .form-control,
    .stack-on-mobile .btn,
    .stack-on-mobile .btn-back,
    .stack-on-mobile .form-control {
        width: 100% !important;
    }

    body.guest .navbar-container,
    .container,
    .main-content.full-width {
        width: calc(100% - 24px);
    }

    .navbar {
        padding: 10px 0;
    }

    .navbar-shell {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 14px;
        padding: 12px 60px 12px 14px;
        border-radius: 24px;
    }

    .sidebar-toggle {
        position: static;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
        margin-left: 0;
    }

    .user-menu {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: space-between;
    }

    .user-account {
        flex: 1 1 auto;
    }

    .user-name {
        white-space: normal;
    }

    .app-frame {
        width: calc(100% - 28px);
        margin: 18px auto 26px;
        gap: 16px;
    }

    .row {
        margin: 0;
        gap: 16px;
    }

    .col,
    .col-3,
    .col-4,
    .col-5,
    .col-6,
    .col-7,
    .col-9,
    .col-8,
    .col-12 {
        padding: 0;
    }

    .sidebar {
        width: min(304px, 88vw);
        padding: 12px 10px;
    }

    .sidebar-panel {
        min-height: calc(100dvh - 24px);
        padding: 20px 12px;
        border-radius: 24px;
    }

    .sidebar-nav a {
        padding: 11px 12px;
    }

    .sidebar-panel,
    .sidebar-footer,
    .card,
    .auth-copy,
    .auth-card,
    .dashboard-hero {
        padding: 22px;
        border-radius: 24px;
    }

    .flash-messages {
        top: 78px;
        left: 12px;
        right: 12px;
    }

    .flash-message {
        min-width: 0;
        max-width: none;
    }

    .shop-toolbar,
    .shop-header {
        align-items: stretch;
    }

    .hero-badges {
        flex-direction: column;
        align-items: stretch;
    }

    .student-dashboard-subrow {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .student-dashboard-card {
        height: 480px;
    }

    .student-hero-compact .hero-group-stack .hero-badge,
    .student-hero-compact .hero-balance {
        min-width: 0;
        width: 100%;
    }

    .balance-card {
        width: 100%;
        min-width: 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid-mini {
        grid-template-columns: 1fr;
    }

    .table th,
    .table td {
        padding: 12px 14px;
    }

    .modal {
        padding: 12px;
    }

    .modal-content {
        margin-top: 24px;
    }

    .announcement-modal-body {
        padding: 24px 20px 26px;
    }

    .announcement-modal-meta span {
        justify-content: center;
    }

    .group-rating-table {
        min-width: 700px;
    }

    .group-rating-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 560px) {
    .logo-mark {
        width: min(148px, 46vw);
    }

    .sidebar {
        width: min(290px, 90vw);
    }

    .sidebar-toggle {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .user-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .student-dashboard-card {
        height: 430px;
    }

    .user-account {
        padding: 12px 14px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .user-status {
        display: grid;
        grid-template-columns: 1fr;
        align-items: center;
        gap: 10px;
    }

    .user-points {
        justify-content: center;
    }

.hero-badges,
.auth-pills {
    flex-direction: column;
    align-items: flex-start;
}
    .btn,
    .btn-sm,
    .btn-back {
        width: 100%;
    }

    .section-header {
        align-items: stretch;
    }

    .group-rating-table .table-action-btn,
    .group-rating-table .table-action-btn.btn-sm {
        width: 36px !important;
    }

    .reports-summary-grid {
        grid-template-columns: 1fr;
    }

    .announcement-modal-content {
        border-radius: 24px;
    }

    .announcement-modal-icon {
        width: 72px;
        height: 72px;
        border-radius: 24px;
        font-size: 1.8rem;
    }

    .announcement-modal-title {
        font-size: 1.45rem;
    }

    .announcement-modal-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .announcement-modal-meta span {
        justify-content: center;
    }
}

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

.development-mentor-shell {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.development-mentor-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 12px 16px;
    border: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(29, 22, 51, 0.96), rgba(123, 75, 199, 0.94));
    color: #fff;
    box-shadow: 0 20px 36px rgba(96, 43, 122, 0.24);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.development-mentor-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 44px rgba(96, 43, 122, 0.28);
}

.development-mentor-toggle-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1rem;
}

.development-mentor-toggle-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

.development-mentor-toggle-copy strong {
    font-size: 0.95rem;
    font-weight: 800;
}

.development-mentor-toggle-copy span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    line-height: 1.3;
}

.development-mentor-panel {
    width: min(390px, calc(100vw - 24px));
    height: min(76vh, 720px);
    max-height: min(76vh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 241, 251, 0.96));
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    box-shadow: 0 28px 54px rgba(29, 22, 51, 0.2);
    backdrop-filter: blur(18px);
}

.development-mentor-panel[hidden] {
    display: none !important;
}

.development-mentor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 234, 250, 0.92));
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.08);
}

.development-mentor-heading {
    min-width: 0;
}

.development-mentor-heading h3 {
    margin: 0 0 2px;
    color: var(--primary-color);
    font-size: 0.98rem;
    line-height: 1.25;
}

.development-mentor-heading p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.75rem;
    line-height: 1.3;
}

.development-mentor-header-actions {
    display: flex;
    gap: 6px;
}

.development-mentor-icon-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary-color);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.development-mentor-icon-btn:hover {
    background: rgba(255, 255, 255, 0.96);
    transform: translateY(-1px);
}

.development-mentor-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: 12px 14px 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.development-mentor-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 92%;
}

.development-mentor-message.is-user {
    align-self: flex-end;
}

.development-mentor-message.is-assistant {
    align-self: flex-start;
}

.development-mentor-message-label {
    color: var(--text-light);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.development-mentor-bubble {
    padding: 11px 13px;
    border-radius: 18px;
    line-height: 1.42;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.88rem;
}

.development-mentor-message.is-assistant .development-mentor-bubble {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(var(--primary-rgb), 0.08);
    color: var(--text-color);
}

.development-mentor-message.is-user .development-mentor-bubble {
    background: linear-gradient(135deg, rgba(96, 43, 122, 0.96), rgba(123, 75, 199, 0.94));
    color: #fff;
    box-shadow: 0 16px 28px rgba(96, 43, 122, 0.18);
}

.development-mentor-loading .development-mentor-bubble {
    color: var(--text-light);
}

.development-mentor-chips {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 14px 8px;
    scrollbar-width: thin;
    min-height: 38px;
}

.development-mentor-chip {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary-color);
    font-size: 0.73rem;
    line-height: 1.25;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.development-mentor-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--accent-rgb), 0.24);
    box-shadow: var(--shadow-soft);
}

.development-mentor-form {
    flex: 0 0 auto;
    padding: 10px 14px 12px;
    border-top: 1px solid rgba(var(--primary-rgb), 0.08);
    background: rgba(255, 255, 255, 0.86);
}

.development-mentor-input {
    width: 100%;
    min-height: 58px;
    max-height: 110px;
    resize: vertical;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-color);
    padding: 10px 12px;
    font: inherit;
    line-height: 1.35;
}

.development-mentor-input:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb), 0.34);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
}

.development-mentor-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.development-mentor-note {
    display: none;
}

@media (max-width: 900px) {
    .development-mentor-shell {
        right: 14px;
        bottom: 14px;
        left: 14px;
        align-items: stretch;
    }

    .development-mentor-toggle {
        width: 100%;
        justify-content: center;
    }

    .development-mentor-panel {
        width: 100%;
        height: min(74vh, 680px);
        max-height: min(74vh, 680px);
    }
}

@media (max-width: 640px) {
    .development-mentor-toggle-copy span {
        display: none;
    }

    .development-mentor-toggle {
        justify-content: flex-start;
        padding: 12px 14px;
        border-radius: 20px;
    }

    .development-mentor-panel {
        border-radius: 24px;
    }

    .development-mentor-header,
    .development-mentor-form {
        padding-left: 12px;
        padding-right: 12px;
    }

    .development-mentor-messages {
        padding-left: 12px;
        padding-right: 12px;
    }

    .development-mentor-chips {
        padding-left: 12px;
        padding-right: 12px;
    }

    .development-mentor-form-actions {
        justify-content: flex-end;
    }
}
