:root {
    --bg: #edf2ff;
    --bg-alt: #f7f9ff;
    --ink: #141b35;
    --muted: #6f7897;
    --line: rgba(78, 97, 176, 0.12);
    --panel: rgba(255, 255, 255, 0.9);
    --shadow: 0 24px 60px rgba(32, 48, 110, 0.12);
    --primary: #4f46e5;
    --primary-soft: rgba(79, 70, 229, 0.1);
    --teal: #14b8a6;
    --gold: #f59e0b;
    --rose: #fb7185;
    --dark-side: #0f172a;
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

.video-toolbox {
    margin-top: 0.5rem;
}

.video-studio-capture-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.upload-progress-shell {
    width: 100%;
    height: 10px;
    background: rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    transition: width 0.24s ease;
}

.video-studio-preview-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.1rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(243,248,255,0.96));
}

.video-studio-preview-media {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.video-studio-preview-media img,
.video-studio-thumb img {
    width: 100%;
    border-radius: 1rem;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    display: block;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.video-studio-preview-player,
.video-studio-player-shell {
    min-width: 0;
}

.video-studio-live-preview {
    width: 100%;
    min-height: 220px;
    border-radius: 1rem;
    background: #0f172a;
    object-fit: cover;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.video-studio-preview-meta {
    display: grid;
    gap: 0.75rem;
}

.video-thumb-fallback {
    display: grid;
    place-items: center;
    min-height: 160px;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.12));
    color: #2563eb;
    font-size: 2rem;
}

.video-studio-card {
    display: grid;
    gap: 1rem;
}

.video-studio-card-head {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.video-studio-thumb {
    min-width: 0;
}

.video-studio-meta {
    display: grid;
    gap: 0.55rem;
}

.video-studio-chip-row,
.video-studio-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.video-studio-project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.video-studio-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
    color: #334155;
    font-size: 0.9rem;
}

.teacher-video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.teacher-video-studio-ribbon {
    display: grid;
    gap: 16px;
}

.teacher-video-studio-ribbon-head,
.teacher-video-studio-ribbon-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.teacher-video-studio-ribbon-head strong,
.teacher-video-studio-ribbon-head span {
    display: block;
}

.teacher-video-studio-ribbon-head span {
    color: var(--muted);
    font-size: 0.92rem;
}

.teacher-video-studio-ribbon-stats span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: #4338ca;
    font-weight: 800;
}

.teacher-video-studio-ribbon-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(300px, 340px);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.teacher-video-studio-ribbon-track::-webkit-scrollbar {
    height: 10px;
}

.teacher-video-studio-ribbon-track::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.22);
    border-radius: 999px;
}

.teacher-video-studio-mini-card {
    display: grid;
    gap: 14px;
    min-height: 100%;
    padding: 16px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,0.99), rgba(248,250,252,0.97));
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    scroll-snap-align: start;
}

.teacher-video-studio-mini-media img,
.teacher-video-studio-mini-media .video-thumb-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
}

.teacher-video-studio-mini-body {
    display: grid;
    gap: 10px;
}

.teacher-video-studio-mini-topline,
.teacher-video-studio-mini-badges,
.teacher-video-studio-mini-share,
.teacher-video-studio-mini-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.teacher-video-studio-mini-body strong,
.teacher-video-studio-mini-body span,
.teacher-video-studio-mini-body small {
    display: block;
}

.teacher-video-studio-mini-body span,
.teacher-video-studio-mini-body small {
    color: var(--muted);
}

.teacher-video-studio-mini-body p {
    margin: 0;
    color: var(--ink);
    line-height: 1.85;
}

.teacher-video-studio-mini-badge,
.teacher-video-share-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.teacher-video-studio-mini-badge {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
}

.teacher-video-share-pill {
    background: rgba(15, 23, 42, 0.05);
    color: var(--ink);
}

.teacher-video-share-pill.is-active {
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
}

.teacher-video-studio-mini-actions .btn[disabled] {
    opacity: 1;
    cursor: default;
}

.teacher-video-gallery-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.teacher-video-gallery-media img,
.teacher-video-gallery-media .video-thumb-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
}

.teacher-video-gallery-body {
    display: grid;
    gap: 8px;
}

.teacher-video-gallery-body span,
.teacher-video-gallery-body small {
    color: var(--muted);
}

.teacher-video-gallery-body p {
    margin: 0;
    color: var(--ink);
    line-height: 1.8;
}

.compact-video-content-card video,
.compact-video-content-card img {
    margin-top: 8px;
}

.video-ai-pack-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.video-ai-card {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.video-ai-card.panel-span-two {
    grid-column: 1 / -1;
}

.video-quiz-stack,
.video-suggestion-stack {
    display: grid;
    gap: 0.6rem;
}

.video-quiz-item {
    display: grid;
    gap: 0.3rem;
    padding: 0.75rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.video-assistant-box {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(239,246,255,0.92), rgba(248,250,252,0.98));
    border: 1px solid rgba(59, 130, 246, 0.14);
}

.video-assistant-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.video-assistant-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.video-assistant-output {
    min-height: 52px;
    padding: 0.85rem 1rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #334155;
    line-height: 1.8;
}

.bassira-video-player {
    width: 100%;
    min-height: 240px;
    border-radius: 1rem;
    overflow: hidden;
}

@media (max-width: 992px) {
    .video-studio-card-head,
    .video-studio-preview-media,
    .video-ai-pack-grid {
        grid-template-columns: 1fr;
    }

    .teacher-ai-shell {
        grid-template-columns: 1fr;
    }

    .teacher-ai-side-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .video-studio-capture-actions,
    .video-studio-chip-row,
    .video-studio-stats {
        flex-direction: column;
    }

    .video-assistant-row {
        grid-template-columns: 1fr;
    }

    .teacher-video-studio-ribbon-track {
        grid-auto-columns: minmax(260px, 86vw);
    }

    .teacher-planner-layout {
        grid-template-columns: 1fr;
    }

    .teacher-planner-side {
        position: static;
    }

    .teacher-ai-shell {
        grid-template-columns: 1fr;
    }

    .planner-toolbar-strip,
    .planner-main-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .teacher-planner-layout {
        grid-template-columns: 1fr;
    }

    .teacher-planner-rail {
        position: static;
    }

    .planner-form-grid,
    .planner-schedule-grid-compact {
        grid-template-columns: 1fr;
    }

    .planner-form-actions {
        flex-direction: column;
    }

    .teacher-calendar-surface {
        min-height: 640px;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Cairo", sans-serif;
    color: var(--ink);
    overflow-x: hidden;
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.12), transparent 25%),
        radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.14), transparent 22%),
        linear-gradient(180deg, #f8faff 0%, #edf2ff 100%);
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

img,
video,
canvas,
iframe {
    max-width: 100%;
}

.landing-body {
    min-height: 100vh;
}

body.modal-open {
    overflow: hidden;
}

.landing-shell,
.simple-shell {
    max-width: 1380px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
}

.promo-shell {
    padding-bottom: 48px;
}

.landing-header,
.landing-hero,
.landing-stats,
.portal-grid,
.dashboard-grid,
.live-grid,
.toolbar-row,
.context-grid,
.quick-actions,
.tag-cloud,
.hero-quick-grid {
    display: grid;
    gap: 18px;
}

.landing-header {
    grid-template-columns: auto 1fr;
    align-items: center;
    margin-bottom: 28px;
}

.brand-mark,
.brand-inline {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
}

.brand-mark-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    box-shadow: 0 14px 32px rgba(79, 70, 229, 0.25);
}

.brand-logo-frame {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 28px rgba(32, 48, 110, 0.16);
}

.brand-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 6px;
}

.brand-mark strong,
.brand-inline strong {
    display: block;
    font-size: 1.05rem;
}

.brand-mark small,
.brand-inline small,
.panel-head span,
.stat-box span,
.stat-box small,
.list-card span,
.list-card small,
.portal-card p,
.landing-copy p,
.mini-stat-card span,
.side-profile small {
    color: var(--muted);
}

.landing-nav {
    display: flex;
    gap: 18px;
    justify-content: end;
    flex-wrap: wrap;
}

.landing-nav a {
    color: var(--ink);
    font-weight: 700;
}

.landing-nav .nav-cta {
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
}

.promo-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
}

.landing-bottom-grid {
    align-items: stretch;
}

.promo-copy {
    padding: 22px 0;
}

.promo-copy p {
    max-width: 720px;
    font-size: 1.05rem;
}

.promo-highlights {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 22px;
}

.promo-highlights span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--line);
    font-weight: 700;
}

.promo-stack {
    display: grid;
    gap: 18px;
}

.home-hero-card {
    padding: 34px;
    grid-template-columns: 1fr;
    align-items: start;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 24%),
        radial-gradient(circle at bottom right, rgba(79, 70, 229, 0.12), transparent 28%),
        rgba(255, 255, 255, 0.92);
}

.home-hero-banner-wrap {
    width: 100%;
}

.home-hero-banner-visual {
    width: 100%;
    object-fit: contain;
}

.landing-simple-shell {
    padding-bottom: 40px;
}

.landing-simple-stack {
    display: grid;
    gap: 22px;
    max-width: 980px;
    margin: 0 auto;
}

.landing-simple-image-card {
    padding: 22px;
}

.landing-simple-auth-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px;
}

.landing-simple-auth-card .auth-teaser-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-slider {
    min-height: 360px;
}

.slider-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.slides {
    position: relative;
    min-height: 268px;
}

.slide-card {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    transition: opacity 0.45s ease, transform 0.45s ease;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
}

.slide-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.slide-gradient {
    position: absolute;
    inset: 0;
}

.slide-gradient.blue {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.98), rgba(99, 102, 241, 0.7));
}

.slide-gradient.teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.98), rgba(45, 212, 191, 0.72));
}

.slide-gradient.rose {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.95), rgba(251, 113, 133, 0.68));
}

.slide-content {
    position: relative;
    color: #fff;
    z-index: 1;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    height: 100%;
}

.slide-content span {
    font-weight: 800;
    opacity: 0.94;
}

.slide-content h3 {
    margin: 10px 0 12px;
    font-size: 1.7rem;
    font-weight: 800;
}

.slide-content p {
    max-width: 520px;
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.slider-dots button {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: rgba(79, 70, 229, 0.18);
}

.slider-dots button.active {
    width: 30px;
    background: var(--primary);
}

.auth-card,
.auth-teaser-card {
    display: grid;
    gap: 16px;
}

.auth-teaser-card {
    overflow: hidden;
    position: relative;
}

.auth-teaser-media,
.auth-modal-visual {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    background: linear-gradient(180deg, rgba(241, 247, 255, 0.98), rgba(226, 239, 255, 0.88));
}

.auth-teaser-media img,
.auth-modal-visual img {
    width: 100%;
    display: block;
}

.auth-teaser-media {
    padding: 16px;
    min-height: 420px;
    border-radius: 34px;
    background: linear-gradient(135deg, #dfe9f8 0%, #d8e6fb 52%, #cdeefe 100%);
    box-shadow: inset 0 0 0 1px rgba(141, 168, 223, 0.35);
}

.auth-teaser-media img {
    width: calc(100% - 40px);
    height: auto;
    min-height: 388px;
    max-height: none;
    object-fit: contain;
    object-position: center;
    border-radius: 24px;
    margin: 0 auto;
    box-shadow: 0 10px 24px rgba(64, 93, 167, 0.12);
}

.auth-teaser-glow,
.auth-modal-visual::after {
    content: "";
    position: absolute;
    inset: auto -10% -26% auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.34), rgba(79, 70, 229, 0.02) 72%);
    filter: blur(8px);
}

.auth-teaser-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.auth-top {
    display: grid;
    gap: 6px;
}

.auth-tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: rgba(79, 70, 229, 0.08);
    border-radius: 16px;
    padding: 4px;
}

.auth-tab {
    border: none;
    background: transparent;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 800;
    color: var(--primary);
}

.auth-tab.active {
    background: #fff;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.12);
}

.auth-form {
    display: none;
    gap: 12px;
}

.auth-form.active {
    display: grid;
}

.google-login-box {
    display: grid;
    gap: 10px;
}

.btn-google {
    background: #fff;
    color: #111827;
    border: 1px solid var(--line);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.auth-message {
    min-height: 24px;
    font-weight: 700;
}

.auth-message.success {
    color: #059669;
}

.auth-message.error {
    color: #dc2626;
}

.demo-accounts {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(79, 70, 229, 0.04);
    border: 1px dashed rgba(79, 70, 229, 0.18);
}

.demo-accounts span {
    color: var(--muted);
}

.logged-summary {
    display: grid;
    gap: 10px;
}

.auth-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    z-index: 1400;
}

.auth-modal.open {
    display: flex;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(10px);
}

.auth-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
    padding: 22px;
}

.auth-modal-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: stretch;
}

.auth-modal-visual {
    min-height: 100%;
}

.auth-modal-visual img {
    height: 100%;
    object-fit: cover;
}

.auth-modal-visual-copy {
    position: absolute;
    inset-inline: 20px;
    bottom: 20px;
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 14px 30px rgba(32, 48, 110, 0.14);
}

.auth-modal-content {
    display: grid;
    gap: 16px;
    align-content: start;
    padding: 12px 4px 4px;
}

.auth-modal-close {
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    z-index: 2;
}

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

.feature-banner {
    display: flex;
    gap: 16px;
    align-items: start;
}

.landing-chatbot-shell {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 1200;
    display: grid;
    gap: 12px;
    width: min(340px, calc(100vw - 20px));
    justify-items: end;
}

.landing-chatbot-toggle {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(79, 70, 229, 0.14);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 55px rgba(32, 48, 110, 0.18);
    cursor: pointer;
    color: var(--ink);
}

.landing-chatbot-toggle-copy,
.landing-chatbot-head-copy {
    display: grid;
    gap: 4px;
    text-align: right;
    flex: 1;
}

.landing-chatbot-panel {
    display: none;
    gap: 14px;
    width: min(340px, calc(100vw - 20px));
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 55px rgba(32, 48, 110, 0.18);
    max-height: min(78vh, 720px);
    overflow: auto;
}

.landing-chatbot-panel.is-open {
    display: grid;
}

.landing-chatbot-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.landing-chatbot-stage {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(20, 184, 166, 0.08));
}

.landing-chatbot-stage-badge {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 72px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(79, 70, 229, 0.1);
    text-align: center;
    color: var(--primary);
    font-weight: 800;
}

.landing-chatbot-stage-badge i {
    font-size: 1.3rem;
}

.landing-chatbot-avatar {
    position: relative;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 46px;
}

.landing-chatbot-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(32, 48, 110, 0.16);
}

.landing-chatbot-badge-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(32, 48, 110, 0.14);
}

.landing-chatbot-lead {
    color: var(--ink);
    line-height: 1.9;
    font-weight: 700;
}

.landing-chatbot-quick {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.landing-chatbot-messages {
    display: grid;
    gap: 10px;
    max-height: 240px;
    overflow: auto;
    padding-inline-end: 4px;
}

.chatbot-message {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(79, 70, 229, 0.08);
}

.chatbot-message.user {
    background: rgba(20, 184, 166, 0.1);
}

.landing-chatbot-compose {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
}

.feature-banner i {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.25rem;
}

.landing-hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    margin-bottom: 24px;
}

.landing-copy h1,
.dashboard-hero h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.15;
    margin: 0 0 14px;
    font-weight: 800;
}

.eyebrow-pill {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 14px;
}

.landing-actions,
.hero-levels {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-levels span,
.tag-cloud span,
.pill-status,
.score-badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    font-weight: 700;
}

.btn {
    border: none;
    border-radius: 16px;
    padding: 12px 18px;
    font-weight: 800;
    max-width: 100%;
    white-space: normal;
}

.btn-hero-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #6f67ff);
}

.btn-hero-secondary {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
}

.panel-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    min-width: 0;
}

.landing-preview {
    padding: 22px;
    display: grid;
    grid-template-columns: 138px 1fr;
    min-height: 420px;
}

.preview-sidebar {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    color: #fff;
    border-radius: 24px;
    padding: 18px 14px;
}

.preview-avatar {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    margin-bottom: 18px;
    font-weight: 800;
}

.preview-menu {
    display: grid;
    gap: 10px;
}

.preview-menu span {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.preview-menu .active {
    background: rgba(255, 255, 255, 0.14);
}

.preview-main {
    padding: 10px 0 10px 18px;
    display: grid;
    gap: 18px;
}

.preview-top,
.preview-board,
.landing-stats,
.portal-grid,
.dashboard-grid.three,
.hero-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.mini-stat,
.feed-card,
.stat-box,
.mini-stat-card,
.list-card,
.quick-action,
.video-placeholder {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
}

.mini-stat,
.feed-card {
    padding: 16px;
}

.preview-board {
    grid-template-columns: 1.2fr 0.8fr;
}

.preview-calendar {
    padding: 18px;
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.06), rgba(20, 184, 166, 0.05));
    border-radius: 24px;
    border: 1px solid var(--line);
}

.preview-events {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.event-chip {
    color: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 700;
}

.event-chip.blue { background: #4f46e5; }
.event-chip.green { background: #14b8a6; }
.event-chip.gold { background: #f59e0b; }

.landing-stats,
.portal-grid {
    margin-bottom: 24px;
}

.stat-box {
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.stat-box i,
.mini-stat-card i {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.25rem;
}

.stat-box strong,
.mini-stat-card strong,
.mini-stat strong {
    display: block;
    font-size: 1.4rem;
}

.portal-card {
    padding: 24px;
    color: var(--ink);
    min-height: 230px;
    position: relative;
    overflow: hidden;
}

.portal-card::after {
    content: "";
    position: absolute;
    inset-inline-end: -34px;
    bottom: -34px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.portal-card.teacher {
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.08), rgba(255, 255, 255, 0.95));
}

.portal-card.student {
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.08), rgba(255, 255, 255, 0.95));
}

.portal-card.admin {
    background: linear-gradient(180deg, rgba(251, 113, 133, 0.08), rgba(255, 255, 255, 0.95));
}

.portal-label {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 800;
}

.portal-card h3,
.panel-head h3 {
    margin: 0 0 10px;
    font-weight: 800;
}

.portal-card-in {
    animation: floatIn 0.55s ease forwards;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-body {
    min-height: 100vh;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    gap: 24px;
    padding: 24px;
}

.dashboard-sidebar {
    border-radius: 30px;
    padding: 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.logout-link {
    margin-top: 10px;
    display: inline-flex;
    color: #fff;
    font-weight: 800;
}

.logout-link.dark {
    color: var(--primary);
}

.page-top-utility {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.top-logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(248, 113, 113, 0.18));
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.18);
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.08);
}

.top-logout-link:hover,
.top-logout-link:focus-visible {
    color: #991b1b;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(248, 113, 113, 0.24));
}

.teacher-theme {
    background: linear-gradient(180deg, #101827 0%, #1a2242 100%);
}

.student-theme {
    background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%);
}

.admin-theme {
    background: linear-gradient(180deg, #0f172a 0%, #243b53 100%);
}

.dashboard-sidebar .brand-inline,
.dashboard-sidebar .brand-inline small,
.side-links a,
.side-profile {
    color: #fff;
}

.side-links {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.side-links a {
    padding: 12px 14px;
    border-radius: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    font-weight: 700;
    min-width: 0;
}

.side-links a.active,
.side-links a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.side-profile {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.side-profile-meta-line {
    display: block;
    line-height: 1.7;
    opacity: 0.92;
}

.side-profile-head {
    display: flex;
    gap: 12px;
    align-items: center;
}

.side-profile-avatar {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
}

.dashboard-main {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.dashboard-hero {
    padding: 28px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    align-items: center;
}


.dashboard-hero.compact {
    grid-template-columns: 1fr;
}

.hero-quick-panel,
.hero-quick-grid,
.dashboard-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-stat-card {
    padding: 18px;
    display: grid;
    gap: 10px;
}

.metric-link-card {
    color: var(--ink);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.metric-link-card::after {
    content: "افتح";
    position: absolute;
    inset-inline-end: 18px;
    top: 18px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
}

.metric-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(32, 48, 110, 0.14);
    border-color: rgba(79, 70, 229, 0.22);
}

.metric-button-card {
    width: 100%;
    text-align: start;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
}

.section-spotlight {
    animation: sectionSpotlightPulse 1.8s ease;
}

@keyframes sectionSpotlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.28);
        border-color: rgba(79, 70, 229, 0.32);
    }
    50% {
        box-shadow: 0 0 0 14px rgba(79, 70, 229, 0.08);
        border-color: rgba(79, 70, 229, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
        border-color: rgba(79, 70, 229, 0.12);
    }
}

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

.panel-card {
    padding: 24px;
}

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

.quick-action {
    padding: 14px;
    font-weight: 800;
}

.teacher-tools-grid {
    align-items: start;
}

.compact-tools-card .quick-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.compact-tools-card .quick-action {
    padding: 11px 10px;
    border-radius: 16px;
    font-size: 0.95rem;
    min-height: 54px;
}

.compact-indicators-grid {
    display: grid;
    gap: 14px;
}

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

.indicator-group strong {
    font-size: 0.98rem;
}

.tag-cloud.compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud.compact span {
    padding: 7px 10px;
    font-size: 0.9rem;
}

.compact-upload-card .stack-form {
    gap: 12px;
}

.compact-upload-card .result-box {
    min-height: 70px;
    max-height: 150px;
    overflow: auto;
}

.student-group-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,255,0.96));
    box-shadow: 0 12px 26px rgba(32, 48, 110, 0.08);
    overflow: hidden;
}

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

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

.student-group-summary strong {
    display: block;
    margin-bottom: 4px;
}

.student-group-summary span {
    color: var(--muted);
    font-size: 0.92rem;
}

.student-group-summary i {
    color: var(--primary);
    transition: transform 0.2s ease;
}

.student-group-card[open] .student-group-summary i {
    transform: rotate(180deg);
}

.student-group-body {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

.teacher-student-item {
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(79, 70, 229, 0.08);
}

.classroom-group-body {
    padding-top: 0;
}

.classroom-detail-item {
    display: grid;
    gap: 6px;
}

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

.tree-visual div {
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(20, 184, 166, 0.08));
    border: 1px dashed rgba(79, 70, 229, 0.18);
    font-weight: 700;
}

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

.stack-form .form-control,
.stack-form .form-select,
.stack-form .btn {
    min-width: 0;
}

.form-note {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.profile-avatar-preview,
.profile-avatar-small {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(79, 70, 229, 0.05);
}

.profile-avatar-preview {
    width: 92px;
    height: 92px;
}

.profile-avatar-small {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
}

.profile-avatar-preview img,
.profile-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-fallback,
.profile-avatar-small i {
    font-size: 1.8rem;
    color: var(--primary);
}

.result-box {
    min-height: 86px;
    padding: 14px;
    margin: 0;
    border-radius: 18px;
    background: #0f172a;
    color: #dbeafe;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

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

.list-card {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.list-card.stacked {
    display: grid;
    justify-content: start;
}

.rich-card {
    gap: 10px;
}

.rich-card-text {
    margin: 0;
    color: var(--ink);
    line-height: 1.9;
}

.video-card-actions,
.video-analytics-strip {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.video-analytics-strip span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    font-weight: 800;
}

.admin-analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.admin-analytics-card {
    min-height: 132px;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(59, 130, 246, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.95));
}

.admin-analytics-card i {
    font-size: 1.6rem;
    color: var(--primary);
}

.admin-analytics-card strong {
    font-size: 1.9rem;
}

.admin-analytics-card span {
    color: var(--text-soft);
}

.admin-activity-list {
    display: grid;
    gap: 1rem;
}

.admin-activity-card {
    border-inline-start: 5px solid rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
}

.admin-activity-card .pill-status {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.admin-activity-card small {
    color: var(--text-soft);
}

.collapsible-panel-head {
    cursor: pointer;
}

.collapse-chip {
    border: 0;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.collapse-chip i {
    font-size: 1rem;
}

.collapsible-panel-body {
    overflow: hidden;
    max-height: 2200px;
    opacity: 1;
    transition: max-height 0.28s ease, opacity 0.22s ease, margin-top 0.22s ease;
    margin-top: 14px;
}

.collapsible-panel-body.is-collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
}

.analytics-chart-shell {
    position: relative;
    min-height: 360px;
    padding: 14px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
    border: 1px solid rgba(59, 130, 246, 0.1);
}

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

.analytics-chart-head strong {
    color: var(--ink);
}

.analytics-chart-head span {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.analytics-chart-shell canvas {
    width: 100% !important;
    height: 320px !important;
}

.video-player-shell {
    border-radius: 20px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.video-player-shell iframe,
.video-player-shell video {
    width: 100%;
    min-height: 260px;
    display: block;
    border: 0;
}

.video-player-shell.link-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
}

.course-attachment-box {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(248, 250, 255, 0.9);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.course-ai-box {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(243, 248, 255, 0.92);
    border: 1px solid rgba(14, 165, 233, 0.12);
}

.toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(79, 70, 229, 0.08);
    font-weight: 700;
    color: var(--ink);
}

.toggle-chip input {
    accent-color: var(--primary);
}

.panel-head.compact {
    margin-bottom: 0;
}

.panel-head.compact h3 {
    font-size: 1rem;
    margin: 0;
}

.course-attachment-preview {
    min-height: 120px;
}

.course-attachment-preview video {
    width: 100%;
    margin-top: 12px;
    border-radius: 18px;
    background: #000;
    display: block;
}

.course-attachment-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.course-attachment-image,
.course-attachment-video,
.course-attachment-frame {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(79, 70, 229, 0.08);
    background: #f8fafc;
}

.course-attachment-image {
    display: block;
    max-height: 320px;
    object-fit: cover;
}

.course-attachment-video,
.course-attachment-frame {
    min-height: 280px;
}

.channel-workspace {
    display: grid;
    gap: 18px;
}

.channel-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.12), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(79, 70, 229, 0.12);
}

.channel-hero-card h3,
.channel-hero-card p {
    margin: 0;
}

.channel-hero-card p {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.9;
}

.channel-hero-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 10px;
}

.channel-hero-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(79, 70, 229, 0.08);
    color: var(--ink);
    font-weight: 700;
}

.channel-group-stack {
    display: grid;
    gap: 14px;
}

.channel-class-group {
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
}

.channel-class-summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 255, 0.96));
}

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

.channel-class-summary strong,
.channel-class-summary small {
    display: block;
}

.channel-class-videos {
    display: grid;
    gap: 14px;
    padding: 0 18px 18px;
}

.channel-ribbon {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 22px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(79, 70, 229, 0.08), rgba(255, 255, 255, 0.95));
    overflow: hidden;
}

.landing-ribbon-shell {
    margin-bottom: 24px;
}

.landing-channel-ribbon {
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.08);
}

.channel-ribbon-label {
    display: grid;
    gap: 6px;
    justify-items: start;
    font-weight: 800;
    color: var(--ink);
}

.channel-ribbon-label i {
    font-size: 1.3rem;
    color: var(--primary);
}

.channel-ribbon-track-wrap {
    overflow: hidden;
    position: relative;
}

.channel-ribbon-track {
    display: flex;
    gap: 14px;
    width: max-content;
    animation: channelRibbonScroll 36s linear infinite;
}

.channel-ribbon-card {
    min-width: 300px;
    max-width: 300px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(79, 70, 229, 0.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 6px;
}

.books-ribbon-card {
    min-width: 360px;
}

.books-ribbon-hero {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 0.85rem;
    align-items: center;
}

.books-ribbon-hero img {
    width: 74px;
    height: 98px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14);
}

.books-ribbon-copy {
    display: grid;
    gap: 0.28rem;
}

.books-ribbon-copy strong {
    color: #0f172a;
}

.landing-books-ribbon .channel-ribbon-label i {
    background: linear-gradient(135deg, #14b8a6, #2563eb);
}

.channel-ribbon-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.channel-ribbon-class {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
}

.channel-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.channel-ribbon-status-line {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
}

.teacher-channel-subject-stack,
.teacher-channel-class-stack {
    display: grid;
    gap: 16px;
}

.teacher-channel-subject-block {
    display: grid;
    gap: 14px;
}

.teacher-channel-subject-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(244, 247, 255, 0.95));
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.teacher-channel-subject-head h4,
.teacher-channel-subject-head small {
    margin: 0;
}

.teacher-channel-class-group .channel-class-summary {
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.96), rgba(238, 242, 255, 0.96));
}

.teacher-channel-cover-panel,
.teacher-channel-composer-panel,
.teacher-channel-guide-panel,
.teacher-channel-feed-panel {
    overflow: hidden;
}

.teacher-channel-cover-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 22px;
    align-items: start;
}

.teacher-channel-cover-copy {
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 32%),
        linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(29, 78, 216, 0.88), rgba(20, 184, 166, 0.78));
    color: #fff;
}

.teacher-channel-cover-copy h3,
.teacher-channel-cover-copy p {
    margin: 0;
}

.teacher-channel-cover-copy p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.9;
    max-width: 760px;
}

.teacher-channel-cover-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-channel-cover-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.teacher-channel-brand-form {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
    border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.teacher-channel-media-card {
    display: grid;
    gap: 10px;
}

.teacher-channel-avatar-preview,
.teacher-channel-cover-preview {
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.95);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.teacher-channel-avatar-preview {
    min-height: 138px;
}

.teacher-channel-cover-preview {
    min-height: 138px;
    padding: 16px;
    text-align: center;
}

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

.teacher-channel-composer-form {
    gap: 14px;
}

.teacher-channel-upload-box {
    background: linear-gradient(180deg, rgba(248,250,252,0.96), rgba(255,255,255,0.98));
}

.teacher-channel-camera-actions {
    justify-content: flex-start;
}

.teacher-channel-camera-preview {
    display: grid;
    gap: 10px;
    min-height: 140px;
    padding: 14px;
    border-radius: 18px;
    border: 1px dashed rgba(59, 130, 246, 0.18);
    background: rgba(248, 250, 252, 0.94);
}

.teacher-channel-camera-preview video {
    width: 100%;
    border-radius: 16px;
    background: #0f172a;
    display: block;
}

.channel-post-preview-card img,
.channel-post-image-card img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
    display: block;
}

.channel-post-media-stack {
    display: grid;
    gap: 14px;
}

.channel-post-image-card {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.98);
}

.teacher-channel-guide-list {
    display: grid;
    gap: 12px;
}

.teacher-channel-guide-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.teacher-channel-guide-item strong {
    color: var(--ink);
}

.teacher-channel-guide-item span {
    color: var(--muted);
    line-height: 1.8;
    font-size: 0.92rem;
}

.social-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    flex: 0 0 auto;
}

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

.social-avatar.is-large {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
}

.teacher-social-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
    gap: 22px;
    align-items: start;
}

.teacher-social-layout.is-compact {
    grid-template-columns: minmax(0, 1fr);
}

.teacher-social-feed,
.teacher-social-sidebar {
    display: grid;
    gap: 16px;
}

.teacher-channel-stack {
    align-items: start;
}

.teacher-channel-topbar-panel,
.teacher-channel-composer-panel,
.teacher-channel-feed-panel {
    overflow: hidden;
}

.teacher-channel-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.92fr);
    gap: 18px;
    align-items: start;
}

.teacher-channel-topbar-copy {
    display: grid;
    gap: 14px;
    padding: 22px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(29, 78, 216, 0.88), rgba(20, 184, 166, 0.78));
    color: #fff;
    background-size: cover;
    background-position: center;
}

.teacher-channel-topbar-copy p {
    margin: 0;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
}

.teacher-channel-topbar-copy .teacher-social-author span:last-child {
    color: rgba(255, 255, 255, 0.82);
}

.teacher-channel-topbar-metrics,
.teacher-social-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-channel-topbar-metrics span,
.teacher-social-summary-strip span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
}

.teacher-channel-topbar-metrics span {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.teacher-channel-settings-box {
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(248,250,252,0.97));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.teacher-channel-settings-box summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
}

.teacher-channel-settings-box summary::-webkit-details-marker {
    display: none;
}

.teacher-channel-settings-box summary span,
.teacher-channel-settings-box summary small {
    display: block;
}

.teacher-channel-settings-box summary span {
    font-weight: 800;
    color: var(--ink);
}

.teacher-channel-settings-box summary small {
    color: var(--muted);
}

.teacher-channel-brand-form-compact {
    padding: 0 18px 18px;
}

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

.teacher-channel-post-intro,
.teacher-social-summary-card {
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(248,250,252,0.98), rgba(255,255,255,0.98));
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.teacher-social-summary-card {
    display: grid;
    gap: 14px;
}

.teacher-social-summary-strip span {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.teacher-social-sidebar {
    position: sticky;
    top: 18px;
}

.teacher-social-composer-ghost,
.teacher-social-post,
.teacher-social-side-card {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.teacher-social-composer-ghost {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
}

.teacher-social-composer-ghost.is-compact {
    padding: 16px 18px;
}

.teacher-social-composer-copy {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(241, 245, 249, 0.95);
    color: var(--muted);
}

.teacher-feed-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.teacher-feed-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.96);
    color: var(--ink);
    font-weight: 800;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.teacher-feed-filter-pill strong {
    display: inline-flex;
    min-width: 28px;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.07);
    font-size: 0.82rem;
}

.teacher-feed-filter-pill:hover,
.teacher-feed-filter-pill.is-active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.22);
    color: #1d4ed8;
    transform: translateY(-1px);
}

.teacher-feed-filter-empty {
    padding: 18px;
    border-radius: 20px;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.96);
    color: var(--muted);
    text-align: center;
    font-weight: 700;
}

.teacher-social-post {
    display: grid;
    gap: 16px;
    padding: 18px 20px 20px;
}

.teacher-social-post-head,
.teacher-social-author,
.teacher-social-post-badges,
.teacher-social-engagement,
.teacher-social-footer,
.teacher-social-actions,
.teacher-social-chip-row,
.teacher-social-side-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.teacher-social-post-head,
.teacher-social-footer {
    justify-content: space-between;
}

.teacher-social-author strong,
.teacher-social-author span,
.teacher-social-side-head strong,
.teacher-social-side-head span {
    display: block;
}

.teacher-social-author span,
.teacher-social-side-head span,
.teacher-social-post-subline,
.teacher-social-footer,
.teacher-social-side-card p {
    color: var(--muted);
    font-size: 0.9rem;
}

.teacher-social-post-body {
    display: grid;
    gap: 10px;
}

.teacher-social-post-body h4,
.teacher-social-side-card h4,
.teacher-social-side-card p {
    margin: 0;
}

.teacher-social-post-subline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.teacher-social-post-body p {
    margin: 0;
    line-height: 1.95;
    color: var(--ink);
}

.teacher-social-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    font-weight: 800;
    font-size: 0.82rem;
}

.teacher-social-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--ink);
    font-weight: 800;
    font-size: 0.82rem;
}

.teacher-social-media .video-player-shell {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.teacher-social-engagement {
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    color: var(--muted);
    font-weight: 700;
}

.teacher-social-engagement span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.teacher-social-action-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.teacher-social-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.96);
    color: var(--ink);
    font-weight: 800;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.teacher-social-action-btn:hover,
.teacher-social-action-btn.is-active {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.18);
    color: #1d4ed8;
    transform: translateY(-1px);
}

.teacher-social-action-btn strong {
    font-size: 0.82rem;
}

.teacher-social-comments {
    display: grid;
    gap: 12px;
}

.teacher-social-comments-list {
    display: grid;
    gap: 10px;
}

.teacher-social-comment {
    display: flex;
    align-items: start;
    gap: 10px;
}

.social-avatar.is-comment {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
}

.teacher-social-comment-body {
    display: grid;
    gap: 4px;
    flex: 1;
}

.teacher-social-comment.is-reply {
    margin-inline-start: 18px;
}

.teacher-channel-ribbon-layout {
    display: grid;
    gap: 12px;
}

.teacher-channel-ribbon-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.teacher-channel-ribbon-layout.is-compact .teacher-channel-ribbon-header {
    padding: 6px 2px 0;
}

.teacher-channel-ribbon-titleline {
    display: grid;
    gap: 2px;
}

.teacher-channel-ribbon-titleline strong,
.teacher-channel-ribbon-titleline span {
    margin: 0;
}

.teacher-channel-ribbon-titleline strong {
    font-size: .98rem;
    color: var(--ink);
}

.teacher-channel-ribbon-titleline span {
    font-size: .82rem;
    color: var(--muted);
}

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

.teacher-channel-summary-inline span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.teacher-channel-ribbon-shell {
    display: grid;
    gap: 10px;
}

.teacher-channel-ribbon-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(208px, 228px);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.teacher-channel-ribbon-card {
    display: grid;
    gap: 0;
    min-height: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(191, 219, 254, 0.72);
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(248,250,252,0.98));
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
    scroll-snap-align: start;
}

.teacher-channel-ribbon-cover {
    min-height: 92px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
    position: relative;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.92), rgba(30, 64, 175, 0.9));
    background-size: cover;
    background-position: center;
}

.teacher-channel-ribbon-thumb {
    min-height: 142px;
    align-items: flex-end;
}

.teacher-channel-date-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    font-size: .72rem;
    font-weight: 800;
}

.teacher-channel-ribbon-duration {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: .74rem;
    font-weight: 900;
}

.teacher-channel-ribbon-body {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.teacher-channel-ribbon-topline {
    display: grid;
    gap: 3px;
}

.teacher-channel-ribbon-authorline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.teacher-channel-ribbon-authorcopy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.teacher-channel-ribbon-authorcopy strong,
.teacher-channel-ribbon-authorcopy span {
    display: block;
}

.teacher-channel-ribbon-authorcopy strong {
    color: var(--ink);
    font-size: .92rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.teacher-channel-ribbon-authorcopy span {
    color: var(--muted);
    font-size: .78rem;
}

.teacher-channel-ribbon-viewsline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.teacher-channel-ribbon-topline strong,
.teacher-channel-ribbon-topline span,
.teacher-channel-ribbon-body p {
    margin: 0;
}

.teacher-channel-ribbon-topline span,
.teacher-channel-ribbon-meta,
.teacher-channel-mini-stat {
    color: var(--muted);
    font-size: .76rem;
}

.teacher-channel-ribbon-body p {
    color: var(--ink);
    line-height: 1.55;
    font-size: .8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.teacher-channel-ribbon-meta {
    display: grid;
    gap: 4px;
}

.teacher-channel-ribbon-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.teacher-channel-ribbon-actions.is-youtube-style .btn {
    flex: 1;
}

.teacher-channel-mini-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.7);
    font-weight: 800;
}

.teacher-channel-mini-stat.is-pending {
    background: rgba(254, 240, 138, 0.7);
    color: #92400e;
}

@media (max-width: 768px) {
    .teacher-channel-ribbon-track {
        grid-auto-columns: minmax(210px, 84vw);
    }

    .teacher-channel-ribbon-header {
        align-items: start;
    }
}

.social-avatar.is-student-channel {
    width: 42px;
    height: 42px;
    font-size: 1rem;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.student-teacher-channel-shell {
    display: grid;
    gap: 18px;
}

.student-teacher-channel-shell.is-ribbon-feed {
    gap: 14px;
}

.student-teacher-channel-shell.is-student-simple-feed {
    gap: 12px;
}

.student-books-lead-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(191, 219, 254, 0.92);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.99));
}

.student-books-lead-copy {
    display: grid;
    gap: 6px;
}

.student-books-lead-copy strong,
.student-books-lead-copy span {
    display: block;
}

.student-books-lead-copy span {
    color: var(--muted);
    font-size: 0.92rem;
}

.student-books-lead-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.student-books-lead-stats span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    font-weight: 800;
    font-size: 0.82rem;
}

.student-channel-modal-dialog {
    max-width: min(920px, calc(100vw - 28px));
}

.student-channel-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.student-channel-modal-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.9rem;
}

.student-teacher-post-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(191, 219, 254, 0.82);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.student-teacher-post-summary-copy {
    display: grid;
    gap: 6px;
}

.student-teacher-post-summary-copy h3,
.student-teacher-post-summary-copy p {
    margin: 0;
}

.student-teacher-post-summary-copy p {
    color: var(--muted);
    font-size: .92rem;
}

.student-teacher-post-summary-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.student-teacher-channel-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
    gap: 18px;
    align-items: start;
    padding: 22px;
    border-radius: 28px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.98));
    background-size: cover;
    background-position: center;
}

.student-teacher-channel-hero-copy,
.student-teacher-channel-hero-side,
.student-teacher-channel-hero-card {
    display: grid;
    gap: 12px;
}

.student-teacher-channel-hero-copy h3,
.student-teacher-channel-hero-copy p {
    margin: 0;
}

.student-teacher-channel-hero-copy p {
    color: var(--muted);
    line-height: 1.9;
    max-width: 760px;
}

.student-teacher-channel-hero-card {
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.92);
}

.student-teacher-channel-hero-card strong,
.student-teacher-channel-hero-card span {
    display: block;
}

.student-teacher-channel-hero-card span,
.student-teacher-channel-hero-stats span {
    color: var(--muted);
}

.student-teacher-channel-hero-stats {
    display: grid;
    gap: 10px;
}

.student-teacher-channel-hero-stats span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    font-weight: 700;
}

.student-teacher-channel-toolbar {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.student-teacher-channel-search {
    position: relative;
}

.student-teacher-channel-search i {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.student-teacher-channel-search .form-control {
    min-height: 48px;
    padding-inline-start: 44px;
    border-radius: 18px;
}

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

.student-teacher-channel-selects .form-select {
    min-height: 46px;
    border-radius: 18px;
}

.student-teacher-channel-ribbon {
    display: grid;
    gap: 10px;
}

.student-teacher-channel-ribbon-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 0 2px;
}

.student-teacher-channel-ribbon-head strong,
.student-teacher-channel-ribbon-head span {
    margin: 0;
}

.student-teacher-channel-ribbon-head span {
    color: var(--muted);
}

.student-teacher-channel-ribbon-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 248px);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.student-teacher-ribbon-card {
    display: grid;
    gap: 0;
    min-height: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(191, 219, 254, 0.75);
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(248,250,252,0.98));
    box-shadow: 0 18px 44px rgba(59, 130, 246, 0.12);
}

.student-teacher-ribbon-cover,
.student-teacher-video-cover {
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.92), rgba(30, 64, 175, 0.88));
    background-size: cover;
    background-position: center;
}

.student-teacher-ribbon-cover {
    min-height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: start;
    padding: 12px;
    color: #fff;
    position: relative;
}

.student-teacher-ribbon-cover-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    font-weight: 800;
}

.student-teacher-ribbon-body {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.student-teacher-ribbon-author,
.student-teacher-video-card-author {
    display: flex;
    gap: 12px;
    align-items: center;
}

.student-teacher-ribbon-author > div,
.student-teacher-video-card-author > div {
    display: grid;
    gap: 3px;
}

.student-teacher-ribbon-author span,
.student-teacher-video-card-author span {
    color: var(--muted);
    font-size: 0.8rem;
}

.student-teacher-ribbon-body h4,
.student-teacher-ribbon-body p,
.student-teacher-video-copy h4,
.student-teacher-video-copy p {
    margin: 0;
}

.student-teacher-ribbon-body h4,
.student-teacher-video-copy h4 {
    font-size: .92rem;
    line-height: 1.6;
}

.student-teacher-ribbon-body p,
.student-teacher-video-copy p {
    color: var(--muted);
    line-height: 1.65;
    font-size: .83rem;
}

.student-teacher-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.student-teacher-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.65);
    color: #334155;
    font-size: 0.74rem;
    font-weight: 800;
}

.student-teacher-badge.is-primary {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

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

.student-teacher-post-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.student-teacher-video-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(191, 219, 254, 0.72);
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(248,250,252,0.98));
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.05);
}

.student-teacher-video-card-compact {
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
}

.student-teacher-video-card-top,
.student-teacher-video-actions,
.student-teacher-video-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.student-teacher-video-card-content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(170px, 0.78fr);
    gap: 16px;
    align-items: stretch;
}

.student-teacher-video-card-compact .student-teacher-video-card-content {
    grid-template-columns: 1fr;
    gap: 12px;
}

.student-teacher-video-copy {
    display: grid;
    gap: 12px;
}

.student-teacher-video-stats span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.student-teacher-video-cover {
    min-height: 180px;
    border-radius: 22px;
    padding: 16px;
    display: flex;
    align-items: end;
    justify-content: start;
    color: #fff;
}

.student-teacher-video-card-compact .student-teacher-video-cover {
    min-height: 130px;
}

.student-teacher-post-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.student-teacher-post-actions .btn {
    min-height: 38px;
    padding-inline: 14px;
    border-radius: 12px;
    font-size: .84rem;
}

.student-teacher-new-badge {
    position: absolute;
    inset-inline-end: 12px;
    inset-block-end: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #fff;
    font-size: .75rem;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.28);
    animation: channelNewPulse 1.8s ease-in-out infinite;
}

@keyframes channelNewPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 22px rgba(239, 68, 68, 0.28); }
    50% { transform: scale(1.06); box-shadow: 0 14px 28px rgba(239, 68, 68, 0.42); }
}

.student-teacher-video-cover-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    font-size: 0.84rem;
    font-weight: 800;
}

.student-teacher-video-note {
    color: var(--muted);
    font-size: 0.86rem;
}

.student-teacher-channel-empty {
    display: grid;
    gap: 6px;
    padding: 20px;
    border-radius: 22px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    background: rgba(248, 250, 252, 0.92);
    color: var(--muted);
}

.teacher-social-comment-box {
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.teacher-social-comment-box strong,
.teacher-social-comment-box p {
    margin: 0;
}

.teacher-social-comment-box p {
    margin-top: 4px;
    line-height: 1.8;
    color: var(--ink);
}

.teacher-social-comment-body > span,
.teacher-social-comment-empty {
    color: var(--muted);
    font-size: 0.8rem;
}

.teacher-social-comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.8rem;
}

.teacher-social-comment-link {
    padding: 0;
    border: none;
    background: transparent;
    color: #1d4ed8;
    font-weight: 800;
}

.teacher-social-replies {
    display: grid;
    gap: 10px;
    margin-top: 8px;
    padding-inline-start: 14px;
    border-inline-start: 2px solid rgba(59, 130, 246, 0.12);
}

.teacher-social-reply-form-wrap[hidden] {
    display: none !important;
}

.teacher-social-comment-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.teacher-social-comment-form.is-reply-form {
    margin-top: 8px;
    padding-inline-start: 4px;
}

.teacher-social-comment-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.teacher-social-comment-form .form-control {
    flex: 1;
}

.teacher-social-comment-empty {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.96);
}

.teacher-social-footer {
    color: var(--muted);
}

.teacher-social-layout.is-compact .teacher-social-footer {
    display: none;
}

.teacher-social-side-card {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.teacher-social-side-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.teacher-social-side-stats div,
.teacher-social-side-row {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.teacher-social-side-stats strong,
.teacher-social-side-row strong {
    color: var(--ink);
}

.teacher-social-side-stats span,
.teacher-social-side-row span {
    color: var(--muted);
    font-size: 0.84rem;
}

.teacher-social-side-list {
    display: grid;
    gap: 10px;
}

.wrap-actions {
    flex-wrap: wrap;
    justify-content: end;
}

@keyframes channelRibbonScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.channel-status-pill.is-live {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.channel-status-pill.is-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #a16207;
}

.channel-status-pill.is-recorded {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.profile-inline,
.profile-actions-inline {
    display: flex;
    gap: 12px;
    align-items: center;
}

.profile-inline {
    justify-content: start;
}

.profile-inline > div:last-child {
    display: grid;
    gap: 4px;
}

.profile-card {
    align-items: center;
}

.account-temp-password-box {
    width: 100%;
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px dashed rgba(79, 70, 229, 0.24);
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.9), rgba(248, 250, 252, 0.95));
}

.account-temp-password-box strong,
.account-temp-password-box small {
    margin: 0;
}

.account-temp-password-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.account-temp-password-row code {
    direction: ltr;
    unicode-bidi: plaintext;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.05);
    color: #1e1b4b;
    font-size: 0.95rem;
    font-weight: 800;
}

.teacher-profile-summary {
    display: flex;
    gap: 18px;
    align-items: center;
}

.student-profile-shell {
    overflow: hidden;
}

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

.student-news-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 22px;
    color: #fff;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.student-news-card.is-primary {
    background: linear-gradient(135deg, #4f46e5, #2563eb);
}

.student-news-card.is-warning {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.student-news-card.is-info {
    background: linear-gradient(135deg, #0891b2, #14b8a6);
}

.student-news-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.student-news-card div:last-child {
    display: grid;
    gap: 4px;
}

.student-news-card strong {
    font-size: 1rem;
    line-height: 1.5;
}

.student-news-card span {
    opacity: 0.92;
    line-height: 1.6;
    font-size: 0.92rem;
}

.student-profile-window {
    display: grid;
    gap: 0;
}

.student-profile-window-summary {
    list-style: none;
    cursor: pointer;
}

.student-profile-window-summary::-webkit-details-marker {
    display: none;
}

.student-profile-window-summary .panel-head {
    margin: 0;
}

.student-profile-window-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 800;
}

.student-profile-window[open] .student-profile-window-toggle::before {
    content: "▾ ";
}

.student-profile-window:not([open]) .student-profile-window-toggle::before {
    content: "▸ ";
}

.student-profile-window-body {
    display: grid;
    gap: 18px;
    padding-top: 8px;
}

.student-section-window {
    display: grid;
    gap: 0;
}

.student-section-window-summary {
    list-style: none;
    cursor: pointer;
}

.student-section-window-summary::-webkit-details-marker {
    display: none;
}

.student-section-window-body {
    display: grid;
    gap: 18px;
    padding-top: 8px;
}

.student-profile-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(300px, 0.95fr);
    gap: 20px;
    align-items: start;
}

.student-profile-stack {
    display: grid;
    gap: 16px;
}

.student-profile-mini-window {
    display: grid;
    gap: 0;
    border-radius: 24px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.95));
    overflow: hidden;
}

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

.student-profile-mini-summary::-webkit-details-marker {
    display: none;
}

.student-profile-mini-summary strong,
.student-profile-mini-summary span {
    display: block;
}

.student-profile-mini-summary strong {
    color: var(--ink);
    font-size: 1rem;
}

.student-profile-mini-summary span {
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.6;
}

.student-profile-mini-summary::after {
    content: "▾";
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-weight: 900;
    flex-shrink: 0;
}

.student-profile-mini-window:not([open]) .student-profile-mini-summary::after {
    content: "▸";
}

.student-profile-mini-body {
    display: grid;
    gap: 18px;
    padding: 0 20px 20px;
}

.student-profile-identity-card,
.student-profile-form-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.95));
}

.student-profile-form-window .student-profile-mini-body {
    padding-top: 4px;
}

.student-profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
}

.student-profile-avatar-xl {
    width: 116px;
    height: 116px;
    border-radius: 28px;
}

.student-profile-hero-meta {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.student-profile-hero-meta strong {
    font-size: 1.35rem;
    color: var(--ink);
    line-height: 1.35;
}

.student-profile-hero-meta span,
.student-profile-hero-meta small {
    color: var(--text-soft);
    display: block;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

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

.student-info-tile {
    display: flex;
    align-items: start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(79, 70, 229, 0.08);
}

.student-info-tile i {
    font-size: 1.15rem;
    color: var(--primary);
    margin-top: 3px;
}

.student-info-tile div {
    display: grid;
    gap: 4px;
}

.student-info-tile strong {
    color: var(--ink);
}

.student-info-tile span {
    color: var(--text-soft);
}

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

.student-profile-shortcut {
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 156px;
    padding: 18px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(14, 165, 233, 0.1), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(79, 70, 229, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.student-profile-shortcut:hover,
.student-profile-shortcut:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.22);
}

.student-profile-shortcut i {
    font-size: 1.2rem;
    color: var(--primary);
}

.student-profile-shortcut em {
    font-style: normal;
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

.student-profile-shortcut strong {
    color: var(--ink);
    display: block;
    font-size: 1.08rem;
    line-height: 1.5;
}

.student-profile-shortcut span {
    color: var(--text-soft);
    display: block;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.student-profile-form-card .panel-head span {
    display: block;
    line-height: 1.7;
}

.student-profile-channel-embed {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.95));
}

.student-ai-stage {
    overflow: hidden;
}

.student-calendar-shell {
    align-items: stretch;
}

.student-calendar-panel {
    display: grid;
    gap: 16px;
    overflow: hidden;
}

.student-calendar-stage-intro {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.98));
}

.student-calendar-stage-intro strong {
    color: var(--ink);
    font-size: 1rem;
}

.student-calendar-stage-intro span {
    color: var(--muted);
    line-height: 1.8;
    font-size: 0.9rem;
}

.panel-span-two {
    grid-column: 1 / -1;
}

.compact-profile-card {
    padding-bottom: 18px;
}

.session-notice-strip {
    margin-bottom: 22px;
}

.live-notice-bar {
    position: relative;
}

.live-notice-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.live-notice-card {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(14, 165, 233, 0.08));
    border: 1px solid rgba(79, 70, 229, 0.12);
}

.live-notice-overlay-link {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    z-index: 1;
}

.live-notice-card > *:not(.live-notice-overlay-link) {
    position: relative;
    z-index: 2;
}

.live-notice-class {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 800;
}

.live-notice-empty {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
    color: var(--muted);
    border: 1px dashed rgba(148, 163, 184, 0.35);
}

.live-quick-access {
    margin-bottom: 14px;
}

.live-quick-access-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(79, 70, 229, 0.18);
}

.live-quick-access-copy {
    display: grid;
    gap: 6px;
}

.live-quick-access-copy strong {
    font-size: 1.02rem;
}

.live-quick-access-copy small {
    color: var(--muted);
}

.live-quick-access-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 22px;
    align-items: center;
}

.teacher-profile-summary-card {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 244, 246, 0.92));
    border: 1px solid rgba(79, 70, 229, 0.1);
    align-items: start;
}

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

.compact-profile-form {
    gap: 14px;
}

.hero-banner-wrap {
    display: grid;
    gap: 14px;
}

.teacher-banner-shell {
    position: relative;
}

.hero-banner-visual {
    width: 100%;
    display: block;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(32, 48, 110, 0.12);
    border: 1px solid rgba(79, 70, 229, 0.08);
}

.teacher-banner-profile-widget {
    width: 250px;
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(79, 70, 229, 0.12);
    box-shadow: 0 18px 38px rgba(32, 48, 110, 0.18);
    color: var(--ink);
}

.teacher-banner-profile-inline {
    width: 100%;
    max-width: 320px;
}

.teacher-banner-profile-label {
    display: inline-flex;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-weight: 800;
}

.teacher-banner-profile-avatar {
    width: 72px;
    height: 72px;
    background: rgba(79, 70, 229, 0.08);
}

.teacher-banner-profile-meta {
    display: grid;
    gap: 4px;
}

.teacher-banner-profile-meta strong {
    font-size: 1.05rem;
}

.teacher-profile-avatar {
    width: 108px;
    height: 108px;
}

.teacher-profile-meta {
    display: grid;
    gap: 6px;
}

.teacher-profile-label {
    display: inline-flex;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.84rem;
}

.teacher-profile-meta strong {
    font-size: 1.2rem;
}

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

.teacher-profile-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    color: var(--text-soft);
    font-size: 0.86rem;
}

.teacher-profile-copy {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.8;
}

.teacher-profile-fields {
    align-items: start;
}

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

.stacked-field > span {
    color: var(--ink);
    font-weight: 700;
    font-size: 0.9rem;
}

.panel-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.teacher-ai-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    gap: 22px;
    align-items: start;
}

.teacher-course-detail-panel {
    min-height: 100%;
}

.teacher-ai-side-panel {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
    align-self: start;
    overflow: hidden;
}

.teacher-ai-panel-head {
    align-items: start;
    gap: 14px;
}

.teacher-ai-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
    font-weight: 800;
    white-space: nowrap;
}

.teacher-ai-body {
    display: grid;
    gap: 14px;
    padding: 0 22px 22px;
}

.teacher-ai-helper {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.08), rgba(236, 240, 255, 0.94));
    border: 1px solid rgba(79, 70, 229, 0.12);
}

.teacher-ai-helper strong {
    color: var(--ink);
    font-size: 0.94rem;
}

.teacher-ai-helper span {
    color: var(--muted);
    line-height: 1.8;
    font-size: 0.88rem;
}

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

.assistant-action-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.95));
    color: inherit;
    text-align: start;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.assistant-action-card:hover,
.assistant-action-card:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.24);
}

.assistant-action-card strong {
    color: var(--ink);
    font-size: 0.95rem;
}

.assistant-action-card span {
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.82rem;
}

.teacher-ai-results-stack {
    display: grid;
    gap: 12px;
}

.teacher-ai-doc-box {
    min-height: 72px;
    background: rgba(248, 250, 252, 0.96);
    color: var(--ink);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.teacher-ai-result-box {
    min-height: 180px;
}

.assistant-example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.assistant-example-chip {
    border: 1px solid rgba(79, 70, 229, 0.14);
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.92), rgba(255, 255, 255, 0.98));
    color: #312e81;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.83rem;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.assistant-example-chip:hover,
.assistant-example-chip:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.26);
}

.calendar-surface {
    min-height: 580px;
}

.teacher-planner-card {
    overflow: hidden;
    padding: 10px;
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,247,255,0.98));
}

.planner-main-head {
    align-items: start;
    gap: 18px;
}

.planner-main-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.planner-mini-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.planner-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 700;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.88);
}

.planner-legend-chip.live {
    color: #4338ca;
    background: rgba(79, 70, 229, 0.1);
}

.planner-legend-chip.review {
    color: #0f766e;
    background: rgba(20, 184, 166, 0.12);
}

.planner-legend-chip.quiz {
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
}

.teacher-planner-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.52fr);
    gap: 22px;
    align-items: start;
}

.teacher-planner-calendar-wrap {
    padding: 10px;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,245,255,0.98));
}

.planner-toolbar-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 8px 10px 2px;
}

.planner-toolbar-note {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.teacher-calendar-surface {
    min-height: 840px;
}

.teacher-planner-rail {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 18px;
}

.planner-rail-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,247,255,0.97));
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.planner-rail-head {
    display: grid;
    gap: 4px;
}

.planner-rail-head h4 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
}

.planner-rail-head span {
    color: var(--muted);
    font-size: 0.84rem;
}

.planner-rail-list,
.planner-next-card {
    display: grid;
    gap: 10px;
}

.planner-rail-item,
.planner-next-body {
    display: grid;
    gap: 4px;
    width: 100%;
    text-align: right;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
}

.planner-rail-item strong,
.planner-next-body strong {
    font-size: 0.93rem;
}

.planner-rail-item span,
.planner-next-body span,
.planner-rail-item small,
.planner-next-body small {
    color: var(--muted);
    line-height: 1.6;
}

.planner-rail-item.is-conflict {
    background: rgba(255, 247, 237, 0.96);
    border-color: rgba(245, 158, 11, 0.22);
}

.planner-rail-empty {
    padding: 14px;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    color: var(--muted);
    background: rgba(248, 250, 252, 0.9);
}

.planner-rail-empty.is-safe {
    color: #0f766e;
    background: rgba(204, 251, 241, 0.72);
    border-color: rgba(20, 184, 166, 0.2);
}

.teacher-planner-side {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(244,247,255,0.98), rgba(255,255,255,0.98));
    position: sticky;
    top: 18px;
}

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

.planner-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    align-items: start;
    justify-items: center;
    padding: 10px 22px 22px;
}

.planner-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
}

.planner-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    max-height: calc(100vh - 32px);
    overflow: auto;
    top: auto;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
    scrollbar-width: thin;
    margin-top: 2px;
}

.planner-modal-topbar {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: -14px;
    z-index: 2;
    margin: -14px -14px 2px;
    padding: 14px 14px 12px;
    background: linear-gradient(180deg, rgba(244,247,255,0.99), rgba(255,255,255,0.97));
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.planner-modal-topbar strong {
    display: block;
    color: var(--ink);
    font-size: 1rem;
}

.planner-modal-topbar span {
    color: var(--muted);
    font-size: 0.84rem;
}

.planner-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(79, 70, 229, 0.1);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4338ca;
    font-size: 1rem;
}

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

.planner-side-head {
    display: grid;
    gap: 4px;
}

.planner-side-head h4 {
    margin: 0;
    font-size: 0.98rem;
}

.planner-side-head span {
    color: var(--muted);
    font-size: 0.84rem;
}

.planner-side-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.planner-side-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.77rem;
    font-weight: 800;
    border: 1px solid transparent;
}

.planner-side-chip.is-live {
    color: #4338ca;
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.16);
}

.planner-side-chip.is-review {
    color: #0f766e;
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.18);
}

.planner-side-chip.is-quiz {
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.2);
}

.planner-side-chip.is-neutral {
    color: #475569;
    background: rgba(226, 232, 240, 0.74);
    border-color: rgba(148, 163, 184, 0.16);
}

.planner-selection-summary {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(238,242,255,0.94));
    border: 1px solid rgba(79, 70, 229, 0.12);
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.08);
}

.planner-selection-summary strong {
    color: var(--ink);
    font-size: 0.95rem;
}

.planner-selection-summary span,
.planner-selection-summary small {
    color: var(--muted);
    line-height: 1.7;
}

.planner-quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.planner-inline-note {
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.12);
    color: #4338ca;
    font-size: 0.78rem;
    line-height: 1.5;
}

.planner-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: sticky;
    bottom: -14px;
    z-index: 2;
    margin: 4px -14px -14px;
    padding: 12px 14px 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(244,247,255,0.99));
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.planner-form-compact {
    gap: 10px;
}

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

.planner-form-grid-main > .stacked-field:first-child {
    grid-column: 1 / -1;
}

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

.planner-form-compact .stacked-field {
    gap: 5px;
}

.planner-form-compact .stacked-field > span {
    font-size: 0.8rem;
}

.planner-form-compact .form-control,
.planner-form-compact .form-select {
    min-height: 42px;
    padding-top: 0.52rem;
    padding-bottom: 0.52rem;
}

.planner-schedule-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.planner-advanced-box {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.9);
    padding: 10px 12px;
}

.planner-advanced-box summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--ink);
    list-style: none;
}

.planner-advanced-box summary::-webkit-details-marker {
    display: none;
}

.planner-advanced-box[open] summary {
    margin-bottom: 10px;
}

.planner-form-grid-advanced {
    margin-top: 2px;
}

.planner-duration-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.planner-pill {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.planner-pill:hover,
.planner-pill.is-active {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.32);
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
}

.planner-profile-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.planner-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.planner-profile-stat {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(238,242,255,0.94));
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.planner-profile-stat strong {
    font-size: 1.15rem;
    color: var(--ink);
}

.planner-profile-stat span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

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

.planner-profile-entry {
    display: grid;
    gap: 4px;
    width: 100%;
    text-align: right;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
}

.planner-profile-entry strong {
    font-size: 0.96rem;
}

.planner-profile-entry span {
    color: var(--muted);
    font-size: 0.84rem;
}

.planner-profile-entry.is-empty {
    border-style: dashed;
}

.planner-profile-note {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.8;
}

.form-note.is-conflict {
    color: #b91c1c;
    background: rgba(254, 226, 226, 0.78);
    border-color: rgba(239, 68, 68, 0.22);
}

.form-note.is-success {
    color: #0f766e;
    background: rgba(204, 251, 241, 0.82);
    border-color: rgba(20, 184, 166, 0.2);
}

.teacher-calendar-surface .fc {
    --fc-border-color: rgba(148, 163, 184, 0.2);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: rgba(241, 245, 249, 0.7);
    --fc-today-bg-color: rgba(79, 70, 229, 0.08);
}

.teacher-calendar-surface .fc-toolbar.fc-header-toolbar {
    margin-bottom: 1rem;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 10px 0;
}

.teacher-calendar-surface .fc-toolbar-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
}

.teacher-calendar-surface .fc-toolbar-chunk {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.teacher-calendar-surface .fc-button-group {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15);
}

.teacher-calendar-surface .fc-button {
    border-radius: 14px !important;
    box-shadow: none !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: var(--ink) !important;
    font-weight: 800 !important;
    padding: 0.5rem 0.9rem !important;
}

.teacher-calendar-surface .fc-button:hover,
.teacher-calendar-surface .fc-button:focus,
.teacher-calendar-surface .fc-button-active {
    background: linear-gradient(180deg, #4f46e5, #3f37c9) !important;
    color: #fff !important;
}

.teacher-calendar-surface .fc-scrollgrid {
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.98);
}

.teacher-calendar-surface .fc-daygrid-day-frame,
.teacher-calendar-surface .fc-timegrid-slot {
    min-height: 62px;
}

.teacher-calendar-surface .fc-col-header-cell {
    background: rgba(248, 250, 252, 0.98);
}

.teacher-calendar-surface .fc-timegrid-event,
.teacher-calendar-surface .fc-daygrid-event {
    border-radius: 14px !important;
    padding: 0 !important;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.teacher-calendar-surface .fc-col-header-cell-cushion,
.teacher-calendar-surface .fc-daygrid-day-number {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
}

.teacher-calendar-surface .fc-col-header-cell-cushion {
    padding: 12px 8px;
}

.teacher-calendar-surface .fc-timegrid-axis-cushion,
.teacher-calendar-surface .fc-timegrid-slot-label-cushion {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.teacher-calendar-surface .fc-day-today {
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.08), rgba(255,255,255,0.98)) !important;
}

.teacher-calendar-surface .fc-event-peer-block {
    opacity: 0.78;
    border-style: dashed !important;
}

.planner-event-card {
    display: grid;
    gap: 5px;
    padding: 9px 10px 10px;
    position: relative;
}

.planner-event-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--planner-accent, rgba(255, 255, 255, 0.75));
}

.planner-event-card.is-peer {
    background: linear-gradient(180deg, rgba(255,248,240,0.98), rgba(255,237,213,0.96));
}

.planner-event-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.planner-event-card strong {
    font-size: 0.86rem;
    line-height: 1.4;
    color: #111827;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.planner-event-meta {
    font-size: 0.73rem;
    color: #1f2937;
    opacity: 0.95;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.planner-event-time {
    font-size: 0.72rem;
    font-weight: 800;
    color: #111827;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
}

.planner-event-teacher {
    font-size: 0.72rem;
    font-weight: 800;
    color: #111827;
    opacity: 0.95;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.planner-event-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--planner-soft, rgba(255, 255, 255, 0.22));
    font-size: 0.68rem;
    font-weight: 800;
    color: #111827;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
}

.planner-event-badge.is-blocked {
    background: rgba(255, 255, 255, 0.55);
    color: #9a3412;
}

.live-session-card {
    position: relative;
    gap: 10px;
}

.live-session-card.is-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.live-session-card.is-clickable:hover,
.live-session-card.is-clickable:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

.live-session-card.is-past {
    opacity: 0.72;
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.98), rgba(226, 232, 240, 0.95));
}

.live-session-card.is-missed {
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(254, 226, 226, 0.95));
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.live-session-card.is-empty {
    opacity: 0.78;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.94));
    border: 1px dashed rgba(148, 163, 184, 0.55);
}

.live-session-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.live-session-status.is-live {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.live-session-status.is-past {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
}

.live-session-status.is-missed {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.live-session-status.is-empty {
    background: rgba(148, 163, 184, 0.16);
    color: #64748b;
}

.live-session-status.is-scheduled {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.live-session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.archive-filter-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

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

.archive-session-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.archive-session-summary {
    list-style: none;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
}

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

.archive-session-summary-main,
.archive-session-summary-side {
    display: grid;
    gap: 8px;
}

.archive-session-summary-main strong {
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.7;
}

.archive-session-summary-main span,
.archive-session-summary-side small {
    color: var(--text-soft);
    line-height: 1.6;
}

.archive-session-summary-side {
    justify-items: end;
    text-align: left;
}

.archive-session-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 700;
}

.archive-session-chip.is-past {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.archive-session-chip.muted {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
}

.archive-session-body {
    display: grid;
    gap: 16px;
    padding: 0 20px 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.archive-session-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding-top: 16px;
}

.archive-session-meta-item {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.archive-session-meta-item strong {
    color: var(--ink);
    font-size: 0.9rem;
}

.archive-session-meta-item span {
    color: var(--text-soft);
    line-height: 1.6;
}

.archive-session-content {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.45), rgba(248, 250, 252, 0.98));
}

.archive-session-content strong {
    color: var(--ink);
}

.archive-session-content p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.9;
}

.fc .fc-toolbar-title {
    font-family: "Cairo", sans-serif;
    font-weight: 800;
}

.fc-event-subject {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

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

.live-room-shell {
    max-width: 1460px;
}

.live-room-panel {
    overflow: hidden;
}

.live-room-head {
    align-items: start;
}

.live-room-status-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.live-room-status-banner {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    font-weight: 700;
}

.live-room-status-banner[data-tone="info"] {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.live-room-status-banner[data-tone="success"] {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.live-room-status-banner[data-tone="danger"] {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.live-room-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.7fr) minmax(320px, 0.9fr);
    gap: 22px;
    margin-top: 22px;
}

.live-stage-column,
.live-side-column {
    display: grid;
    gap: 18px;
}

.live-room-stage-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.live-room-featured-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.72fr);
    gap: 16px;
    align-items: stretch;
}

.live-featured-stage,
.live-video-tile,
.remote-video-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #172554, #312e81);
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 280px;
}

.live-featured-stage {
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 16px;
    min-height: 420px;
}

.live-featured-stage-head,
.live-featured-stage-foot {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    color: #fff;
}

.live-featured-stage-head span,
.live-featured-stage-foot span {
    color: rgba(255,255,255,.84);
    font-size: .92rem;
}

.live-featured-stage-badges {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.live-featured-video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    min-height: 280px;
    background: rgba(15,23,42,.92);
    margin: 14px 0;
}

.live-featured-stage video,
.live-video-tile video,
.remote-video-card video {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    display: block;
    background: #0f172a;
}

.live-featured-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 12px;
    text-align: center;
    padding: 24px;
    color: #fff;
    background:
        radial-gradient(circle at top, rgba(34,197,94,.14), transparent 34%),
        radial-gradient(circle at bottom, rgba(99,102,241,.22), transparent 36%),
        rgba(15,23,42,.94);
}

.live-avatar-badge,
.participant-avatar {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 14px 24px rgba(15,23,42,.18);
}

.live-avatar-badge {
    width: 84px;
    height: 84px;
    margin: 0 auto;
    font-size: 1.6rem;
}

.live-avatar-badge img,
.participant-avatar img,
.remote-video-overlay-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.live-video-meta,
.remote-video-meta {
    display: grid;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 18px;
    color: #fff;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(6px);
}

.remote-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.live-remote-strip-wrap {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(79,70,229,.08);
}

.remote-video-card {
    min-height: 220px;
    display: grid;
    grid-template-rows: 1fr auto;
}

.remote-video-shell {
    position: relative;
    min-height: 160px;
}

.remote-video-overlay {
    position: absolute;
    inset: auto 10px 10px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(15,23,42,.58);
    color: #fff;
    backdrop-filter: blur(8px);
}

.remote-video-overlay-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
}

.remote-video-overlay strong,
.remote-video-overlay span {
    display: block;
}

.live-side-card {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(79, 70, 229, 0.08);
}

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

.participant-chip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.08);
}

.participant-chip.is-self {
    background: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.18);
}

.participant-chip.is-hand-raised {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.22);
}

.participant-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.participant-main strong,
.participant-main span {
    overflow-wrap: anywhere;
}

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

.participant-tag,
.participant-stage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: .78rem;
    font-weight: 800;
}

.participant-tag {
    background: rgba(15,23,42,.08);
    color: var(--ink);
}

.participant-tag--live {
    background: rgba(16,185,129,.16);
    color: #047857;
}

.participant-stage-btn {
    border: none;
    background: rgba(99,102,241,.12);
    color: #4338ca;
    cursor: pointer;
}

.live-chat-list {
    display: grid;
    gap: 10px;
    max-height: 260px;
    overflow: auto;
    padding-inline-end: 4px;
}

.live-chat-message {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.12);
}

.live-chat-message.is-own {
    background: rgba(79, 70, 229, 0.1);
}

.live-chat-message-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.live-presence-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.live-presence-toolbar .btn.is-active {
    background: rgba(245,158,11,.14);
    border-color: rgba(245,158,11,.28);
    color: #b45309;
}

.live-stage-presence {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-stage-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34,197,94,.14);
}

.live-chat-empty {
    padding: 18px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    color: var(--muted);
    text-align: center;
}

.live-chat-compose {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 14px;
}

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

.live-check-list li {
    display: flex;
    gap: 10px;
    align-items: start;
    color: var(--ink);
}

.live-check-list i {
    color: #10b981;
    margin-top: 3px;
}

.live-session-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.live-session-summary-item {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(248, 250, 255, 0.95);
    border: 1px solid rgba(79, 70, 229, 0.08);
}

.live-session-summary-item strong {
    color: var(--ink);
}

.live-session-summary-item span {
    color: var(--text-soft);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.live-session-summary-item-wide {
    grid-column: 1 / -1;
}

.context-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-placeholder {
    min-height: 220px;
    padding: 18px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.video-placeholder.primary {
    background: linear-gradient(135deg, #4f46e5, #6d65ff);
}

.video-placeholder.soft {
    background: linear-gradient(135deg, #14b8a6, #2dd4bf);
}

.toolbar-row {
    grid-auto-flow: column;
    justify-content: start;
}

.toolbar-row.wrap {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
}

.progress-line {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    overflow: hidden;
}

.progress-line span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--teal), var(--primary));
}

.insight-strip {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.insight-strip div {
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
}

.quiz-submit {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: -2px;
}

.colored-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,255,0.98));
}

.soft-card {
    background: linear-gradient(180deg, rgba(79,70,229,0.04), rgba(20,184,166,0.05));
}

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

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

.course-card-shell {
    display: grid;
    gap: 8px;
}

.course-card {
    border: 1px solid rgba(78, 97, 176, 0.12);
    border-radius: 22px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,255,0.96));
    box-shadow: 0 12px 28px rgba(32,48,110,0.08);
    display: grid;
    gap: 10px;
    text-align: right;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--course-color, var(--primary));
}

.course-card:hover,
.course-card.active {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.24);
    box-shadow: 0 20px 40px rgba(32,48,110,0.14);
}

.course-card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-inline: 4px;
}

.course-card-actions .btn {
    border-radius: 12px;
    font-weight: 700;
    padding: 8px 14px;
}

.course-date-line,
.detail-date-line {
    color: var(--muted);
    font-size: 0.88rem;
}

.detail-date-line {
    display: block;
    margin-top: 6px;
}

.feature-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.1);
    color: var(--ink);
    font-weight: 700;
}

.course-card-top,
.list-head-inline,
.course-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.course-badge {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: var(--course-color, var(--primary));
}

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

.course-detail-head h3 {
    margin: 8px 0 6px;
    font-weight: 800;
}

.course-summary {
    margin: 0;
    color: var(--muted);
}

.detail-grid,
.content-blocks {
    display: grid;
    gap: 12px;
}

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

.detail-box,
.content-block,
.mini-quiz-box,
.empty-detail {
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,255,0.96));
    padding: 16px;
}

.content-block.prominent {
    border-inline-start: 5px solid var(--course-color, var(--primary));
}

.detail-box ul {
    margin: 10px 0 0;
    padding-inline-start: 18px;
}

.detail-box li {
    margin-bottom: 6px;
}

.empty-detail {
    display: grid;
    gap: 8px;
}

.student-calendar {
    min-height: 820px;
}

.student-calendar-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.student-calendar .fc {
    --fc-border-color: #d9dee7;
    --fc-page-bg-color: #ffffff;
    --fc-neutral-bg-color: #f6f7fb;
    --fc-today-bg-color: rgba(59, 130, 246, 0.07);
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(217, 222, 231, 0.95);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
    padding: 18px;
}

.student-calendar .fc-toolbar.fc-header-toolbar {
    margin-bottom: 1rem;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.student-calendar .fc-toolbar-title {
    font-size: 1.5rem;
    color: #111827;
    letter-spacing: 0.01em;
}

.student-calendar .fc-button {
    border-radius: 14px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #374151 !important;
    box-shadow: none !important;
    padding: 0.48rem 0.9rem !important;
    font-weight: 800 !important;
}

.student-calendar .fc-button:hover,
.student-calendar .fc-button:focus,
.student-calendar .fc-button-active {
    background: linear-gradient(180deg, #4f46e5, #3f37c9) !important;
    color: #ffffff !important;
}

.student-calendar .fc-scrollgrid {
    border-radius: 24px;
    overflow: hidden;
}

.student-calendar .fc-col-header-cell {
    background: #fafafa;
}

.student-calendar .fc-col-header-cell-cushion {
    display: block;
    padding: 12px 6px;
    color: #1f2937;
    font-weight: 800;
    text-decoration: none;
}

.student-calendar .fc-daygrid-day-number {
    color: #111827;
    text-decoration: none;
    font-weight: 800;
    padding: 10px 12px 0;
}

.student-calendar .fc-daygrid-day-frame {
    min-height: 112px;
    background: #fff;
}

.student-calendar .fc-timegrid-event,
.student-calendar .fc-daygrid-event {
    border-radius: 14px !important;
    padding: 0 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.student-calendar .fc-day-other .fc-daygrid-day-frame {
    background: #fbfbfd;
}

.student-calendar .fc-day-today .fc-daygrid-day-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    margin-top: 6px;
    margin-inline-start: 6px;
}

.student-calendar .fc-daygrid-event-harness {
    margin-inline: 8px;
    margin-bottom: 6px;
}

.student-calendar .fc-daygrid-event {
    margin-top: 0 !important;
    border-radius: 8px !important;
    border: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.student-shared-event-card {
    min-height: 100%;
}

.student-calendar .fc-daygrid-more-link {
    margin: 4px 10px 8px;
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 800;
}

.student-calendar .fc-event-main {
    padding: 0 !important;
}

.student-calendar .fc-daygrid-body-natural .fc-daygrid-day-events {
    margin-bottom: 6px;
}

.ai-stage-card {
    position: relative;
    overflow: hidden;
}

.avatar-stage {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(20,184,166,0.08));
    border: 1px solid var(--line);
}

.ai-avatar {
    position: relative;
    width: 150px;
    height: 190px;
    margin: 0 auto;
}

.avatar-hair {
    position: absolute;
    top: 8px;
    left: 18px;
    width: 112px;
    height: 88px;
    background: linear-gradient(180deg, #1f2937, #0f172a);
    border-radius: 48px 48px 34px 34px;
    z-index: 3;
}

.avatar-face {
    position: absolute;
    top: 34px;
    left: 30px;
    width: 90px;
    height: 106px;
    background: linear-gradient(180deg, #f5c8a0, #ecb180);
    border-radius: 38px 38px 44px 44px;
    z-index: 2;
    box-shadow: inset 0 -10px 18px rgba(0,0,0,0.08);
}

.avatar-eyes {
    position: absolute;
    top: 34px;
    left: 18px;
    width: 54px;
    display: flex;
    justify-content: space-between;
}

.avatar-eyes span {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #1f2937;
}

.avatar-nose {
    position: absolute;
    top: 52px;
    left: 40px;
    width: 10px;
    height: 22px;
    border-radius: 10px;
    background: rgba(183, 111, 76, 0.24);
}

.avatar-mouth {
    position: absolute;
    left: 29px;
    bottom: 20px;
    width: 32px;
    height: 9px;
    border-radius: 999px;
    background: #8b1e3f;
    transform-origin: center;
    transition: height 0.12s ease, transform 0.12s ease, border-radius 0.12s ease;
}

.ai-avatar.talking .avatar-mouth {
    height: 24px;
    transform: translateY(2px);
    border-radius: 16px;
}

.avatar-body {
    position: absolute;
    bottom: 0;
    left: 15px;
    width: 118px;
    height: 88px;
    border-radius: 36px 36px 22px 22px;
    background: linear-gradient(180deg, #4f46e5, #3026b0);
}

.avatar-caption {
    display: grid;
    gap: 6px;
}

.mini-quiz-box {
    display: grid;
    gap: 8px;
}

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

.analysis-card,
.doc-quiz-card {
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(246,248,255,0.96));
    box-shadow: 0 14px 34px rgba(32, 48, 110, 0.08);
    padding: 18px;
}

.analysis-card-head,
.doc-quiz-head,
.doc-quiz-feedback {
    display: grid;
    gap: 6px;
}

.analysis-card-head span,
.analysis-note,
.analysis-questions,
.doc-quiz-feedback span,
.doc-quiz-feedback small {
    color: var(--muted);
}

.analysis-card p {
    margin: 0;
    line-height: 1.9;
}

.analysis-list,
.analysis-questions {
    margin: 0;
    padding-inline-start: 18px;
    display: grid;
    gap: 8px;
}

.doc-quiz-grid {
    display: grid;
    gap: 16px;
}

.doc-quiz-order {
    display: inline-flex;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.09);
    color: var(--primary);
    font-weight: 800;
}

.doc-quiz-options {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.doc-option {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(79, 70, 229, 0.04);
    border: 1px solid rgba(79, 70, 229, 0.08);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.doc-option:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.2);
}

.doc-option input {
    accent-color: var(--primary);
}

.doc-quiz-actions {
    margin-top: 14px;
}

.doc-quiz-feedback {
    margin-top: 14px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px dashed rgba(79, 70, 229, 0.18);
}

.doc-quiz-card.is-correct {
    border-color: rgba(5, 150, 105, 0.28);
    box-shadow: 0 18px 36px rgba(5, 150, 105, 0.12);
}

.doc-quiz-card.is-correct .doc-quiz-feedback {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.doc-quiz-card.is-wrong {
    border-color: rgba(239, 68, 68, 0.24);
    box-shadow: 0 18px 36px rgba(239, 68, 68, 0.1);
}

.doc-quiz-card.is-wrong .doc-quiz-feedback {
    background: rgba(239, 68, 68, 0.07);
    border-color: rgba(239, 68, 68, 0.2);
}

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

.course-list-grid.compact {
    max-height: 620px;
    overflow: auto;
    padding-inline-end: 6px;
}

.landing-nav a,
.promo-highlights span,
.hero-levels span,
.tag-cloud span,
.channel-ribbon-card,
.participant-chip,
.live-chat-message,
.list-card,
.portal-card,
.feature-banner,
.side-profile,
.mini-stat-card {
    overflow-wrap: anywhere;
}

.empty-courses {
    min-height: 180px;
    align-content: center;
}

.classroom-focus-card {
    display: grid;
    gap: 16px;
}

.classroom-focus-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.classroom-focus-card h3,
.classroom-focus-card p {
    margin: 0;
}

.classroom-focus-card p {
    color: var(--muted);
    line-height: 1.9;
}

@media (max-width: 992px) {
    .landing-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .landing-nav {
        justify-content: start;
        gap: 12px;
    }

    .landing-nav a,
    .landing-nav .nav-cta {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .promo-grid,
    .landing-hero,
    .feature-banner-grid,
    .portal-grid,
    .dashboard-hero,
    .dashboard-grid.two,
    .dashboard-grid.three,
    .hero-quick-grid,
    .live-room-layout,
    .live-room-featured-wrap,
    .teacher-profile-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .dashboard-sidebar {
        position: static;
        min-height: auto;
    }

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

    .promo-copy,
    .home-hero-card,
    .dashboard-hero,
    .live-room-panel {
        padding: 22px;
    }

    .participant-chip {
        grid-template-columns: auto 1fr;
    }

    .participant-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .feature-banner {
        flex-direction: column;
        align-items: start;
    }

    .course-list-grid.compact,
    .compact-upload-card .result-box {
        max-height: none;
    }

    .auth-modal-dialog {
        width: min(760px, 100%);
        max-height: calc(100vh - 32px);
        overflow: auto;
    }

    .landing-chatbot-shell {
        right: 10px;
        bottom: 10px;
        width: min(320px, calc(100vw - 16px));
    }
}

@media (max-width: 1200px) {
    .promo-grid,
    .landing-hero,
    .landing-stats,
    .feature-banner-grid,
    .portal-grid,
    .dashboard-shell,
    .dashboard-hero,
    .dashboard-grid.two,
    .dashboard-grid.three,
    .hero-quick-grid,
    .preview-top,
    .preview-board,
    .quick-actions,
    .live-grid,
    .context-grid,
    .detail-grid,
    .filter-grid,
    .analysis-grid,
    .filter-toolbar,
    .avatar-stage {
        grid-template-columns: 1fr;
    }

    .landing-preview {
        grid-template-columns: 1fr;
    }

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

    .teacher-profile-layout {
        grid-template-columns: 1fr;
    }

    .assistant-actions-grid {
        grid-template-columns: 1fr;
    }

    .teacher-channel-cover-layout,
    .teacher-social-layout,
    .student-teacher-channel-hero,
    .student-teacher-video-card-content {
        grid-template-columns: 1fr;
    }

    .teacher-channel-topbar,
    .teacher-channel-form-grid {
        grid-template-columns: 1fr;
    }

    .teacher-social-sidebar {
        position: static;
    }

    .teacher-channel-media-grid,
    .teacher-social-action-bar {
        grid-template-columns: 1fr;
    }

    .teacher-feed-filter-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-teacher-channel-selects,
    .student-teacher-video-grid {
        grid-template-columns: 1fr;
    }

    .student-teacher-channel-ribbon-track {
        grid-auto-columns: minmax(260px, 88vw);
    }

    .teacher-social-comment.is-reply {
        margin-inline-start: 10px;
    }

    .live-room-layout {
        grid-template-columns: 1fr;
    }

    .live-session-summary-grid {
        grid-template-columns: 1fr;
    }

    .mini-schedule-grid,
    .live-notice-track,
    .planner-profile-stats {
        grid-template-columns: 1fr;
    }

    .teacher-social-side-stats {
        grid-template-columns: 1fr;
    }

    .compact-tools-card .quick-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .teacher-banner-profile-widget {
        width: 100%;
        margin-top: 14px;
        max-width: none;
    }

    .preview-sidebar {
        min-height: 100px;
    }
}

@media (max-width: 768px) {
    .landing-shell,
    .simple-shell,
    .dashboard-shell {
        padding: 14px;
    }

    .panel-card,
    .dashboard-sidebar {
        padding: 18px;
    }

    .live-chat-compose {
        grid-template-columns: 1fr;
    }

    .remote-video-grid {
        grid-template-columns: 1fr;
    }

    .landing-header {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .landing-nav {
        justify-content: start;
    }

    .promo-highlights {
        flex-direction: column;
    }

    .auth-teaser-actions {
        grid-template-columns: 1fr;
    }

    .auth-modal {
        padding: 14px;
    }

    .auth-modal-layout {
        grid-template-columns: 1fr;
    }

    .auth-modal-visual {
        min-height: 240px;
    }

    .auth-modal-dialog {
        padding: 16px;
    }

    .landing-stats {
        grid-template-columns: 1fr;
    }

    .compact-tools-card .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .floating-mini-card {
        position: static;
        min-width: 0;
        margin-top: 12px;
    }

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

    .student-profile-layout {
        grid-template-columns: 1fr;
    }

    .student-news-board {
        grid-template-columns: 1fr;
    }

    .student-profile-shortcuts,
    .student-profile-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-profile-shortcut {
        min-height: 148px;
    }

    .analytics-chart-shell {
        min-height: 300px;
    }

    .analytics-chart-shell canvas {
        height: 260px !important;
    }
}

@media (max-width: 576px) {
    .landing-shell,
    .simple-shell,
    .dashboard-shell {
        padding: 10px;
    }

    .panel-card,
    .dashboard-sidebar,
    .promo-copy,
    .home-hero-card,
    .dashboard-hero,
    .live-room-panel {
        padding: 14px;
        border-radius: 22px;
    }

    .brand-mark,
    .brand-inline,
    .slider-head,
    .panel-head,
    .classroom-focus-top,
    .live-session-top,
    .live-room-status-wrap {
        flex-direction: column;
        align-items: start;
    }

    .side-links {
        grid-template-columns: 1fr;
    }

    .live-session-summary-item {
        padding: 12px 14px;
    }

    .hero-slider,
    .slides,
    .slide-card,
    .auth-teaser-media {
        min-height: auto;
    }

    .auth-teaser-media {
        padding: 10px;
    }

    .auth-teaser-media img {
        width: 100%;
        min-height: auto;
    }

    .toolbar-row.wrap,
    .compact-tools-card .quick-actions,
    .auth-teaser-actions,
    .live-chat-compose {
        grid-template-columns: 1fr;
    }

    .btn,
    .btn-google {
        width: 100%;
    }

    .landing-chatbot-shell {
        right: 8px;
        left: 8px;
        width: auto;
    }

    .landing-chatbot-stage,
    .landing-chatbot-compose {
        grid-template-columns: 1fr;
    }

    .landing-chatbot-toggle {
        padding: 10px 12px;
    }

    .hero-levels,
    .promo-highlights,
    .landing-actions {
        flex-direction: column;
    }

    .slide-content {
        padding: 18px;
    }

    .slide-content h3,
    .portal-card h3,
    .panel-head h3 {
        font-size: 1.05rem;
    }

    .admin-analytics-summary-grid {
        grid-template-columns: 1fr;
    }

    .admin-analytics-card {
        min-height: 112px;
    }

    .student-profile-hero {
        flex-direction: column;
        align-items: start;
    }

    .student-news-card {
        padding: 16px;
        border-radius: 20px;
    }

    .student-profile-info-grid,
    .student-profile-shortcuts {
        grid-template-columns: 1fr;
    }

    .student-profile-identity-card,
    .student-profile-form-card {
        padding: 16px;
        border-radius: 20px;
    }

    .student-profile-avatar-xl {
        width: 96px;
        height: 96px;
        border-radius: 24px;
    }

    .student-profile-shortcut {
        min-height: auto;
        padding: 16px;
    }

    .archive-filter-toolbar,
    .archive-session-meta-grid {
        grid-template-columns: 1fr;
    }

    .archive-session-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .archive-session-summary-side {
        justify-items: start;
        text-align: right;
    }

    .analytics-chart-shell {
        padding: 10px;
        min-height: 260px;
    }

.analytics-chart-shell canvas {
        height: 220px !important;
    }
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.books-empty-state {
    display: grid;
    gap: 0.5rem;
    place-items: center;
    text-align: center;
    min-height: 220px;
    padding: 1.6rem;
    border-radius: 24px;
    border: 1px dashed rgba(59, 130, 246, 0.28);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(248, 250, 252, 0.96));
    color: #475569;
}

.books-empty-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 1.75rem;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.book-card {
    display: grid;
    align-content: start;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,245,249,0.96));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.16);
}

.book-cover-shell {
    position: relative;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #dbeafe, #f5f3ff);
    overflow: hidden;
}

.book-cover-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-cover-pill {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.book-owner-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.34rem 0.72rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24);
}

.book-card-body {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1rem 1.1rem;
}

.book-meta-row {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.book-meta-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.32rem 0.72rem;
    background: rgba(37, 99, 235, 0.09);
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 700;
}

.book-meta-chip.alt {
    background: rgba(124, 58, 237, 0.09);
    color: #7c3aed;
}

.book-status-chip.is-live {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.book-status-chip.is-pending {
    background: rgba(234, 179, 8, 0.14);
    color: #a16207;
}

.book-card-body strong {
    font-size: 1rem;
    color: #0f172a;
}

.book-card-summary {
    margin: 0;
    color: #475569;
    line-height: 1.8;
    min-height: 3.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
}

.book-card-body span,
.book-card-body small {
    color: #475569;
}

.book-card-footer .btn {
    min-width: 124px;
    justify-content: center;
}

.admin-book-main-actions {
    margin-bottom: 0.35rem;
}

.admin-book-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.admin-book-actions-grid .btn {
    width: 100%;
    justify-content: center;
}

.admin-book-actions-grid .btn:last-child {
    grid-column: 1 / -1;
}

#adminBooksList,
#adminBooksList.list-stack,
#teacherBooksGrid,
#teacherBooksGrid.list-stack {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 180px)) !important;
    gap: 16px;
    align-items: start;
    justify-content: start;
}

#adminBooksList > .empty-detail,
#adminBooksList > .books-empty-state,
#teacherBooksGrid > .empty-detail,
#teacherBooksGrid > .books-empty-state {
    grid-column: 1 / -1;
}

.admin-book-card {
    height: 100%;
    max-width: 180px;
}

.admin-book-card .book-cover-shell {
    aspect-ratio: 4 / 2.45;
}

.admin-book-card .book-card-body {
    gap: 0.45rem;
    padding: 0.85rem 0.9rem 1rem;
}

.admin-book-card .book-card-body strong {
    font-size: 0.96rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-book-card .book-card-summary {
    min-height: auto;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    font-size: 0.88rem;
}

.admin-book-card .book-card-owner,
.admin-book-card .book-card-body small {
    font-size: 0.8rem;
    line-height: 1.5;
}

.admin-book-card .book-card-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-book-card .book-card-footer .btn,
.admin-book-card .admin-book-actions-grid .btn {
    min-width: 0;
    padding: 0.58rem 0.7rem;
    font-size: 0.82rem;
}

.admin-book-card .admin-book-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.compact-book-card {
    grid-template-columns: 64px 1fr;
    align-items: stretch;
}

.compact-book-card .book-cover-shell {
    aspect-ratio: auto;
    min-height: 100%;
}

.compact-book-card .book-card-body {
    padding: 0.62rem 0.68rem 0.72rem;
    gap: 0.35rem;
}

.compact-book-card .book-card-body strong {
    -webkit-line-clamp: 2;
    font-size: 0.84rem;
    line-height: 1.45;
}

.compact-book-card .book-card-summary {
    -webkit-line-clamp: 1;
    font-size: 0.74rem;
    line-height: 1.45;
}

.compact-book-card .book-cover-pill {
    top: 6px;
    right: 6px;
    font-size: 0.6rem;
    padding: 0.16rem 0.36rem;
}

.compact-book-card .book-owner-badge {
    left: 6px;
    bottom: 6px;
    font-size: 0.58rem;
    padding: 0.16rem 0.36rem;
}

.compact-book-card .book-meta-chip {
    padding: 0.14rem 0.34rem;
    font-size: 0.58rem;
}

.compact-book-card .admin-book-actions-grid {
    grid-template-columns: 1fr;
}

.compact-book-card .admin-book-actions-grid .btn:last-child {
    grid-column: auto;
}

.compact-book-card .book-card-footer .btn {
    width: 100%;
    padding: 0.44rem 0.5rem;
    font-size: 0.72rem;
}

.book-status-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.book-status-actions .btn {
    width: 100%;
    justify-content: center;
}

.backup-admin-actions {
    display: grid;
    gap: 0.85rem;
}

.spin-inline {
    display: inline-block;
    animation: spin 1s linear infinite;
}

.content-domain-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.content-domain-card p {
    margin: 0;
    color: #475569;
    line-height: 1.9;
}

.admin-content-domain-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.books-modal,
.books-submodal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: rgba(2, 6, 23, 0.76);
    backdrop-filter: blur(10px);
    z-index: 1055;
}

.books-modal[hidden],
.books-submodal[hidden] {
    display: none !important;
}

.books-modal.is-open,
.books-submodal.is-open {
    display: flex;
}

.books-modal-dialog,
.books-submodal-dialog {
    width: min(1320px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
    position: relative;
    padding: 1.1rem;
}

.books-submodal-dialog {
    width: min(980px, 100%);
}

.books-modal-close,
.books-submodal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.books-modal-close:hover,
.books-submodal-close:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
}

.books-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 3.2rem 1rem 0;
}

.books-modal-header strong {
    display: block;
    font-size: 1.3rem;
    color: #0f172a;
}

.books-modal-header span {
    color: #64748b;
}

.books-modal-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.books-reader-stage {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem;
    align-items: center;
}

.book-nav-arrow {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.book-flipbook {
    --book-zoom: 100%;
    transform: scale(calc(var(--book-zoom) / 100));
    transform-origin: center top;
    transition: transform 0.2s ease;
}

.book-flipbook-frame {
    width: 100%;
    min-height: 78vh;
    border: 0;
    border-radius: 24px;
    background: linear-gradient(180deg, #eff6ff, #f8fafc);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.book-sheet {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 1rem;
    background: linear-gradient(180deg, #fff, #f8fafc);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    padding: 1rem;
    min-height: 640px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45), 0 12px 30px rgba(15, 23, 42, 0.08);
}

.book-sheet.book-sheet-flip-next {
    animation: bookSpreadFlipNext 0.42s ease;
}

.book-sheet.book-sheet-flip-prev {
    animation: bookSpreadFlipPrev 0.42s ease;
}

.book-sheet-media {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff, #faf5ff);
    min-height: 600px;
}

.book-spread {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.06) 49.2%, rgba(255,255,255,0.95) 49.5%, rgba(203, 213, 225, 0.9) 50%, rgba(255,255,255,0.95) 50.5%, rgba(15, 23, 42, 0.06) 50.8%),
        linear-gradient(180deg, #fdfcf8, #ffffff);
}

.book-spread::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, rgba(15, 23, 42, 0.12), transparent 18%),
        linear-gradient(90deg, transparent 47%, rgba(15, 23, 42, 0.12) 49.4%, rgba(255,255,255,0.9) 50%, rgba(15, 23, 42, 0.12) 50.6%, transparent 53%);
    mix-blend-mode: multiply;
}

.book-spread-page {
    position: relative;
    min-height: 600px;
    background: linear-gradient(180deg, #fffef9, #ffffff);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.book-spread-page.is-right {
    border-left: 1px solid rgba(148, 163, 184, 0.14);
}

.book-spread-page.is-left {
    border-right: 1px solid rgba(148, 163, 184, 0.14);
}

.book-spread-page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}

.book-spread-page img.is-broken {
    opacity: 0;
}

.book-page-broken-note {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1rem;
    color: #64748b;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(248,250,252,0.92), rgba(255,255,255,0.98));
}

.book-spread-number {
    position: absolute;
    bottom: 0.9rem;
    left: 1rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.book-spread-empty {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(125, 211, 252, 0.18), transparent 45%),
        linear-gradient(180deg, #f8fafc, #eef2ff);
}

.book-spread-empty-note {
    color: #64748b;
    font-weight: 700;
    font-size: 1rem;
}

.book-pdf-stage {
    width: 100%;
    height: 100%;
    min-height: 600px;
    display: grid;
    place-items: center;
    padding: 1rem;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.92)),
        radial-gradient(circle at top, rgba(37,99,235,0.08), transparent 40%);
}

.book-pdf-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    background: #fff;
}

.book-pdf-frame {
    width: 100%;
    min-height: 620px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.book-sheet-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-hotspots-layer {
    position: absolute;
    inset: 0;
}

@keyframes bookSpreadFlipNext {
    0% {
        opacity: 0.4;
        transform: perspective(1400px) rotateY(-10deg) translateX(18px);
    }
    100% {
        opacity: 1;
        transform: perspective(1400px) rotateY(0deg) translateX(0);
    }
}

@keyframes bookSpreadFlipPrev {
    0% {
        opacity: 0.4;
        transform: perspective(1400px) rotateY(10deg) translateX(-18px);
    }
    100% {
        opacity: 1;
        transform: perspective(1400px) rotateY(0deg) translateX(0);
    }
}

.book-hotspot {
    position: absolute;
    transform: translate(50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    font-size: 1rem;
}

.book-hotspot.hot-video {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
}

.book-hotspot.hot-ai {
    background: linear-gradient(135deg, #22c55e, #14b8a6);
    color: #fff;
}

.book-sheet-copy {
    display: grid;
    align-content: start;
    gap: 0.85rem;
}

.book-page-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.book-sheet-copy h4 {
    margin: 0;
    color: #0f172a;
    font-size: 1.35rem;
}

.book-sheet-copy p {
    margin: 0;
    line-height: 2;
    color: #334155;
}

.book-exercise-list {
    display: grid;
    gap: 0.7rem;
}

.book-exercise-card {
    background: #f8fafc;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 0.85rem;
    display: grid;
    gap: 0.3rem;
}

.book-empty-note,
.book-upload-preview-note {
    background: #f8fafc;
    color: #475569;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    padding: 1rem;
    min-height: 88px;
    display: grid;
    place-items: center;
    text-align: center;
}

.book-upload-preview-note img,
.books-ai-image img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 16px;
}

.books-reader-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.books-reader-footer input[type="range"] {
    flex: 1 1 220px;
    accent-color: #2563eb;
}

.books-video-body iframe,
.books-video-body video {
    width: 100%;
    min-height: 420px;
    border: 0;
    border-radius: 20px;
    background: #020617;
}

.books-ai-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1rem;
}

.books-ai-preview,
.books-ai-actions {
    background: #f8fafc;
    border-radius: 22px;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

#teacherBooksWrap .filter-toolbar,
#student-books .filter-toolbar {
    padding: 0.85rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.96));
    border: 1px solid rgba(191, 219, 254, 0.8);
}

#teacherBooksWrap .form-select,
#teacherBooksWrap .form-control,
#student-books .form-select,
#student-books .form-control {
    min-height: 46px;
}

.books-ai-text {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.books-ai-text p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.panel-subhead {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}

.panel-subhead strong {
    color: #0f172a;
}

.panel-subhead span {
    color: #64748b;
    font-size: 0.92rem;
}

.upload-surface {
    display: grid;
    gap: 0.55rem;
}

.book-hotspot-stage {
    position: relative;
    min-height: 180px;
    border-radius: 20px;
    border: 1px dashed rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    display: grid;
    place-items: center;
    text-align: center;
    color: #475569;
    padding: 1rem;
}

.book-hotspot-preview-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.18);
}

@media (max-width: 991.98px) {
    .books-reader-stage {
        grid-template-columns: 1fr;
    }

    .book-nav-arrow {
        display: none;
    }

    .book-sheet,
    .books-ai-layout {
        grid-template-columns: 1fr;
    }

    .book-sheet-media {
        min-height: 420px;
    }

    .book-spread {
        grid-template-columns: 1fr;
    }

    .book-spread-page.is-left {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .books-modal,
    .books-submodal {
        padding: 0.65rem;
    }

    .books-modal-dialog,
    .books-submodal-dialog {
        border-radius: 22px;
        padding: 0.85rem;
    }

    .books-modal-header,
    .books-reader-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .books-modal-actions {
        width: 100%;
    }

    .books-modal-actions .btn {
        flex: 1 1 100%;
    }

    .books-video-body iframe,
    .books-video-body video {
        min-height: 240px;
    }
}

.scroll-top-fab {
    position: fixed;
    right: 18px;
    bottom: 22px;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.28);
    font-size: 1.9rem;
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.92);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.scroll-top-fab.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-top-fab:hover,
.scroll-top-fab:focus-visible {
    color: #fff;
    box-shadow: 0 22px 40px rgba(79, 70, 229, 0.35);
    transform: translateY(-2px) scale(1.02);
}

.scroll-top-fab i {
    line-height: 1;
}

.scroll-top-fab-landing {
    bottom: 92px;
}

@media (max-width: 767.98px) {
    .scroll-top-fab {
        right: 14px;
        bottom: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.7rem;
    }

    .scroll-top-fab-landing {
        bottom: 82px;
    }
}
