/* Libyan Smart Learning Platform - Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #e0f2fe;
    --accent-libya-green: #059669;
    --accent-libya-red: #dc2626;
    --accent-amber: #d97706;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px -2px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 28px -6px rgba(0,0,0,0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TOP NAVBAR */
.top-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-flag {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #dc2626 0%, #000000 50%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.brand-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}
.brand-subtitle {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
}

/* SPACE SWITCHER TABS */
.space-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    overflow-x: auto;
}
.space-tab-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.space-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.6);
}
.space-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* APP MAIN CONTAINER */
.main-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 20px 60px 20px;
    width: 100%;
    flex: 1;
}

/* CARDS & CONTAINERS */
.portal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.portal-card:hover {
    box-shadow: var(--shadow-md);
}

/* LINEAR TUNNELING BREADCRUMB */
.tunnel-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
}
.tunnel-step {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}
.tunnel-step.active {
    color: var(--primary);
}
.tunnel-arrow {
    color: #cbd5e1;
}

/* SUBJECT COLORFUL CARDS */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 16px;
}
.subject-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 22px;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.subject-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 14px;
}

/* TRACK SWITCH (STUDENT BOOK vs ACTIVITY WORKBOOK) */
.track-switcher {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.track-pill {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}
.track-pill.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* PURE FOCUS ROOM (غرفة التركيز المعزولة) */
.focus-room-container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid #cbd5e1;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.focus-room-header {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    color: white;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.pomodoro-badge {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1px;
}
.pomodoro-btn {
    background: white;
    color: var(--primary-dark);
    border: none;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.focus-body {
    padding: 36px 30px;
}
.focus-question-box {
    background: #f8fafc;
    border-right: 6px solid var(--primary);
    padding: 24px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}
.focus-question-text {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.8;
    color: #1e293b;
}

/* 3-TIER GUIDANCE ACCORDION */
.guidance-box {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}
.tier-button-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.tier-btn {
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.tier-btn:hover {
    background: #f1f5f9;
}
.tier-btn.unlocked {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}
.tier-content-panel {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 12px;
    line-height: 1.8;
    font-size: 14px;
}

/* BUBBLE SHEET EXAM SIMULATOR (محاكي امتحانات الشهادة الإعدادية) */
.exam-sim-container {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}
.bubble-sheet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}
.bubble-options {
    display: flex;
    gap: 14px;
}
.bubble-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.bubble-circle:hover {
    border-color: var(--primary);
    background: #f0f9ff;
}
.bubble-circle.selected {
    background: #0284c7;
    border-color: #0284c7;
    color: white;
    box-shadow: 0 0 0 3px rgba(2,132,199,0.25);
}

/* MINISTRY TRAPS ALERT CARD (كشف الفخاخ الوزارية) */
.trap-alert-card {
    background: #fff1f2;
    border-right: 5px solid #e11d48;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}
.trap-title {
    color: #9f1239;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 4px;
}
.trap-desc {
    font-size: 13px;
    color: #4c0519;
    line-height: 1.7;
}

/* PARENTAL GATE MODAL & PIN PAD */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.modal-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 90%;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.pin-display {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 24px 0;
}
.pin-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: transparent;
}
.pin-dot.filled {
    background: var(--primary);
    border-color: var(--primary);
}
.pin-pad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 260px;
    margin: 0 auto;
}
.pin-key {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s;
}
.pin-key:hover {
    background: #e2e8f0;
}
.pin-key:active {
    transform: scale(0.95);
}

/* BUTTONS */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover {
    background: var(--primary-dark);
}
.btn-success {
    background: var(--accent-libya-green);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-success:hover {
    background: #047857;
}

/* STATUS BADGES */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}
.status-badge.approved {
    background: #dcfce7;
    color: #15803d;
}
.status-badge.under-review {
    background: #fef3c7;
    color: #b45366;
}
.status-badge.draft {
    background: #f1f5f9;
    color: #64748b;
}

/* RESPONSIVENESS */
@media (max-width: 768px) {
    .tier-button-group {
        grid-template-columns: 1fr;
    }
    .space-tabs {
        width: 100%;
    }
    .bubble-sheet-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ==========================================================================
   ADMIN HIERARCHICAL TREE VIEW & SUPERVISOR ASSIGNMENT STYLES
   ========================================================================== */
.tree-stage-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.2s ease;
}
.tree-stage-card:hover {
    border-color: #0284c7;
    box-shadow: var(--shadow-md);
}
.tree-stage-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 12px;
}
.tree-stage-title {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tree-grades-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fafafa;
}
.tree-grade-node {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-right: 5px solid #0284c7;
    border-radius: var(--radius-sm);
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.tree-grade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.tree-grade-name {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tree-subjects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 6px;
}
.tree-subject-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.tree-subject-chip:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}
.chip-delete-btn {
    color: #dc2626;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-right: 4px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chip-delete-btn:hover {
    background: #fee2e2;
}
.btn-pdf-chip {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
    margin-right: 4px;
}
.btn-pdf-chip:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* SUPERVISOR ASSIGNMENTS MATRIX MODAL */
.assignment-matrix {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
    margin: 16px 0;
}
.matrix-grade-block {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.matrix-grade-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 8px;
}
.matrix-subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.matrix-subject-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
}
.matrix-subject-item:hover {
    background: #f1f5f9;
}
.supervisor-pill {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    margin: 2px;
}

/* CURRICULUM PDF FILES & UPLOAD MODAL */
.pdf-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.pdf-file-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pdf-file-card:hover {
    border-color: #0284c7;
    box-shadow: var(--shadow-sm);
}
.file-upload-zone {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.file-upload-zone:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}
.assigned-subject-badge {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 13px;
    transition: all 0.2s;
}
.assigned-subject-badge:hover {
    border-color: #0284c7;
    transform: translateY(-2px);
}
.assigned-subject-badge.active {
    border-color: #059669;
    background: #f0fdf4;
    color: #166534;
}

/* UPLOAD PROGRESS & NOTIFICATIONS */
.upload-progress-container {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 14px;
}
.upload-progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0284c7 0%, #059669 100%);
    border-radius: 8px;
    transition: width 0.15s ease-out;
    background-size: 30px 30px;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.25) 75%, transparent 75%, transparent);
    animation: progress-stripes 1s linear infinite;
}
@keyframes progress-stripes {
    from { background-position: 30px 0; }
    to { background-position: 0 0; }
}
.upload-progress-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
}
.upload-success-card {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 16px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SUBJECT BOOK BADGES */
.badge-books-uploaded {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    font-weight: 800;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}
.badge-books-uploaded:hover {
    background: #bbf7d0;
    transform: scale(1.03);
}
.badge-books-missing {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde047;
    font-weight: 800;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}
.badge-books-missing:hover {
    background: #fde68a;
    transform: scale(1.03);
}

/* DROPZONE */
.pdf-dropzone {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.pdf-dropzone:hover, .pdf-dropzone.dragover {
    border-color: #0284c7;
    background: #eff6ff;
}

/* USER LOGIN CARD */
.user-card-selectable {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}
.user-card-selectable:hover {
    border-color: #0284c7;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* ==========================================================================
   SUPERVISOR QUALITY STUDIO & COURSE CARDS (WORLD-CLASS ERGONOMIC DESIGN)
   ========================================================================== */
.supervisor-cockpit-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.supervisor-kpi-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 16px;
    text-align: center;
    min-width: 90px;
}
.supervisor-kpi-num {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.2;
}
.supervisor-kpi-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-top: 2px;
}

/* Grade Filter Pills */
.grade-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 18px;
}
.grade-filter-pill {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.grade-filter-pill:hover {
    border-color: #0284c7;
    color: #0284c7;
    background: #f0f9ff;
    transform: translateY(-1px);
}
.grade-filter-pill.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 4px 12px -2px rgba(2, 132, 199, 0.4);
}
.grade-filter-count {
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 12px;
}
.grade-filter-pill.active .grade-filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Supervisor Course Grid */
.supervisor-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.supervisor-course-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.supervisor-course-card:hover {
    transform: translateY(-4px);
    border-color: #94a3b8;
    box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.08);
}

.course-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.course-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.course-title-block h4 {
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 4px 0;
}
.course-grade-name {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Textbook Health Box */
.textbook-health-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 12px 0 16px 0;
}
.textbook-health-title {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.textbook-health-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}
.textbook-health-pill {
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 800;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1px solid transparent;
}
.textbook-health-pill.available {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}
.textbook-health-pill.missing {
    background: #fffbeb;
    color: #b45309;
    border-color: #fef08a;
}

/* Course Card Actions */
.course-card-actions {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 10px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    margin-top: auto;
}
.btn-course-library {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-course-library:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.btn-course-audit {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}
.btn-course-audit:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

/* Focused Audit Studio */
.audit-studio-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.audit-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
}
.audit-back-btn {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.audit-back-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.audit-status-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.audit-status-pill {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.audit-status-pill.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.audit-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.audit-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.audit-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================================================
   TWO-PANEL SMART CURRICULUM ANNOTATION & EXTRACTION STUDIO (محاكي المناهج)
   ========================================================================== */
.split-studio-wrapper {
    background: #f1f5f9;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 30px;
}

.split-studio-topbar {
    background: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: 0 4px 16px rgba(11, 19, 43, 0.2);
}

.split-studio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(380px, 0.85fr);
    gap: 18px;
    height: calc(100vh - 160px);
    min-height: 750px;
    align-items: stretch;
    transition: grid-template-columns 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.split-studio-grid.book-expanded-mode {
    grid-template-columns: minmax(0, 1.95fr) minmax(340px, 0.65fr);
}

@media (max-width: 1024px) {
    .split-studio-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.split-studio-pane {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.studio-pane-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.studio-pane-title {
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-toolbar-row {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    flex-shrink: 0;
}

/* Switch Toggle (iOS style) */
.studio-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    user-select: none;
}
.studio-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}
.studio-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.studio-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 20px;
}
.studio-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.studio-switch input:checked + .studio-slider {
    background-color: #0284c7;
}
.studio-switch input:checked + .studio-slider:before {
    transform: translateX(16px);
}

/* ==========================================================================
   COLLAPSIBLE STUDIO BOOK TOOLBARS & EXPAND/COLLAPSE HANDLES
   ========================================================================== */
.studio-book-toolbar-container {
    background: #ffffff;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    max-height: 480px;
    overflow: hidden;
    opacity: 1;
    flex-shrink: 0;
}

.studio-book-toolbar-container.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    pointer-events: none;
}

/* Button inside header to collapse */
.btn-toggle-toolbar-collapse {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-toggle-toolbar-collapse:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

/* Bottom edge handle bar with arrow up */
.toolbar-edge-toggle-handle {
    background: #f1f5f9;
    border-top: 1.5px solid #e2e8f0;
    text-align: center;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 800;
    color: #0284c7;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    user-select: none;
}
.toolbar-edge-toggle-handle:hover {
    background: #e0f2fe;
    color: #0369a1;
}
.toolbar-edge-toggle-handle .handle-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}
.toolbar-edge-toggle-handle:hover .handle-arrow {
    transform: translateY(-2px);
}

/* Sleek Re-Open Strip (When Collapsed) with arrow down */
.studio-collapsed-reopen-strip {
    display: none;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-bottom: 2px solid #0284c7;
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    animation: fadeInSlideDown 0.25s ease-out;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.studio-collapsed-reopen-strip.visible {
    display: flex !important;
}

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

.btn-reopen-arrow-pulse {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
    transition: all 0.2s;
}
.btn-reopen-arrow-pulse:hover {
    background: #38bdf8;
    color: #0f172a;
    transform: scale(1.03);
}

.collapsed-book-badge {
    background: rgba(255, 255, 255, 0.12);
    color: #93c5fd;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 800;
}
.collapsed-page-badge {
    background: #16a34a;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
}

.btn-reopen-quick-action {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-reopen-quick-action:hover {
    background: #ffffff;
    color: #0f172a;
}

/* Document Paper Sheet (Continuous Scrollable Book Viewport) */
.paper-sheet-viewport {
    background: #cbd5e1;
    padding: 28px 20px;
    flex: 1;
    overflow-y: auto;
    position: relative;
    border-radius: 0 0 16px 16px;
    scrollbar-width: thin;
    scrollbar-color: #0284c7 #e2e8f0;
    scroll-behavior: smooth;
    transition: all 0.2s ease;
}

.continuous-book-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.paper-sheet {
    background: #ffffff;
    max-width: 900px;
    width: 96%;
    margin: 0 auto;
    padding: 42px 48px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    position: relative;
    font-family: inherit;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
    min-height: 520px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.paper-sheet:hover {
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.06);
}

.paper-page-separator {
    text-align: center;
    position: relative;
    margin: 8px 0;
}
.paper-page-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #94a3b8;
    z-index: 1;
}
.paper-page-pill-badge {
    position: relative;
    z-index: 2;
    background: #0f172a;
    color: #ffffff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.paper-header {
    border-bottom: 2px solid #0284c7;
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.paper-page-badge {
    background: #0f172a;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
}

.paper-exercise-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: 4px solid #0284c7;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}
.paper-exercise-item:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}
.paper-exercise-item.highlighted {
    border-color: #0284c7;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.paper-snip-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    background: #0284c7;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    display: none;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.paper-exercise-item:hover .paper-snip-badge {
    display: inline-flex;
}

/* Floating Snip Action Bubble */
.snip-floating-bubble {
    position: fixed;
    z-index: 9999;
    background: #0f172a;
    color: #ffffff;
    border-radius: 30px;
    padding: 6px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    animation: fadeInScale 0.2s ease-out;
}
.snip-bubble-btn {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.snip-bubble-btn:hover {
    background: #38bdf8;
    transform: scale(1.05);
}
.snip-bubble-btn.sol {
    background: #16a34a;
}
.snip-bubble-btn.sol:hover {
    background: #22c55e;
}

/* Studio Tabs (Right on image, Left on our form) */
.studio-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
}
.studio-tab-btn {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.studio-tab-btn.active {
    color: #0f172a;
    border-bottom-color: #d97706;
    background: #ffffff;
}

.studio-form-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d97706 #f1f5f9;
}

/* Custom Dual Independent Scrollbars (Right Book: Blue | Left Form: Amber) */
.paper-sheet-viewport::-webkit-scrollbar {
    width: 8px;
}
.paper-sheet-viewport::-webkit-scrollbar-track {
    background: #cbd5e1;
    border-radius: 8px;
}
.paper-sheet-viewport::-webkit-scrollbar-thumb {
    background: #0284c7;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
}
.paper-sheet-viewport::-webkit-scrollbar-thumb:hover {
    background: #0369a1;
}

.studio-form-body::-webkit-scrollbar {
    width: 8px;
}
.studio-form-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
}
.studio-form-body::-webkit-scrollbar-thumb {
    background: #d97706;
    border-radius: 8px;
    border: 2px solid #f1f5f9;
}
.studio-form-body::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

.solution-entry-box {
    background: #f8fafc;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px;
    margin-top: 4px;
}
.solution-source-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.solution-source-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.solution-source-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.solution-source-btn.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}


.studio-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.studio-banner-title {
    font-size: 13px;
    font-weight: 800;
    color: #166534;
}
.studio-tag {
    background: #22c55e;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Form inputs */
.studio-label {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 6px;
}
.studio-label .req {
    color: #dc2626;
    margin-right: 2px;
}
.studio-input, .studio-select, .studio-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13.5px;
    color: #0f172a;
    font-family: inherit;
    transition: all 0.2s;
    background: #ffffff;
    box-sizing: border-box;
}
.studio-input:focus, .studio-select:focus, .studio-textarea:focus {
    border-color: #0284c7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Transfer flash */
@keyframes transferFlash {
    0% { background-color: #fef08a; transform: scale(1.02); }
    100% { background-color: #ffffff; transform: scale(1); }
}
.transfer-flash {
    animation: transferFlash 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AI Solver Button */
.btn-ai-solver {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 12.5px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    transition: all 0.2s;
}
.btn-ai-solver:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

/* 3-Tier Guidance Cards */
.tier-scaffolding-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}
.tier-card {
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid;
}
.tier-card.tier1 {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.tier-card.tier2 {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.tier-card.tier3 {
    background: #fffbeb;
    border-color: #fde047;
}

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

/* Studio Toast Notification */
.studio-toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    background: #0f172a;
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    border-right: 4px solid #0284c7;
    animation: fadeInScale 0.25s ease-out;
    transition: opacity 0.3s, transform 0.3s;
}
.studio-toast-notification.success {
    border-right-color: #22c55e;
}
.studio-toast-notification.warn {
    border-right-color: #f59e0b;
}
.studio-toast-notification.hide {
    opacity: 0;
    transform: translateY(10px);
}

@keyframes snipPulse {
    0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(2, 132, 199, 0); }
    100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}
.paper-exercise-item.guide-pulse {
    animation: snipPulse 1.5s infinite;
    border-color: #0284c7;
    background: #f0f9ff;
}

/* ==========================================================================
   WORLD-CLASS STUDENT DISCOVERY & TEXTBOOK PEDAGOGICAL BRIDGE SYSTEM
   ========================================================================== */

/* Hero Banner & Subject Header */
.student-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0369a1 100%);
    border-radius: 16px;
    padding: 24px 28px;
    color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}
.student-hero-banner::after {
    content: '';
    position: absolute;
    left: -50px;
    bottom: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.student-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 2;
}
.student-hero-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}
.student-subject-avatar {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    flex-shrink: 0;
}
.student-hero-stats-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 14px 20px;
    min-width: 260px;
}
.student-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 6px;
}
.student-progress-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}
.student-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #38bdf8 100%);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Track Switcher (Book Selector Tabs) */
.student-book-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.student-book-tabs::-webkit-scrollbar {
    display: none;
}
.student-book-tab {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 800;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
}
.student-book-tab:hover {
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}
.student-book-tab.active {
    background: #eff6ff;
    border-color: #0284c7;
    color: #0369a1;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}
.book-badge-count {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    transition: all 0.2s;
}
.student-book-tab.active .book-badge-count {
    background: #0284c7;
    color: #ffffff;
}

/* Intelligent Multi-Dimensional Discovery Console */
.discovery-console {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    margin-bottom: 22px;
}
.discovery-console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.discovery-console-title {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.discovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    align-items: end;
}
.discovery-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.discovery-label {
    font-size: 12px;
    font-weight: 800;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 5px;
}
.discovery-input, .discovery-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    color: #0f172a;
    background: #ffffff;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}
.discovery-input:focus, .discovery-select:focus {
    border-color: #0284c7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Fast Page Navigator Pills */
.fast-page-strip-wrapper {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.fast-page-strip-label {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.fast-page-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    flex: 1;
    scrollbar-width: thin;
}
.page-pill-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.page-pill-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}
.page-pill-btn.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}
.page-pill-count {
    background: rgba(0,0,0,0.08);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
}
.page-pill-btn.active .page-pill-count {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
}

/* Active Filter Badges */
.active-filters-tray {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 12px;
}
.active-filter-tag {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 3px 10px;
    border-radius: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.active-filter-tag .tag-remove {
    cursor: pointer;
    font-weight: 900;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.active-filter-tag .tag-remove:hover {
    opacity: 1;
    color: #dc2626;
}
.btn-clear-all-filters {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
    padding: 2px 6px;
}

/* Exercise Cards Grid */
.student-exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.textbook-exercise-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}
.textbook-exercise-card:hover {
    border-color: #0284c7;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.12);
}
.textbook-exercise-card.mastered {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 40%);
}

/* Card Header */
.exercise-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}
.book-location-badge {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.book-location-badge.student_book {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}
.book-location-badge.activity_book {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}
.book-location-badge.teacher_guide {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

/* Mastery Status Indicator */
.mastery-status-pill {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.mastery-status-pill.mastered {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.mastery-status-pill.attempted {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde047;
}
.mastery-status-pill.not_attempted {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Curriculum Breadcrumb inside Card */
.exercise-curriculum-crumb {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Exercise Title & Problem Statement */
.exercise-card-title {
    font-size: 15.5px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.4;
}
.exercise-question-preview {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #f1f5f9;
    margin-bottom: 14px;
    font-family: inherit;
    direction: rtl;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Pedagogical Support Badges (Tiers available) */
.pedagogical-features-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.pedagogical-feature-tag {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pedagogical-feature-tag.hint {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fef08a;
}
.pedagogical-feature-tag.steps {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.pedagogical-feature-tag.sol {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Card CTA Button */
.btn-enter-focus-tunnel {
    width: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}
.btn-enter-focus-tunnel:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.35);
}
.textbook-exercise-card.mastered .btn-enter-focus-tunnel {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
}
.textbook-exercise-card.mastered .btn-enter-focus-tunnel:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Empty State Box */
.student-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    margin-top: 20px;
}
.student-empty-state-icon {
    font-size: 44px;
    margin-bottom: 12px;
}
.student-empty-state-title {
    font-size: 17px;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 6px;
}
.student-empty-state-desc {
    font-size: 13px;
    color: #64748b;
    max-width: 440px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

/* ==========================================================================
   1. SNIP STUDIO CLICK-TO-TRANSFER ACTION TOOLBAR & EXERCISE CARD STYLES
   ========================================================================== */
.paper-exercise-item {
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e2e8f0;
    border-right: 5px solid #0284c7;
    background: #ffffff;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.paper-exercise-item:hover {
    border-color: #38bdf8;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.12);
}
.paper-exercise-item.active-selected {
    border-color: #0284c7 !important;
    border-right-color: #2563eb !important;
    background: #f0fdf4 !important;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25), 0 8px 20px rgba(0,0,0,0.12) !important;
    transform: scale(1.01);
}
.paper-exercise-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}
.paper-exercise-badge {
    font-weight: 900;
    font-size: 14px;
    color: #0f172a;
    background: #e2e8f0;
    padding: 4px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.paper-exercise-item.active-selected .paper-exercise-badge {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}
.paper-exercise-hint-click {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}
.paper-exercise-item:hover .paper-exercise-hint-click {
    color: #0284c7;
    background: #e0f2fe;
}
.paper-exercise-item.active-selected .paper-exercise-hint-click {
    color: #15803d;
    background: #dcfce7;
    font-weight: 900;
}
.paper-exercise-body {
    font-size: 17px;
    color: #0f172a;
    line-height: 2.0;
    font-weight: 700;
    letter-spacing: 0.15px;
    margin-top: 4px;
}
.paper-exercise-solution-box {
    margin-top: 14px;
    padding: 14px 18px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-right: 5px solid #16a34a;
    border-radius: 8px;
    font-size: 15.5px;
    color: #14532d;
    font-weight: 700;
    line-height: 1.85;
}

/* Eye Comfort Zoom Scalers for Textbook Viewer */
.studio-zoom-controls {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 2px 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.btn-studio-zoom {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-studio-zoom:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.btn-studio-zoom.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

/* Zoom 115% (Comfortable Large View) */
.paper-sheet-viewport.zoom-115 .paper-sheet {
    max-width: 960px;
    padding: 46px 54px;
}
.paper-sheet-viewport.zoom-115 .paper-exercise-body {
    font-size: 19px;
    line-height: 2.1;
}
.paper-sheet-viewport.zoom-115 .paper-exercise-solution-box {
    font-size: 17px;
}
.paper-sheet-viewport.zoom-115 .paper-exercise-badge {
    font-size: 15px;
}

/* Zoom 130% (High Visibility Large View) */
.paper-sheet-viewport.zoom-130 .paper-sheet {
    max-width: 1040px;
    padding: 52px 60px;
}
.paper-sheet-viewport.zoom-130 .paper-exercise-body {
    font-size: 21px;
    line-height: 2.25;
}
.paper-sheet-viewport.zoom-130 .paper-exercise-solution-box {
    font-size: 18.5px;
}
.paper-sheet-viewport.zoom-130 .paper-exercise-badge {
    font-size: 16px;
}

/* Docked/Sticky Snip Action Toolbar */
.studio-action-toolbar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-top: 2px solid #38bdf8;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
    padding: 10px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px 12px 0 0;
}
.studio-action-toolbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.studio-toolbar-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}
.studio-toolbar-pin {
    font-size: 20px;
    animation: bounce 1.5s infinite;
}
.studio-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.btn-snip-bar {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-snip-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-snip-bar.question {
    background: #0284c7;
    color: #ffffff;
}
.btn-snip-bar.question:hover {
    background: #0369a1;
}
.btn-snip-bar.solution {
    background: #16a34a;
    color: #ffffff;
}
.btn-snip-bar.solution:hover {
    background: #15803d;
}
.btn-snip-bar.both {
    background: linear-gradient(135deg, #d97706, #ea580c);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}
.btn-snip-bar.both:hover {
    background: linear-gradient(135deg, #b45309, #c2410c);
}
.btn-snip-bar.cancel {
    background: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}
.btn-snip-bar.cancel:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   2. SUPERVISOR QUALITY FACTORY VISIBILITY CONTROL PANEL
   ========================================================================== */
.quality-visibility-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.quality-visibility-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 10px;
}
.quality-tracks-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
.quality-track-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}
.quality-track-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}
.quality-track-card.active {
    background: #f0fdf4;
    border-color: #86efac;
}

/* iOS Style Switch Toggle */
.switch-toggle-label {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin: 0;
    cursor: pointer;
}
.switch-toggle-label input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 26px;
}
.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch-toggle-label input:checked + .switch-slider {
    background-color: #16a34a;
}
.switch-toggle-label input:checked + .switch-slider:before {
    transform: translateX(22px);
}

/* Uploaded Files Visibility Strip */
.file-visibility-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.file-visibility-pill.visible {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.file-visibility-pill.hidden {
    border-color: #f1f5f9;
    background: #f8fafc;
    opacity: 0.75;
}
.btn-toggle-file-vis {
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-toggle-file-vis.active {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}
.btn-toggle-file-vis:hover {
    transform: scale(1.04);
}

/* ==========================================================================
   3. STUDENT CURRICULUM FILES & APPROVED PDF VAULT
   ========================================================================== */
.student-curriculum-files-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.student-curriculum-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.student-curriculum-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}
.student-pdf-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}
.student-pdf-card:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}
.btn-student-open-pdf {
    background: #0284c7;
    color: #ffffff;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}
.btn-student-open-pdf:hover {
    background: #0369a1;
    transform: scale(1.04);
}

/* ==========================================================================
   AI TWIN GENERATOR (STANDALONE DEDICATED BUTTON & MODAL)
   ========================================================================== */
.ai-twin-generator-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1.5px solid #818cf8;
    border-radius: 12px;
    padding: 16px;
    margin-top: 14px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
}
.ai-twin-generator-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #4f46e5, #818cf8);
}
.ai-twin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.ai-twin-badge {
    background: #4f46e5;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}
.btn-ai-twin-action {
    width: 100%;
    background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 13.5px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-ai-twin-action:hover {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}
.btn-ai-twin-action:active {
    transform: translateY(0);
}

/* File Delete Button in Visibility Panels */
.btn-delete-file-pill {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-delete-file-pill:hover {
    background: #fecaca;
    color: #b91c1c;
    border-color: #f87171;
    transform: scale(1.03);
}

/* Visual Flash Glow on Auto-filled Fields (100% recognition) */
@keyframes transferPulseGlow {
    0% {
        background-color: #dcfce7;
        border-color: #22c55e;
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.35);
    }
    50% {
        background-color: #bbf7d0;
        border-color: #16a34a;
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.25);
    }
    100% {
        background-color: #ffffff;
        border-color: #cbd5e1;
        box-shadow: none;
    }
}
.transfer-flash {
    animation: transferPulseGlow 1.8s ease-out forwards;
}

/* AI Twin Modal Styling */
.ai-twin-modal-box {
    max-width: 860px;
    width: 95%;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    text-align: right;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #818cf8;
}
.tree-hierarchy-breadcrumb {
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #3730a3;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.twin-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .twin-comparison-grid {
        grid-template-columns: 1fr;
    }
}
.twin-col-card {
    border-radius: 12px;
    padding: 16px;
    border: 1.5px solid #cbd5e1;
}
.twin-col-card.reference {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.twin-col-card.generated {
    background: #f0fdf4;
    border-color: #86efac;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.1);
}

/* ==========================================================================
   ROLE PORTAL & ISOLATED AUTH GATEWAY STYLING
   ========================================================================== */
.portal-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.portal-hero-header {
    text-align: center;
    margin-bottom: 32px;
}

.portal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    color: #334155;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    margin-bottom: 14px;
}

.portal-hero-title {
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.portal-hero-subtitle {
    font-size: 15px;
    color: #64748b;
    max-width: 720px;
    margin: 0 auto 18px;
    line-height: 1.6;
}

.portal-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.portal-role-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1.5px solid #e2e8f0;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px -3px rgba(0, 0, 0, 0.05);
}

.portal-role-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
}

.portal-role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12);
}

/* Card Role Theming */
.portal-role-card.role-admin {
    border-color: #fecaca;
}
.portal-role-card.role-admin::before {
    background: linear-gradient(90deg, #dc2626, #b91c1c);
}
.portal-role-card.role-admin:hover {
    border-color: #f87171;
}

.portal-role-card.role-supervisor {
    border-color: #bbf7d0;
}
.portal-role-card.role-supervisor::before {
    background: linear-gradient(90deg, #16a34a, #059669);
}
.portal-role-card.role-supervisor:hover {
    border-color: #4ade80;
}

.portal-role-card.role-teacher {
    border-color: #fde68a;
}
.portal-role-card.role-teacher::before {
    background: linear-gradient(90deg, #d97706, #b45309);
}
.portal-role-card.role-teacher:hover {
    border-color: #fbbf24;
}

.portal-role-card.role-parent {
    border-color: #bae6fd;
}
.portal-role-card.role-parent::before {
    background: linear-gradient(90deg, #0284c7, #0369a1);
}
.portal-role-card.role-parent:hover {
    border-color: #38bdf8;
}

.portal-role-card.role-student {
    border-color: #ddd6fe;
}
.portal-role-card.role-student::before {
    background: linear-gradient(90deg, #7c3aed, #6d28d9);
}
.portal-role-card.role-student:hover {
    border-color: #a78bfa;
}

.portal-role-card.role-student-elementary {
    border-color: #fbcfe8;
}
.portal-role-card.role-student-elementary::before {
    background: linear-gradient(90deg, #db2777, #be185d);
}
.portal-role-card.role-student-elementary:hover {
    border-color: #f472b6;
}

.portal-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.portal-role-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.portal-role-tag {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 4px;
}

.portal-role-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.portal-role-user {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.portal-role-checklist li {
    font-size: 13px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.portal-role-checklist li span.check-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.portal-role-btn {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.portal-role-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.portal-role-btn:active {
    transform: translateY(0);
}

/* Standard Login Container */
.portal-standard-box {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    padding: 28px 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    max-width: 640px;
    margin: 0 auto;
}

.portal-standard-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-standard-sub {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
}

.portal-input-group {
    margin-bottom: 16px;
}

.portal-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.portal-input-field {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: #f8fafc;
}

.portal-input-field:focus {
    outline: none;
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}



