:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #eef4ff;
    --text: #363257;
    --muted: #9693ad;
    --line: #ececf4;
    --primary: #2f68d8;
    --primary-strong: #1f5cc8;
    --green: #18ba5b;
    --orange: #ff9f2e;
    --shadow: 0 18px 50px rgba(42, 49, 85, 0.08);
    --radius: 24px;
    font-family: Poppins, Manrope, "Segoe UI", Arial, sans-serif;
    line-height: 1.45;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 28px 20px;
}

.brand {
    display: block;
    width: 100%;
    color: var(--primary);
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.student-mini {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin: 42px 0 30px;
    text-align: center;
}

.student-mini-name {
    font-size: 15px;
    line-height: 1.35;
}

.student-mini-note {
    font-size: 12px;
    line-height: 1.45;
    max-width: 170px;
}

.student-mini span,
.eyebrow,
.empty-state p,
.profile-card p,
.trial-strip p,
.steps p,
.lesson-row span,
.details-list span {
    color: var(--muted);
}

.avatar {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #edf2df;
    color: var(--primary);
    font-size: 28px;
    font-weight: 700;
}

.student-icon {
    width: 58%;
    height: 58%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.avatar-large {
    width: 120px;
    height: 120px;
    font-size: 44px;
}

.avatar-xl {
    width: 144px;
    height: 144px;
    font-size: 56px;
}

.nav {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 24px;
    color: #8a8a9e;
    font-weight: 600;
}

.nav svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    fill: currentColor;
}

.nav a.is-active,
.nav a:hover {
    background: #e9f1ff;
    color: var(--primary);
}

.icon-sprite {
    display: none;
}

.main {
    min-width: 0;
}

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

.topbar-spacer {
    flex: 1;
}

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

.video-topbar-widget {
    position: relative;
    z-index: 35;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 6px 8px 6px 18px;
    border: 1px solid rgba(226, 231, 244, 0.95);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(35, 42, 78, 0.08);
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    pointer-events: auto;
}

.video-topbar-widget[hidden] {
    display: none;
}

.video-topbar-widget .video-join-button {
    position: relative;
    z-index: 36;
    min-height: 34px;
    padding: 0 16px;
    font-size: 13px;
    box-shadow: none;
    pointer-events: auto;
    cursor: pointer;
}

.video-topbar-widget .video-join-button.is-loading {
    opacity: 0.82;
    cursor: progress;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 600;
}

.pill-primary,
.button {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.topbar-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: #f0f0f2;
    color: #2f2c52;
    cursor: pointer;
}

.topbar-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.topbar-icon span {
    position: absolute;
    right: -2px;
    top: -4px;
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.topbar-notification {
    position: relative;
}

.topbar-inline-dropdown {
    position: relative;
    display: block;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: min(380px, calc(100vw - 32px));
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(233, 236, 245, 0.95);
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(35, 42, 78, 0.14);
    overflow: hidden;
    z-index: 60;
}

.notification-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(236, 236, 244, 0.9);
}

.notification-dropdown-head strong {
    font-size: 17px;
    font-weight: 700;
}

.notification-dropdown-head em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.notification-list {
    display: grid;
    gap: 0;
    max-height: 360px;
    overflow-y: auto;
}

.notification-item {
    display: grid;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(236, 236, 244, 0.9);
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.notification-item:hover {
    background: #f7f9ff;
}

.notification-item.is-new {
    background: linear-gradient(180deg, rgba(236, 244, 255, 0.78), rgba(255, 255, 255, 0.98));
}

.notification-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.notification-item-head strong {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.notification-item-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.notification-item p {
    margin: 0;
    color: #6f6c89;
    font-size: 13px;
    line-height: 1.55;
}

.notification-info .notification-item-head strong {
    color: var(--text);
}

.notification-success .notification-item-head strong {
    color: #1d8550;
}

.notification-warning .notification-item-head strong {
    color: #b06a17;
}

.notification-empty {
    display: grid;
    gap: 8px;
    padding: 22px 20px 24px;
}

.notification-empty strong {
    font-size: 15px;
    font-weight: 700;
}

.notification-empty p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.messenger-dropdown-body,
.bonus-dropdown-body {
    gap: 14px;
}

.messenger-dropdown {
    width: min(280px, calc(100vw - 32px));
}

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

.messenger-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
}

.messenger-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.messenger-button-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.messenger-button-whatsapp {
    align-self: start;
    width: 100%;
    background: #ffffff;
    color: #111a2d;
    border: 1.5px solid rgba(37, 211, 102, 0.28);
    box-shadow: none;
}

.messenger-button-whatsapp .messenger-button-icon {
    color: #128c4a;
    width: 44px;
    height: 44px;
    flex-basis: 44px;
}

.messenger-button-whatsapp .messenger-button-icon svg {
    width: 44px;
    height: 44px;
}

.messenger-button-viber {
    background: linear-gradient(135deg, #7f55d8, #6d3fcb);
    border-color: #6d3fcb;
}

.messenger-button-telegram {
    align-self: start;
    width: 100%;
    background: linear-gradient(135deg, #35a8eb, #2f68d8);
    border-color: #2f68d8;
}

.bonus-dropdown-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
}

.header-profile-dropdown {
    position: relative;
}

.header-profile-button {
    appearance: none;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.header-profile-button:hover,
.header-profile-button[aria-expanded="true"] {
    border-color: rgba(46, 104, 216, 0.24);
    box-shadow: 0 14px 32px rgba(35, 42, 78, 0.08);
}

.profile-dropdown {
    width: 230px;
    padding: 10px;
}

.profile-dropdown-list {
    display: grid;
    gap: 4px;
}

.profile-dropdown-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    color: #232a4e;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.profile-dropdown-link:hover {
    background: #eef4ff;
    color: var(--primary);
}

.profile-dropdown-logout {
    margin-top: 4px;
    border-top: 1px solid rgba(236, 236, 244, 0.9);
    color: #d94a4a;
}

.profile-dropdown-logout:hover {
    background: #fff0f0;
    color: #c93737;
}

.header-profile span:nth-child(2) {
    display: grid;
    gap: 1px;
    min-width: 96px;
}

.header-profile strong {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.header-profile em {
    color: #111a2d;
    font-size: 17px;
    font-style: normal;
    font-weight: 600;
}

.header-profile svg {
    width: 22px;
    height: 22px;
    fill: #8b90a1;
}

.header-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #78bb00;
    color: #fff;
    font-weight: 800;
}

.header-avatar .student-icon {
    width: 24px;
    height: 24px;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 34px 36px 22px;
}

.page-head h1,
.card h2 {
    margin: 4px 0 0;
    font-weight: 700;
    line-height: 1.2;
}

.page-head h1 {
    font-size: 34px;
}

.eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 24px;
    font-weight: 600;
}

.button-light {
    background: #eef4ff;
    color: var(--primary);
}

.link {
    color: var(--primary);
    font-weight: 600;
}

.dashboard-grid,
.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    padding: 14px 36px 24px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.hero-card,
.package-feature,
.trial-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.hero-card p,
.package-feature p,
.trial-strip p {
    max-width: 680px;
    line-height: 1.6;
}

.teacher-badge {
    display: grid;
    place-items: center;
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e9f1ff, #fff3de);
    color: var(--primary);
    font-size: 48px;
    font-weight: 700;
}

.teacher-badge img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.profile-card {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 14px;
    text-align: center;
}

.next-lesson-card {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 14px;
}

.next-lesson-card p {
    color: var(--muted);
}

.pending-teacher-card {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 14px;
    min-height: 300px;
    overflow: hidden;
    text-align: center;
}

.pending-teacher-card h2 {
    justify-self: start;
    margin-right: 34px;
}

.pending-teacher-card strong {
    color: #111a2d;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.pending-teacher-card p {
    max-width: 220px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.card-menu {
    position: absolute;
    top: 24px;
    right: 26px;
    color: #28244d;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}

.pending-teacher-photo {
    width: 150px;
    height: 150px;
    margin-top: 10px;
    border-radius: 50%;
    overflow: hidden;
    transform: scale(1.02);
}

.pending-teacher-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-main {
    min-height: 420px;
}

.lead-profile-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.profile-data-card {
    display: grid;
    align-content: start;
    gap: 22px;
}

.details-list-wide div {
    grid-template-columns: 210px minmax(0, 1fr);
}

.achievements-card {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 14px;
    min-height: 360px;
    text-align: center;
}

.achievement-mark {
    display: grid;
    place-items: center;
    width: 118px;
    height: 118px;
    margin-top: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f7ef, #eaf1ff);
    color: #11b85f;
    font-size: 56px;
    font-weight: 800;
}

.achievements-card p {
    max-width: 250px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.profile-edit-form,
.profile-password-form {
    display: grid;
    gap: 16px;
}

.profile-edit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-edit-form .button {
    justify-self: start;
}

.profile-static-details {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.account-security-card {
    align-content: start;
}

.account-security-card .form-alert,
.account-security-card .form-success {
    width: 100%;
    margin: 4px 0;
    text-align: left;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 0 36px 24px;
}

.active-work-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 24px;
    padding: 0 36px 24px;
}

.active-student-top-grid {
    grid-template-columns: minmax(0, 2.35fr) minmax(300px, 0.9fr);
}

.active-work-grid.active-student-top-grid {
    padding-top: 0;
}

.active-lessons-card,
.package-summary-card,
.active-student-teacher-card,
.active-student-side-stack {
    min-width: 0;
}

.active-student-side-stack {
    display: grid;
    gap: 24px;
    align-content: start;
}

.active-student-top-grid .active-lessons-card .lesson-list {
    max-height: 368px;
}

.active-student-teacher-card {
    grid-template-columns: 82px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    align-content: start;
    gap: 10px 16px;
    min-height: 0;
    text-align: left;
}

.active-student-teacher-card h2 {
    grid-column: 1 / -1;
    margin: 0 34px 0 0;
    max-width: 100%;
    font-size: 21px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.active-student-teacher-card .pending-teacher-photo {
    width: 82px;
    height: 82px;
    margin-top: 0;
}

.active-student-teacher-card strong {
    font-size: 20px;
}

.active-student-teacher-card p {
    max-width: none;
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.45;
}

.package-summary-card {
    display: grid;
    align-content: start;
    gap: 16px;
}

.package-summary-card .section-title {
    margin-bottom: 0;
}

.package-summary-card .section-title h2 {
    font-size: 21px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.package-compact-summary {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    background: #f7f8fc;
}

.package-compact-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.package-compact-stats span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.package-compact-stats strong {
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.admin-field-note {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.empty-package {
    display: grid;
    gap: 18px;
    align-content: start;
    padding: 20px;
    border-radius: 22px;
    background: #fafbff;
}

.empty-package p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.stat-card {
    display: grid;
    gap: 8px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card span {
    color: var(--muted);
    font-weight: 500;
}

.stat-card strong {
    font-size: 26px;
    font-weight: 700;
}

.main>.card,
.main>.profile-layout+.card {
    margin: 0 36px 0;
}

.main>.trial-card-soft {
    margin: 0 36px 24px;
}

.main>.lessons-page-card {
    margin-top: 24px;
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

.main>.calendar-page-card {
    margin-top: 24px;
}

.dashboard-packages-block {
    margin-top: 0;
}

.dashboard-packages-block > .card {
    margin: 0 36px 0;
}

.dashboard-packages-block .package-grid {
    padding: 8px 0 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.trial-strip {
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(90deg, #eef4ff, #fff);
}

.trial-strip .button {
    margin-top: 12px;
}

.trial-card-soft {
    padding: 28px;
}

.trial-feature {
    min-height: 188px;
    padding: 34px 30px;
    border-radius: 24px;
    background: linear-gradient(90deg, #eef4ff 0%, #fff9ee 100%);
}

.trial-feature-copy {
    display: grid;
    gap: 14px;
    max-width: 760px;
}

.trial-feature-copy h2 {
    margin: 0;
}

.trial-feature .rich-text-content,
.trial-feature .rich-text-content p,
.trial-feature .rich-text-content ul,
.trial-feature .rich-text-content ol,
.trial-feature .rich-text-content li {
    color: var(--text);
}

.trial-feature .rich-text-content {
    font-size: 16px;
    line-height: 1.65;
}

.trial-feature .rich-text-content p,
.trial-feature .rich-text-content ul,
.trial-feature .rich-text-content ol {
    margin-bottom: 10px;
}

.trial-feature .rich-text-content strong,
.trial-feature .rich-text-content b {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
}

.trial-feature-button {
    min-height: 62px;
    padding: 0 30px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #a73ff1 0%, #568cff 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    flex: 0 0 auto;
    box-shadow: 0 12px 24px rgba(42, 49, 85, 0.12);
}

.trial-feature-button:hover {
    color: #fff;
    background: linear-gradient(90deg, #9633e6 0%, #4b7cf0 100%);
}

.package-trial-feature {
    margin-top: 18px;
    margin-bottom: 10px;
}

.package-trial-feature .eyebrow {
    display: block;
    margin-bottom: 8px;
}

.package-trial-feature + .package-grid {
    margin-top: 24px;
}

.package-trial-feature h2 {
    margin: 0;
}

.progress-panel {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 150px;
    gap: 22px;
    align-items: center;
    padding: 24px;
    border-radius: 22px;
    background: #fafbff;
}

.progress-panel-compact {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
}

.progress-panel-compact strong {
    font-size: 30px;
}

.locked-lessons-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.locked-calendar-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.lesson-list-blurred {
    filter: blur(4px);
    opacity: 0.62;
    pointer-events: none;
    user-select: none;
}

.calendar-board-blurred {
    filter: blur(4px);
    opacity: 0.62;
    pointer-events: none;
    user-select: none;
}

.locked-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    background: rgb(230 230 230 / 58%);
    backdrop-filter: blur(2px);
}

.locked-overlay h2,
.locked-overlay p {
    margin: 0;
}

.locked-overlay p {
    max-width: 360px;
    color: var(--muted);
}

.lock-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    box-shadow: 0 18px 42px rgba(42, 49, 85, 0.16);
}

.lock-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.progress-panel span {
    color: var(--muted);
}

.progress-panel strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
}

.progress-track {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eaf2;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #6a95ee);
}

.trial-price {
    display: grid;
    place-items: center;
    flex: 0 0 112px;
    height: 112px;
    border-radius: 24px;
    background: var(--primary);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.empty-state,
.calendar-empty {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 42px 20px;
    text-align: center;
    border-radius: 22px;
    background: #fafbff;
}

.calendar-icon {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: #e9f1ff;
    color: var(--primary);
    font-size: 34px;
    font-weight: 700;
}

.calendar-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.calendar-page-card .calendar-layout {
    grid-template-columns: minmax(0, 1fr);
}

.calendar-page-card .calendar-sidebar {
    display: none;
}

.teacher-calendar-page-card {
    margin-top: 24px;
}

.teacher-calendar-filter {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 22px;
}

.teacher-calendar-filter label {
    display: grid;
    gap: 8px;
    min-width: min(360px, 100%);
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.teacher-calendar-filter select {
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0 18px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 700;
}

.teacher-calendar-filter-summary {
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.teacher-calendar-event {
    text-decoration: none;
}

.calendar-page-card.is-loading {
    opacity: .72;
    pointer-events: none;
}

.calendar-sidebar {
    min-width: 0;
}

.calendar-sidebar-card {
    display: grid;
    align-content: start;
    gap: 22px;
    min-height: 100%;
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(42, 49, 85, 0.06);
}

.calendar-sidebar-card h3,
.calendar-toolbar h3 {
    margin: 0;
    color: #111627;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
}

.calendar-sidebar-list {
    display: grid;
    gap: 12px;
}

.calendar-sidebar-item {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, #5e8ee8, #4a7fe0);
    color: #fff;
    box-shadow: 0 14px 28px rgba(74, 127, 224, 0.22);
}

.calendar-sidebar-item strong {
    font-size: 16px;
    font-weight: 700;
}

.calendar-sidebar-item span,
.calendar-sidebar-item em {
    color: rgba(255, 255, 255, 0.92);
    font-style: normal;
}

.calendar-sidebar-item em {
    font-size: 13px;
}

.calendar-sidebar-item.is-completed {
    background: linear-gradient(135deg, #6ac88f, #44b36d);
    box-shadow: 0 14px 28px rgba(68, 179, 109, 0.2);
}

.calendar-surface {
    min-width: 0;
    padding: 18px 22px 24px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(42, 49, 85, 0.06);
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.calendar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-today-button,
.calendar-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    text-decoration: none;
}

.calendar-today-button {
    padding: 0 16px;
    border-radius: 8px;
    background: #4d82e7;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.calendar-nav-group {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #e3e8f5;
    border-radius: 8px;
    background: #fff;
}

.calendar-nav-button {
    width: 46px;
    color: #a8b0c4;
    font-size: 30px;
    line-height: 1;
}

.calendar-nav-button+.calendar-nav-button {
    border-left: 1px solid #e3e8f5;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #e7ebf5;
    border-left: 1px solid #e7ebf5;
}

.calendar-weekday,
.calendar-day {
    min-width: 0;
    border-right: 1px solid #e7ebf5;
    border-bottom: 1px solid #e7ebf5;
}

.calendar-weekday {
    display: grid;
    place-items: center;
    min-height: 74px;
    color: #98a4b7;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
}

.calendar-day {
    position: relative;
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 130px;
    padding: 14px 12px 12px;
    background: #fff;
}

.calendar-day.is-outside {
    background: #fbfcff;
}

.calendar-day.is-outside .calendar-day-number {
    color: #d4dae6;
}

.calendar-day.is-today {
    background: #fff8d8;
}

.calendar-day-number {
    justify-self: end;
    color: #9ba6bb;
    font-size: 14px;
    font-weight: 600;
}

.calendar-day-events {
    display: grid;
    gap: 6px;
}

.calendar-event-chip {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(77, 130, 231, 0.12);
    color: #3159a9;
}

.calendar-event-chip strong {
    font-size: 12px;
    font-weight: 700;
}

.calendar-event-chip span {
    color: #6b7b9f;
    font-size: 11px;
}

.calendar-event-chip.is-completed {
    background: rgba(68, 179, 109, 0.14);
    color: #2f8c55;
}

.calendar-event-more {
    color: #7f8aaa;
    font-size: 12px;
    font-weight: 700;
}

.roadmap-subtitle {
    margin: -8px 0 24px;
    color: var(--muted);
    font-size: 18px;
    font-weight: 600;
}

.learning-roadmap-linear {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    padding: 20px 0 10px;
}

/* Горизонтальная линия удалена по запросу пользователя */
.learning-roadmap-linear::before {
    display: none;
}

.roadmap-step {
    position: relative;
    padding: 26px 24px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(42, 49, 85, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.roadmap-step:nth-child(1) {
    z-index: 4;
}

.roadmap-step:nth-child(2) {
    z-index: 3;
}

.roadmap-step:nth-child(3) {
    z-index: 2;
}

.roadmap-step:nth-child(4) {
    z-index: 1;
}

.roadmap-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(42, 49, 85, 0.08);
}

/* Стрелки между этапами (крупные и накладывающиеся) */
.roadmap-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    right: -30px;
    width: 64px;
    height: 64px;
    background: url('../img/right-arrow.png') no-repeat center center;
    background-size: contain;
    transform: translateY(-50%);
    z-index: 10;
}

.roadmap-step-blue {
    border-bottom: 4px solid #4e91c9;
}

.roadmap-step-orange {
    border-bottom: 4px solid #f0a22d;
}

.roadmap-step-green {
    border-bottom: 4px solid #50a96b;
}

.roadmap-step-red {
    border-bottom: 4px solid #cf6348;
}

.roadmap-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.roadmap-step-blue .roadmap-icon {
    background: #4e91c9;
    box-shadow: 0 6px 16px rgba(78, 145, 201, 0.3);
}

.roadmap-step-orange .roadmap-icon {
    background: #f0a22d;
    box-shadow: 0 6px 16px rgba(240, 162, 45, 0.3);
}

.roadmap-step-green .roadmap-icon {
    background: #50a96b;
    box-shadow: 0 6px 16px rgba(80, 169, 107, 0.3);
}

.roadmap-step-red .roadmap-icon {
    background: #cf6348;
    box-shadow: 0 6px 16px rgba(207, 99, 72, 0.3);
}

.roadmap-step h3 {
    margin: 0 0 16px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: #1f2136;
    min-height: 50px;
    /* Чтобы списки (ul) всегда начинались на одном уровне */
}

.roadmap-step ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    /* Убрали flex: 1 и display: grid, чтобы расстояния между пунктами не растягивались */
}

.roadmap-step li {
    position: relative;
    padding-left: 24px;
    color: #4a4e69;
    font-size: 14.5px;
    line-height: 1.45;
}

.roadmap-step li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f0f2f8;
}

.roadmap-step li::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 8px;
    width: 4px;
    height: 7px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(45deg);
}

@media (max-width: 1100px) {
    .learning-roadmap-linear {
        grid-template-columns: repeat(2, 1fr);
    }

    .learning-roadmap-linear::before,
    .roadmap-step::after {
        display: none;
    }
}

@media (max-width: 650px) {
    .learning-roadmap-linear {
        grid-template-columns: 1fr;
    }
}

.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.15fr;
    gap: 24px;
    margin-top: 24px;
    padding: 0 36px 24px;
}

.referral-card,
.goal-card {
    display: grid;
    align-content: start;
    gap: 18px;
}

.referral-card {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    background:
        radial-gradient(circle at 88% 18%, rgba(126, 124, 234, 0.82) 0 22%, transparent 23%),
        radial-gradient(circle at 8% 108%, rgba(112, 163, 255, 0.26) 0 34%, transparent 35%),
        linear-gradient(135deg, #4456d6 0%, #5b52cf 54%, #2f68d8 100%);
    color: #fff;
}

.referral-card::before,
.referral-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.referral-card::before {
    left: -64px;
    bottom: -72px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        18px -18px 0 -2px rgba(255, 255, 255, 0.08),
        36px -36px 0 -4px rgba(255, 255, 255, 0.06),
        54px -54px 0 -6px rgba(255, 255, 255, 0.04);
}

.referral-card::after {
    right: -34px;
    top: -42px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(33, 45, 142, 0.18);
}

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

.referral-card .eyebrow,
.referral-card p {
    color: rgba(255, 255, 255, 0.78);
}

.referral-card h2 {
    color: #fff;
    font-size: 32px;
}

.referral-card .button-light {
    justify-self: start;
    background: rgba(255, 255, 255, 0.92);
    color: #345bd6;
}

.referral-glow {
    position: absolute;
    right: 26px;
    top: 24px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: #4d55d3;
    font-size: 28px;
    font-weight: 800;
    box-shadow: 0 18px 36px rgba(20, 29, 92, 0.18);
}

.goal-card {
    background: linear-gradient(145deg, #fff7ea, #ffffff 72%);
}

.goal-card p,
.interests-card p {
    color: var(--muted);
    line-height: 1.6;
}

.interests-card {
    border: 1.5px solid #26aaff;
    box-shadow: none;
}

.interests-card h2 {
    margin-top: 0;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.chip-option {
    cursor: pointer;
}

.chip-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-option span,
.quiz-options a {
    display: inline-flex;
    border: 0;
    border-radius: 999px;
    background: #f1f1f3;
    color: #182334;
    font: inherit;
    font-weight: 600;
    padding: 11px 20px;
}

.chip-option input:checked+span {
    background: #e9f1ff;
    color: var(--primary);
    box-shadow: inset 0 0 0 1px rgba(47, 104, 216, 0.18);
}

.save-button {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    background: #f1f1f2;
    color: #c2c6cc;
    font: inherit;
    font-weight: 700;
}

.save-button {
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.form-success {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #ecfbf1;
    color: #2f9c4d;
    font-weight: 700;
}

.form-error {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff1f3;
    color: #d54863;
    font-weight: 700;
}

.bonus-terms-link {
    align-self: end;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.quiz-card {
    min-height: 440px;
}

.quiz-options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.placeholder-page,
.text-page {
    margin: 24px 36px;
}

.text-page p,
.placeholder-page p {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    padding: 8px 36px 34px;
    color: var(--muted);
    font-size: 14px;
}

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

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 20px;
    background: var(--surface);
    box-shadow: 12px 0 38px rgba(30, 41, 73, 0.06);
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    justify-content: space-between;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 24px 36px;
}

.admin-grid .card,
.admin-card {
    display: grid;
    align-content: start;
    gap: 18px;
}

.admin-grid p {
    color: var(--muted);
    line-height: 1.6;
}

.admin-card {
    margin: 24px 36px;
}

.admin-content-top-actions {
    display: flex;
    justify-content: flex-end;
}

.trumbowyg-input {
    min-height: 220px;
}

.trumbowyg-box,
.trumbowyg-editor-box {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.trumbowyg-box.trumbowyg-editor-visible,
.trumbowyg-box.trumbowyg-editor-hidden {
    box-shadow: none;
}

.trumbowyg-button-pane {
    background: #f8f9fd;
    border-bottom: 1px solid var(--line);
}

.trumbowyg-button-pane::after {
    background: transparent;
}

.trumbowyg-button-pane button {
    color: var(--text);
}

.trumbowyg-button-pane .trumbowyg-active,
.trumbowyg-button-pane button:hover {
    background: #e9f1ff;
}

.trumbowyg-editor,
.trumbowyg-textarea {
    min-height: 220px;
    padding: 16px 18px;
    font-family: Poppins, Manrope, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
}

.trumbowyg-editor h2 {
    font-size: 26px;
    margin: 0 0 0.75em;
}

.trumbowyg-editor h3 {
    font-size: 22px;
    margin: 0 0 0.75em;
}

.trumbowyg-editor p {
    margin: 0 0 1em;
}

.trumbowyg-editor ul,
.trumbowyg-editor ol {
    margin: 0 0 1em 1.25em;
}

.trumbowyg-editor a {
    color: var(--primary);
}

.admin-login-card {
    max-width: 520px;
    margin: 48px auto;
}

.admin-form {
    display: grid;
    gap: 18px;
}

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

.admin-access-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
}

.admin-access-card h3 {
    margin: 6px 0 0;
    font-size: 24px;
}

.auth-card-wide {
    width: min(960px, 100%);
}

.candidate-card {
    width: 100%;
}

.candidate-status-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: center;
    padding: 18px;
    margin: 18px 0 24px;
    border-radius: 22px;
    background: linear-gradient(90deg, #e9f1ff, #fff7ea);
}

.candidate-status-panel div {
    display: grid;
    gap: 6px;
}

.candidate-status-panel span {
    color: var(--muted);
    font-weight: 700;
}

.candidate-status-panel strong {
    color: var(--text);
    font-size: 18px;
}

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

.inline-admin-form input {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    color: var(--text);
    font: inherit;
}

.inline-admin-form .button {
    min-height: 44px;
    padding: 10px 16px;
}

.admin-inline-actions {
    margin: 0;
}

.admin-package-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-field {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
}

.admin-field-full {
    grid-column: 1 / -1;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    color: var(--text);
    font: inherit;
    outline: none;
    background: #fff;
}

.admin-field input {
    min-height: 52px;
}

.admin-field textarea {
    resize: vertical;
    line-height: 1.55;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(47, 104, 216, 0.12);
}

.admin-field select {
    min-height: 52px;
}

.admin-inline-options {
    display: grid;
    gap: 12px;
}

.video-settings-form {
    max-width: 900px;
}

.video-master-switch {
    align-self: start;
    padding: 16px 18px;
    border-radius: 18px;
    background: #e9f1ff;
}

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

.video-provider-card,
.video-settings-panel {
    display: grid;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fafbff;
}

.video-provider-card.is-current {
    border-color: rgba(47, 104, 216, 0.45);
    background: #e9f1ff;
}

.video-provider-card span,
.video-settings-panel p {
    color: var(--muted);
}

.video-settings-panel h3,
.video-settings-panel p {
    margin: 0;
}

.checkout-card form {
    margin-top: 20px;
}

.checkout-feature {
    margin: 18px 0 8px;
}

.rich-text-content p,
.rich-text-content ul,
.rich-text-content ol {
    margin: 0 0 12px;
}

.rich-text-content p:last-child,
.rich-text-content ul:last-child,
.rich-text-content ol:last-child {
    margin-bottom: 0;
}

.rich-text-content ul,
.rich-text-content ol {
    padding-left: 20px;
}

.rich-text-content strong,
.rich-text-content b {
    font-weight: 700;
}

.rich-text-content em,
.rich-text-content i {
    font-style: italic;
}

.rich-text-content u {
    text-decoration: underline;
}

.trial-strip .rich-text-content,
.trial-strip .rich-text-content p,
.trial-strip .rich-text-content ul,
.trial-strip .rich-text-content ol,
.trial-strip .rich-text-content li {
    color: var(--text);
}

.rich-admin-form {
    gap: 22px;
}

.admin-accordion-item {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
}

.admin-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

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

.admin-accordion-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.admin-content-field {
    gap: 12px;
    padding: 0 20px 20px;
}

.admin-content-group {
    display: grid;
    gap: 18px;
    padding-top: 4px;
}

.rich-editor {
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    background: #fafbff;
}

.rich-editor-toolbar button {
    min-width: 42px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

.rich-editor-toolbar select {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.rich-editor-surface {
    min-height: 180px;
    padding: 16px;
    outline: none;
    line-height: 1.6;
}

.rich-editor-source {
    width: 100%;
}

.rich-editor-input {
    display: none;
}

.admin-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
}

.admin-checkbox input {
    width: 18px;
    height: 18px;
}

.admin-package-list {
    display: grid;
    gap: 24px;
}

.admin-language-tabs {
    display: grid;
    gap: 22px;
}

.admin-tab-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.admin-tab-button {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #7c7896;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.admin-tab-button.is-active {
    background: #e9f1ff;
    border-color: rgba(47, 104, 216, 0.35);
    color: var(--primary);
}

.admin-package-actions,
.admin-package-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.admin-package-card-actions form {
    margin: 0;
}

.admin-language-card {
    display: grid;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    display: none;
}

.admin-language-card.is-active {
    display: grid;
}

.admin-language-card>span {
    color: var(--muted);
    font-weight: 600;
}

.button-danger {
    background: #d94d4d;
    border-color: #d94d4d;
    color: #fff;
}

.admin-debug {
    max-height: 520px;
    overflow: auto;
    padding: 18px;
    border-radius: 16px;
    background: #111a2d;
    color: #eaf1ff;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.teacher-shell .admin-main {
    background: var(--bg);
}

.teacher-mini {
    margin-bottom: 26px;
}

.teacher-avatar,
.teacher-header-avatar,
.teacher-avatar-preview {
    overflow: hidden;
}

.teacher-avatar img,
.teacher-header-avatar img,
.teacher-avatar-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-avatar-edit {
    display: grid;
    gap: 12px;
}

.teacher-avatar-preview {
    display: grid;
    place-items: center;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: #edf2df;
    color: var(--primary);
}

.teacher-avatar-preview .student-icon {
    width: 62px;
    height: 62px;
}

.teacher-profile-form textarea {
    min-height: 180px;
}

.teacher-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 24px 36px 0;
}

.teacher-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
    gap: 24px;
    padding: 24px 36px;
}

.teacher-card-wide {
    margin: 0 36px 24px;
}

.teacher-lesson-list,
.teacher-student-list,
.teacher-calendar-lessons {
    display: grid;
    gap: 12px;
}

.teacher-lesson-item,
.teacher-student-item,
.teacher-calendar-lessons a {
    display: grid;
    gap: 4px;
    padding: 18px 20px;
    border-radius: 20px;
    background: #f6f7fb;
}

.teacher-lesson-item {
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
}

.teacher-lesson-item em,
.teacher-student-item em,
.teacher-student-card em,
.teacher-calendar-lessons span {
    color: var(--muted);
    font-style: normal;
}

.lesson-time {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.teacher-student-item {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
}

.teacher-student-item .header-avatar {
    width: 48px;
    height: 48px;
}

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

.teacher-student-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 24px;
    border-radius: 22px;
    background: #fafbff;
    text-align: center;
    border: 1px solid var(--line);
}

.teacher-student-card .avatar {
    width: 78px;
    height: 78px;
}

.teacher-student-card span:last-child {
    color: var(--muted);
    font-size: 14px;
}

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

.teacher-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.teacher-lessons-table {
    min-width: 1120px;
}

.teacher-table th,
.teacher-table td {
    padding: 17px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.teacher-table th {
    color: #4a466d;
    font-size: 14px;
    font-weight: 700;
}

.teacher-table td {
    color: #2f2b50;
}

.teacher-lesson-edit-form {
    display: grid;
    grid-template-columns: 132px 104px 132px auto;
    gap: 8px;
    align-items: end;
    min-width: 430px;
}

.teacher-lesson-edit-form label {
    display: grid;
    gap: 5px;
    margin: 0;
}

.teacher-lesson-edit-form span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.teacher-lesson-edit-form input,
.teacher-lesson-edit-form select {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.teacher-lesson-edit-form button {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.teacher-customer-table {
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.teacher-customer-table thead th {
    padding-top: 0;
    padding-bottom: 8px;
    border-bottom: 0;
    color: #6b6888;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.teacher-customer-table tbody tr {
    box-shadow: 0 8px 22px rgba(42, 49, 85, 0.05);
}

.teacher-customer-table tbody td {
    background: #fff;
    border-top: 1px solid rgba(236, 236, 244, 0.9);
    border-bottom: 1px solid rgba(236, 236, 244, 0.9);
}

.teacher-customer-table tbody td:first-child {
    border-left: 1px solid rgba(236, 236, 244, 0.9);
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

.teacher-customer-table tbody td:last-child {
    border-right: 1px solid rgba(236, 236, 244, 0.9);
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

.teacher-customer-name {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.teacher-customer-name span:last-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.teacher-customer-name strong {
    font-size: 16px;
    line-height: 1.1;
}

.teacher-customer-name em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.teacher-customer-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    font-size: 18px;
}

.teacher-level-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #edf3ff;
    color: var(--primary);
    font-weight: 700;
}

.teacher-customer-arrow {
    width: 52px;
    text-align: right;
}

.teacher-customer-arrow svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #b2b0c4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

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

.teacher-calendar-day {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    background: #fafbff;
    border: 1px solid var(--line);
}

.teacher-calendar-date {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    min-height: 86px;
    border-radius: 20px;
    background: #e9f1ff;
    color: var(--primary);
}

.teacher-calendar-date strong {
    font-size: 24px;
}

.teacher-calendar-date span {
    color: #6d7baa;
    font-size: 13px;
    font-weight: 700;
}

.teacher-filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
    gap: 14px;
    align-items: end;
}

.teacher-filter-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
}

.teacher-filter-form input,
.teacher-filter-form select {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.coordinator-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.teacher-dashboard-lessons-card {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}

.teacher-dashboard-tabs {
    margin-top: -4px;
}

.teacher-dashboard-filter-form {
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(160px, 1fr)) auto auto;
    padding: 0;
}

.teacher-dashboard-filter-form label {
    margin: 0;
}

.teacher-dashboard-filter-form .button {
    min-height: 48px;
}

.student-combobox {
    position: relative;
    display: block;
}

.student-combobox-toggle {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.student-combobox-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    display: grid;
    gap: 6px;
    border: 1px solid rgba(42, 49, 85, 0.16);
    border-radius: 16px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(42, 49, 85, 0.16);
}

.student-combobox-panel[hidden] {
    display: none !important;
}

.student-combobox-search {
    width: 100%;
}

.student-combobox-options {
    display: grid;
    max-height: 280px;
    overflow-y: auto;
}

.student-combobox-option {
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.student-combobox-option:hover,
.student-combobox-option.is-selected {
    background: var(--primary);
    color: #fff;
}

.inline-lesson-value {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.inline-lesson-cell {
    --inline-editor-width: 210px;
    position: relative;
}

.inline-lesson-cell-datetime {
    --inline-editor-width: 250px;
}

.inline-lesson-cell-status {
    --inline-editor-width: 210px;
}

.inline-lesson-datetime {
    width: var(--inline-editor-width);
    min-height: 38px;
    color: var(--text);
}

.inline-lesson-status {
    width: var(--inline-editor-width);
    min-height: 38px;
    border-radius: 999px;
    padding: 6px 10px;
}

.inline-lesson-select,
.inline-lesson-datetime-editor input {
    box-sizing: border-box;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 700;
}

.inline-lesson-datetime-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 8px;
    width: var(--inline-editor-width);
}

.inline-lesson-select {
    width: var(--inline-editor-width);
}

.inline-lesson-datetime-editor input {
    min-width: 0;
    width: 100%;
}

[data-inline-lesson-row].is-saving {
    opacity: 0.82;
}

[data-inline-lesson-row].has-inline-error {
    outline: 2px solid rgba(220, 38, 38, 0.35);
    outline-offset: -2px;
}

.inline-save-feedback {
    position: absolute;
    top: 50%;
    left: calc(14px + var(--inline-editor-width) + 12px);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    transform: translateY(-50%);
    vertical-align: middle;
    white-space: nowrap;
    pointer-events: none;
}

.inline-save-feedback-saved {
    color: #16a34a;
}

.inline-save-feedback-error {
    color: #dc2626;
}

.inline-save-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(47, 102, 217, 0.18);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: inline-save-spin 0.7s linear infinite;
}

@keyframes inline-save-spin {
    to {
        transform: rotate(360deg);
    }
}

.teacher-dashboard-table {
    table-layout: fixed;
    min-width: 980px;
}

.teacher-dashboard-table th:nth-child(1),
.teacher-dashboard-table td:nth-child(1) {
    width: 16%;
}

.teacher-dashboard-table th:nth-child(2),
.teacher-dashboard-table td:nth-child(2) {
    width: 26%;
}

.teacher-dashboard-table th:nth-child(3),
.teacher-dashboard-table td:nth-child(3) {
    width: 34%;
}

.teacher-dashboard-table th:nth-child(4),
.teacher-dashboard-table td:nth-child(4) {
    width: 24%;
}

.teacher-dashboard-table td:nth-child(1) strong,
.teacher-dashboard-table td:nth-child(2) .link {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.table-sort-link {
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.table-sort-link:hover {
    color: var(--primary);
}

.coordinator-table {
    min-width: 980px;
}

.coordinator-table td strong {
    display: block;
    margin-bottom: 4px;
}

.coordinator-dashboard-card {
    margin-bottom: 24px;
}

.coordinator-join-button {
    min-height: 42px;
    padding: 10px 18px;
    white-space: nowrap;
}

.site-footer a {
    font-weight: 600;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 28px 24px 32px;
    background:
        radial-gradient(circle at top left, rgba(233, 241, 255, 0.9), transparent 38%),
        radial-gradient(circle at top right, rgba(255, 247, 234, 0.95), transparent 34%),
        var(--bg);
}

.auth-main {
    display: grid;
    place-items: center;
    padding: 28px 0 20px;
}

.auth-card-wrap {
    width: min(100%, 560px);
}

.auth-card-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.auth-card-logo {
    display: block;
    width: min(210px, 46vw);
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.auth-footer {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    color: var(--muted);
}

.auth-footer a {
    font-weight: 600;
}

.login-card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 34px 36px 30px;
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(42, 49, 85, 0.08);
}

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

.login-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
}

.login-form input {
    width: 100%;
    min-height: 56px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 18px;
    color: var(--text);
    font: inherit;
    outline: none;
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(47, 104, 216, 0.12);
}

.login-form input[data-phone-mask] {
    letter-spacing: 0.02em;
}

.login-helper-link {
    justify-self: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.auth-card-wrap .section-title {
    margin-bottom: 22px;
}

.auth-card-wrap .section-title h2 {
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.auth-card-wrap .eyebrow {
    font-size: 14px;
}

.login-card .button {
    font-size: 22px;
    line-height: 1;
    min-height: 60px;
}

.form-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff0f0;
    color: #b83636;
    font-weight: 600;
}

.alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
}

.alert-error {
    background: #fff0f0;
    color: #b83636;
}

.alert-success {
    background: #ecfbf1;
    color: #249557;
}

.package-feature {
    padding: 30px;
    border-radius: 22px;
    background: linear-gradient(90deg, #e9f1ff, #fff7ea);
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 0;
    align-items: end;
}

.package-grid-active {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.package-card-showcase {
    position: relative;
    display: grid;
    align-content: start;
    min-height: 100%;
    overflow: hidden;
    padding: 0;
    border-radius: 30px;
    background: #fff;
    border: 1px solid rgba(225, 229, 240, 0.9);
    box-shadow: 0 24px 48px rgba(42, 49, 85, 0.1);
    --wave-x: -30%;
    --wave-y: -30px;
    --wave-width: 158%;
    --wave-height: 126px;
    --wave-rotate: -8deg;
    --soft-wave-x: -34%;
    --soft-wave-y: 34px;
    --soft-wave-width: 148%;
    --soft-wave-height: 118px;
    --soft-wave-rotate: -7deg;
}

.package-card-showcase .package-card-top {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    min-height: 250px;
    padding: 32px 26px 108px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 72%, rgba(255, 255, 255, 0.18) 0 15%, transparent 16%),
        radial-gradient(circle at 88% 68%, rgba(255, 255, 255, 0.12) 0 14%, transparent 15%),
        linear-gradient(180deg, #7df2a6 0%, #30c8e0 100%);
    text-align: center;
    margin-bottom: -60px;
}

.package-card-showcase .package-card-top::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 46px;
    background: #fff;
    pointer-events: none;
}

.package-card-showcase.package-card-tier-2 {
    transform: scale(1);
    z-index: 1;
    box-shadow: 0 24px 48px rgba(42, 49, 85, 0.1);
    --wave-x: -20%;
    --wave-y: -38px;
    --wave-width: 140%;
    --wave-height: 132px;
    --wave-rotate: 0deg;
    --soft-wave-x: -26%;
    --soft-wave-y: 30px;
    --soft-wave-width: 152%;
    --soft-wave-height: 116px;
    --soft-wave-rotate: 0deg;
}

.package-card-showcase.package-card-tier-2 .package-card-top {
    background:
        radial-gradient(circle at 16% 74%, rgba(255, 255, 255, 0.22) 0 15%, transparent 16%),
        radial-gradient(circle at 86% 70%, rgba(255, 255, 255, 0.14) 0 13%, transparent 14%),
        linear-gradient(180deg, #ff3b67 0%, #ff8e73 100%);
}

.package-card-showcase.package-card-tier-3 .package-card-top {
    background:
        radial-gradient(circle at 14% 72%, rgba(255, 255, 255, 0.18) 0 14%, transparent 15%),
        radial-gradient(circle at 86% 68%, rgba(255, 255, 255, 0.12) 0 13%, transparent 14%),
        linear-gradient(180deg, #a63cf0 0%, #568cff 100%);
}

.package-card-showcase.package-card-tier-3 {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 32px 64px rgba(42, 49, 85, 0.15);
    --wave-x: -18%;
    --wave-y: -30px;
    --wave-width: 154%;
    --wave-height: 124px;
    --wave-rotate: 8deg;
    --soft-wave-x: -18%;
    --soft-wave-y: 34px;
    --soft-wave-width: 150%;
    --soft-wave-height: 112px;
    --soft-wave-rotate: 7deg;
}

.package-card-showcase.package-card-tier-4 .package-card-top {
    background:
        radial-gradient(circle at 15% 72%, rgba(255, 255, 255, 0.18) 0 14%, transparent 15%),
        radial-gradient(circle at 86% 66%, rgba(255, 255, 255, 0.12) 0 13%, transparent 14%),
        linear-gradient(180deg, #5d8bff 0%, #5478ec 38%, #7cc6ff 100%);
}

.package-card-showcase.package-card-tier-4 {
    --wave-x: -26%;
    --wave-y: -32px;
    --wave-width: 160%;
    --wave-height: 126px;
    --wave-rotate: 9deg;
    --soft-wave-x: -22%;
    --soft-wave-y: 34px;
    --soft-wave-width: 150%;
    --soft-wave-height: 116px;
    --soft-wave-rotate: 8deg;
}

.package-card-showcase .package-card-wave {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.package-card-showcase .package-card-wave-back {
    z-index: 1;
    left: var(--soft-wave-x);
    bottom: var(--soft-wave-y);
    width: var(--soft-wave-width);
    height: var(--soft-wave-height);
    transform: rotate(var(--soft-wave-rotate));
    background: rgba(255, 255, 255, 0.2);
}

.package-card-showcase .package-card-wave-front {
    z-index: 1;
    left: var(--wave-x);
    bottom: var(--wave-y);
    width: var(--wave-width);
    height: var(--wave-height);
    transform: rotate(var(--wave-rotate));
    background: #fff;
}

.package-card-showcase .package-card-top h2 {
    position: relative;
    z-index: 2;
    margin: 14px auto 0;
    font-size: 30px;
    line-height: 1.05;
    border: 0;
    padding: 0;
    display: block;
    width: 100%;
    max-width: 100%;
}

.package-top-rate {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 5px;
    justify-items: center;
    margin-top: 14px;
    padding-top: 14px;
}

.package-top-rate::before {
    content: "";
    width: 58%;
    max-width: 170px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
}

.package-top-rate span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.86;
    text-transform: uppercase;
}

.package-top-rate strong {
    font-size: 56px;
    line-height: 1;
    letter-spacing: 0;
}

.package-card-showcase p {
    margin: 0;
    color: #625f7d;
    min-height: 72px;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.package-card-showcase .package-badge {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: transparent;
    border: none;
    padding: 0;
}

.package-card-showcase .package-card-body {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 28px 24px 24px;
    margin-top: 0;
    position: relative;
    background: #fff;
    z-index: 19;
}

.package-card-showcase .rich-text-content,
.package-card-showcase .rich-text-content p,
.package-card-showcase .rich-text-content ul,
.package-card-showcase .rich-text-content ol,
.package-card-showcase .rich-text-content li {
    font-size: 14px;
}

.package-card-showcase.package-card-tier-3 .package-card-body {
    margin-top: -1px;
}

.package-card-showcase .package-lesson-price {
    display: grid;
    justify-items: start;
    gap: 6px;
    padding-top: 6px;
}

.package-card-showcase .package-lesson-price-label {
    color: #8c89a4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
    display: block;
}

.package-card-showcase .package-lesson-price strong {
    color: #2f2b50;
    font-size: 42px;
    line-height: 0.95;
    text-align: center;
    width: 100%;
    display: block;
}

.package-card-showcase .package-lesson-price small {
    font-size: 18px;
    font-weight: 700;
}

.package-card-showcase .package-total-price {
    display: grid;
    gap: 4px;
    padding-top: 18px;
    border-top: 1px solid #eef0f7;
    text-align: center;
}

.package-card-showcase .package-price-old {
    color: #9b98b3;
    text-decoration: line-through;
    font-size: 16px;
}

.package-card-showcase .package-total-price strong {
    font-size: 34px;
    line-height: 1;
    color: #2f2b50;
}

.package-card-showcase .package-price-caption {
    color: #6f6c87;
    font-weight: 600;
    font-size: 14px;
}

.package-card-showcase .package-pay-button {
    justify-content: center;
    min-height: 60px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(42, 49, 85, 0.12);
    background: linear-gradient(90deg, #7df2a6, #30c8e0);
    border: 0;
    margin-top: 8px;
}

.package-card-showcase.package-card-tier-2 .package-pay-button {
    background: linear-gradient(90deg, #ff4c6c, #ff8e73);
}

.package-card-showcase.package-card-tier-3 .package-pay-button {
    background: linear-gradient(90deg, #a73ff1, #568cff);
}

.package-card-showcase.package-card-tier-4 .package-pay-button {
    background: linear-gradient(90deg, #5d8bff, #7cc6ff);
}

.package-card-showcase .package-payment-icons {
    margin-top: 8px;
}

.package-payment-systems {
    display: block;
    width: min(220px, 100%);
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(42, 49, 85, 0.08);
}

@media (max-width: 1200px) {

    .package-trial-feature {
        align-items: stretch;
        flex-direction: column;
    }

    .package-trial-feature .trial-feature-button {
        align-self: flex-start;
        min-width: 320px;
        max-width: 100%;
    }

    .package-grid,
    .package-grid-active {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .package-card-showcase .package-card-top h2 {
        font-size: 28px;
    }

    .package-card-showcase .package-lesson-price strong,
    .package-card-showcase .package-total-price strong {
        font-size: 34px;
    }

    .package-top-rate strong {
        font-size: 46px;
    }
}

.details-list {
    display: grid;
    gap: 14px;
}

.details-list div,
.lesson-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 390px;
    /* Ограничиваем высоту примерно на 4 урока (по ~105px каждый + отступы) */
    overflow-y: auto;
    padding-right: 6px;
    /* Отступ для скроллбара */
}

/* Кастомизация скроллбара для .lesson-list */
.lesson-list::-webkit-scrollbar {
    width: 6px;
}

.lessons-page-card .lesson-list {
    flex: 1;
    min-height: calc(100vh - 300px);
    max-height: calc(100vh - 300px);
}

.lessons-page-card .locked-lessons-wrap {
    min-height: calc(100vh - 300px);
}

.lesson-list::-webkit-scrollbar-track {
    background: #f0f2f8;
    border-radius: 4px;
}

.lesson-list::-webkit-scrollbar-thumb {
    background: #cdd2e1;
    border-radius: 4px;
}

.lesson-row {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    padding: 18px 20px;
    border: 0;
    border-radius: 24px;
    background: #f1f3f7;
}

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

.video-join-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #a73ff1, #568cff);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 14px 28px rgba(86, 140, 255, 0.22);
}

.video-join-button:hover {
    color: #fff;
    transform: translateY(-1px);
}

.lesson-row>div:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lesson-time-line {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
}

.lesson-time-line small {
    font-size: 11px;
    line-height: 1.3;
}

.lesson-row p {
    margin: 6px 0 0;
    color: #6f6b8d;
}

.lesson-meta {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.lesson-teacher-time {
    margin-top: 2px;
}

.calendar-timezone-note {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.activation-card {
    display: grid;
    gap: 22px;
}

.activation-feature {
    align-items: stretch;
}

.activation-checklist {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    line-height: 1.7;
}

.activation-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activation-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 8px;
}

.setup-card {
    max-width: 980px;
    margin: 0 auto;
}

.setup-card__intro {
    max-width: 720px;
}

.setup-card__intro p,
.setup-panel__copy p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.setup-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
    gap: 30px;
    margin-top: 26px;
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(110deg, #eef5ff 0%, #fff8ec 100%);
}

.setup-panel__copy h3 {
    margin: 0;
    color: var(--text);
    font-size: 28px;
}

.setup-form {
    align-self: start;
    padding: 24px;
    border: 1px solid rgba(34, 96, 214, 0.1);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(24, 36, 76, 0.08);
}

.setup-form .trial-feature-button {
    min-width: 220px;
}

.lesson-row-completed {
    background: #f4fbf6;
}

.lesson-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.status {
    color: var(--green);
    font-weight: 700;
}

.status-planned {
    color: var(--primary);
}

@media (max-width: 1040px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        display: grid;
        gap: 18px;
        padding: 20px;
    }

    .student-mini {
        display: none;
    }

    .nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
        margin-top: 0;
    }

    .nav a {
        white-space: nowrap;
    }

    .topbar {
        min-height: 0;
        padding: 16px 20px;
        gap: 14px;
        flex-wrap: wrap;
        align-items: center;
    }

    .topbar-spacer {
        display: none;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .video-topbar-widget {
        order: 10;
        width: 100%;
        justify-content: space-between;
    }

    .header-profile {
        margin-left: auto;
    }

    .dashboard-grid,
    .profile-layout,
    .admin-shell,
    .admin-grid,
    .admin-access-grid,
    .admin-package-form,
    .candidate-status-panel,
    .teacher-stats,
    .teacher-overview-grid,
    .teacher-student-grid,
    .teacher-calendar,
    .teacher-filter-form,
    .teacher-dashboard-filter-form,
    .stats-grid,
    .active-work-grid,
    .learning-roadmap,
    .bottom-grid,
    .calendar-board,
    .calendar-layout,
    .progress-panel {
        grid-template-columns: 1fr;
    }

    .teacher-calendar-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .teacher-calendar-filter label {
        min-width: 0;
    }

    .setup-panel {
        grid-template-columns: 1fr;
    }

    .profile-edit-form,
    .profile-password-form {
        grid-template-columns: 1fr;
    }

    .profile-edit-form .button,
    .profile-password-form .button {
        justify-self: stretch;
    }

    .roadmap-arrow {
        display: none;
    }
}

@media (max-width: 680px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        top: auto;
        z-index: 40;
        height: auto;
        padding: 10px 10px 12px;
        border: 1px solid rgba(42, 49, 85, 0.08);
        border-right: 1px solid rgba(42, 49, 85, 0.08);
        border-radius: 24px;
        box-shadow: 0 10px 28px rgba(42, 49, 85, 0.12);
        backdrop-filter: blur(18px);
        background: rgba(255, 255, 255, 0.96);
    }

    .brand,
    .student-mini {
        display: none;
    }

    .nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        overflow: visible;
        padding: 0;
        margin-top: 0;
    }

    .nav a {
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        padding: 10px 4px;
        border-radius: 16px;
        font-size: 11px;
        text-align: center;
        min-height: 64px;
    }

    .nav svg {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }

    .main {
        padding-bottom: 108px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding: 12px 14px 10px;
        gap: 10px;
    }

    .page-head,
    .hero-card,
    .trial-strip,
    .package-feature,
    .section-title {
        align-items: stretch;
        flex-direction: column;
    }

    .page-head,
    .dashboard-grid,
    .profile-layout,
    .admin-grid,
    .profile-edit-form,
    .stats-grid,
    .active-work-grid,
    .bottom-grid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .video-topbar-widget {
        flex: 1 0 100%;
        min-height: 42px;
        padding: 7px 9px 7px 12px;
        font-size: 12px;
    }

    .topbar .pill {
        display: none;
    }

    .topbar-icon {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }

    .topbar-icon svg {
        width: 20px;
        height: 20px;
    }

    .topbar-icon span {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        right: -3px;
        top: -3px;
    }

    .notification-dropdown {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 74px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 96px);
        border-radius: 20px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .notification-dropdown-head,
    .notification-item,
    .notification-empty {
        padding-left: 16px;
        padding-right: 16px;
    }

    .notification-dropdown-head {
        padding-top: 16px;
        padding-bottom: 12px;
    }

    .notification-dropdown-head strong {
        font-size: 16px;
    }

    .notification-dropdown-head em {
        font-size: 12px;
    }

    .notification-list {
        max-height: none;
    }

    .notification-item {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .notification-item strong,
    .notification-empty strong {
        font-size: 15px;
        line-height: 1.35;
    }

    .notification-item p,
    .notification-empty p,
    .bonus-dropdown-link {
        font-size: 14px;
        line-height: 1.55;
    }

    .topbar-notification,
    .topbar-inline-dropdown {
        position: static;
    }

    .messenger-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .messenger-button {
        width: 100%;
        justify-content: center;
        min-width: 0;
    }

    .bonus-dropdown-body,
    .messenger-dropdown-body {
        gap: 12px;
    }

    .header-profile {
        min-height: 42px;
        padding: 5px 10px 5px 5px;
        border-radius: 18px;
        flex: 0 0 auto;
        width: auto;
        max-width: calc(100vw - 180px);
        margin-left: auto;
        justify-content: flex-start;
        overflow: hidden;
    }

    .header-profile span:nth-child(2) {
        min-width: 0;
    }

    .header-profile strong {
        font-size: 13px;
        line-height: 1.1;
    }

    .header-profile em {
        display: none;
    }

    .header-profile svg {
        display: none;
    }

    .main>.card,
    .admin-card {
        margin-left: 16px;
        margin-right: 16px;
    }

    .setup-card {
        margin-left: 16px;
        margin-right: 16px;
    }

    .setup-panel {
        padding: 22px;
        border-radius: 22px;
    }

    .setup-panel__copy h3 {
        font-size: 23px;
    }

    .setup-card__intro p,
    .setup-panel__copy p {
        font-size: 15px;
    }

    .dashboard-packages-block > .card {
        margin-left: 16px;
        margin-right: 16px;
    }

    .package-trial-feature .trial-feature-button {
        align-self: stretch;
        min-width: 0;
        width: 100%;
        padding: 14px 22px;
        white-space: normal;
    }

    .active-lessons-card,
    .package-summary-card {
        width: 100%;
    }

    .lead-mobile-hide {
        display: none !important;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .teacher-card-wide {
        margin-left: 16px;
        margin-right: 16px;
    }

    .package-card-showcase .package-card-top {
        min-height: 214px;
        padding: 24px 18px 88px;
    }

    .package-card-showcase {
        --wave-y: -20px;
        --wave-width: 150%;
        --wave-height: 92px;
        --soft-wave-y: 26px;
        --soft-wave-width: 146%;
        --soft-wave-height: 82px;
    }

    .package-card-showcase.package-card-tier-2,
    .package-card-showcase.package-card-tier-3,
    .package-card-showcase.package-card-tier-4 {
        --wave-y: -22px;
        --wave-width: 150%;
        --wave-height: 92px;
        --soft-wave-y: 26px;
        --soft-wave-width: 146%;
        --soft-wave-height: 82px;
    }

    .package-grid,
    .package-grid-active {
        grid-template-columns: 1fr;
    }

    .package-card-showcase .package-card-top h2 {
        font-size: 24px;
    }

    .package-top-rate strong {
        font-size: 38px;
    }

    .package-card-showcase .package-card-body {
        padding: 22px 18px 18px;
        gap: 14px;
    }

    .package-card-showcase .package-lesson-price strong,
    .package-card-showcase .package-total-price strong {
        font-size: 30px;
    }

    .calendar-surface {
        padding: 16px;
    }

    .calendar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-actions {
        justify-content: space-between;
    }

    .calendar-weekday {
        min-height: 52px;
        font-size: 13px;
    }

    .calendar-day {
        min-height: 112px;
        padding: 10px 8px;
    }

    .calendar-sidebar-card {
        padding: 20px;
    }

    .package-card-showcase p {
        min-height: 0;
    }

    .teacher-customer-table {
        min-width: 100%;
        border-spacing: 0 10px;
    }

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

    .teacher-customer-table thead {
        display: none;
    }

    .teacher-customer-table tbody tr {
        margin-bottom: 12px;
        box-shadow: none;
    }

    .teacher-customer-table tbody td {
        border-left: 1px solid rgba(236, 236, 244, 0.9);
        border-right: 1px solid rgba(236, 236, 244, 0.9);
        border-top: 0;
        border-bottom: 0;
        padding: 12px 14px;
    }

    .teacher-customer-table tbody td:first-child {
        border-top-left-radius: 18px;
        border-top-right-radius: 18px;
        padding-top: 16px;
    }

    .teacher-customer-table tbody td:last-child {
        border-bottom-left-radius: 18px;
        border-bottom-right-radius: 18px;
        padding-bottom: 16px;
    }

    .teacher-customer-name {
        width: 100%;
    }

    .teacher-customer-arrow {
        display: none;
    }

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

    .page-head h1 {
        font-size: 28px;
    }

    .teacher-badge,
    .trial-price {
        width: 100%;
        flex-basis: auto;
    }

    .details-list div,
    .lesson-row,
    .agenda-item,
    .teacher-lesson-item,
    .teacher-calendar-day {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        overflow-x: auto;
    }
}
