/* ========================================
   CSS RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-card: #ffffff;
    /* Soft Pastel Color Palette - Optimized for Smart Boards */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;

    --secondary-50: #fef3c7;
    --secondary-100: #fde68a;
    --secondary-200: #fcd34d;
    --secondary-300: #fbbf24;
    --secondary-400: #f59e0b;

    --accent-50: #fce7f3;
    --accent-100: #fbcfe8;
    --accent-200: #f9a8d4;
    --accent-300: #f472b6;

    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-200: #bbf7d0;
    --success-300: #86efac;
    --success-400: #4ade80;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;

    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-200: #fecaca;
    --danger-300: #fca5a5;
    --danger-400: #f87171;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;

    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

[data-theme="dark"] {
    --primary-50: #0c4a6e;
    --primary-100: #075985;
    --primary-200: #0369a1;
    --primary-300: #0284c7;
    --primary-400: #0ea5e9;
    --primary-500: #38bdf8;
    --primary-600: #7dd3fc;
    --primary-700: #bae6fd;

    --secondary-50: #422006;
    --secondary-100: #713f12;
    --secondary-200: #854d0e;
    --secondary-300: #a16207;
    --secondary-400: #ca8a04;

    --neutral-50: #171717;
    --neutral-100: #262626;
    --neutral-200: #404040;
    --neutral-300: #525252;
    --neutral-400: #737373;
    --neutral-500: #a3a3a3;
    --neutral-600: #d4d4d4;
    --neutral-700: #e5e5e5;
    --neutral-800: #f5f5f5;

    --success-50: #052e16;
    --success-100: #14532d;
    --success-200: #166534;
    --success-300: #15803d;
    --success-400: #16a34a;
    --success-500: #22c55e;
    --success-600: #4ade80;
    --success-700: #86efac;

    --danger-50: #450a0a;
    --danger-100: #7f1d1d;
    --danger-200: #991b1b;
    --danger-300: #b91c1c;
    --danger-400: #dc2626;
    --danger-500: #ef4444;
    --danger-600: #f87171;
    --danger-700: #fca5a5;

    --bg-card: #262626;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.theme-toggle {
    position: fixed;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    z-index: 9999;
    background: var(--neutral-50);
    border: 2px solid var(--primary-200);
    color: var(--primary-600);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-50) 100%);
    color: var(--neutral-800);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
}

/* ========================================
   LAYOUT
   ======================================== */
#app {
    max-width: 1800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    color: var(--neutral-800);
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.25rem;
    color: var(--primary-700);
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
    font-size: 1.125rem;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-xl);
}

.header-title {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    animation: fadeInDown 0.6s ease-out;
}

.header-subtitle {
    font-size: 1.5rem;
    color: var(--neutral-600);
    font-weight: 400;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm) var(--spacing-md);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--neutral-600);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.breadcrumb-item:hover {
    color: var(--primary-600);
}

.breadcrumb-item.active {
    color: var(--primary-600);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--neutral-400);
    user-select: none;
}

/* ========================================
   CARDS & BUTTONS
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-700);
    margin-bottom: var(--spacing-sm);
}

.card-description {
    color: var(--neutral-600);
    font-size: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--primary-600);
    border: 2px solid var(--primary-200);
}

.btn-secondary:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
}

.btn-download {
    background: linear-gradient(135deg, var(--success-200), var(--success-300));
    color: var(--neutral-800);
}

.btn-download:hover {
    background: linear-gradient(135deg, var(--success-300), var(--success-300));
    box-shadow: var(--shadow-lg);
}

/* ========================================
   GRADE CARDS (Home Page)
   ======================================== */
.grade-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
}

.grade-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-slow);
    cursor: pointer;
}

.grade-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.grade-card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.grade-card-content {
    padding: var(--spacing-xl);
}

.grade-card-title {
    font-size: 2rem;
    color: var(--primary-700);
    margin-bottom: var(--spacing-sm);
}

.grade-card-description {
    color: var(--neutral-600);
    font-size: 1.125rem;
}

/* ========================================
   DASHBOARD SECTIONS
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.section-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
}

.section-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-300);
}

.section-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 1.25rem;
    color: var(--primary-700);
    margin-bottom: var(--spacing-xs);
}

.section-count {
    color: var(--neutral-500);
    font-size: 0.9rem;
}

/* ========================================
   ACCORDION MENUS
   ======================================== */
.accordion {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.accordion-item {
    border-bottom: 1px solid var(--neutral-200);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-card);
    border: none;
    text-align: left;
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--neutral-800);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.accordion-header.active {
    background: var(--primary-100);
    color: var(--primary-700);
}

.accordion-icon {
    transition: transform var(--transition-base);
    font-size: 1.25rem;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
    background: var(--neutral-50);
}

.accordion-content.active {
    max-height: 10000px;
}

.accordion-body {
    padding: var(--spacing-lg);
    color: var(--neutral-700);
    line-height: 1.8;
}

/* ========================================
   THREE-COLUMN LAYOUT (Presentation Detail)
   ======================================== */
.three-column-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 250px;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    align-items: start;
}

.column-left,
.column-right {
    position: sticky;
    top: var(--spacing-lg);
    height: fit-content;
    max-height: calc(100vh - 2 * var(--spacing-lg));
    overflow-y: auto;
}

.column-center {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.pdf-viewer-container {
    width: 100%;
    min-height: 800px;
}

.pdf-viewer-container iframe {
    width: 100%;
    height: 800px;
    border: none;
    border-radius: var(--radius-md);
}

/* ========================================
   ACTIVITY DETAIL SECTIONS
   ======================================== */
.activity-sections {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.activity-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-400);
}

.activity-section-title {
    font-size: 1.5rem;
    color: var(--primary-700);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.activity-section-content {
    color: var(--neutral-700);
    font-size: 1.125rem;
    line-height: 1.8;
}

.placeholder-text {
    color: var(--neutral-500);
    font-style: italic;
    padding: var(--spacing-lg);
    background: var(--neutral-100);
    border-radius: var(--radius-md);
    text-align: center;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn var(--transition-base);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: slideUp var(--transition-slow);
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    font-size: 2rem;
    font-weight: bold;
    color: var(--neutral-500);
    cursor: pointer;
    transition: color var(--transition-fast);
    line-height: 1;
}

.modal-close:hover {
    color: var(--neutral-800);
}

.modal-body {
    flex: 1;
    overflow: auto;
    padding: var(--spacing-lg);
}

.modal-body iframe {
    width: 100%;
    height: 70vh;
    border: none;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--spacing-xs);
}

.mt-2 {
    margin-top: var(--spacing-sm);
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mt-4 {
    margin-top: var(--spacing-lg);
}

.mt-5 {
    margin-top: var(--spacing-xl);
}

.mb-1 {
    margin-bottom: var(--spacing-xs);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.mb-4 {
    margin-bottom: var(--spacing-lg);
}

.mb-5 {
    margin-bottom: var(--spacing-xl);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-transition {
    animation: slideUp 0.4s ease-out both;
}



/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1100px) {
    .three-column-layout {
        grid-template-columns: 200px 1fr 200px;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 900px) {
    .three-column-layout {
        grid-template-columns: 1fr;
    }

    .column-left,
    .column-right {
        position: static;
        max-height: none;
    }

    .grade-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.5rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .three-column-layout {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   DARK MODE FIXES
   ======================================== */
/* Fix 1: Force dark text for containers that retain white backgrounds in Dark Mode */
[data-theme="dark"] .accordion-header,
[data-theme="dark"] .activity-section,
[data-theme="dark"] .card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .notebook-wrapper {
    color: #2c3e50 !important;
}

[data-theme="dark"] .card h4,
[data-theme="dark"] .card p {
    color: #2c3e50 !important;
}

/* Force dark text for elements with inline light backgrounds */
[data-theme="dark"] div[style*="background-color"],
[data-theme="dark"] div[style*="background:"] {
    color: #2c3e50 !important;
}

[data-theme="dark"] div[style*="background-color"] h1,
[data-theme="dark"] div[style*="background-color"] h2,
[data-theme="dark"] div[style*="background-color"] h3,
[data-theme="dark"] div[style*="background-color"] h4,
[data-theme="dark"] div[style*="background-color"] h5,
[data-theme="dark"] div[style*="background-color"] h6,
[data-theme="dark"] div[style*="background-color"] strong,
[data-theme="dark"] div[style*="background-color"] b,
[data-theme="dark"] div[style*="background-color"] li {
    color: #1a1a1a !important;
}



/* Print Optimization */
@media print {

    /* Hide UI Elements */
    .theme-toggle,
    .search-toggle-btn,
    .breadcrumb,
    .btn,
    button,
    .modal,
    iframe,
    .accordion-header .accordion-icon {
        display: none !important;
    }

    /* Layout Reset */
    body,
    #app,
    .header,
    .three-column-layout,
    .container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        display: block !important;
    }

    /* Content Visibility */
    .accordion-content {
        display: block !important;
        max-height: none !important;
        border: none !important;
    }

    .accordion-item {
        border: 1px solid #eee !important;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }

    .header-title img {
        display: none;
        /* Hide logos in print to save ink */
    }

    .header-title {
        font-size: 18pt !important;
        text-align: center;
        margin-bottom: 10px;
        color: black !important;
    }

    .header-subtitle {
        text-align: center;
        font-size: 12pt !important;
        margin-bottom: 20px;
        color: #555 !important;
    }

    /* Expand Columns */
    .column-left,
    .column-center,
    .column-right {
        width: 100% !important;
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 20px;
        border: none !important;
    }

    /* Typography */
    p,
    li,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: black !important;
    }

    a {
        text-decoration: none !important;
        color: black !important;
    }
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-300);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-400);
}

/* ========================================
   NOTEBOOK STYLES
   ======================================== */
.notebook-entry {
    background-color: #fff9c4;
    /* Light yellow paper color */
    background-image: linear-gradient(#e1e1e1 1px, transparent 1px);
    background-size: 100% 1.5em;
    padding: var(--spacing-lg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-family: var(--font-sans);
    /* Clean sans-serif font as per screenshot */
    line-height: 1.5em;
    color: #2c3e50;
    position: relative;
    border-left: 4px solid #ef5350;
    /* Red margin line */
}

.notebook-title-container {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 1rem;
}

.notebook-main-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.notebook-sub-title {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-style: italic;
}

.notebook-section-header {
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-blue {
    background-color: #2980b9;
}

.header-green {
    background-color: #27ae60;
}

.header-orange {
    background-color: #d35400;
}

.header-purple {
    background-color: #8e44ad;
}

.header-red {
    background-color: #c0392b;
}

.header-teal {
    background-color: #16a085;
}

.notebook-entry ul {
    list-style-type: none;
    padding-left: 1em;
}

.notebook-entry li {
    margin-bottom: 0.8em;
    position: relative;
}

.notebook-entry li::before {
    content: "•";
    color: #e74c3c;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.notebook-highlight {
    background-color: rgba(255, 235, 59, 0.4);
    padding: 0 4px;
    border-radius: 3px;
}

.notebook-note-box {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 0.95em;
}

.notebook-info-box {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 0.95em;
}

/* ========================================
   UNIFIED NOTEBOOK STYLES
   ======================================== */
.notebook-container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.notebook-wrapper {
    position: relative;
    z-index: 1;
}

.notebook-wrapper::after {
    content: "--- ✂ ---";
    display: block;
    text-align: center;
    color: var(--neutral-400);
    margin: 2rem 0;
    font-family: monospace;
    letter-spacing: 2px;
}

.notebook-wrapper:last-child::after {
    display: none;
}

/* ========================================
   DARK MODE FIXES (FINAL)
   ======================================== */
/* Fix for Accordion Headers in Dark Mode */
[data-theme="dark"] .accordion-header {
    color: #2c3e50 !important;
    /* Dark text to contrast with light component bg */
}

[data-theme="dark"] .accordion-header .accordion-icon {
    color: #2c3e50 !important;
}

/* Fix for Content with Inline Light Backgrounds (e.g. Expectations, Warnings) */
[data-theme="dark"] div[style*="background-color"],
[data-theme="dark"] div[style*="background:"] {
    color: #1a1a1a !important;
    /* Force dark text on light backgrounds */
}

/* Ensure headers inside these light boxes are also dark */
[data-theme="dark"] div[style*="background-color"] h1,
[data-theme="dark"] div[style*="background-color"] h2,
[data-theme="dark"] div[style*="background-color"] h3,
[data-theme="dark"] div[style*="background-color"] h4,
[data-theme="dark"] div[style*="background-color"] h5,
[data-theme="dark"] div[style*="background-color"] strong {
    color: #000000 !important;
}

/* ========================================
   DARK MODE CARD FIXES
   ======================================== */
[data-theme="dark"] .card-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .grade-card-title,
[data-theme="dark"] .intro-title,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: #bae6fd !important;
    /* Force Light Blue */
}

[data-theme="dark"] .card-description,
[data-theme="dark"] .section-count,
[data-theme="dark"] .grade-card-description,
[data-theme="dark"] .intro-text,
[data-theme="dark"] p,
[data-theme="dark"] li {
    color: #e5e5e5 !important;
    /* Force Light Gray */
}

[data-theme="dark"] .breadcrumb {
    background: #262626;
    border: 1px solid #404040;
}

[data-theme="dark"] .breadcrumb-item {
    color: #a3a3a3;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: #38bdf8;
}

/* Ensure borders are visible in dark mode */
/* Ensure borders are visible in dark mode */
[data-theme="dark"] .section-card,
[data-theme="dark"] .card,
[data-theme="dark"] .grade-card {
    border: 1px solid #404040;
}

/* ========================================
   DARK MODE CARD FIXES (FORCED)
   ======================================== */
[data-theme="dark"] .card-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .grade-card-title,
[data-theme="dark"] .intro-title,
[data-theme="dark"] .card-title-text,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: #bae6fd !important;
    /* Force Light Blue */
}

[data-theme="dark"] .card-description,
[data-theme="dark"] .section-count,
[data-theme="dark"] .grade-card-description,
[data-theme="dark"] .intro-text,
[data-theme="dark"] .card-desc-text,
[data-theme="dark"] p,
[data-theme="dark"] li {
    color: #e5e5e5 !important;
    /* Force Light Gray */
}