/**
 * ai_teacher/assets/css/ai-teacher.css
 *
 * Scholtrix AI Soft Teacher - Visual Identity & Dashboard Architecture
 * Visual Palette: Clean Cream, Crisp White, Forest Green & Subtle Neutrals
 */

:root {
    /* Color Palette */
    --color-cream-bg: #FAF8F5;
    --color-cream-surface: #F5F2EB;
    --color-cream-border: #E8E3DA;
    --color-cream-dark: #DDD7CB;
    --color-white: #FFFFFF;

    /* Forest Green Primary */
    --color-forest-950: #071A14;
    --color-forest-900: #0B251D;
    --color-forest-800: #133E32;
    --color-forest-700: #1B4D3E; /* Main Brand Color */
    --color-forest-600: #256653;
    --color-forest-500: #2E7D32; /* Emerald Success */
    
    /* Sage Accents */
    --color-sage-50: #F7FAF8;
    --color-sage-100: #F0F6F3;
    --color-sage-200: #E8F3EE;
    --color-sage-300: #D1E7DD;
    --color-sage-400: #ADCDBF;
    --color-sage-500: #88B39F;

    /* Neutrals & Text */
    --color-text-title: #14241E;
    --color-text-main: #2D3748;
    --color-text-muted: #64748B;
    --color-text-light: #94A3B8;

    /* Feedback Colors */
    --color-danger-bg: #FEF2F2;
    --color-danger-border: #FCA5A5;
    --color-danger-text: #991B1B;

    --color-warning-bg: #FFFBEB;
    --color-warning-border: #FCD34D;
    --color-warning-text: #92400E;

    --color-info-bg: #F0F9FF;
    --color-info-border: #BAE6FD;
    --color-info-text: #075985;

    --color-success-bg: #ECFDF5;
    --color-success-border: #A7F3D0;
    --color-success-text: #065F46;

    /* Stat Accents */
    --accent-blue-bg: #EFF6FF;
    --accent-blue-border: #BFDBFE;
    --accent-blue-text: #1D4ED8;

    --accent-orange-bg: #FFF7ED;
    --accent-orange-border: #FED7AA;
    --accent-orange-text: #C2410C;

    /* Shadows & Border Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(19, 62, 50, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(19, 62, 50, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(19, 62, 50, 0.08), 0 2px 4px -2px rgba(19, 62, 50, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(19, 62, 50, 0.10), 0 8px 10px -6px rgba(19, 62, 50, 0.05);
    --shadow-card: 0 20px 40px -15px rgba(27, 77, 62, 0.12);

    /* Dimensions */
    --sidebar-width: 270px;
    --header-height: 70px;
}

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-cream-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.bg-cream {
    background-color: var(--color-cream-bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(27, 77, 62, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(232, 243, 238, 0.5) 0px, transparent 50%);
}

/* ─────────────────────────────────────────────────────────────────
   APP LAYOUT: SIDEBAR + MAIN CONTENT
   ───────────────────────────────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--color-white);
    border-right: 1px solid var(--color-cream-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

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

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-text-group {
    display: flex;
    flex-direction: column;
}

.brand-main-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-forest-800);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-sub-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-forest-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
}

/* Sidebar School Tenant Micro-Card */
.sidebar-school-card {
    margin: 16px;
    padding: 12px;
    background: var(--color-cream-surface);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-school-thumb {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-logo-fallback {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-forest-700);
}

.sidebar-school-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-school-name {
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--color-text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-tenant-code {
    font-size: 0.7rem;
    color: var(--color-forest-600);
    font-family: monospace;
    font-weight: 600;
}

/* Sidebar Navigation Items */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: 0.06em;
    padding: 12px 12px 6px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--color-text-main);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.15s ease;
    margin-bottom: 3px;
    position: relative;
}

.nav-item:hover {
    background-color: var(--color-cream-surface);
    color: var(--color-forest-800);
}

.nav-item.active {
    background-color: var(--color-sage-200);
    color: var(--color-forest-800);
    font-weight: 700;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 6px;
    bottom: 6px;
    width: 4px;
    background-color: var(--color-forest-700);
    border-radius: var(--radius-full);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    color: var(--color-forest-700);
}

.sidebar-status-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--color-cream-border);
    background: var(--color-sage-50);
}

.system-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-forest-700);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-forest-500);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.phase-info-text {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────
   MAIN CONTENT WRAPPER
   ───────────────────────────────────────────────────────────────── */
.app-main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0; /* Prevents overflow in flex child */
}

/* Top App Header */
.app-header {
    height: var(--header-height);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-cream-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-xs);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-main);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.sidebar-toggle-btn:hover {
    background: var(--color-cream-surface);
}

.academic-badge-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.academic-session-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-sage-200);
    color: var(--color-forest-800);
    border: 1px solid var(--color-sage-300);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.825rem;
    font-weight: 700;
}

.session-term-divider {
    color: var(--color-forest-600);
    opacity: 0.6;
}

.tenant-inline-badge {
    background: var(--color-cream-surface);
    color: var(--color-forest-700);
    border: 1px solid var(--color-cream-border);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: monospace;
}

/* Header Right: Profile Dropdown & Logout */
.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.profile-trigger-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s ease;
}

.profile-trigger-btn:hover,
.profile-trigger-btn[aria-expanded="true"] {
    background: var(--color-cream-surface);
    border-color: var(--color-cream-border);
}

.profile-text-group {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.profile-user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-title);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-forest-700);
}

.profile-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-forest-700);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
}

.dropdown-chevron {
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.profile-trigger-btn[aria-expanded="true"] .dropdown-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu Popup */
.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    display: none;
    z-index: 200;
}

.profile-dropdown-menu.show {
    display: block;
    animation: fadeInDown 0.15s ease forwards;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
    padding: 12px 18px;
    border-bottom: 1px solid var(--color-cream-border);
}

.dropdown-user-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text-title);
}

.dropdown-user-email {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.dropdown-tenant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}

.dropdown-tenant-school {
    font-weight: 700;
    color: var(--color-forest-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.dropdown-tenant-id {
    font-family: monospace;
    font-weight: 700;
    color: var(--color-forest-600);
}

.dropdown-academic-info {
    padding: 10px 18px;
    background: var(--color-sage-50);
    font-size: 0.75rem;
}

.academic-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.ac-label {
    color: var(--color-text-muted);
}

.ac-val {
    font-weight: 700;
    color: var(--color-forest-900);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-cream-border);
    margin: 6px 0;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-main);
    text-decoration: none;
    transition: background 0.15s ease;
}

.dropdown-link:hover {
    background: var(--color-cream-surface);
    color: var(--color-forest-800);
}

.dropdown-link.logout {
    color: var(--color-danger-text);
}

.dropdown-link.logout:hover {
    background: var(--color-danger-bg);
}

.btn-direct-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    background: var(--color-cream-surface);
    color: var(--color-text-main);
    border: 1px solid var(--color-cream-border);
    font-size: 0.825rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-direct-logout:hover {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
    border-color: var(--color-danger-border);
}

/* ─────────────────────────────────────────────────────────────────
   DASHBOARD MAIN VIEW & HERO
   ───────────────────────────────────────────────────────────────── */
.dashboard-main {
    flex: 1;
    padding: 28px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.hero-welcome-card {
    background: linear-gradient(135deg, var(--color-forest-900) 0%, var(--color-forest-800) 45%, var(--color-forest-700) 100%);
    color: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-welcome-card::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(232, 243, 238, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    color: #A7F3D0;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
}

.hero-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.22);
    padding: 5px 12px;
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.9);
}

.btn-hero {
    background: var(--color-white);
    color: var(--color-forest-900);
    font-weight: 700;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-hero:hover {
    background: var(--color-sage-100);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* ─────────────────────────────────────────────────────────────────
   QUICK ACTIONS BAR
   ───────────────────────────────────────────────────────────────── */
.quick-actions-bar {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-xs);
}

.quick-actions-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-forest-800);
    white-space: nowrap;
}

.quick-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--color-cream-surface);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-md);
    color: var(--color-text-title);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.15s ease;
}

.quick-action-btn:hover {
    background: var(--color-sage-200);
    border-color: var(--color-sage-400);
    color: var(--color-forest-900);
    transform: translateY(-1px);
}

.qa-icon {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qa-icon.forest { background: var(--color-sage-200); color: var(--color-forest-700); }
.qa-icon.emerald { background: #DCFCE7; color: #166534; }
.qa-icon.sage { background: #FEF3C7; color: #92400E; }
.qa-icon.dark { background: #F1F5F9; color: #334155; }

/* ─────────────────────────────────────────────────────────────────
   STATISTICS CARDS GRID (6 Cards)
   ───────────────────────────────────────────────────────────────── */
.section-container {
    width: 100%;
}

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

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text-title);
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

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

.stat-card {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-xs);
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--color-forest-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-wrap.forest { background: var(--color-sage-200); color: var(--color-forest-700); }
.stat-icon-wrap.sage { background: #E0E7FF; color: #3730A3; }
.stat-icon-wrap.emerald { background: #DCFCE7; color: #15803D; }
.stat-icon-wrap.orange { background: var(--accent-orange-bg); color: var(--accent-orange-text); }
.stat-icon-wrap.blue { background: var(--accent-blue-bg); color: var(--accent-blue-text); }
.stat-icon-wrap.dark { background: #F1F5F9; color: #334155; }

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--color-text-title);
    line-height: 1.1;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.3;
}

.stat-subtext {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────
   ACTIVITIES & TIMETABLE GRID (2 Columns)
   ───────────────────────────────────────────────────────────────── */
.activities-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.activity-card-panel {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.panel-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text-title);
}

.panel-header-title svg {
    color: var(--color-forest-700);
}

.panel-header-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-forest-700);
    text-decoration: none;
    transition: color 0.15s ease;
}

.panel-header-link:hover {
    color: var(--color-forest-900);
    text-decoration: underline;
}

.panel-body {
    padding: 18px 20px;
    flex: 1;
}

/* Activity Rows */
.activity-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lesson-item-row,
.schedule-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--color-cream-surface);
    border: 1px solid var(--color-cream-border);
    transition: background 0.15s ease;
}

.lesson-item-row:hover,
.schedule-item-row:hover {
    background: var(--color-sage-100);
}

.item-icon-box {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--color-sage-200);
    color: var(--color-forest-700);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.schedule-day-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-forest-700);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    min-width: 44px;
    flex-shrink: 0;
}

.day-short {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.period-num {
    font-size: 0.65rem;
    opacity: 0.9;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-subtitle {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.dot-sep {
    margin: 0 4px;
}

.item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-badge.published,
.status-badge.badge-success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.status-badge.draft,
.status-badge.badge-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
}

.status-badge.badge-danger {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
}

.item-date {
    font-size: 0.7rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

.time-slot-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-forest-800);
    background: var(--color-sage-200);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

/* Activity Feed List */
.activity-feed-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feed-item-row {
    display: flex;
    gap: 12px;
    position: relative;
    padding-left: 18px;
}

.feed-indicator {
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-forest-700);
}

.feed-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-title);
}

.feed-subtitle {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.feed-time {
    font-size: 0.68rem;
    color: var(--color-text-light);
    margin-top: 2px;
    display: block;
}

/* Empty State Box */
.empty-state-box {
    text-align: center;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-cream-surface);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.empty-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-title);
    margin-bottom: 4px;
}

.empty-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    max-width: 300px;
    margin-bottom: 14px;
    line-height: 1.45;
}

/* ─────────────────────────────────────────────────────────────────
   MODULE VIEW CARDS (Secondary Pages)
   ───────────────────────────────────────────────────────────────── */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.breadcrumb-link {
    color: var(--color-forest-700);
    text-decoration: none;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--color-text-light);
}

.breadcrumb-current {
    color: var(--color-text-muted);
}

.module-view-card {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-xl);
    padding: 48px 32px;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.module-hero-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: var(--color-sage-200);
    color: var(--color-forest-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.module-status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    background: var(--color-cream-surface);
    border: 1px solid var(--color-cream-border);
    color: var(--color-forest-800);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.module-view-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--color-text-title);
    margin-bottom: 8px;
}

.module-view-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    max-width: 550px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.setting-item-box {
    background: var(--color-cream-surface);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
}

.setting-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-title);
}

.setting-item-sub {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* ─────────────────────────────────────────────────────────────────
   TENANT SECURITY CARD
   ───────────────────────────────────────────────────────────────── */
.tenant-status-card {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-xs);
}

.tenant-info-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tenant-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--color-sage-200);
    color: var(--color-forest-700);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tenant-heading {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text-title);
    margin-bottom: 2px;
}

.tenant-subtext {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.tenant-status-tags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
}

.status-tag.active {
    background: var(--color-success-bg);
    color: var(--color-success-text);
    border: 1px solid var(--color-success-border);
}

.status-tag.tenant-code {
    background: var(--color-cream-surface);
    color: var(--color-forest-800);
    border: 1px solid var(--color-cream-border);
    font-family: monospace;
}

/* App Footer */
.app-footer {
    background: var(--color-white);
    border-top: 1px solid var(--color-cream-border);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: auto;
}

.footer-badge {
    background: var(--color-sage-200);
    color: var(--color-forest-700);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
}

/* Utilities */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

/* ─────────────────────────────────────────────────────────────────
   RESPONSIVE MEDIA QUERIES (Desktop, Tablets & Classroom Computers)
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(11, 37, 29, 0.4);
        backdrop-filter: blur(2px);
        z-index: 999;
        display: none;
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .sidebar-close-btn {
        display: block;
    }

    .app-main-wrapper {
        margin-left: 0;
    }

    .sidebar-toggle-btn {
        display: block;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-welcome-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .app-header {
        padding: 0 16px;
    }

    .dashboard-main {
        padding: 16px;
    }

    .d-none-mobile {
        display: none !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .profile-text-group {
        display: none;
    }

    .tenant-status-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .app-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ─────────────────────────────────────────────────────────────────
   PHASE 4: INTELLIGENT AI LESSON PREPARATION STYLES
   ───────────────────────────────────────────────────────────────── */

/* Workflow Progress Tracker */
.prep-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    padding: 18px 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xs);
}

.prep-step {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.prep-step-num {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--color-cream-surface);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid var(--color-cream-border);
    transition: all 0.25s ease;
}

.prep-step.active {
    color: var(--color-forest-700);
}

.prep-step.active .prep-step-num {
    background: var(--color-forest-700);
    color: var(--color-white);
    border-color: var(--color-forest-700);
    box-shadow: 0 0 0 4px var(--color-sage-200);
}

.prep-step.completed {
    color: var(--color-forest-800);
}

.prep-step.completed .prep-step-num {
    background: var(--color-forest-500);
    color: var(--color-white);
    border-color: var(--color-forest-500);
}

.prep-step-divider {
    flex: 1;
    height: 2px;
    background: var(--color-cream-border);
    margin: 0 16px;
}

/* Card & Section Styling */
.prep-card {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    margin-bottom: 24px;
}

.prep-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-cream-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-sage-50);
}

.prep-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-forest-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.prep-card-body {
    padding: 24px;
}

/* Selection Filters Grid */
.prep-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Summary Grid */
.lesson-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    background: var(--color-cream-bg);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 18px;
}

.lesson-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lesson-meta-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.lesson-meta-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-title);
}

/* Configuration Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.config-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.config-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.config-select, .config-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-text-main);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.config-select:focus, .config-input:focus {
    border-color: var(--color-forest-700);
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.12);
}

/* Pedagogical Section Accordion / Cards */
.sections-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-card {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: all 0.25s ease;
}

.section-card:hover {
    border-color: var(--color-sage-400);
    box-shadow: var(--shadow-sm);
}

.section-header {
    padding: 14px 20px;
    background: var(--color-sage-50);
    border-bottom: 1px solid var(--color-cream-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-order-badge {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--color-forest-700);
    color: var(--color-white);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-forest-900);
}

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

.section-duration-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--color-cream-surface);
    border: 1px solid var(--color-cream-border);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-forest-800);
}

.section-body {
    padding: 18px 20px;
}

.section-editor-textarea {
    width: 100%;
    min-height: 180px;
    padding: 14px;
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-main);
    background: var(--color-white);
    resize: vertical;
    outline: none;
    transition: all 0.2s ease;
}

.section-editor-textarea:focus {
    border-color: var(--color-forest-700);
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.12);
}

.section-footer-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Modals */
.prep-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 26, 20, 0.5);
    backdrop-filter: blur(3px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.prep-modal-overlay.show {
    display: flex;
}

.prep-modal-box {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    max-width: 650px;
    width: 100%;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    animation: modalSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.prep-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-cream-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-sage-50);
}

.prep-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-forest-900);
}

.prep-modal-close {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.prep-modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.prep-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-cream-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: var(--color-cream-bg);
}

/* Timeline & Versions */
.version-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.version-item {
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--color-white);
}

.version-item.current {
    border-color: var(--color-forest-600);
    background: var(--color-sage-50);
}

.version-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.version-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-forest-800);
}

.version-meta {
    font-size: 0.76rem;
    color: var(--color-text-muted);
}

/* Generation Animation Overlay */
.gen-progress-card {
    text-align: center;
    padding: 40px 24px;
}

.gen-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-sage-200);
    border-top-color: var(--color-forest-700);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.gen-step-list {
    max-width: 440px;
    margin: 20px auto 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.gen-step-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.gen-step-row.done {
    color: var(--color-forest-700);
    font-weight: 600;
}

/* Print View Styles */
@media print {
    .app-sidebar, .app-header, .app-footer, .breadcrumb-bar, .no-print, .btn {
        display: none !important;
    }
    .app-main-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .section-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    .section-header {
        background: #f0f0f0 !important;
    }
}

/* ─────────────────────────────────────────────────────────────────
   PHASE 5: AI TEACHING ORCHESTRATION & CLASSROOM PLAYER STYLES
   ───────────────────────────────────────────────────────────────── */

/* Theater Layout */
.classroom-theater-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.classroom-top-bar {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-xs);
}

.theater-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: stretch;
}

/* Digital Blackboard */
.digital-blackboard {
    background: radial-gradient(circle at 50% 50%, #153A2E 0%, #0B251D 100%);
    border: 8px solid #3E2723; /* Classic wooden border */
    border-radius: var(--radius-xl);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 15px 35px rgba(7, 26, 20, 0.25);
    min-height: 540px;
    padding: 30px;
    color: #FAF8F5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.board-content-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 440px;
    width: 100%;
}

/* Chalk typography */
.chalk-entry {
    font-size: 1.2rem;
    line-height: 1.7;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.4);
    max-width: 800px;
}

.chalk-heading {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FCD34D !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px dashed rgba(252, 211, 77, 0.4);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.chalk-callout_box {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 18px 24px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #A7F3D0 !important;
}

/* Board Action Cards */
.board-visual-card, .board-draw-card, .board-demo-card,
.board-ask-card, .board-wait-card, .board-reveal-card,
.board-summary-card, .board-assess-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 760px;
    width: 100%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.board-ask-card {
    background: rgba(239, 246, 255, 0.08);
    border-color: rgba(191, 219, 254, 0.3);
}

.ask-badge {
    display: inline-block;
    background: #1D4ED8;
    color: #fff;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.ask-question-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: #FCD34D;
    line-height: 1.4;
    margin-bottom: 8px;
}

.ask-subtext {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Countdown Clock */
.board-wait-card {
    background: rgba(254, 243, 199, 0.08);
    border-color: rgba(252, 211, 77, 0.3);
}

.wait-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.wait-prompt {
    font-size: 1.2rem;
    color: #FCD34D;
    margin-bottom: 12px;
}

.wait-countdown-clock {
    font-size: 3.5rem;
    font-weight: 900;
    font-family: monospace;
    color: #A7F3D0;
    text-shadow: 0 0 10px rgba(167, 243, 208, 0.5);
}

/* Reveal Solution Card */
.board-reveal-card {
    background: rgba(236, 253, 245, 0.12);
    border-color: rgba(167, 243, 208, 0.4);
}

.reveal-badge {
    background: #065F46;
    color: #A7F3D0;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 800;
}

.reveal-ans-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #FAF8F5;
    margin-top: 12px;
}

/* Teacher Avatar & Speech Panel */
.teacher-speech-panel {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.teacher-avatar-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-cream-border);
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-sage-200);
    border: 3px solid var(--color-forest-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(27, 77, 62, 0.15);
}

.avatar-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-forest-900);
}

.avatar-role-label {
    font-size: 0.76rem;
    color: var(--color-forest-700);
    font-weight: 600;
}

/* Speech Caption Bubble */
.teacher-speech-bubble {
    background: var(--color-cream-surface);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin: 16px 0;
    position: relative;
    min-height: 140px;
}

.speech-bubble-tail {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--color-cream-surface);
}

.live-caption-text {
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--color-text-main);
    font-style: italic;
}

.teacher-cues-badge {
    font-size: 0.74rem;
    background: var(--color-sage-100);
    color: var(--color-forest-800);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-sage-300);
}

/* Classroom Control Dock */
.classroom-control-dock {
    background: var(--color-white);
    border: 1px solid var(--color-cream-border);
    border-radius: var(--radius-full);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    margin-top: 10px;
}

.control-dock-left, .control-dock-center, .control-dock-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-dock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-cream-border);
    background: var(--color-white);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--color-text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dock:hover {
    background: var(--color-sage-100);
    border-color: var(--color-forest-700);
    color: var(--color-forest-800);
}

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

.btn-dock.btn-dock-primary:hover {
    background: var(--color-forest-800);
}

.btn-dock.active {
    background: var(--color-forest-500);
    border-color: var(--color-forest-500);
    color: #fff;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-scale-up {
    animation: scaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive adjustment */
@media (max-width: 992px) {
    .theater-grid {
        grid-template-columns: 1fr;
    }
}
