/* ==========================================================================
   GIÁO ÁN AI PRO - MODERN PREMIUM SAAS DESIGN SYSTEM
   ========================================================================== */

:root {
    /* Color Palette */
    --primary-hue: 217;
    --primary: #2563EB;             /* Primary Sapphire Blue */
    --primary-hover: #1D4ED8;
    --primary-light: #EFF6FF;
    --primary-glow: rgba(37, 99, 235, 0.25);
    
    --secondary-violet: #7C3AED;     /* Secondary AI Accent */
    --secondary-violet-light: #F5F3FF;
    
    --accent-emerald: #10B981;
    --accent-amber: #F59E0B;
    --accent-rose: #EF4444;
    
    /* Backgrounds & Surface */
    --bg-body: #F4F7F9;             /* Soft light grey-blue to reduce eye strain */
    --bg-card: #FFFFFF;
    --bg-input: #F8FAFC;
    
    /* Typography Colors */
    --text-primary: #0F172A;         /* Rich deep slate */
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    /* Borders & Dividers */
    --border: #E2E8F0;
    --border-hover: #CBD5E1;
    --border-focus: #3B82F6;
    
    /* Elevation Shadows */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 20px 35px -8px rgba(15, 23, 42, 0.08), 0 6px 12px -4px rgba(15, 23, 42, 0.03);
    --shadow-glow: 0 8px 25px rgba(37, 99, 235, 0.35);
    
    /* Radius Tokens */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* Fonts */
    --font-ui: 'Be Vietnam Pro', 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', 'Be Vietnam Pro', sans-serif;
    --font-doc: 'Times New Roman', Times, serif;
    
    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(219, 234, 254, 0.45) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(237, 233, 254, 0.4) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* ==========================================================================
   HEADER NAVBAR
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 60%, #1E3A8A 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
    border-radius: 10px;
    transition: var(--transition);
}

.app-logo-img:hover {
    transform: scale(1.06) rotate(1deg);
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text h1 span {
    background: linear-gradient(135deg, #38BDF8, #818CF8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.logo-text p {
    font-size: 0.78rem;
    color: #C7D2FE;
    font-weight: 400;
    opacity: 0.9;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Nav Pill Buttons */
.nav-btn-pill {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #FFFFFF !important;
    border-radius: var(--radius-full) !important;
    padding: 0.45rem 0.95rem !important;
    font-size: 0.83rem !important;
    font-weight: 500 !important;
    backdrop-filter: blur(4px);
    transition: var(--transition) !important;
}

.nav-btn-pill:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-btn-license {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    border-radius: var(--radius-full) !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.83rem !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
    transition: var(--transition) !important;
}

.nav-btn-license:hover {
    background: linear-gradient(135deg, #B45309 0%, #D97706 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45) !important;
}

.nav-btn-sample {
    background: rgba(99, 102, 241, 0.25) !important;
    border: 1px solid rgba(165, 180, 252, 0.4) !important;
    color: #E0E7FF !important;
}
.nav-btn-sample:hover {
    background: rgba(99, 102, 241, 0.4) !important;
    color: #FFFFFF !important;
}

/* ==========================================================================
   MAIN LAYOUT & SIDEBAR
   ========================================================================== */
.main-content {
    display: grid;
    grid-template-columns: 375px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    max-width: 1650px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* MODE SWITCHER TABS */
.mode-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
    background: #E2E8F0;
    padding: 5px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(203, 213, 225, 0.7);
}

.mode-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.5rem;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.mode-tab:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
}

.mode-tab.active {
    background: #FFFFFF;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    font-weight: 700;
}

/* CARD CONTAINER */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: var(--transition);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h2 i {
    color: var(--primary);
}

.badge {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-accent {
    background: linear-gradient(135deg, #EFF6FF, #EEF2FF);
    color: var(--primary);
    border: 1px solid #BFDBFE;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
}

/* FORMS & INPUTS */
.form-group {
    margin-bottom: 1.15rem;
}

.form-row {
    display: flex;
    gap: 0.75rem;
}
.form-row .col {
    flex: 1;
}

label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

label i {
    color: var(--primary);
    font-size: 0.9rem;
}

.required {
    color: var(--accent-rose);
    font-weight: bold;
}

input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

input[type="text"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover {
    border-color: var(--border-hover);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3.5px var(--primary-glow);
}

/* NUMBER INPUT HIGHLIGHT FOR WORKSHEETS & EXAMS */
#so_trac_nghiem, #so_tu_luan, .number-input-lg {
    width: 80%;
    max-width: 130px;
    height: 42px;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.4rem 0.6rem;
    text-align: center;
    color: #1E3A8A;
    background-color: #F0F6FF;
    border: 2px solid #3B82F6;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
}

#so_trac_nghiem:focus, #so_tu_luan:focus, .number-input-lg:focus {
    outline: none;
    border-color: #1D4ED8;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

textarea {
    resize: vertical;
    min-height: 75px;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    color: #FFFFFF;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #6D28D9 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: #E2E8F0;
    color: #334155;
}
.btn-secondary:hover {
    background: #CBD5E1;
    color: #0F172A;
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: #F1F5F9;
    border-color: var(--border-hover);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    border-radius: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* AI SPARKLE BUTTON INTERACTION */
.btn-ai-sparkle {
    position: relative;
    overflow: hidden;
}

.btn-ai-sparkle::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        60deg,
        transparent 30%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 70%
    );
    transform: rotate(30deg) translateY(-100%);
    transition: transform 0.8s ease;
}

.btn-ai-sparkle:hover::after {
    transform: rotate(30deg) translateY(100%);
}

.sparkle-icon-anim {
    animation: sparklePulse 2.5s ease-in-out infinite;
}

@keyframes sparklePulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.25) rotate(15deg); opacity: 0.85; }
}

/* ==========================================================================
   PREVIEW SECTION & TOOLBAR
   ========================================================================== */
.preview-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toolbar-card {
    background: #FFFFFF;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.toolbar-left h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-left h2 i {
    color: var(--primary);
}

.toolbar-right {
    display: flex;
    gap: 0.5rem;
}

/* ACTION BUTTON STYLES IN PREVIEW TOOLBAR */
.btn-action-copy {
    background: #F1F5F9 !important;
    color: #334155 !important;
    border: 1px solid #CBD5E1 !important;
}
.btn-action-copy:hover {
    background: #E2E8F0 !important;
    color: #0F172A !important;
}

.btn-action-print {
    background: #FEF2F2 !important;
    color: #DC2626 !important;
    border: 1px solid #FCA5A5 !important;
}
.btn-action-print:hover {
    background: #FEE2E2 !important;
    color: #B91C1C !important;
}

.btn-action-word {
    background: #EFF6FF !important;
    color: #2563EB !important;
    border: 1px solid #93C5FD !important;
    font-weight: 600 !important;
}
.btn-action-word:not(:disabled):hover {
    background: #DBEAFE !important;
    color: #1D4ED8 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-action-pptx {
    background: #FFF7ED !important;
    color: #EA580C !important;
    border: 1px solid #FDBA74 !important;
    font-weight: 600 !important;
}
.btn-action-pptx:not(:disabled):hover {
    background: #FFEDD5 !important;
    color: #C2410C !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
}

/* DOCUMENT CONTAINER (GLASSMORPHIC BACKGROUND & A4 WORKSPACE) */
.document-container {
    background: linear-gradient(135deg, #EAEFF5 0%, #DFE6EF 100%);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    min-height: 720px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: auto;
    border: 1px solid rgba(203, 213, 225, 0.6);
    position: relative;
}

/* EMPTY STATE CARD (GLASSMORPHISM SAAS LOOK) */
.empty-state {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2.5rem;
    text-align: center;
    max-width: 520px;
    margin: auto;
    box-shadow: 
        0 20px 40px -15px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    animation: fadeInScale 0.4s ease-out;
}

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

.empty-illustration {
    margin-bottom: 1.2rem;
    display: inline-block;
}

.ai-3d-graphic {
    filter: drop-shadow(0 10px 20px rgba(59, 130, 246, 0.2));
}

.floating-wand {
    animation: floatWand 3.5s ease-in-out infinite alternate;
}

@keyframes floatWand {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-7px) rotate(2deg); }
}

.sparkle-1 { animation: pulseSparkle 2s ease-in-out infinite 0s; }
.sparkle-2 { animation: pulseSparkle 2s ease-in-out infinite 0.6s; }
.sparkle-3 { animation: pulseSparkle 2s ease-in-out infinite 1.2s; }

@keyframes pulseSparkle {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.2); }
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    letter-spacing: -0.2px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto;
}

.empty-state strong {
    color: var(--primary-hover);
    font-weight: 600;
}

/* LOADING STATE */
.loading-state {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2.5rem;
    text-align: center;
    max-width: 520px;
    margin: auto;
    box-shadow: var(--shadow-lg);
}

.spinner {
    width: 58px;
    height: 58px;
    border: 5px solid #DBEAFE;
    border-top-color: var(--primary);
    border-right-color: var(--secondary-violet);
    border-radius: 50%;
    animation: spin 0.9s infinite cubic-bezier(0.55, 0.15, 0.45, 0.85);
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state h4 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-hover);
    margin-bottom: 0.5rem;
}

.loading-sub {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* A4 PAPER SIMULATION FOR LESSON PLAN / WORKSHEET */
.lesson-paper {
    background: #FFFFFF;
    width: 210mm;
    min-height: 297mm;
    padding: 20mm 20mm 20mm 30mm; /* Standard A4 Margins: Top 2cm, Right 2cm, Bottom 2cm, Left 3cm */
    box-shadow: 
        0 12px 36px rgba(15, 23, 42, 0.1),
        0 2px 6px rgba(15, 23, 42, 0.04);
    border-radius: 4px;
    font-family: var(--font-doc);
    font-size: 13pt;
    line-height: 1.3;
    color: #000000;
    animation: fadeIn 0.3s ease-out;
}

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

/* LESSON SECTION FORMATTING */
.doc-header-table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}
.doc-header-table td {
    vertical-align: top;
    padding: 2px 0;
}

.doc-title {
    text-align: center;
    margin: 1.5rem 0 1rem 0;
}
.doc-title h2 {
    font-size: 15pt;
    font-weight: bold;
}
.doc-title h3 {
    font-size: 14pt;
    font-weight: bold;
}
.doc-title p {
    font-size: 11pt;
    font-style: italic;
    color: #333333;
}

.doc-section {
    position: relative;
    margin-bottom: 1.2rem;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}
.doc-section:hover {
    background-color: #F8FAFC;
}

.doc-section-title {
    font-size: 13pt;
    font-weight: bold;
    color: #002060;
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}
.doc-section:hover .section-actions {
    opacity: 1;
}

.btn-regen-section {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
    padding: 3px 10px;
    font-size: 9.5pt;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-ui);
    transition: var(--transition);
}
.btn-regen-section:hover {
    background: #3B82F6;
    color: #FFFFFF;
}

.doc-list {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}
.doc-list li {
    margin-bottom: 0.25rem;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 12pt;
}
.doc-table th, .doc-table td {
    border: 1px solid #000000;
    padding: 6px 8px;
    vertical-align: top;
}
.doc-table th {
    background-color: #FFF2CC;
    font-weight: bold;
    text-align: center;
    border: 1px solid #000000;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.25s ease-out;
}

.modal-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    width: 92%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
    padding: 1.2rem 1.5rem;
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}
.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #F8FAFC;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.hidden {
    display: none !important;
}

/* PRINT STYLES */
@media print {
    .navbar, .sidebar, .toolbar-card {
        display: none !important;
    }
    .main-content {
        display: block !important;
        padding: 0 !important;
    }
    .document-container {
        background: none !important;
        padding: 0 !important;
        border: none !important;
    }
    .lesson-paper {
        box-shadow: none !important;
        width: 100% !important;
        padding: 0 !important;
    }
    .section-actions {
        display: none !important;
    }
}
