@font-face {
    font-family: 'Dana';
    src: url('../fonts/dana-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../fonts/dana-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* متغیرهای رنگ از config/theme.php تزریق می‌شوند */
:root {
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Dana', system-ui, sans-serif;
    color: var(--text-body);
    background: var(--bg-page);
}

.font-heading {
    font-family: 'Dana', system-ui, sans-serif;
    font-weight: 700;
    color: var(--text-heading);
}

.text-brand { color: var(--brand-primary); }
.bg-brand-soft { background: var(--bg-soft); }

/* ── Header ── */
.top-promo-bar {
    position: relative;
    background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand-primary) 50%, var(--brand-hover) 100%);
    color: #fff;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease;
    max-height: 5rem;
}

.top-promo-bar.is-hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.top-promo-inner {
    position: relative;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0.625rem 2.5rem 0.875rem 1rem;
}

.top-promo-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 12px;
    color: var(--bg-page);
}

.top-promo-wave-path {
    opacity: 0.9;
}

.top-promo-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.top-promo-messages {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    min-width: 0;
}

.top-promo-item {
    font-size: 0.8125rem;
    font-weight: 500;
    opacity: 0.95;
    text-align: center;
}

.top-promo-item--link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s;
}

.top-promo-item--link:hover {
    opacity: 1;
}

.top-promo-item strong {
    font-weight: 700;
}

.top-promo-dot {
    opacity: 0.6;
    font-size: 0.625rem;
}

.top-promo-cta {
    flex-shrink: 0;
    padding: 0.3125rem 0.875rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    transition: background 0.2s;
}

.top-promo-cta:hover {
    background: rgba(255, 255, 255, 0.32);
}

.top-promo-close {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 9999px;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
    font-size: 0.875rem;
}

.top-promo-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

@media (max-width: 639px) {
    .top-promo-inner {
        padding: 0.5rem 2.25rem 0.75rem 0.75rem;
    }
    .top-promo-item {
        font-size: 0.75rem;
    }
}

.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
}

.site-header__brand-name {
    font-size: 1.0625rem;
    line-height: 1.2;
    color: var(--text-heading);
}

@media (min-width: 640px) {
    .site-header__brand-name {
        font-size: 1.25rem;
    }
}

.mobile-search-panel {
    display: none;
}

.mobile-search-panel.is-open {
    display: block;
}

#mobileSearchToggle.is-active {
    background: var(--bg-soft);
    color: var(--brand-primary);
}

.header-link {
    color: var(--text-body);
    transition: color 0.2s, background 0.2s;
}
.header-link:hover {
    color: var(--brand-primary);
}

.header-icon-btn {
    color: var(--text-muted);
    transition: background 0.2s, color 0.2s;
}
.header-icon-btn:hover {
    background: var(--bg-soft);
    color: var(--brand-primary);
}

.search-field {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    color: var(--text-heading);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-field::placeholder {
    color: var(--text-light);
}
.search-field:focus {
    outline: none;
    border-color: var(--brand-mid);
    box-shadow: 0 0 0 3px var(--brand-ring);
    background: var(--bg-surface);
}

.search-btn {
    background: var(--brand-bg);
    color: var(--brand-primary);
    transition: background 0.2s;
}
.search-btn:hover {
    background: var(--brand-soft);
}

/* —— Live site search —— */
.site-search__field {
    position: relative;
}

.site-search__dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    z-index: 60;
    max-height: min(70vh, 22rem);
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card);
}

.site-search__dropdown[hidden] {
    display: none !important;
}

.site-search__dropdown--mobile {
    position: static;
    margin-top: 0.5rem;
    max-height: min(50vh, 18rem);
}

.site-search__loading,
.site-search__empty {
    margin: 0;
    padding: 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.site-search__loading .bi {
    display: inline-block;
    animation: site-search-spin 0.8s linear infinite;
    margin-left: 0.35rem;
}

@keyframes site-search-spin {
    to { transform: rotate(360deg); }
}

.site-search__section {
    padding: 0.35rem 0;
}

.site-search__section + .site-search__section {
    border-top: 1px solid var(--border-light);
}

.site-search__section-title {
    margin: 0;
    padding: 0.4rem 0.75rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
}

.site-search__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-search__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.site-search__item:hover,
.site-search__item:focus-visible {
    background: var(--bg-soft);
    color: var(--brand-primary);
}

.site-search__item--category .bi {
    color: var(--brand-primary);
    font-size: 1rem;
}

.site-search__thumb {
    width: 2.75rem;
    height: 2rem;
    border-radius: 0.35rem;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-muted);
}

.site-search__thumb--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.site-search__item-body {
    min-width: 0;
    flex: 1;
}

.site-search__item-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-heading);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-search__item-meta {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-search-panel.is-open {
    position: relative;
    z-index: 45;
}

.btn-outline-soft {
    border: 1px solid var(--border-soft);
    color: var(--text-heading);
    background: var(--bg-surface);
    transition: background 0.2s, border-color 0.2s;
}
.btn-outline-soft:hover {
    background: var(--bg-soft);
    border-color: var(--brand-mid);
    color: var(--brand-primary);
}

.btn-primary-soft {
    background: var(--brand-bg);
    color: var(--brand-primary);
    transition: background 0.2s;
}
.btn-primary-soft:hover {
    background: var(--brand-soft);
}

.btn-cta {
    background: var(--brand-bg);
    color: var(--brand-dark);
    border: 1px solid var(--brand-soft);
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-cta:hover {
    background: var(--brand-soft);
    box-shadow: var(--shadow-card);
}

.categories-dropdown {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
}

.dropdown-item {
    color: var(--text-body);
    transition: background 0.2s, color 0.2s;
}
.dropdown-item:hover {
    background: var(--bg-tint);
    color: var(--brand-primary);
}

/* ── Cards & surfaces ── */
.surface-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
}
.surface-card:hover {
    box-shadow: var(--shadow-card);
}

.section-soft-brand {
    background: linear-gradient(135deg, var(--bg-tint) 0%, var(--bg-warm) 100%);
}

.section-soft-gray {
    background: var(--bg-soft);
}

.section-soft-hero {
    background: linear-gradient(to left, var(--bg-hero), var(--bg-surface));
}

/* ── Footer ── */
.site-footer {
    background: var(--bg-muted);
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
}
.site-footer h4 {
    color: var(--text-heading);
}
.site-footer a:hover {
    color: var(--brand-primary);
}

.site-footer__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.25rem;
}

.site-footer__trust img {
    max-height: 4.5rem;
    width: auto;
    height: auto;
}

.site-footer__trust iframe {
    max-width: 100%;
    border: 0;
}

.site-footer__trust--preview {
    padding: 0.75rem;
    background: var(--bg-soft);
    border: 1px dashed var(--border-light);
    border-radius: 0.75rem;
}

@media (max-width: 767px) {
    .site-footer__trust {
        gap: 0.75rem;
    }

    .site-footer__trust img {
        max-height: 3.5rem;
    }
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s;
    position: absolute;
    inset: 0;
}
.hero-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.hero-nav-btn {
    position: absolute;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    box-shadow: var(--shadow-soft);
    transition: background 0.2s, color 0.2s;
}
.hero-nav-btn:hover {
    background: var(--bg-surface);
    color: var(--brand-primary);
}
.hero-nav-btn--prev {
    right: 0.5rem;
}
.hero-nav-btn--next {
    left: 0.5rem;
}

.hero-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
}

.hero-slide-card__title {
    margin: 0 0 0.35rem;
}

.hero-slide-card__subtitle {
    margin: 0 0 0.65rem;
    line-height: 1.45;
}

.hero-slide-card__cta {
    display: inline-block;
    text-decoration: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.hero-section__track {
    touch-action: pan-y;
}

.hero-section__track {
    min-height: 320px;
}

@media (min-width: 768px) {
    .hero-section__track {
        min-height: 400px;
    }

    .hero-slide-inner {
        min-height: 400px;
    }

    .hero-slide-img {
        max-height: 360px;
        width: auto;
        max-width: 100%;
        border-radius: 1rem;
        aspect-ratio: auto;
    }

    .hero-slide-card {
        margin-top: 0;
    }
}

@media (max-width: 767px) {
    .hero-section__track {
        min-height: 0;
    }

    .hero-slide-inner {
        min-height: 0;
    }

    .hero-slide-visual {
        width: 100%;
        position: relative;
    }

    .hero-slide-img {
        display: block;
        width: 100%;
        max-height: 10rem;
        aspect-ratio: 16 / 9;
        border-radius: 0.75rem 0.75rem 0 0;
    }

    .hero-nav-btn {
        top: 5rem;
        transform: translateY(-50%);
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }

    .hero-nav-btn--prev {
        right: 0.625rem;
    }

    .hero-nav-btn--next {
        left: 0.625rem;
    }

    .hero-slide-card {
        margin-top: -0.5rem;
        padding: 0.625rem 0.75rem 0.75rem;
        border-radius: 0.75rem;
        position: relative;
        z-index: 2;
    }

    .hero-slide-card__title {
        font-size: 0.9375rem;
        font-weight: 700;
        line-height: 1.35;
        margin-bottom: 0.25rem;
    }

    .hero-slide-card__subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .hero-slide-card__cta {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        border-radius: 0.5rem;
        line-height: 1.2;
    }
}

@media (min-width: 768px) {
    .hero-nav-btn {
        top: 50%;
        transform: translateY(-50%);
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
    }

    .hero-nav-btn--prev {
        right: 1rem;
        left: auto;
    }

    .hero-nav-btn--next {
        left: 1rem;
        right: auto;
    }

    .hero-slide-card {
        padding: 2rem;
    }

    .hero-slide-card__title {
        font-size: 1.875rem;
        margin-bottom: 0.75rem;
    }

    .hero-slide-card__subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-slide-card__cta {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

.skill-tab {
    position: relative;
    white-space: nowrap;
    color: var(--text-muted);
    font-weight: 400;
    transition: color 0.2s;
}
.skill-tab:hover {
    color: var(--text-heading);
}
.skill-tab.active {
    color: var(--brand-primary);
    font-weight: 700;
}
.skill-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--brand-mid);
    border-radius: 2px;
}

.skill-panel {
    overflow: visible;
}

.offcanvas-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    background: rgba(90, 82, 72, 0.22);
}
.offcanvas-overlay.open {
    opacity: 1;
    visibility: visible;
}
.offcanvas-panel {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-surface);
    border-left: 1px solid var(--border-light);
}
.offcanvas-panel.open {
    transform: translateX(0);
}

.offcanvas-link {
    color: var(--text-body);
    transition: background 0.2s, color 0.2s;
}
.offcanvas-link:hover {
    background: var(--bg-tint);
    color: var(--brand-primary);
}

.course-card {
    transition: transform 0.2s;
}
.course-card:hover {
    transform: translateY(-2px);
}
.course-card h3 {
    color: var(--text-heading);
}

.course-thumb {
    border: 1px solid var(--border-light);
}

.badge-bestseller {
    background: #d1ece9;
    color: #1e6058;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    line-height: 1.3;
}

/* ── Trending Course Cards (Udemy-style + hover popover) ── */
.trending-courses-grid {
    overflow: visible;
    align-items: stretch;
}

.trending-course-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
}

.trending-course-wrap:hover,
.trending-course-wrap:focus-within {
    z-index: 30;
}

.trending-course-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.trending-course-wrap.is-open .trending-course-card {
    box-shadow: var(--shadow-card);
    outline: 2px solid var(--brand-soft);
    outline-offset: 1px;
}

.trending-course-wrap:hover .trending-course-card {
    box-shadow: var(--shadow-card);
}

.trending-course-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

.trending-course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.trending-course-wrap:hover .trending-course-thumb img {
    transform: scale(1.03);
}

.trending-course-body {
    padding: 0.625rem 0.75rem 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.trending-course-title {
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--text-heading);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
    min-height: calc(0.875rem * 1.35 * 2);
}

.trending-course-instructor {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-course-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.375rem;
    margin-bottom: 0.375rem;
    min-height: 1.375rem;
}

.trending-course-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.trending-course-popover {
    display: none;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
}

.trending-popover-close {
    display: none;
}

.trending-popover-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    padding-left: 2rem;
}

.trending-popover-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.trending-popover-updated {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #3d7a52;
}

.trending-popover-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.625rem;
}

.trending-popover-desc {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--text-body);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-popover-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    max-height: 5.5rem;
    overflow: hidden;
}

.trending-popover-features-more {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0 !important;
    padding-right: 1.375rem;
}

.trending-popover-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-body);
    margin-bottom: 0.375rem;
}

.trending-popover-features li i {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.trending-popover-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trending-popover-enter {
    display: block;
    width: 100%;
    padding: 0.6875rem 1rem;
    background: var(--brand-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    text-align: center;
    border-radius: 0.375rem;
    transition: background 0.2s;
}

.trending-popover-enter:hover {
    background: var(--brand-dark);
}

.trending-popover-cart {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--bg-surface);
    color: var(--text-heading);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.875rem;
    border: 1px solid var(--border-soft);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.trending-popover-cart:hover {
    background: var(--bg-soft);
    border-color: var(--brand-mid);
}

/* Mobile: 2-col cards + bottom sheet popover */
@media (max-width: 1023px) {
    .trending-course-body {
        padding: 0.5rem 0.5rem 0.625rem;
    }

    .trending-course-title {
        font-size: 0.75rem;
        margin-bottom: 0.125rem;
        min-height: calc(0.75rem * 1.35 * 2);
    }

    .trending-course-instructor {
        font-size: 0.6875rem;
        margin-bottom: 0.25rem;
    }

    .trending-course-rating {
        gap: 0.125rem 0.25rem;
        margin-bottom: 0.25rem;
        min-height: 1.25rem;
    }

    .trending-course-rating .badge-bestseller {
        font-size: 0.625rem;
        padding: 0.0625rem 0.25rem;
    }

    .trending-course-reviews {
        display: none;
    }

    .trending-course-price {
        font-size: 0.8125rem;
        gap: 0.25rem;
    }

    .trending-course-old-price {
        display: none;
    }

    .trending-course-popover {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: min(88vh, 640px);
        overflow-y: auto;
        z-index: 60;
        border-radius: 1.25rem 1.25rem 0 0;
        padding: 1.25rem 1.25rem calc(1rem + var(--safe-bottom));
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15);
        transform: translateY(105%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }

    .trending-course-wrap.is-open {
        z-index: 61;
    }

    .trending-course-wrap.is-open .trending-course-popover {
        transform: translateY(0);
        pointer-events: auto;
    }

    .trending-popover-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 1rem;
        left: 1rem;
        width: 2rem;
        height: 2rem;
        border: none;
        background: var(--bg-soft);
        color: var(--text-muted);
        border-radius: 9999px;
        cursor: pointer;
    }

    .trending-popover-title {
        padding-left: 2.25rem;
        font-size: 1.0625rem;
    }

    .course-popover-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(90, 82, 72, 0.4);
        z-index: 55;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        backdrop-filter: blur(2px);
    }

    .course-popover-backdrop.open {
        opacity: 1;
        visibility: visible;
    }
}

@media (hover: hover) and (min-width: 1024px) {
    .course-popover-backdrop {
        display: none;
    }

    .trending-course-popover {
        display: block;
        position: absolute;
        top: 0;
        right: calc(100% + 14px);
        width: 22rem;
        max-height: min(22rem, 72vh);
        overflow-y: auto;
        border-radius: 0.5rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        padding: 1.25rem 1.25rem 1rem;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(8px);
        transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
        scrollbar-width: thin;
    }

    .trending-popover-title {
        padding-left: 0;
    }

    .trending-popover-close {
        display: none;
    }

    .trending-course-popover::before,
    .trending-course-popover::after {
        content: '';
        position: absolute;
        top: 1.75rem;
        border: 9px solid transparent;
    }

    /* Beak pointing toward card */
    .trending-course-wrap:not(.trending-course-wrap--flip) .trending-course-popover::before {
        left: 100%;
        border-left-color: var(--border-light);
    }
    .trending-course-wrap:not(.trending-course-wrap--flip) .trending-course-popover::after {
        left: calc(100% - 1px);
        border-left-color: var(--bg-surface);
    }

    /* Flip popover for left-side cards (avoid overflow) */
    .trending-course-wrap--flip .trending-course-popover {
        right: auto;
        left: calc(100% + 14px);
        transform: translateX(-8px);
    }
    .trending-course-wrap--flip .trending-course-popover::before {
        right: 100%;
        left: auto;
        border-right-color: var(--border-light);
        border-left-color: transparent;
    }
    .trending-course-wrap--flip .trending-course-popover::after {
        right: calc(100% - 1px);
        left: auto;
        border-right-color: var(--bg-surface);
        border-left-color: transparent;
    }

    .trending-course-wrap:hover .trending-course-popover,
    .trending-course-wrap:focus-within .trending-course-popover {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }
}

.partner-logo {
    filter: grayscale(100%);
    opacity: 0.45;
    color: var(--text-light);
    transition: opacity 0.2s;
}
.partner-logo:hover {
    opacity: 0.75;
}

@media (max-width: 767px) {
    .mobile-app-shell {
        max-width: 100%;
        margin: 0 auto;
        min-height: 100dvh;
        padding-bottom: calc(4.5rem + var(--safe-bottom));
    }
    .mobile-bottom-nav {
        padding-bottom: var(--safe-bottom);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-light);
    }
}

.categories-wrap:hover .categories-dropdown,
.categories-wrap:focus-within .categories-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.categories-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
}

.star-filled { color: var(--star); }
.star-empty { color: #e5e7eb; }

.rating-num { color: var(--star); }

.avatar-soft {
    background: var(--brand-bg);
    color: var(--brand-primary);
}

.quote-icon { color: var(--brand-mid); }

.link-brand {
    color: var(--brand-primary);
    transition: color 0.2s;
}
.link-brand:hover {
    color: var(--brand-hover);
}

.cert-badge {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-heading);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.cert-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
    border-color: var(--brand-mid);
}

.cert-icon-wrap {
    background: var(--bg-tint);
}

.career-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(90, 82, 72, 0.4) 0%, transparent 65%);
    z-index: 1;
}

.bottom-nav-active { color: var(--brand-primary); }
.bottom-nav-item { color: var(--text-muted); transition: color 0.2s; }
.bottom-nav-item:hover { color: var(--text-heading); }

.promo-check { color: var(--brand-primary); }

/* ── Teacher register CTA (home + sidebar) ── */
.home-teach-cta {
    background: linear-gradient(
        to left,
        var(--bg-tint-deep, #feead4) 0%,
        var(--brand-bg, #fff4e8) 45%,
        var(--bg-tint-deep, #feead4) 100%
    );
    border-block: 1px solid var(--brand-mid, #fac775);
    border-inline-start: 4px solid var(--brand-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.home-teach-cta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    padding: 0.4rem 0;
    min-height: 2.5rem;
}

.home-teach-cta__text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
    margin: 0;
    min-width: 0;
    flex: 1;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--text-body);
}

.home-teach-cta__icon {
    flex-shrink: 0;
    font-size: 0.9375rem;
    color: var(--brand-primary);
}

.home-teach-cta__label {
    font-weight: 700;
    color: var(--brand-primary);
    white-space: nowrap;
}

.home-teach-cta__sep {
    color: var(--brand-mid, #fac775);
    font-weight: 700;
}

.home-teach-cta__desc {
    color: var(--text-body);
}

.home-teach-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    white-space: nowrap;
    border: 0;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(244, 140, 23, 0.25);
}

.header-teach-register:hover {
    background: var(--bg-soft);
    color: var(--brand-primary);
}

.offcanvas-teach-register {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: calc(100% - 2rem);
    margin: 0.5rem 1rem 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: var(--brand-primary);
    border: 0;
    border-radius: 0.75rem;
    cursor: pointer;
    text-align: right;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: background 0.2s, transform 0.15s;
}

.offcanvas-teach-register:hover {
    background: var(--brand-hover, var(--brand-primary));
}

.offcanvas-teach-register:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .home-teach-cta__inner {
        padding: 0.45rem 0;
        flex-wrap: nowrap;
    }

    .home-teach-cta__text {
        font-size: 0.8125rem;
        flex-wrap: nowrap;
    }

    .home-teach-cta__btn {
        padding: 0.4rem 1rem;
        font-size: 0.8125rem;
    }
}

.promo-check { color: var(--brand-primary); }

.home-pathway__badge {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-primary);
    background: var(--bg-soft);
    border-radius: 999px;
}

.home-pathway__courses {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.home-pathway__course {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light, #e8ecf0);
    border-radius: 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.home-pathway__course:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.home-pathway__step {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--brand-primary);
    border-radius: 50%;
}

.home-pathway__course-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-heading);
    text-decoration: none;
}

.home-pathway__course-title:hover {
    color: var(--brand-primary);
}

.home-pathway__course-meta {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.home-pathway__cert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-body);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.75rem;
    border: 1px dashed var(--brand-primary);
}

.home-pathway__cert .bi-award {
    color: var(--brand-primary);
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.home-pathway__visual {
    position: sticky;
    top: 5rem;
}

.home-pathway__featured {
    display: block;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.home-pathway__featured-img,
.home-pathway__banner-img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 1rem;
}

.home-pathway__featured-cap {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #fff;
}

.home-pathway__featured-label {
    display: block;
    font-size: 0.7rem;
    opacity: 0.85;
    margin-bottom: 0.25rem;
}

.home-pathway__featured-cap strong {
    font-size: 1rem;
    font-weight: 700;
}

.home-pathway__title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.home-pathway__subtitle {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.home-pathway__btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

@media (max-width: 767px) {
    .home-pathway__inner {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .home-pathway__grid {
        gap: 0.75rem;
    }

    .home-pathway__badge {
        margin-bottom: 0.375rem;
        padding: 0.2rem 0.55rem;
        font-size: 0.625rem;
    }

    .home-pathway__title {
        font-size: 1.0625rem;
        margin-bottom: 0.375rem;
        line-height: 1.35;
    }

    .home-pathway__subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.625rem;
        line-height: 1.45;
    }

    .home-pathway__courses {
        gap: 0.375rem;
        margin-bottom: 0.625rem;
    }

    .home-pathway__course {
        gap: 0.5rem;
        padding: 0.45rem 0.55rem;
        border-radius: 0.625rem;
    }

    .home-pathway__step {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.6875rem;
    }

    .home-pathway__course-title {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .home-pathway__course-meta {
        font-size: 0.6875rem;
        margin-top: 0.1rem;
    }

    .home-pathway__cert {
        padding: 0.5rem 0.625rem;
        font-size: 0.6875rem;
        line-height: 1.45;
        gap: 0.375rem;
        border-radius: 0.5rem;
    }

    .home-pathway__cert .bi-award {
        font-size: 0.875rem;
    }

    .home-pathway__bullets {
        margin-bottom: 0.625rem !important;
        gap: 0.375rem;
    }

    .home-pathway__bullets li {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .home-pathway__actions {
        margin-top: 0.625rem !important;
        gap: 0.375rem;
    }

    .home-pathway__btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.6875rem;
        border-radius: 0.5rem;
    }

    .home-pathway__visual {
        position: static;
        top: auto;
    }

    .home-pathway__featured {
        border-radius: 0.625rem;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }

    .home-pathway__featured-img,
    .home-pathway__banner-img {
        max-height: 9rem;
        border-radius: 0.625rem;
    }

    .home-pathway__featured-cap {
        padding: 0.45rem 0.625rem;
    }

    .home-pathway__featured-label {
        font-size: 0.5625rem;
        margin-bottom: 0.125rem;
    }

    .home-pathway__featured-cap strong {
        font-size: 0.75rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.testimonial-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
}
.testimonial-card:hover {
    border-color: var(--brand-soft);
    box-shadow: var(--shadow-card);
}

/* ── Testimonials Swiper ── */
.testimonials-swiper-wrap {
    position: relative;
    padding-bottom: 0.5rem;
}

.testimonials-swiper {
    overflow: hidden;
    padding: 0.25rem 0.125rem 1rem;
}

.testimonials-swiper .swiper-slide {
    height: auto;
}

.testimonials-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.testimonials-nav-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid var(--border-soft);
    background: var(--bg-surface);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.testimonials-nav-btn:hover {
    background: var(--brand-bg);
    border-color: var(--brand-mid);
    color: var(--brand-primary);
}

.testimonials-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-width: 4rem;
}

.testimonials-pagination .swiper-pagination-bullet {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--border-soft);
    opacity: 1;
    margin: 0 !important;
    transition: width 0.25s, background 0.25s;
}

.testimonials-pagination .swiper-pagination-bullet-active {
    width: 1.5rem;
    border-radius: 9999px;
    background: var(--brand-primary);
}

.feature-icon-brand {
    background: var(--brand-bg);
    color: var(--brand-primary);
}
.feature-icon-warm {
    background: var(--bg-tint);
    color: var(--brand-hover);
}
.feature-icon-accent {
    background: var(--bg-warm);
    color: var(--brand-light);
}

/* ── Category Showcase (Udemy-style) ── */
.category-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}

.category-card {
    flex: 0 0 calc(100% - 2rem);
    max-width: 280px;
    scroll-snap-align: start;
    border-radius: 1.5rem;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s, box-shadow 0.25s;
}
@media (min-width: 640px) {
    .category-card {
        flex: 0 0 calc(50% - 0.5rem);
    }
}
@media (min-width: 1024px) {
    .category-card {
        flex: 0 0 calc(33.333% - 0.667rem);
        max-width: none;
    }
}

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

.category-card-visual {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
}

.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
    transition: transform 0.4s;
}

.category-card:hover .category-card-img {
    transform: scale(1.04);
}

.category-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    color: var(--text-heading);
}

.category-card-arrow {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.category-card:hover .category-card-arrow {
    background: var(--brand-bg);
    border-color: var(--brand-soft);
    color: var(--brand-primary);
}

.category-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.category-nav-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid var(--border-soft);
    background: var(--bg-surface);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.category-nav-btn:hover:not(:disabled) {
    background: var(--brand-bg);
    border-color: var(--brand-mid);
    color: var(--brand-primary);
}

.category-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.category-dots {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.category-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: var(--border-soft);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.25s, background 0.25s;
}

.category-dot.active {
    width: 1.5rem;
    background: var(--brand-primary);
}

/* ── Category pages ── */
.category-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.category-breadcrumb a {
    color: var(--brand-primary);
    transition: color 0.2s;
}
.category-breadcrumb a:hover {
    color: var(--brand-dark);
}

.category-hero {
    display: grid;
    gap: 1.25rem;
    align-items: start;
}
@media (min-width: 768px) {
    .category-hero {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 1.75rem;
    }
}
.category-hero__visual {
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-hero__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-hero__desc {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text-muted);
}

.category-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.category-subcard {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    border-radius: 0.875rem;
    overflow: hidden;
    background: var(--bg-surface);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.category-subcard:hover {
    border-color: var(--brand-soft);
    box-shadow: var(--shadow-card);
}
.category-subcard__visual {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.category-subcard__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-subcard__body {
    padding: 0.875rem 1rem 1rem;
}

.category-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.category-course-card {
    border: 1px solid var(--border-light);
    border-radius: 0.875rem;
    overflow: hidden;
    background: var(--bg-surface);
    transition: box-shadow 0.2s;
}
.category-course-card:hover {
    box-shadow: var(--shadow-card);
}
.category-course-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.category-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    border: 1px dashed var(--border-light);
    border-radius: 1rem;
    color: var(--text-muted);
}
.category-empty p {
    margin-bottom: 1rem;
}

.categories-index-grid {
    display: grid;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .categories-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.categories-index-card {
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-surface);
}
.categories-index-card__main {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
}
.categories-index-card__visual {
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 1;
}
.categories-index-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.categories-index-subs {
    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.categories-index-subs a {
    font-size: 0.8125rem;
    color: var(--brand-primary);
    font-weight: 600;
}

.categories-dropdown--mega {
    padding: 1rem 1.25rem 0.75rem;
    max-height: min(70vh, 420px);
    overflow-y: auto;
}
.categories-mega-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
}
.categories-mega-parent {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
}
.categories-mega-parent:hover {
    color: var(--brand-primary);
}
.categories-mega-subs {
    list-style: none;
    margin: 0;
    padding: 0;
}
.categories-mega-subs a {
    display: block;
    font-size: 0.8125rem;
    padding: 0.2rem 0;
    color: var(--text-muted);
}
.categories-mega-subs a:hover {
    color: var(--brand-primary);
}
.categories-mega-all {
    display: block;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--brand-primary);
}

a.course-tag {
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
a.course-tag:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

/* ── Course detail page ── */
.course-page {
    background: var(--bg-page);
}

.course-back-link {
    color: var(--text-heading);
    transition: color 0.2s;
}

.course-back-link:hover {
    color: var(--brand-primary);
}

.course-hero-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .course-hero-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: 2rem;
        align-items: start;
    }
}

.course-hero-media {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    ring: 1px solid var(--border-light);
}

.course-hero-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.course-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

.course-video-player__video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #0f172a;
}

.course-video-player--watermark {
    overflow: hidden;
}

.course-video-player__watermark {
    position: absolute;
    z-index: 2;
    padding: 0.2rem 0.55rem;
    border-radius: 0.35rem;
    font-size: clamp(0.75rem, 2.2vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
    transition: left 1.8s ease-in-out, top 1.8s ease-in-out, opacity 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.course-video-player__watermark--fullscreen {
    position: fixed;
    z-index: 2147483646;
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    transition: left 1.8s ease-in-out, top 1.8s ease-in-out;
}

.course-video-player:fullscreen .course-video-player__watermark,
.course-video-player:-webkit-full-screen .course-video-player__watermark {
    font-size: clamp(0.95rem, 2.8vw, 1.25rem);
}

.course-hero-media--video .course-video-player {
    border-radius: inherit;
}

.course-hero-media--video .course-video-player__video {
    object-fit: cover;
}

.course-hero-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.course-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    color: var(--text-heading);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.course-share-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.course-share-btn--compact span {
    display: inline;
}

.course-share-picker {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    text-align: right;
}

.course-share-picker__hint {
    margin: 0 0 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.course-share-picker__btn {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    color: var(--text-heading);
    text-align: right;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.course-share-picker__btn:hover {
    border-color: var(--brand-primary);
    background: color-mix(in srgb, var(--brand-primary) 6%, var(--bg-surface));
}

.course-share-picker__btn i {
    font-size: 1.25rem;
    color: var(--brand-primary);
    margin-top: 0.1rem;
}

.course-share-picker__btn span {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.course-share-picker__btn strong {
    font-size: 0.875rem;
}

.course-share-picker__btn small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.course-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    background: var(--brand-bg);
    color: var(--brand-dark);
}

.course-instructor-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.course-meta-list li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.course-meta-list i {
    color: var(--brand-primary);
}

.course-price-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
}

.course-buy-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    background: var(--brand-primary);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.course-buy-btn:hover {
    background: var(--brand-dark);
}

.course-buy-btn--pulse {
    animation: course-buy-pulse 0.6s ease 2;
}

@keyframes course-buy-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

.course-learn-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    font-size: 0.875rem;
}

.course-learn-list i {
    color: var(--brand-primary);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ——— Course syllabus ——— */
.course-syllabus__sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.course-syllabus__section {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    overflow: hidden;
}

.course-syllabus__section-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    background: var(--bg-tint, #f8fafc);
    border-bottom: 1px solid var(--border-light);
}

.course-syllabus__section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    font-size: 0.75rem;
    border-radius: 0.35rem;
    background: var(--brand-primary);
    color: #fff;
}

.course-syllabus__section-count {
    margin-right: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted, #64748b);
}

.course-syllabus__lessons {
    list-style: none;
    margin: 0;
    padding: 0;
}

.course-syllabus__lesson + .course-syllabus__lesson {
    border-top: 1px solid var(--border-light);
}

.course-syllabus__lesson-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.course-syllabus__lesson.is-open .course-syllabus__lesson-link:hover {
    background: var(--brand-bg, #f0f7ff);
}

.course-syllabus__lesson.is-locked .course-syllabus__lesson-link {
    cursor: not-allowed;
    opacity: 0.72;
}

.course-syllabus__lesson-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
}

.course-syllabus__lesson.is-locked .course-syllabus__lesson-icon {
    background: #f1f5f9;
    color: #94a3b8;
}

.course-syllabus__lesson.is-open .course-syllabus__lesson-icon {
    background: var(--brand-bg, #eff6ff);
    color: var(--brand-primary);
}

.course-syllabus__lesson.is-free.is-open .course-syllabus__lesson-icon {
    background: #ecfdf5;
    color: #059669;
}

.course-syllabus__lesson-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
}

.course-syllabus__lesson-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.course-syllabus__lesson-duration {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

.course-syllabus__badge {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
}

.course-syllabus__badge--free {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* ——— Lesson player page ——— */
.course-lesson-main {
    color: var(--text-body, #334155);
}

.course-lesson-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 1.25rem;
}

.course-lesson-breadcrumb a {
    color: var(--brand-primary);
    text-decoration: none;
}

.course-lesson-breadcrumb a:hover {
    text-decoration: underline;
}

.course-lesson-breadcrumb__sep {
    opacity: 0.45;
}

.course-lesson-header {
    margin-bottom: 1.5rem;
}

.course-lesson-section {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.35rem;
}

.course-lesson-title {
    font-size: 1.5rem;
    line-height: 1.35;
    color: var(--text-heading, #0f172a);
    margin-bottom: 0.5rem;
}

.course-lesson-duration {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.75rem;
}

.course-lesson-player {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card, 0 4px 24px rgba(90, 82, 72, 0.06));
}

.course-lesson-player__inner {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(160deg, var(--bg-tint, #f0f7ff) 0%, var(--bg-surface, #fff) 55%);
    color: var(--text-muted, #64748b);
    font-size: 0.875rem;
}

.course-lesson-player__inner i {
    font-size: 3.5rem;
    color: var(--brand-primary);
    opacity: 0.35;
}

.course-lesson-player .course-video-player {
    aspect-ratio: 16 / 9;
}

.course-lesson-player__inner--poster {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.course-lesson-player__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.course-lesson-player__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    text-align: center;
    padding: 1rem;
}

.course-lesson-player__placeholder i {
    font-size: 3rem;
    color: #fff;
    opacity: 0.9;
}

.course-lesson-player__placeholder p {
    margin: 0;
    font-size: 0.875rem;
}

.course-lesson-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
}

.course-lesson-back:hover {
    text-decoration: underline;
}

.course-related-card {
    display: block;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.course-related-card:hover {
    border-color: var(--brand-soft);
    box-shadow: var(--shadow-card);
}

.course-related-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.course-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem calc(0.875rem + var(--safe-bottom));
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 20px rgba(90, 82, 72, 0.08);
}

/* ── Instructor card (course page) ── */
.instructor-card {
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
}

.instructor-card-inner {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--brand-bg) 100%);
    border: 1px solid var(--border-light);
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-card);
}

.instructor-card-head {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.instructor-card-profile-link {
    text-decoration: none;
    color: inherit;
    border-radius: 0.75rem;
    margin: -0.35rem;
    padding: 0.35rem;
    transition: background 0.2s;
}

.instructor-card-profile-link:hover {
    background: rgba(255, 255, 255, 0.55);
}

.instructor-card-profile-link:hover .instructor-card-name {
    color: var(--brand-primary);
}

.instructor-card-avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1rem;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: var(--shadow-soft);
}

.instructor-card-avatar--letter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.instructor-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.instructor-card-name {
    font-family: inherit;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-heading);
    margin: 0.15rem 0;
}

.instructor-card-headline {
    font-size: 0.875rem;
    color: var(--text-body);
    margin: 0;
}

.instructor-card-resume {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-body);
}

.instructor-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.instructor-card-tags span {
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    color: var(--brand-dark);
}

.instructor-card-courses {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-soft);
}

.instructor-card-courses-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.instructor-card-courses ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.instructor-card-courses a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    transition: background 0.2s;
}

.instructor-card-courses a:hover {
    background: #fff;
}

.instructor-card-courses img {
    width: 3rem;
    height: 2rem;
    object-fit: cover;
    border-radius: 0.35rem;
}

.instructor-card-courses span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-heading);
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.instructor-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: auto;
    margin-top: 1rem;
    padding: 0.4375rem 0.875rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--brand-primary);
    background: var(--bg-surface);
    border: 1px solid var(--brand-mid);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.instructor-card-cta:hover {
    background: var(--brand-soft);
    border-color: var(--brand-primary);
    color: var(--brand-dark);
}

/* ── Course comments ── */
.course-comments {
    margin-top: 1.5rem;
    padding-top: 0;
    border-top: none;
}

.course-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.course-comments-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.comment-form {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.comment-form-row {
    margin-bottom: 1rem;
}

.comment-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-heading);
}

.comment-form-input,
.comment-form-textarea {
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    font-family: inherit;
    font-size: 0.875rem;
    background: var(--bg-page);
}

.comment-form-textarea {
    resize: vertical;
    min-height: 5rem;
}

.comment-rating-pick {
    display: flex;
    gap: 0.25rem;
}

.comment-star-btn {
    border: none;
    background: none;
    padding: 0.15rem;
    cursor: pointer;
    color: var(--border-soft);
    font-size: 1.25rem;
}

.comment-star-btn.is-active,
.comment-star-btn:hover {
    color: var(--star);
}

.comment-form-submit {
    padding: 0.65rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    background: var(--brand-primary);
    border: none;
    cursor: pointer;
}

.comment-form-msg {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.comment-form-msg.is-success {
    color: #15803d;
}

.comment-form-msg.is-error {
    color: #b91c1c;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}

.comment-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-heading);
}

.comment-body {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-body);
    margin: 0;
}

.comment-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    background: var(--bg-soft);
    border-radius: 1rem;
}

/* ── Teacher profile page ── */
.teacher-profile-hero {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(145deg, var(--bg-surface), var(--brand-bg));
    border: 1px solid var(--border-light);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
    .teacher-profile-hero {
        grid-template-columns: auto 1fr;
        padding: 2rem;
    }
}

.teacher-profile-avatar-wrap {
    width: 7rem;
    height: 7rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .teacher-profile-avatar-wrap {
        width: 10rem;
        height: 10rem;
    }
}

.teacher-profile-avatar-wrap .teacher-profile-avatar-wrap-inner.user-avatar {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    --avatar-size: 100%;
    border-radius: 1.25rem;
    border: 4px solid #fff;
    box-shadow: var(--shadow-card);
}

.teacher-profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.teacher-profile-avatar--letter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.teacher-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-dark);
    background: var(--badge-bg);
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    margin-bottom: 0.5rem;
}

.teacher-profile-headline {
    font-size: 1rem;
    color: var(--text-body);
    margin-bottom: 0.5rem;
}

.teacher-profile-stat {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.teacher-resume-block {
    margin-top: 2rem;
}

.teacher-resume-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.5rem;
    line-height: 1.8;
    font-size: 0.9375rem;
    color: var(--text-body);
}

/* ── Stories (Instagram-style) ── */
.stories-bar-section {
    padding: 0.75rem 0 0.25rem;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border-light);
}

.stories-bar-wrap {
    overflow: hidden;
}

.stories-bar {
    display: flex;
    gap: 0.85rem;
    padding: 0.25rem 0 0.75rem;
    overflow-x: auto;
}

.stories-ring {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 4.5rem;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.stories-ring__circle {
    position: relative;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-light), var(--brand-dark));
}

.stories-ring--seen .stories-ring__circle {
    background: var(--border-soft);
}

.stories-ring__preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid var(--bg-page);
    background: var(--bg-muted);
}

.stories-ring__preview--empty {
    display: block;
    background: var(--bg-muted);
}

.stories-ring__profile {
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    padding: 2px;
    background: var(--bg-page);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.stories-ring__profile-img,
.stories-ring__profile-letter {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.stories-ring__profile-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 0.625rem;
}

.stories-ring__name {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-body);
    max-width: 4.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #000;
    display: none;
    flex-direction: column;
}

.story-viewer.is-open {
    display: flex;
}

.story-viewer__chrome {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 0.75rem 0.75rem 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
}

.story-viewer__progress {
    display: flex;
    gap: 4px;
    margin-bottom: 0.65rem;
}

.story-viewer__progress-seg {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    overflow: hidden;
}

.story-viewer__progress-fill {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
    border-radius: 2px;
}

.story-viewer__progress-fill.is-done {
    width: 100%;
}

.story-viewer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.story-viewer__publisher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

.story-viewer__publisher-avatar,
.story-viewer__publisher-avatar--letter {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.65);
    flex-shrink: 0;
    display: block;
}

.story-viewer__publisher-avatar--letter {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
}

.story-viewer__publisher-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
}

.story-viewer__publisher-time {
    display: block;
    font-size: 0.6875rem;
    opacity: 0.85;
}

.story-viewer__header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    flex-shrink: 0;
}

.story-viewer__views {
    font-size: 0.75rem;
    opacity: 0.9;
}

.story-viewer__close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer__stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3.5rem 0.75rem 1.5rem;
    min-height: 0;
}

.story-viewer__frame {
    position: relative;
    width: min(100%, 400px);
    aspect-ratio: 9 / 16;
    max-height: calc(100vh - 5rem);
    height: auto;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #111;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.story-viewer__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.story-nav {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: background 0.2s, opacity 0.2s;
    z-index: 4;
}

.story-nav:hover:not(.is-disabled) {
    background: rgba(255, 255, 255, 0.38);
}

.story-nav.is-disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 480px) {
    .story-nav {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.1rem;
    }

    .story-viewer__stage {
        gap: 0.35rem;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .story-viewer__frame {
        width: min(calc(100vw - 5.5rem), 400px);
    }
}

.story-viewer__caption {
    position: absolute;
    bottom: 4.5rem;
    left: 0.75rem;
    right: 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    text-align: center;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
    z-index: 2;
    pointer-events: none;
}

.story-viewer__link-btn {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 1.15rem;
    background: #fff;
    color: var(--text-heading);
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.8125rem;
    text-decoration: none;
    z-index: 6;
}

.story-viewer__link-btn.hidden {
    display: none;
}

.story-viewer__eitaa-hint {
    position: absolute;
    bottom: 3.75rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: 18rem;
    margin: 0;
    padding: 0.45rem 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 0.5rem;
    z-index: 6;
}

.story-viewer__eitaa-hint.hidden {
    display: none;
}

.story-viewer__eitaa-hint .bi {
    margin-left: 0.25rem;
}

.tp-story-link-eitaa-note {
    line-height: 1.5;
}

.tp-story-link-eitaa-note.hidden {
    display: none;
}

/* ——— Auth modal ——— */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.auth-modal.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.auth-modal__panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 1.5rem 1.25rem 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
}

@media (min-width: 480px) {
    .auth-modal {
        align-items: center;
        padding: 1rem;
    }
    .auth-modal__panel {
        border-radius: 1.25rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

.auth-modal.is-open .auth-modal__panel {
    transform: translateY(0);
}

body.auth-modal-open {
    overflow: hidden;
}

.auth-modal__close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: var(--bg-soft, #f1f5f9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal__brand {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
}

.auth-modal__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.75rem 0 0.25rem;
}

.auth-modal__subtitle {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
}

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-heading);
}

.auth-input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--brand, #2563eb);
    box-shadow: 0 0 0 3px var(--brand-soft, rgba(37, 99, 235, 0.15));
}

.auth-input--code {
    letter-spacing: 0.35em;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
}

.auth-btn {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.auth-btn--primary {
    background: var(--brand, #2563eb);
    color: #fff;
}

.auth-btn--secondary {
    background: var(--bg-surface);
    color: var(--text-heading);
    border: 1px solid var(--border-light);
}

.auth-btn--ghost {
    background: transparent;
    color: #64748b;
    margin-top: 0.5rem;
}

.auth-link {
    background: none;
    border: none;
    color: var(--brand, #2563eb);
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0;
}

.auth-link:disabled {
    color: #94a3b8;
    cursor: default;
}

.auth-message {
    font-size: 0.8125rem;
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: #ecfdf5;
    color: #047857;
}

.auth-message--error {
    background: #fef2f2;
    color: #b91c1c;
}

.auth-hint {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.auth-step.hidden {
    display: none;
}

/* Bottom nav profile */
/* آواتار کاربر — fallback آیکونی */
.user-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--avatar-size, 40px);
    height: var(--avatar-size, 40px);
    flex-shrink: 0;
    border-radius: 0.65rem;
    overflow: hidden;
    background: linear-gradient(145deg, #eef2f7 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
}

.user-avatar--xs { border-radius: 50%; }
.user-avatar--sm { border-radius: 50%; }
.user-avatar--md { border-radius: 50%; }
.user-avatar--lg { border-radius: 50%; }
.user-avatar--xl { border-radius: 50%; }
.user-avatar--2xl { border-radius: 0.75rem; }

.user-avatar__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.user-avatar__icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #94a3b8;
    font-size: calc(var(--avatar-size, 40px) * 0.55);
    line-height: 1;
}

.user-avatar.is-fallback .user-avatar__icon {
    display: flex;
}

.user-avatar.is-fallback .user-avatar__img {
    display: none !important;
}

.bottom-nav-profile .user-avatar.bottom-nav-active,
.bottom-nav-profile.bottom-nav-active .user-avatar {
    border-color: var(--brand-primary, var(--brand, #2563eb));
}

.bottom-nav-profile .user-avatar {
    border-width: 2px;
}

.bottom-nav-avatar.user-avatar__img {
    position: absolute;
}

.teach-photo-preview.user-avatar__img {
    position: absolute;
}

.account-sidebar__avatar-wrap.user-avatar {
    border-radius: 50%;
}

.bottom-nav-auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
}

.bottom-nav-active .bottom-nav-auth-icon,
.nav-auth-item.bottom-nav-active .bottom-nav-auth-icon {
    color: var(--brand-primary, var(--brand, #2563eb));
}

.nav-auth-item {
    transition: color 0.2s;
    font-family: inherit;
}

.nav-auth-item:hover {
    color: var(--text-heading);
}

.nav-auth-item:hover .bottom-nav-auth-icon {
    color: var(--text-heading);
}

.nav-auth-item.bottom-nav-active:hover {
    color: var(--brand-primary, var(--brand, #2563eb));
}

.nav-auth-item.bottom-nav-active:hover .bottom-nav-auth-icon {
    color: var(--brand-primary, var(--brand, #2563eb));
}

/* ——— Account panel ——— */
.page-account .site-header {
    position: sticky;
}

.account-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 5.5rem;
    min-height: calc(100vh - 72px);
    position: relative;
}

@media (min-width: 768px) {
    .account-layout {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem 1.5rem 3rem;
    }
}

.account-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: calc(100% + 2rem);
    margin: 0 -1rem 0.75rem;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 12;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.account-nav-toggle__label {
    flex: 1;
    text-align: right;
}

.account-nav-toggle__chev {
    font-size: 0.9rem;
    color: #64748b;
    transition: transform 0.2s;
}

.page-account.account-nav-open .account-nav-toggle__chev {
    transform: rotate(180deg);
}

@media (min-width: 768px) {
    .account-nav-toggle {
        display: none;
    }
}

.account-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.25s;
}

.page-account.account-nav-open .account-drawer-backdrop {
    display: block;
    opacity: 1;
}

@media (min-width: 768px) {
    .account-drawer-backdrop {
        display: none !important;
    }
}

.account-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    width: min(300px, 88vw);
    height: 100%;
    max-height: 100dvh;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    padding: 0;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s;
    overflow: hidden;
}

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

.page-account.account-nav-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .account-sidebar {
        position: sticky;
        top: 5.5rem;
        width: 260px;
        height: auto;
        max-height: none;
        flex-shrink: 0;
        border: 1px solid #e2e8f0;
        border-radius: 1rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        padding: 1rem;
        transform: none;
        visibility: visible;
        order: -1;
    }

    .account-sidebar.is-open {
        transform: none;
    }
}

.account-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.account-sidebar__head-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 800;
}

.account-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.5rem;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
}

@media (min-width: 768px) {
    .account-sidebar__head {
        display: none;
    }
}

.account-sidebar__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .account-sidebar__user {
        padding: 0 0 1rem;
        margin-bottom: 0.5rem;
    }
}

.instructor-card-avatar-wrap.user-avatar {
    border-radius: 50%;
}

.stories-ring__profile .user-avatar {
    width: 100%;
    height: 100%;
    --avatar-size: 100%;
    border: none;
    border-radius: 50%;
    background: #e2e8f0;
}

.account-sidebar__name {
    font-weight: 700;
    font-size: 0.9375rem;
    margin: 0;
}

.account-sidebar__phone {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.15rem 0 0;
}

.account-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .account-sidebar__nav {
        padding: 0;
        overflow: visible;
        flex: none;
    }
}

.account-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

@media (min-width: 768px) {
    .account-sidebar__link {
        font-size: 0.875rem;
        padding: 0.65rem 0.85rem;
    }
}

.account-sidebar__link:hover {
    background: var(--brand-soft, #eff6ff);
    color: var(--brand, #2563eb);
}

.account-sidebar__link.is-active {
    background: var(--brand-soft, #eff6ff);
    color: var(--brand, #2563eb);
}

.account-sidebar__link--logout {
    margin-top: 0.5rem;
    color: #b91c1c;
}

@media (min-width: 768px) {
    .account-sidebar__link--logout {
        border-top: 1px solid #f1f5f9;
        padding-top: 1rem;
        margin-top: 0.75rem;
    }
}

.account-main {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding-top: 0.75rem;
}

@media (min-width: 768px) {
    .account-main {
        padding-top: 0;
    }
}

.account-main__head {
    margin-bottom: 1.25rem;
}

.account-main__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.account-main__title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .account-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.account-stat-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
}

.account-stat-card__icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft, #eff6ff);
    color: var(--brand, #2563eb);
    border-radius: 0.5rem;
    font-size: 1.1rem;
}

.account-stat-card__value {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.2;
}

.account-stat-card__label {
    font-size: 0.7rem;
    color: #64748b;
    margin: 0.15rem 0 0;
}

.account-progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.account-progress-bar span {
    display: block;
    height: 100%;
    background: var(--brand, #2563eb);
    border-radius: 4px;
}

.account-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1.25rem;
}

.account-card__title {
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.account-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.account-empty p {
    margin: 1rem 0;
}

.account-course-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .account-course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.account-course-card {
    display: flex;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    overflow: hidden;
    padding: 0.75rem;
}

.account-course-card__thumb {
    width: 100px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.account-course-card__thumb img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.account-course-card__body h3 {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.account-course-card__body a {
    color: inherit;
    text-decoration: none;
}

.account-form__row {
    margin-bottom: 1rem;
}

.account-form__row label,
.account-form__label-block {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.account-input,
.account-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    font-size: 0.875rem;
}

.account-textarea {
    resize: vertical;
}

.account-profile-preview {
    margin-bottom: 1.25rem;
}

.account-wallet-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--brand, #2563eb), #1d4ed8);
    color: #fff;
    border-radius: 1rem;
}

.account-wallet-banner__amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0 0;
}

.account-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
}

.account-table {
    width: 100%;
    font-size: 0.8125rem;
    border-collapse: collapse;
}

.account-table th,
.account-table td {
    padding: 0.75rem 1rem;
    text-align: right;
    border-bottom: 1px solid #f1f5f9;
}

.account-table th {
    font-weight: 700;
    background: #f8fafc;
}

.account-ticket-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-ticket-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1rem;
}

.account-ticket-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.account-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #475569;
}

.account-badge--open {
    background: #fef3c7;
    color: #b45309;
}

.account-badge--answered {
    background: #dbeafe;
    color: #1d4ed8;
}

.account-badge--closed {
    background: #f1f5f9;
    color: #64748b;
}

/* ——— Support chat (Telegram-like) ——— */
.support-chat {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 1rem;
    height: min(72vh, 640px);
    max-height: min(72vh, 640px);
    min-height: 420px;
}

.support-chat__list-panel,
.support-chat__main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.support-chat__list-head {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.support-chat__list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.support-chat__list-empty {
    padding: 1.25rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

.support-chat__list-item {
    display: block;
    width: 100%;
    text-align: right;
    padding: 0.75rem 0.85rem;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    cursor: pointer;
    transition: background 0.12s;
}

.support-chat__list-item:hover,
.support-chat__list-item.is-active {
    background: #eff6ff;
}

.support-chat__list-subject {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    color: #0f172a;
}

.support-chat__list-user {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.support-chat__list-preview {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-chat__list-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.support-chat__list-foot time {
    font-size: 0.7rem;
    color: #94a3b8;
}

.support-chat__main {
    position: relative;
    background: #f8fafc;
}

.support-chat__empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #94a3b8;
    padding: 2rem;
}

.support-chat__empty i {
    font-size: 2.5rem;
}

.support-chat__thread {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.support-chat__thread.hidden {
    display: none !important;
}

.support-chat__drawer-backdrop {
    display: none;
}

.support-chat__back-btn {
    display: none;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
}

.support-chat__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.support-chat__header-title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.support-chat__header-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.support-chat__header-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.support-chat__header-actions {
    margin-inline-start: auto;
}

.support-chat__status-select {
    min-width: 10rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
}

.support-chat__messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: linear-gradient(180deg, #e8eef5 0%, #f1f5f9 100%);
}

.support-chat__messages-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.65rem;
    min-height: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

.support-chat__bubble {
    max-width: 85%;
    padding: 0.55rem 0.75rem;
    border-radius: 0.85rem;
    font-size: 0.875rem;
    line-height: 1.45;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.support-chat__bubble--in {
    align-self: flex-start;
    background: #fff;
    border-bottom-right-radius: 0.2rem;
}

.support-chat__bubble--out {
    align-self: flex-end;
    background: #dbeafe;
    border-bottom-left-radius: 0.2rem;
}

.support-chat__bubble-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.support-chat__bubble-text {
    margin: 0;
    word-break: break-word;
}

.support-chat__bubble-time {
    display: block;
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 0.35rem;
    text-align: left;
}

.support-chat__attach-img img {
    max-width: 220px;
    border-radius: 0.5rem;
    margin-top: 0.35rem;
    display: block;
}

.support-chat__attach-file {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #2563eb;
    text-decoration: none;
}

.support-chat__composer {
    padding: 0.65rem 0.75rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.support-chat__composer.is-disabled {
    opacity: 0.65;
    pointer-events: none;
}

.support-chat__composer-form {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
}

.support-chat__attach-btn,
.support-chat__send-btn {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f1f5f9;
    color: #475569;
}

.support-chat__send-btn {
    background: #2563eb;
    color: #fff;
}

.support-chat__input {
    flex: 1;
    resize: none;
    min-height: 2.5rem;
    max-height: 8rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.support-chat__file-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.35rem 0 0;
    min-height: 1rem;
}

.support-chat-new {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.support-chat-new__card {
    width: 100%;
    max-width: 420px;
    padding: 1.25rem;
}

.page-account-support .account-main {
    max-width: none;
}

@media (max-width: 767px) {
    .support-chat {
        grid-template-columns: 1fr;
        min-height: calc(100dvh - 12rem);
    }

    .support-chat__list-panel {
        min-height: calc(100dvh - 12rem);
    }

    .support-chat__main {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 55;
        width: 100%;
        max-width: 100vw;
        height: 100%;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
        box-shadow: -8px 0 32px rgba(15, 23, 42, 0.15);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.28s ease, visibility 0.28s;
    }

    .support-chat--thread-open .support-chat__main {
        transform: translateX(0);
        visibility: visible;
    }

    .support-chat__drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 54;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s, visibility 0.25s;
    }

    .support-chat--thread-open .support-chat__drawer-backdrop {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    body.support-chat-open {
        overflow: hidden;
    }

    .support-chat__back-btn {
        display: inline-flex;
    }

    .support-chat__empty {
        display: none;
    }
}

@media (min-width: 768px) {
    .support-chat--has-thread .support-chat__empty {
        display: none;
    }
}

.page-support-admin .support-chat {
    height: calc(100dvh - 10.5rem);
    max-height: calc(100dvh - 10.5rem);
    min-height: 420px;
}

@media (max-width: 767px) {
    .page-support-admin .support-chat {
        height: calc(100dvh - 8rem);
        max-height: calc(100dvh - 8rem);
    }

    .support-chat--thread-open .support-chat__messages {
        flex: 1;
        min-height: 0;
    }
}

/* ——— Teacher course builder (account) ——— */
.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;
}

.tc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-surface) 100%);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
}

/* ——— Teacher panel: public profile + sub-navigation ——— */
.tp-panel-head {
    margin-bottom: 0.75rem;
}

.tp-public-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--brand-primary, #2563eb);
    text-decoration: none;
    background: var(--brand-soft, #eff6ff);
    border: 1px solid rgba(37, 99, 235, 0.18);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tp-public-profile-btn:hover {
    background: #dbeafe;
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
}

.tp-public-profile-btn__ext {
    font-size: 0.75rem;
    opacity: 0.75;
    margin-inline-start: auto;
}

.tp-subnav {
    margin-bottom: 1rem;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 0.75rem;
    background: var(--bg-surface, #fff);
    overflow: hidden;
}

.tp-subnav__scroll {
    display: flex;
    gap: 0.35rem;
    padding: 0.4rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tp-subnav__scroll::-webkit-scrollbar {
    display: none;
}

.tp-subnav__link {
    flex: 1 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.55rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.tp-subnav__link:hover {
    background: #f1f5f9;
    color: var(--text-primary, #0f172a);
}

.tp-subnav__link.is-active {
    background: var(--brand-soft, #eff6ff);
    color: var(--brand-primary, #2563eb);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

@media (min-width: 768px) {
    .tp-subnav__link {
        flex: 1;
    }
}

.tp-profile__avatar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.tp-profile__upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: 0.55rem;
    border: 1px solid var(--border-light);
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--brand-primary);
    cursor: pointer;
}

.tp-profile__slug-wrap {
    display: flex;
    align-items: stretch;
    gap: 0;
    direction: ltr;
    position: relative;
}

.tp-profile__slug-wrap .account-input {
    padding-inline-end: 2.5rem;
}

.tp-slug-status {
    position: absolute;
    inset-inline-end: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    pointer-events: none;
    font-size: 1.15rem;
    line-height: 1;
}

.tp-slug-status--ok {
    color: #2563eb;
}

.tp-slug-status--bad {
    color: #dc2626;
}

.tp-slug-status--wait {
    color: #94a3b8;
}

.tp-slug-status--wait .bi {
    animation: tp-slug-spin 0.7s linear infinite;
}

@keyframes tp-slug-spin {
    to {
        transform: rotate(360deg);
    }
}

.tp-profile__slug-wrap .account-input[readonly] {
    background: #f8fafc;
    color: #475569;
    cursor: not-allowed;
}

.tp-profile__slug-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.65rem;
    background: #f1f5f9;
    border: 1px solid var(--border-light);
    border-left: none;
    border-radius: 0.5rem 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.tp-profile__slug-wrap > .account-input {
    border-radius: 0 0.5rem 0.5rem 0;
}

.tp-profile__public-link {
    display: inline-block;
    margin-top: 0.35rem;
    color: var(--brand-primary);
}

.tp-story-upload__zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 140px;
    padding: 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    background: #f8fafc;
    cursor: pointer;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #64748b;
}

.tp-story-upload__zone i {
    font-size: 1.75rem;
    opacity: 0.5;
}

.tp-story-upload__hint {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.8;
}

.tp-story-size-guide {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.tp-story-size-guide__icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.55rem;
    background: #fff;
    color: var(--brand-primary, #2563eb);
    font-size: 1.25rem;
}

.tp-story-size-guide__title {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
}

.tp-story-size-guide__list {
    margin: 0;
    padding: 0 1rem 0 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.55;
}

.tp-story-size-guide__list li {
    margin-bottom: 0.2rem;
}

.tp-story-ready-hint {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #15803d;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tp-story-ready-hint.hidden {
    display: none;
}

.tp-story-crop-modal .teach-crop-modal__panel {
    max-width: 360px;
}

.tc-crop-wrap--story {
    max-width: 260px;
    margin: 0 auto;
    max-height: min(58vh, 520px);
    aspect-ratio: 9 / 16;
    background: #0f172a;
}

.tp-avatar-crop-modal .teach-crop-modal__panel {
    max-width: 400px;
}

.tc-crop-wrap--avatar {
    max-width: 300px;
    margin: 0 auto;
    max-height: min(50vh, 320px);
    aspect-ratio: 1;
    background: #0f172a;
}

.tp-story-crop-frame-hint {
    text-align: center;
    margin-bottom: 0.5rem;
}

.tp-story-crop-frame-hint__label {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--brand-primary, #2563eb);
    font-size: 0.7rem;
    font-weight: 800;
}

.tp-story-video-modal__preview {
    max-width: 220px;
    margin: 0 auto;
    aspect-ratio: 9 / 16;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #0f172a;
}

.tp-story-video-modal__preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tp-story-upload__preview {
    max-width: 200px;
    margin: 0.75rem auto 0;
    aspect-ratio: 9 / 16;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #0f172a;
}

.tp-story-upload__preview img,
.tp-story-upload__preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tp-story-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.tp-story-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem;
    border: 1px solid var(--border-light);
    border-radius: 0.65rem;
    background: #fafbfc;
}

.tp-story-item__thumb {
    position: relative;
    width: 56px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 0.45rem;
    overflow: hidden;
    background: #0f172a;
}

.tp-story-item__thumb img,
.tp-story-item__thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tp-story-item__badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1.25rem;
}

.tp-story-item__body {
    flex: 1;
    min-width: 0;
}

.tp-story-item__caption {
    font-size: 0.8125rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.tp-story-item__meta {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    margin: 0;
}

.tp-story-item__time {
    font-size: 0.65rem;
    color: #94a3b8;
}

.account-empty--compact {
    padding: 1.5rem 1rem;
}

.tc-course-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tc-course-card {
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.9rem;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tc-course-card__top {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.tc-course-card__thumb {
    width: 88px;
    height: 56px;
    object-fit: cover;
    border-radius: 0.55rem;
    flex-shrink: 0;
    background: #e2e8f0;
}

.tc-course-card__head {
    flex: 1;
    min-width: 0;
}

.tc-course-card__title {
    font-size: 0.9375rem;
    font-weight: 800;
    line-height: 1.45;
    margin: 0 0 0.35rem;
}

.tc-course-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-right: auto;
}

.tc-course-card__accordion {
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 0.65rem;
    background: #f8fafc;
    overflow: hidden;
}

.tc-course-card__accordion-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s;
}

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

.tc-course-card__accordion-summary::marker {
    content: '';
}

.tc-course-card__accordion-summary:hover {
    background: #f1f5f9;
}

.tc-course-card__accordion-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    flex-shrink: 0;
}

.tc-course-card__accordion-hint {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.tc-course-card__accordion-chevron {
    flex-shrink: 0;
    font-size: 0.9rem;
    color: #64748b;
    transition: transform 0.2s ease;
}

.tc-course-card__accordion[open] .tc-course-card__accordion-chevron {
    transform: rotate(180deg);
}

.tc-course-card__accordion[open] .tc-course-card__accordion-summary {
    border-bottom: 1px solid var(--border-light, #e2e8f0);
    background: #fff;
}

.tc-course-card__accordion-body {
    padding: 0.75rem;
    background: #fff;
}

.tc-course-card__accordion-body .tc-course-card__note {
    margin-top: 0.65rem;
}

.tc-course-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 1rem;
    margin: 0;
    padding: 0;
    border-top: none;
}

@media (min-width: 640px) {
    .tc-course-card__meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.tc-course-card__meta-item {
    margin: 0;
    min-width: 0;
}

.tc-course-card__meta-item--wide {
    grid-column: 1 / -1;
}

@media (min-width: 640px) {
    .tc-course-card__meta-item--wide {
        grid-column: span 2;
    }
}

.tc-course-card__meta-item dt {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    margin: 0 0 0.15rem;
}

.tc-course-card__meta-item dd {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    line-height: 1.4;
}

.tc-course-card__note {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    margin: 0;
    padding: 0.55rem 0.7rem;
    border-radius: 0.55rem;
    background: #f8fafc;
}

.tc-course-card__note--danger {
    color: #b91c1c;
    background: #fef2f2;
}

.tc-course-card__note--info {
    color: #b45309;
    background: #fffbeb;
}

.tc-pending-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.55;
}

.tc-pending-banner i {
    flex-shrink: 0;
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.tc-status {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    margin-top: 0.25rem;
}

.tc-status--draft { background: #f1f5f9; color: #475569; }
.tc-status--pending_review { background: #fef3c7; color: #b45309; }
.tc-status--published { background: #dcfce7; color: #15803d; }
.tc-status--rejected { background: #fee2e2; color: #b91c1c; }

.tc-builder__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tc-builder__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--brand-primary);
    text-decoration: none;
}

.tc-builder__back:hover {
    opacity: 0.85;
}

.tc-rejection-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tc-field-hint--block {
    display: block;
    margin: 0.2rem 0 0.65rem;
}

.tc-category-box {
    margin-top: 0.4rem;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tc-category-box__search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.tc-category-box__search i {
    color: #94a3b8;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.tc-category-search {
    flex: 1;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.45rem 0.65rem;
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--text-primary, #0f172a);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tc-category-search::placeholder {
    color: #94a3b8;
}

.tc-category-search:focus {
    outline: none;
    border-color: var(--brand-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tc-category-list {
    max-height: 13.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    direction: rtl;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.tc-category-list::-webkit-scrollbar {
    width: 6px;
}

.tc-category-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.tc-category-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.6rem;
    border: 1px solid #e8edf3;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    user-select: none;
}

.tc-category-item:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.tc-category-item.is-selected {
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.tc-category-item.is-hidden-by-search {
    display: none;
}

.tc-category-item:has(.tc-category-check:disabled) {
    opacity: 0.55;
    cursor: not-allowed;
}

.tc-category-item__check {
    position: relative;
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
}

.tc-category-check {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.tc-category-item__box {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.3rem;
    background: #fff;
    box-sizing: border-box;
    pointer-events: none;
    transition: border-color 0.18s, background 0.18s;
}

.tc-category-item.is-selected .tc-category-item__box,
.tc-category-item:has(.tc-category-check:checked) .tc-category-item__box {
    border-color: var(--brand-primary, #2563eb);
    background: var(--brand-primary, #2563eb);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2L6.4 11.1L12.5 5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.7rem;
}

.tc-category-item__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    text-align: right;
}

.tc-category-item__title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    line-height: 1.4;
}

.tc-category-item__parent {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.3;
}

.tc-category-box__empty {
    margin: 0;
    padding: 0.85rem 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
}

.tc-category-box__foot {
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    border-top: 1px solid var(--border-light, #e2e8f0);
    background: #f8fafc;
    text-align: right;
}

.tc-save-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 0.65rem 0.9rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.tc-autosave-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: min(18rem, calc(100vw - 2rem));
    padding: 0.55rem 0.95rem;
    border-radius: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
    background: #334155;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.tc-autosave-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tc-autosave-toast--saving {
    background: #475569;
}

.tc-autosave-toast--success {
    background: #15803d;
}

.tc-autosave-toast--error {
    background: #b91c1c;
}

.tc-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ——— Course builder wizard ——— */
.tc-wizard__nav {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.35rem 0 1rem;
    margin-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tc-wizard-step-btn {
    flex: 1 0 auto;
    min-width: 5.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    background: var(--bg-surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tc-wizard-step-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tc-wizard-step-btn__num {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    background: var(--bg-soft);
    color: var(--text-muted);
}

.tc-wizard-step-btn__label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .tc-wizard-step-btn__label {
        font-size: 0.75rem;
    }
}

.tc-wizard-step-btn.is-active {
    border-color: var(--brand-primary);
    background: var(--brand-soft, #eff6ff);
}

.tc-wizard-step-btn.is-active .tc-wizard-step-btn__num {
    background: var(--brand-primary);
    color: #fff;
}

.tc-wizard-step-btn.is-active .tc-wizard-step-btn__label {
    color: var(--brand-primary);
}

.tc-wizard-step-btn.is-done:not(.is-active) .tc-wizard-step-btn__num {
    background: #dcfce7;
    color: #15803d;
}

.tc-wizard__body {
    min-height: 200px;
}

.tc-wizard-pane {
    display: none;
    animation: tc-wizard-in 0.25s ease;
}

.tc-wizard-pane.is-active {
    display: block;
}

@keyframes tc-wizard-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tc-wizard__foot {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 1rem 0 0;
    border-top: 1px solid var(--border-light);
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: linear-gradient(180deg, transparent 0%, var(--bg-page, #fff) 20%);
}

.tc-wizard__foot-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.tc-wizard__foot #tcWizardPrev {
    justify-self: start;
}

.tc-wizard__foot #tcWizardNext,
.tc-wizard__foot #tcSubmitReview {
    justify-self: end;
}

@media (max-width: 639px) {
    .tc-wizard__foot {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    .tc-wizard__foot-mid {
        grid-column: 1 / -1;
        order: -1;
    }
    .tc-wizard__foot #tcWizardNext,
    .tc-wizard__foot #tcSubmitReview {
        grid-column: 2;
    }
}

.tc-publish-summary {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tc-publish-summary li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-soft);
    border-radius: 0.65rem;
    font-size: 0.875rem;
}

.tc-publish-summary__key {
    color: var(--text-muted);
    font-weight: 600;
}

.tc-publish-summary__val {
    font-weight: 700;
    text-align: left;
}

.tc-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tc-panel__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.tc-panel__head--split {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.tc-panel__head-start {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tc-panel__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--brand-soft, #eff6ff);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tc-panel__title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.15rem;
    font-family: var(--font-heading, inherit);
}

.tc-panel__desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.tc-media-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .tc-media-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.tc-media-card {
    border: 1px solid var(--border-light);
    border-radius: 0.9rem;
    padding: 0.85rem;
    background: var(--bg-soft);
}

.tc-media-card__label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: var(--text-heading, #0f172a);
}

.tc-media-card__badge {
    margin-right: auto;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.tc-media-preview {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #0f172a;
    border: 1px dashed #cbd5e1;
}

.tc-media-preview.is-uploading img,
.tc-media-preview.is-uploading video {
    opacity: 0.35;
}

.tc-media-upload-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
}

.tc-media-upload-overlay.hidden {
    display: none;
}

.tc-media-upload-overlay__box {
    width: min(88%, 200px);
    text-align: center;
}

.tc-media-upload-overlay__spin {
    display: block;
    font-size: 1.5rem;
    margin: 0 auto 0.5rem;
    animation: tc-upload-spin 0.9s linear infinite;
}

@keyframes tc-upload-spin {
    to { transform: rotate(360deg); }
}

.tc-media-upload-overlay .tc-upload-progress__pct {
    display: block;
    font-size: 1.125rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
}

.tc-media-upload-overlay .tc-upload-progress__bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    overflow: hidden;
}

.tc-media-upload-overlay .tc-upload-progress__bar span {
    background: #fff;
}

.tc-media-preview--cover {
    aspect-ratio: 16 / 9;
}

.tc-media-preview--video {
    aspect-ratio: 16 / 9;
}

.tc-media-preview.has-media {
    border-style: solid;
    border-color: var(--border-light);
}

.tc-media-preview img,
.tc-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #0f172a;
}

.tc-media-preview.has-media .tc-media-empty {
    display: none !important;
}

.tc-media-preview.has-media video {
    display: block !important;
    visibility: visible;
    position: relative;
    z-index: 1;
}

.tc-media-preview:not(.has-media) video {
    display: none !important;
}

.tc-media-empty {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
}

.tc-media-empty i {
    font-size: 1.75rem;
    opacity: 0.55;
}

.tc-media-actions {
    margin-top: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.tc-media-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--brand-primary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.tc-media-btn:hover:not(:disabled) {
    background: var(--brand-soft, #eff6ff);
    border-color: var(--brand-primary);
}

.tc-media-btn:disabled,
.tc-media-btn.is-disabled,
.tc-lesson-upload-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.tc-media-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    min-height: 1.1em;
}

.tc-media-status.is-success { color: #15803d; }
.tc-media-status.is-error { color: #b91c1c; }

.tc-form-grid {
    display: grid;
    gap: 0.85rem;
}

.tc-form-grid--2 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .tc-form-grid--2 {
        grid-template-columns: 1fr 1fr;
    }
}

.tc-form-grid__full {
    grid-column: 1 / -1;
}

.tc-field-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tc-add-section-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: 0.65rem;
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--brand-primary);
    cursor: pointer;
}

.tc-add-section-btn:hover:not(:disabled) {
    background: var(--brand-soft, #eff6ff);
}

.tc-crop-modal__panel {
    max-width: 520px;
}

.tc-crop-wrap--wide {
    max-height: 55vh;
}

.tc-price-input {
    direction: rtl;
    text-align: right;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* ——— TinyMCE course description ——— */
.tc-editor-wrap {
    margin-top: 0.5rem;
}

.tc-tinymce-field {
    width: 100%;
    min-height: 220px;
    visibility: hidden;
}

.tc-editor-wrap .tox-tinymce {
    border-radius: 0.75rem !important;
    border-color: var(--border-light) !important;
    margin-top: 0.35rem;
}

.tc-editor-wrap .tox .tox-edit-area__iframe {
    background: var(--bg-surface);
}


.course-description--rich h1,
.course-description--rich h2,
.course-description--rich h3 {
    font-family: var(--font-heading, inherit);
    font-weight: 700;
    margin: 1rem 0 0.5rem;
}

.course-description--rich ul,
.course-description--rich ol {
    margin: 0.5rem 1.25rem 0.75rem 0;
    padding: 0;
}

.course-description--rich a {
    color: var(--brand-primary);
    text-decoration: underline;
}

.course-description--rich blockquote {
    border-right: 3px solid var(--brand-soft);
    padding: 0.5rem 1rem;
    margin: 0.75rem 0;
    color: var(--text-muted);
}

.tc-sections-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tc-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tc-section {
    border: 1px solid var(--border-light);
    border-radius: 0.9rem;
    padding: 1rem 1.05rem;
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-surface) 100%);
}

.tc-section__head,
.tc-lesson__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.tc-section__num,
.tc-drag-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.tc-icon-btn {
    border: none;
    background: var(--bg-surface);
    border-radius: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
}

.tc-icon-btn:hover { color: var(--brand-primary); }
.tc-icon-btn--danger:hover { color: #dc2626; }

.tc-lessons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.tc-lesson {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 0.8rem;
    padding: 0.85rem;
}

.tc-lesson-media {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .tc-lesson-media {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

.tc-lesson-video-preview {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 0.65rem;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid var(--border-light);
}

.tc-lesson-video-preview.is-uploading video {
    opacity: 0.35;
}

.tc-lesson-video-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #0f172a;
}

.tc-lesson-video-preview--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
}

.tc-lesson-video-preview--empty i {
    font-size: 1.5rem;
    opacity: 0.5;
}

.tc-lesson-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.55rem;
    border: 1px dashed var(--border-light);
    background: var(--bg-soft);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-primary);
    cursor: pointer;
}

.tc-lesson-upload-btn:hover {
    border-color: var(--brand-primary);
    background: var(--brand-soft, #eff6ff);
}

.tc-video-status.is-success {
    color: #15803d;
    font-weight: 600;
}

.tc-lesson__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
}

.tc-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tc-lesson-dur-label input {
    width: 6rem;
    margin-right: 0.35rem;
}

.tc-video-upload {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tc-attach-list {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tc-attach-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: 0.65rem;
    background: var(--bg-soft);
    font-size: 0.8125rem;
}

.tc-lesson-quiz {
    background: #f8fafc;
    border: 1px solid #dbe5f1 !important;
    border-radius: 0.75rem;
}

.tc-quiz-builder {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tc-quiz-questions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.tc-quiz-empty {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.tc-quiz-question {
    border: 1px solid var(--border-light);
    border-radius: 0.65rem;
    padding: 0.65rem;
    background: #fff;
}

.tc-quiz-question__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.tc-quiz-question__num {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted);
}

.tc-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.tc-quiz-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
}

.tc-quiz-correct {
    margin: 0;
    font-size: 0.75rem;
    white-space: nowrap;
}

.tc-upload-progress,
.tc-video-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.tc-upload-progress__bar,
.tc-video-progress__bar {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.tc-upload-progress__bar span,
.tc-video-progress__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--brand-primary), #60a5fa);
    transition: width 0.12s ease-out;
}

.tc-upload-progress__pct,
.tc-video-progress__pct {
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--brand-primary);
    min-width: 2.5rem;
    text-align: left;
}

.tc-media-card.is-uploading,
.tc-lesson.is-uploading {
    outline: 2px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}



.tc-admin-preview-img {
    max-width: 280px;
    border-radius: 0.75rem;
}

/* ——— Teach apply ——— */
.teach-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    background: var(--brand-soft, #eff6ff);
    color: var(--brand-primary, #2563eb);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.teach-loading {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.teach-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .teach-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .teach-grid--full {
        grid-column: 1 / -1;
    }
}

.teach-section {
    margin-bottom: 1.25rem;
}

.teach-section .account-card__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.teach-doc-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .teach-doc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.teach-doc-item {
    padding: 0.85rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.65rem;
    background: #f8fafc;
}

.teach-doc-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.teach-doc-link {
    display: block;
    font-size: 0.75rem;
    color: var(--brand-primary, #2563eb);
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.teach-status-card {
    margin-bottom: 1.5rem;
}

.teach-status-inner {
    padding: 1.25rem;
    border-radius: 0.85rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.teach-status--pending { background: #fffbeb; border-color: #fde68a; }
.teach-status--ok { background: #ecfdf5; border-color: #a7f3d0; }
.teach-status--warn { background: #fff7ed; border-color: #fed7aa; }
.teach-status--err { background: #fef2f2; border-color: #fecaca; }

.teach-status-hint {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.875rem;
    line-height: 1.75;
    color: #475569;
    text-align: right;
    white-space: pre-line;
}

.teach-admin-msg {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ——— Cart / Checkout ——— */
.header-cart-badge,
.bottom-nav-cart-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    color: #fff;
    background: var(--brand, #2563eb);
    border-radius: 9999px;
}

.bottom-nav-cart-badge {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.checkout-loading,
.checkout-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 1rem;
    text-align: center;
    color: #64748b;
}

.checkout-layout {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .checkout-content {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 1.5rem;
        align-items: start;
    }
}

.checkout-card {
    background: #fff;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 1rem;
    padding: 1.25rem;
}

.checkout-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.checkout-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkout-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.checkout-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.checkout-item__thumb {
    flex-shrink: 0;
    width: 88px;
    height: 56px;
    border-radius: 0.5rem;
    overflow: hidden;
}

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

.checkout-item__title {
    font-weight: 700;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.25rem;
}

.checkout-item__meta {
    font-size: 0.75rem;
    color: #64748b;
}

.checkout-item__price {
    font-size: 0.8125rem;
    font-weight: 700;
    margin: 0.35rem 0;
}

.checkout-item__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.checkout-item__remove {
    border: none;
    background: none;
    color: #dc2626;
    font-size: 0.75rem;
    cursor: pointer;
}

.checkout-discount-form {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.checkout-discount-form .account-input {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    line-height: 1.4;
    min-height: 2.75rem;
}

.checkout-discount-form .auth-btn {
    width: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.1rem;
    font-size: 0.9375rem;
    white-space: nowrap;
}

.checkout-discount-remove {
    margin-top: 0.5rem;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
}

.checkout-discount-msg.is-ok { color: #059669; font-size: 0.8125rem; margin-top: 0.5rem; }
.checkout-discount-msg.is-err { color: #dc2626; font-size: 0.8125rem; margin-top: 0.5rem; }

.checkout-summary__row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    padding: 0.35rem 0;
}

.checkout-summary__row--total {
    font-weight: 800;
    font-size: 1rem;
    border-top: 1px dashed #e2e8f0;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

.checkout-summary__row--discount span:last-child {
    color: #059669;
}

.checkout-pay-btn {
    justify-content: center;
}

.checkout-msg {
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.5rem;
}

.checkout-flash {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
    font-size: 0.875rem;
}

.checkout-flash--ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.checkout-flash--err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.checkout-flash__link {
    font-weight: 700;
    color: inherit;
}

/* ——— Admin ——— */
.page-admin-login {
    min-height: 100vh;
    background: linear-gradient(160deg, var(--bg-tint, #f0f7ff), #fff);
}

.admin-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.admin-login-card {
    width: 100%;
    max-width: 400px;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 30;
}

.admin-layout {
    display: grid;
    gap: 1rem;
}

@media (min-width: 900px) {
    .admin-layout {
        grid-template-columns: 320px 1fr;
        align-items: start;
    }
}

.admin-list-panel {
    max-height: 70vh;
    overflow-y: auto;
}

.admin-filter-pill {
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
}

.admin-filter-pill.is-active {
    background: var(--brand-primary, #2563eb);
    color: #fff;
}

.admin-app-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-app-list__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
}

.admin-app-list__item.is-active {
    background: var(--brand-soft, #eff6ff);
}

.admin-app-list__item small {
    color: #94a3b8;
    font-size: 0.7rem;
}

.admin-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    background: #f1f5f9;
    width: fit-content;
}

.admin-badge--pending { background: #fef3c7; color: #b45309; }
.admin-badge--approved { background: #d1fae5; color: #047857; }
.admin-badge--rejected_temp { background: #ffedd5; color: #c2410c; }
.admin-badge--rejected_permanent { background: #fee2e2; color: #b91c1c; }

.admin-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.admin-detail-grid {
    display: grid;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .admin-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-resume-box {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.65rem;
    font-size: 0.875rem;
    line-height: 1.7;
    max-height: 200px;
    overflow-y: auto;
}

.admin-docs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-docs-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8125rem;
}

.admin-docs-list a {
    color: var(--brand-primary, #2563eb);
}

.admin-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.admin-btn-warn {
    background: #f59e0b !important;
    color: #fff !important;
}

.admin-btn-danger {
    background: #dc2626 !important;
    color: #fff !important;
}

.admin-review-box .auth-btn {
    width: auto;
    flex: 1;
    min-width: 140px;
}

/* ——— Rules modal (قابل استفاده سراسری) ——— */
.rules-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.rules-modal.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.rules-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.rules-modal__panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.rules-modal__close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    cursor: pointer;
}

.rules-modal__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 1rem;
    padding-top: 0.25rem;
}

.rules-modal__body {
    flex: 1;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.75;
    color: #334155;
    padding: 0 0.25rem;
}

.prose-rules ul {
    margin: 0.5rem 0;
    padding-right: 1.25rem;
}

.prose-rules li {
    margin-bottom: 0.35rem;
}

body.rules-modal-open,
body.teach-wizard-open {
    overflow: hidden;
}

.teach-terms-link {
    color: var(--brand-primary, #2563eb);
    font-weight: 700;
    text-decoration: underline;
}

.teach-terms-check {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.875rem;
    cursor: pointer;
}

.teach-terms-check input {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* ——— Teach wizard modal ——— */
.teach-wizard-modal {
    position: fixed;
    inset: 0;
    z-index: 105;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

@media (min-width: 640px) {
    .teach-wizard-modal {
        align-items: center;
        padding: 1rem;
    }
}

.teach-wizard-modal.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.teach-wizard-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.teach-wizard-modal__panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
}

@media (min-width: 640px) {
    .teach-wizard-modal__panel {
        border-radius: 1.25rem;
        max-height: 88vh;
    }
}

.teach-wizard-modal.is-open .teach-wizard-modal__panel {
    transform: translateY(0);
}

.teach-wizard-modal__head {
    padding: 1rem 1rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.teach-wizard-modal__close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    cursor: pointer;
}

.teach-wizard-modal__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

.teach-wizard-steps {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-bottom: 0.5rem;
}

.teach-wizard-step {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.teach-wizard-step.is-active {
    background: var(--brand-primary, #2563eb);
    color: #fff;
}

.teach-wizard-step.is-done {
    background: #d1fae5;
    color: #047857;
}

.teach-wizard-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.teach-wizard-modal__foot {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #f1f5f9;
}

.teach-wizard-divider {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 1.25rem 0;
}

.teach-grid--wizard {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .teach-grid--wizard {
        grid-template-columns: 1fr 1fr;
    }
    .teach-grid--wizard .teach-grid--full {
        grid-column: 1 / -1;
    }
}

.teach-photo-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.teach-photo-preview-wrap {
    flex-shrink: 0;
}

.teach-photo-preview {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 0.75rem;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
}

.teach-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.teach-summary-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

/* Crop modal */
.teach-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.teach-crop-modal.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.teach-crop-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.teach-crop-modal__panel {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 1rem;
    padding: 1rem;
}

.teach-crop-wrap {
    max-height: 50vh;
    background: #0f172a;
    overflow: hidden;
}

.teach-crop-wrap img {
    max-width: 100%;
    display: block;
}

.teach-wizard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: #64748b;
    font-size: 0.875rem;
}

.teach-wizard-loading .bi {
    font-size: 1.75rem;
    animation: teach-spin 0.8s linear infinite;
}

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

.teach-wizard-status-only {
    padding: 0.5rem 0;
}

/* دکمه‌های در حال پردازش */
.auth-btn.btn-is-loading,
.auth-btn.btn-is-loading:hover {
    opacity: 0.85;
    cursor: wait;
    pointer-events: none;
}

.btn-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: teach-spin 0.65s linear infinite;
    vertical-align: middle;
    margin-left: 0.35rem;
}

.auth-btn.btn-is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.teach-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* تقویم شمسی در ویزارد */
.teach-wizard-modal .datepicker-plot-area {
    z-index: 130;
    font-family: inherit;
}

.teach-wizard-modal .pwt-btn-submit,
.teach-wizard-modal .pwt-btn-today {
    font-family: inherit;
}

/* ——— Access management panel ——— */
.page-access-login {
    min-height: 100vh;
    background: linear-gradient(160deg, var(--bg-tint, #fff4e8), var(--bg-page, #faf9f7));
}

.access-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.access-login-card {
    width: 100%;
    max-width: 420px;
}

.page-access {
    background: var(--bg-page, #faf9f7);
    min-height: 100vh;
}

.access-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1rem;
    background: var(--bg-surface, #fff);
    border-bottom: 1px solid var(--border-light, #eceae6);
    box-shadow: var(--shadow-soft, 0 1px 3px rgba(90, 82, 72, 0.05));
}

.access-topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text-heading, #5a5248);
    min-width: 0;
}

.access-topbar__logo {
    border-radius: 0.65rem;
    object-fit: cover;
    flex-shrink: 0;
}

.access-topbar__title {
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.access-topbar__user {
    flex-shrink: 0;
}

.access-topbar__name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted, #9c9590);
}

.access-layout {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
    min-height: calc(100vh - 56px);
    position: relative;
}

@media (min-width: 768px) {
    .access-layout {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

.access-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: calc(100% + 2rem);
    margin: 0 -1rem 0.75rem;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid var(--border-light, #eceae6);
    background: var(--bg-surface, #fff);
    color: var(--text-heading, #5a5248);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    position: sticky;
    top: 56px;
    z-index: 12;
}

.access-nav-toggle__label {
    flex: 1;
    text-align: right;
}

.access-nav-toggle__chev {
    color: var(--text-muted, #9c9590);
    transition: transform 0.2s;
}

.page-access.access-nav-open .access-nav-toggle__chev {
    transform: rotate(180deg);
}

@media (min-width: 768px) {
    .access-nav-toggle {
        display: none;
    }
}

.access-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(90, 82, 72, 0.4);
    opacity: 0;
    transition: opacity 0.25s;
}

.page-access.access-nav-open .access-drawer-backdrop {
    display: block;
    opacity: 1;
}

@media (min-width: 768px) {
    .access-drawer-backdrop {
        display: none !important;
    }
}

.access-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    width: min(300px, 88vw);
    height: 100%;
    max-height: 100dvh;
    background: var(--bg-surface, #fff);
    border-left: 1px solid var(--border-light, #eceae6);
    box-shadow: -8px 0 32px rgba(90, 82, 72, 0.12);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s;
    overflow: hidden;
}

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

.page-access.access-nav-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .access-sidebar {
        position: sticky;
        top: 5.5rem;
        width: 260px;
        height: auto;
        max-height: none;
        flex-shrink: 0;
        border: 1px solid var(--border-light, #eceae6);
        border-radius: 1rem;
        box-shadow: var(--shadow-card, 0 4px 16px rgba(90, 82, 72, 0.07));
        padding: 1rem;
        transform: none;
        visibility: visible;
        order: -1;
    }

    .access-sidebar.is-open {
        transform: none;
    }
}

.access-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light, #eceae6);
    flex-shrink: 0;
}

.access-sidebar__head-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text-heading, #5a5248);
}

.access-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--bg-soft, #f5f4f2);
    color: var(--text-body, #6e6560);
    cursor: pointer;
}

@media (min-width: 768px) {
    .access-sidebar__head {
        display: none;
    }
}

.access-sidebar__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light, #eceae6);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .access-sidebar__user {
        padding: 0 0 1rem;
        margin-bottom: 0.5rem;
    }
}

.access-sidebar__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--brand-bg, #fff4e8);
    color: var(--brand-primary, #f48c17);
    font-size: 1.25rem;
}

.access-sidebar__name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-heading, #5a5248);
}

.access-sidebar__role {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted, #9c9590);
}

.access-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1;
}

@media (min-width: 768px) {
    .access-sidebar__nav {
        padding: 0;
    }
}

.access-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.65rem;
    text-decoration: none;
    color: var(--text-body, #6e6560);
    font-size: 0.875rem;
    font-weight: 700;
    transition: background 0.15s, color 0.15s;
}

.access-sidebar__link:hover {
    background: var(--bg-soft, #f5f4f2);
    color: var(--text-heading, #5a5248);
}

.access-sidebar__link.is-active {
    background: var(--brand-bg, #fff4e8);
    color: var(--brand-primary, #f48c17);
}

.access-sidebar__link--logout {
    margin-top: auto;
    color: #b91c1c;
}

.access-sidebar__ext {
    margin-right: auto;
    font-size: 0.75rem;
    opacity: 0.7;
}

.access-main {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.access-main__head {
    margin-bottom: 1.25rem;
}

.access-main__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-heading, #5a5248);
}

.access-main__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: var(--text-muted, #9c9590);
}

.access-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .access-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .access-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.access-stat-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-light, #eceae6);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft, 0 1px 3px rgba(90, 82, 72, 0.05));
}

.access-stat-card--warn {
    border-color: var(--brand-mid, #fac775);
    background: var(--bg-warm, #fff8f2);
}

.access-stat-card--wide {
    grid-column: span 2;
}

@media (min-width: 1024px) {
    .access-stat-card--wide {
        grid-column: span 1;
    }
}

.access-stat-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--brand-bg, #fff4e8);
    color: var(--brand-primary, #f48c17);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.access-stat-card__value {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading, #5a5248);
    line-height: 1.2;
}

.access-stat-card__label {
    margin: 0.2rem 0 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted, #9c9590);
}

.access-quick__title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-heading, #5a5248);
}

.access-quick__grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .access-quick__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.access-quick__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.85rem;
    border: 1px solid var(--border-light, #eceae6);
    background: var(--bg-soft, #f5f4f2);
    text-decoration: none;
    color: var(--text-heading, #5a5248);
    font-size: 0.8125rem;
    font-weight: 700;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}

.access-quick__item i {
    font-size: 1.35rem;
    color: var(--brand-primary, #f48c17);
}

.access-quick__item:hover {
    border-color: var(--brand-mid, #fac775);
    background: var(--brand-bg, #fff4e8);
}

.access-quick__badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: var(--brand-primary, #f48c17);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    font-style: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.access-main__body .admin-layout {
    width: 100%;
}

.access-main__body .admin-list-panel {
    max-height: none;
}

@media (min-width: 900px) {
    .access-main__body .admin-list-panel {
        max-height: calc(100vh - 12rem);
        overflow-y: auto;
    }
}

/* ——— Admin manage courses ——— */
.admin-mc-toolbar {
    margin-bottom: 1rem;
    padding: 1rem;
}

.admin-mc-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.admin-mc-search-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.admin-mc-search-wrap .bi-search {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #9c9590);
    pointer-events: none;
}

.admin-mc-search-wrap .account-input {
    padding-right: 2.25rem;
}

.admin-mc-select {
    min-width: 140px;
    max-width: 200px;
}

.admin-mc-toolbar__meta {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted, #9c9590);
}

.admin-mc-layout {
    width: 100%;
}

.admin-mc-list-wrap {
    max-height: 65vh;
    overflow-y: auto;
}

.admin-mc-list-item {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
}

.admin-mc-list-thumb {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.admin-mc-list-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.admin-mc-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--border-light, #eceae6);
    margin-top: 0.5rem;
}

.admin-mc-page-btn {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid var(--border-light, #eceae6);
    border-radius: 0.5rem;
    background: #fff;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-body, #6e6560);
}

.admin-mc-page-btn.is-active {
    background: var(--brand-primary, #f48c17);
    border-color: var(--brand-primary, #f48c17);
    color: #fff;
}

.admin-mc-editor {
    min-height: 400px;
}

.admin-mc-form__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light, #eceae6);
}

.admin-mc-form__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-heading, #5a5248);
}

.admin-mc-form__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.auth-btn--sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
}

.admin-mc-public-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-primary, #f48c17);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.admin-mc-form__grid {
    display: grid;
    gap: 0.85rem;
}

@media (min-width: 640px) {
    .admin-mc-form__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.admin-mc-preview-wrap img.admin-mc-preview-img {
    max-width: 160px;
    max-height: 100px;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 1px solid var(--border-light, #eceae6);
}

.admin-mc-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.admin-mc-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
}

.admin-mc-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 160px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-soft, #f5f4f2);
    border-radius: 0.65rem;
}

.admin-mc-cat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    background: #fff;
    border: 1px solid var(--border-light, #eceae6);
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-mc-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light, #eceae6);
}

.admin-mc-status--published { background: #d1fae5; color: #047857; }
.admin-mc-status--draft { background: #f1f5f9; color: #475569; }
.admin-mc-status--pending_review { background: #fef3c7; color: #b45309; }
.admin-mc-status--rejected { background: #fee2e2; color: #b91c1c; }
.admin-mc-status--archived { background: #e2e8f0; color: #64748b; }

.admin-filter-pill--sub {
    font-size: 0.7rem;
    padding: 0.3rem 0.55rem;
}

.admin-teacher-status--approved { background: #d1fae5; color: #047857; }
.admin-teacher-status--inactive { background: #e2e8f0; color: #64748b; }
.admin-teacher-status--pending { background: #fef3c7; color: #b45309; }
.admin-teacher-status--rejected { background: #fee2e2; color: #b91c1c; }
.admin-teacher-status--revision { background: #ffedd5; color: #c2410c; }
.admin-teacher-status--none { background: #f1f5f9; color: #64748b; }

.admin-teacher-actions {
    padding-top: 0.5rem;
}

/* ——— Admin list + modal ——— */
.admin-page-list {
    padding: 0;
    overflow: hidden;
}

.admin-page-toolbar {
    margin-bottom: 1rem;
    padding: 1rem;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.admin-table thead th {
    text-align: right;
    padding: 0.75rem 1rem;
    font-weight: 800;
    color: var(--text-muted, #9c9590);
    background: var(--bg-soft, #f5f4f2);
    border-bottom: 1px solid var(--border-light, #eceae6);
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light, #eceae6);
    vertical-align: middle;
}

.admin-table__row {
    cursor: pointer;
    transition: background 0.12s;
}

.admin-table__row:hover,
.admin-table__row:focus {
    background: var(--bg-warm, #fff8f2);
    outline: none;
}

.admin-table__empty {
    text-align: center;
    color: var(--text-muted, #9c9590);
    padding: 2rem 1rem !important;
}

.admin-table__empty--error {
    color: #b91c1c;
}

.admin-table__course {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.admin-table__course strong {
    display: block;
    color: var(--text-heading, #5a5248);
}

.admin-table__course small {
    color: var(--text-muted, #9c9590);
    font-size: 0.7rem;
}

.admin-table__thumb {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.admin-table__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft, #f5f4f2);
    color: var(--text-muted, #9c9590);
}

.admin-table__action {
    color: var(--brand-primary, #f48c17);
    font-size: 1.1rem;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.admin-modal.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.admin-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(90, 82, 72, 0.45);
}

.admin-modal__panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    background: var(--bg-surface, #fff);
    border-radius: 1rem;
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(90, 82, 72, 0.18);
    overflow: hidden;
}

.admin-modal__panel--large {
    max-width: min(920px, 96vw);
}

.admin-modal__close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--bg-soft, #f5f4f2);
    color: var(--text-body, #6e6560);
    cursor: pointer;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-modal__title {
    margin: 0 0 1rem;
    padding: 0 2.5rem 0 0;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-heading, #5a5248);
    flex-shrink: 0;
}

.admin-modal__body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-left: 0.15rem;
}

body.admin-modal-open {
    overflow: hidden;
}

.admin-mc-form__quick--modal {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light, #eceae6);
}

.admin-mc-review-box {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-warm, #fff8f2);
    border: 1px solid var(--brand-mid, #fac775);
    border-radius: 0.75rem;
}

.admin-mc-review-preview .tc-admin-preview-img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 0.5rem;
    object-fit: cover;
}

/* ——— Admin discount codes ——— */
.admin-dc-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem 1rem;
}

@media (min-width: 640px) {
    .admin-dc-form__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.admin-dc-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    cursor: pointer;
}

.admin-dc-users {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light, #e2e8f0);
}

.admin-dc-users--compact {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.admin-dc-users__title {
    font-size: 0.9375rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.admin-dc-users__results {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    max-height: 180px;
    overflow-y: auto;
}

.admin-dc-users__result-btn {
    display: block;
    width: 100%;
    text-align: right;
    padding: 0.55rem 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.admin-dc-users__result-btn:hover {
    background: #eff6ff;
}

.admin-dc-users__result-empty {
    padding: 0.65rem;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.admin-dc-users__chips {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-dc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem 0.35rem 0.65rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    font-size: 0.8125rem;
}

.admin-dc-chip button {
    border: none;
    background: none;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}

/* ——— Admin settings (tabbed) ——— */
.admin-settings__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    position: sticky;
    top: 4.5rem;
    z-index: 20;
}

.admin-settings__tab {
    border: 1px solid var(--border-light, #e2e8f0);
    background: #fff;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.admin-settings__tab:hover {
    background: #f8fafc;
}

.admin-settings__tab.is-active {
    background: var(--brand-primary, #2563eb);
    border-color: var(--brand-primary, #2563eb);
    color: #fff;
}

.admin-settings__panel {
    margin-bottom: 1rem;
}

.admin-settings__panel.hidden {
    display: none;
}

.admin-settings__panel-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 1rem;
}

.admin-settings__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem 1rem;
}

@media (min-width: 640px) {
    .admin-settings__grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

.admin-settings__theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem 1rem;
}

.admin-settings__theme-grid label {
    font-size: 0.7rem;
    color: #64748b;
}

/* ── Admin CMS: categories & hero slider ── */
.admin-cat-form__grid,
.admin-hero-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem 1rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .admin-cat-form__grid,
    .admin-hero-form__grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

.admin-cat-form__flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
}

.admin-cms-media {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem;
    background: var(--bg-soft, #f5f4f2);
    border-radius: 0.75rem;
}

.admin-cms-media__preview {
    width: 120px;
    height: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border-light, #e8e4df);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-cms-media__preview--wide {
    width: 100%;
    max-width: 280px;
    height: 140px;
}

.admin-cms-media__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-cms-media__placeholder {
    font-size: 0.75rem;
    color: var(--text-muted, #9a928c);
    text-align: center;
    padding: 0.5rem;
}

.admin-cms-media__placeholder i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.admin-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.admin-hero-card {
    border: 1px solid var(--border-light, #e8e4df);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.admin-hero-card:hover,
.admin-hero-card:focus-visible {
    box-shadow: 0 8px 20px rgba(90, 82, 72, 0.12);
    transform: translateY(-2px);
    outline: none;
}

.admin-hero-card--inactive {
    opacity: 0.65;
}

.admin-hero-card__img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.admin-hero-card__img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft, #f5f4f2);
    color: var(--text-muted);
    font-size: 2rem;
}

.admin-hero-card__body {
    padding: 0.75rem;
}

.admin-hero-card__order {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.admin-hero-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0.25rem 0;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-hero-card__sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-stories-grid {
    margin-top: 0;
}

.admin-stories-card {
    border: 1px solid var(--border-light, #e8e4df);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.admin-stories-card:hover,
.admin-stories-card:focus-visible {
    box-shadow: 0 8px 20px rgba(90, 82, 72, 0.12);
    transform: translateY(-2px);
    outline: none;
}

.admin-stories-card--archived {
    opacity: 0.6;
}

.admin-stories-card__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.admin-stories-card__media {
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--bg-soft, #f5f4f2);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.admin-stories-card__media i {
    font-size: 2rem;
}

.admin-stories-card__body {
    padding: 0.75rem;
}

.admin-stories-card__teacher {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.admin-stories-card__caption {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-stories-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-stories-detail__preview {
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-soft, #f5f4f2);
}

.admin-stories-detail__img {
    max-width: 100%;
    max-height: 280px;
    display: block;
    margin: 0 auto;
}

.admin-stories-detail__video {
    width: 100%;
    max-height: 280px;
    display: block;
}

.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;
}

/* ——— Notifications ——— */
.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    margin-right: auto;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #ef4444;
    border-radius: 999px;
}

.notif-badge.hidden {
    display: none;
}

.notif-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.notif-bell-btn.header-icon-btn {
    color: var(--text-muted);
}

.notif-bell-btn.header-icon-btn:hover {
    background: var(--bg-soft);
    color: var(--brand-primary);
}

.access-topbar .notif-bell-btn {
    width: 2.25rem;
    height: 2.25rem;
    margin-left: 0.5rem;
    border-radius: 0.5rem;
}

.access-topbar .notif-bell-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.notif-badge--header {
    position: absolute;
    top: 2px;
    left: 2px;
    margin: 0;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    line-height: 1.1rem;
}

.access-topbar .notif-bell-btn .notif-badge {
    top: -2px;
    left: -2px;
}

/* ——— Notifications overlay (full-screen, above bottom nav) ——— */
.notif-bottom-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s;
}

.notif-bottom-overlay.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.notif-bottom-overlay[hidden] {
    display: none !important;
}

.notif-bottom-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(15, 23, 42, 0.45);
}

.notif-bottom-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
    max-height: min(88vh, 32rem);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -12px 48px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    padding-bottom: var(--safe-bottom, 0px);
    animation: notif-panel-slide-up 0.22s ease-out;
}

@media (min-width: 640px) {
    .notif-bottom-overlay {
        justify-content: center;
        padding: 1rem;
    }

    .notif-bottom-panel {
        border-radius: 1rem;
        max-height: min(80vh, 32rem);
        padding-bottom: 0;
        box-shadow: 0 12px 48px rgba(15, 23, 42, 0.18);
    }
}

@keyframes notif-panel-slide-up {
    from {
        transform: translateY(12px);
        opacity: 0.5;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notif-bottom-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: var(--bg-soft, #f8fafc);
}

.notif-bottom-panel__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 800;
}

.notif-bottom-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.notif-bottom-panel__close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.notif-bottom-panel__list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.notif-bottom-panel__loading,
.notif-bottom-panel__empty {
    margin: 0;
    padding: 1.25rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
}

.notif-bottom-item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.notif-bottom-item:hover {
    background: #f8fafc;
}

.notif-bottom-item--unread {
    background: #eff6ff;
}

.notif-bottom-item--unread:hover {
    background: #dbeafe;
}

.notif-bottom-item__title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    line-height: 1.35;
}

.notif-bottom-item__body {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

.notif-bottom-item__time {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.6875rem;
    color: #94a3b8;
}

.notif-bottom-panel__foot {
    padding: 0.65rem 1rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.notif-bottom-panel__all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--brand-primary, #2563eb);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.15s ease;
}

.notif-bottom-panel__all:hover {
    background: var(--brand-soft, #eff6ff);
}

body.notif-bottom-open {
    overflow: hidden;
}

.bottom-nav-notif-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    line-height: 1.1rem;
}

button.bottom-nav-item.is-active,
button.bottom-nav-item[data-notif-toggle][aria-expanded="true"] {
    color: var(--brand-primary);
}

.notif-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notif-item {
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
}

.notif-item--unread {
    border-color: #93c5fd;
    background: #eff6ff;
}

.notif-item__head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
}

.notif-item__title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.notif-item__body {
    margin: 0;
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.5;
}

.notif-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.65rem;
    font-size: 0.8rem;
}

.notif-item__link {
    color: var(--brand, #2563eb);
    font-weight: 600;
    text-decoration: none;
}

.notif-item__read {
    padding: 0;
    border: 0;
    background: none;
    color: #64748b;
    cursor: pointer;
    font-size: inherit;
}

.notif-item__read:hover {
    color: var(--brand, #2563eb);
}

.notif-empty,
.notif-loading,
.notif-error {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
}

.notif-empty i {
    font-size: 2rem;
    opacity: 0.35;
    display: block;
    margin-bottom: 0.5rem;
}

.eitaa-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.eitaa-login-overlay__card {
    width: min(100%, 22rem);
    padding: 1.25rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.eitaa-login-overlay__title {
    margin: 0 0 0.5rem;
    font-weight: 700;
    text-align: center;
}

.eitaa-login-overlay__msg {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
    line-height: 1.6;
}

.eitaa-login-overlay--success .eitaa-login-overlay__card {
    text-align: center;
}

.eitaa-login-overlay__icon {
    font-size: 2.75rem;
    color: #16a34a;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.eitaa-login-overlay--success .eitaa-login-overlay__title {
    color: #15803d;
}

.eitaa-login-overlay--success .eitaa-login-overlay__msg {
    margin-bottom: 0.5rem;
    color: #334155;
}

.eitaa-login-overlay__hint {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

html.eitaa-miniapp body {
    overscroll-behavior-y: contain;
}

/* SweetAlert2 — RTL و فونت سایت */
.learnita-swal-popup {
    font-family: 'Dana', system-ui, sans-serif !important;
    direction: rtl;
    text-align: right;
}
.learnita-swal-confirm,
.learnita-swal-cancel {
    font-family: inherit !important;
    font-weight: 700;
}
