/* 
 * EduFlow: Neo-Historical Design System (Jose Rizal Theme)
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;1,700&family=Inter:wght@400;600;700;800&family=Lora:ital,wght@0,400;0,600;1,400&family=Dancing+Script:wght@700&display=swap');

:root {
    /* Color Palette */
    --clr-terracotta: #A04936;
    --clr-terracotta-light: #B86B5A;
    --clr-parchment: #F4F1EA;
    --clr-cream: #FFFFFF;
    --clr-charcoal: #333333;
    --clr-ink: #2A2A2A;
    --clr-sepia: #704214;
    --clr-completed: #6B63FF;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
    --font-ui: 'Inter', sans-serif;
    --font-script: 'Dancing Script', cursive;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Shadows & Borders */
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
    --border-sketch: 2px solid var(--clr-terracotta);
    --radius-sm: 8px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--clr-parchment);
    color: var(--clr-ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Fixes 'excess' horizontal scroll */
    width: 100%;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--clr-terracotta);
    margin-bottom: var(--spacing-sm);
}

.btn-purple {
    background-color: #5c5be5 !important;
    color: white !important;
    padding: 14px 40px !important;
    box-shadow: 6px 6px 0px rgba(92, 91, 229, 0.2);
    border: none;
}

.btn-about {
    border: 3px solid #5c5be5 !important;
    color: #5c5be5 !important;
    background: white;
    padding: 12px 38px !important;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.05);
}

.container {
    width: 100%;
    max-width: 1000px;
    /* Increased for better 2-column desktop feel */
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Premium Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: var(--font-ui);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: none;
}

header {
    background-color: var(--clr-terracotta);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    flex-wrap: wrap;
    /* Allow logo and nav to wrap on narrow screens */
    gap: var(--spacing-sm);
}

.logo {
    flex: 0 1 auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

header .app-logo {
    filter: brightness(0) invert(1);
}

#appSidebar .logo-text {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    color: var(--clr-ink);
    text-transform: none;
    width: 100%;
    margin-bottom: 0.5rem;
}

#appSidebar .app-logo {
    height: 65px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.main-nav a {
    text-decoration: none;
    color: white;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 700;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.main-nav a:hover {
    opacity: 0.8;
}

.login-link {
    background: white;
    color: var(--clr-terracotta) !important;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 800;
}

.btn-primary {
    background-color: var(--clr-terracotta);
    color: var(--clr-cream);
    box-shadow: 0 4px 10px rgba(160, 73, 54, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--clr-terracotta);
    color: var(--clr-terracotta);
}

/* Glassy/Paper Surfaces */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: var(--spacing-md);
}

/* Parchment Texture Simulation */
.parchment-bg {
    background-color: var(--clr-parchment);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        url('../img/parchment_background_large_1776647270752.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-blend-mode: overlay;
}

/* Sketchy Elements */
.sketch-border {
    border: 2px solid var(--clr-terracotta);
    border-radius: 4px;
    position: relative;
    padding: var(--spacing-sm);
}

.sketch-border::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    bottom: -4px;
    left: -4px;
    border: 1px solid var(--clr-terracotta);
    opacity: 0.5;
    pointer-events: none;
    border-radius: 6px;
    transform: rotate(-0.5deg);
}

.sketch-border-thick {
    border: 3px solid var(--clr-terracotta);
    border-radius: 15px 5px 15px 5px;
    position: relative;
    box-shadow: 4px 4px 0px var(--clr-terracotta);
}

.terracotta-block {
    background-color: var(--clr-terracotta);
    width: 60px;
    height: 60px;
    display: inline-block;
    border-radius: 4px;
    opacity: 0.9;
}

/* --- Expanded Footer Styling --- */
.main-footer {
    background-color: var(--clr-terracotta);
    color: white;
    padding: 60px 0 40px;
    font-family: var(--font-ui);
}

.footer-platform-desc {
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
    line-height: 1.8;
    font-size: 16px;
    opacity: 0.9;
}

.developers-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1000px;
    margin: 0 auto 40px;
    gap: 40px;
}

.developers-title h2 {
    font-size: 64px;
    font-weight: 900;
    color: white;
    margin: 0;
    line-height: 1;
    max-width: 300px;
    text-transform: none;
    font-family: var(--font-heading);
}

.developers-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: right;
}

.developer-item {
    display: flex;
    flex-direction: column;
}

.dev-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.dev-role {
    font-size: 13px;
    opacity: 0.7;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

.footer-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 40px auto;
    max-width: 1000px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.back-up a {
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    transition: opacity 0.3s;
}

.back-up a:hover {
    opacity: 0.7;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
    .developers-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }

    .developers-list {
        text-align: center;
    }

    .developers-title h2 {
        font-size: 48px;
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}

/* --- New Layout Components --- */

/* Hero Section Enhancement */
.hero-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 1298;
    /* Match original artwork aspect ratio */
    background: url('../img/01.png') no-repeat center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: white;
}

.hero-content {
    position: relative;
    z-index: 100;
    max-width: 800px;
    padding: 0 var(--spacing-lg);
    text-align: center;
    margin-top: -8vw;
    /* Lifted higher into the sky gap per request */
}

.hero-prefix {
    font-family: var(--font-ui);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clr-ink);
    font-size: 14px;
    margin-bottom: var(--spacing-xs);
    display: block;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--clr-terracotta);
    margin: 0 auto var(--spacing-lg);
    max-width: 600px;
}

/* Lesson Cards Upgrade */
.module-card {
    background: var(--clr-cream);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.module-header-bar {
    height: 100px;
    /* Reduced from 160px for a smaller look */
    background-color: var(--clr-terracotta);
    background-image: linear-gradient(rgba(0, 0, 0, 0.1), transparent);
    width: 100%;
    position: relative;
}

.module-content {
    padding: var(--spacing-md);
    /* Reduced from var(--spacing-lg) */
    background: white;
    flex-grow: 1;
}

.module-title {
    font-size: 20px;
    margin-bottom: var(--spacing-xs);
}

.module-desc {
    font-size: 14px;
    color: var(--clr-charcoal);
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lessons-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 1298;
    background: url('../img/02.png') no-repeat center;
    background-size: 100% 100%;
    background-color: #F8F8F8;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.lessons-content {
    width: 100%;
    max-width: 1100px;
    padding: 0 10vw;
    text-align: center;
    margin-top: -5vw;
    /* Minor adjustment to lift content above the bottom line */
}

.module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

/* Floral Decor Utility */
.floating-decor {
    position: absolute;
    width: 250px;
    height: 250px;
    /* background: url('../assets/floral_decor.png') no-repeat; */
    background-size: contain;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

/* About Us Section with Watermarks */
.about-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 1164;
    background: url('../img/03.png') no-repeat center;
    background-size: 100% 100%;
    background-color: #F8F8F8;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 0;
}

.about-content {
    width: 100%;
    max-width: 650px;
    padding: 0 5vw;
    text-align: center;
    z-index: 10;
    margin-top: -5vw;
    /* Position text centered between the animal watermarks */
}

.about-title {
    font-family: var(--font-script);
    font-size: 84px;
    color: var(--clr-terracotta);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
}

/* Transitions */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(160, 73, 54, 0.15);
}

/* Section Dividers */
.section-divider {
    height: 4px;
    background: repeating-linear-gradient(45deg,
            var(--clr-terracotta),
            var(--clr-terracotta) 10px,
            transparent 10px,
            transparent 20px);
    border: none;
    margin: var(--spacing-xl) 0;
    opacity: 0.3;
}

/* Utils */
.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.lessons-section {
    padding: var(--spacing-xl) var(--spacing-sm);
    margin-top: var(--spacing-xl);
    /* Add space to clear hero art */
    background-color: var(--clr-parchment);
    position: relative;
    z-index: 10;
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.text-center {
    text-align: center;
}

.italic {
    font-style: italic;
}

/* ==========================================================================
   Responsive Design (Media Queries)
   ========================================================================== */

/* Tablet & Smaller Desktops */
@media (max-width: 992px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .hero {
        height: 75vw;
        /* Slightly taller aspect for tablet */
    }

    .hero-title {
        font-size: 40px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-lg: 1.5rem;
    }

    /* Header Mobile Adjustments */
    header {
        padding: 8px 0;
    }

    .header-content {
        flex-direction: column;
        gap: 8px;
    }

    .logo-text {
        font-size: 24px;
    }

    .main-nav {
        gap: var(--spacing-sm);
        justify-content: center;
    }

    .main-nav a {
        font-size: 13px;
    }

    /* Landing Page Frames Mobile */
    .hero-frame,
    .lessons-frame,
    .about-frame {
        aspect-ratio: auto;
        height: auto;
        min-height: 500px;
        padding: var(--spacing-xl) 0;
    }

    .hero-content,
    .lessons-content,
    .about-content {
        margin-top: 0;
        padding: 0 var(--spacing-md);
    }

    .hero-title {
        font-size: 28px;
        line-height: 1.3;
        max-width: 100%;
        text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
        /* Helps readability over artwork */
    }

    .about-title {
        font-size: 48px;
    }

    .module-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-sm);
    }

    .cta-group {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .cta-group .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Very Small Mobile */
@media (max-width: 480px) {
    .logo-text {
        font-size: 20px;
    }

    .hero-title {
        font-size: 22px;
    }

    .about-title {
        font-size: 36px;
    }

    .module-card {
        border-radius: 15px;
    }

    .footer-block {
        height: 100px;
    }
}

/* --- App Layout (Dashboard / Admin) --- */
.app-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--clr-parchment);
    position: relative;
    overflow-x: hidden;
}


.app-main {
    flex: 1;
    margin-left: 280px;
    /* Sidebar width */
    padding: 60px var(--spacing-xl) var(--spacing-xl);
    width: calc(100% - 280px);
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* --- Authentication Pages --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background-color: var(--clr-parchment);
    background-image:
        radial-gradient(circle at 15% 15%, rgba(160, 73, 54, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(160, 73, 54, 0.1) 0%, transparent 40%);
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 32px;
    box-shadow:
        0 40px 100px -20px rgba(0, 0, 0, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    width: 100%;
    max-width: 480px;
    padding: 3.5rem;
    position: relative;
    z-index: 10;
    text-align: center;
    animation: authCardEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 36px;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    letter-spacing: 4px;
    font-weight: 900;
}

.auth-header p {
    color: var(--clr-charcoal);
    opacity: 0.6;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-group {
    margin-bottom: 1.8rem;
    text-align: left;
}

.form-label {
    display: block;
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--clr-ink);
    margin-bottom: 12px;
    padding-left: 4px;
}

.form-control {
    width: 100%;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(160, 73, 54, 0.08);
    border-radius: 16px;
    font-family: var(--font-ui);
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--clr-ink);
}

.form-control:focus {
    outline: none;
    background: white;
    border-color: var(--clr-terracotta);
    box-shadow: 0 12px 30px rgba(160, 73, 54, 0.12);
    transform: translateY(-2px);
}

.auth-btn {
    width: 100%;
    margin-top: 1rem;
    background: var(--clr-terracotta);
    color: white;
    padding: 20px;
    font-size: 17px;
    font-weight: 900;
    border-radius: 18px;
    letter-spacing: 1px;
    box-shadow: 0 15px 35px rgba(160, 73, 54, 0.3);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
}

.auth-btn:hover {
    background: #B9533D;
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(160, 73, 54, 0.4);
}

.auth-footer {
    margin-top: 2.5rem;
    font-size: 15px;
    color: var(--clr-charcoal);
    font-weight: 600;
}

.auth-footer a {
    color: var(--clr-terracotta);
    font-weight: 800;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--clr-terracotta);
    transition: width 0.3s;
}

.auth-footer a:hover::after {
    width: 100%;
}

.auth-side-illustration {
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 650px;
    opacity: 0.12;
    z-index: 1;
    pointer-events: none;
    filter: sepia(0.3) brightness(0.9);
    transition: transform 0.5s ease;
}

.auth-side-illustration-left {
    position: absolute;
    top: -80px;
    left: -80px;
    width: 550px;
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
    transform: scaleX(-1);
    filter: sepia(0.3);
}

@media (max-width: 768px) {
    .auth-card {
        padding: 3rem 1.8rem;
        margin: var(--spacing-sm);
        border-radius: 28px;
        backdrop-filter: blur(15px);
    }

    .auth-side-illustration,
    .auth-side-illustration-left {
        width: 350px;
        opacity: 0.08;
    }
}


/* --- Sidebar (Light Parchment Theme) --- */
.app-sidebar {
    width: 280px;
    background-color: #FBF9F4 !important;
    color: var(--clr-ink);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(160, 73, 54, 0.1);
}

.sidebar-header {
    padding: 2.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mobile-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.sidebar-header .logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--clr-terracotta) !important;
    letter-spacing: 0.5px;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-nav {
    padding: 1rem 1.2rem;
    flex-grow: 1;
}

.nav-group {
    margin-bottom: 2.5rem;
}

.nav-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(51, 51, 51, 0.4);
    margin: 0 0 1.2rem 1.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 1.5rem;
    color: var(--clr-ink);
    text-decoration: none;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 14px;
    border-radius: 12px;
    transition: all 0.3s;
    margin-bottom: 4px;
}

.nav-item i {
    font-size: 22px;
    width: 24px;
    text-align: center;
    color: var(--clr-ink);
    opacity: 0.6;
}

.nav-item:hover {
    background: rgba(160, 73, 54, 0.05);
    color: var(--clr-terracotta);
}

.nav-item.active {
    background: var(--clr-terracotta);
    color: white !important;
    box-shadow: 0 8px 20px rgba(160, 73, 54, 0.15);
}

.nav-item.active i {
    color: white;
    opacity: 1;
}

.nav-item-logout {
    color: #ec7063 !important;
    margin-top: 2rem;
}

.sidebar-branding {
    margin-top: auto;
    padding: 2rem 1.5rem;
    text-align: center;
    opacity: 0.3;
}

.branding-text {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clr-charcoal);
    font-weight: 800;
}

.logout-pill:hover {
    opacity: 1;
    color: var(--clr-terracotta);
}

/* Mobile Header Components */
.mobile-app-header {
    display: none;
}

.burger-btn,
.mobile-close-btn {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-app-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    color: var(--clr-terracotta);
}

.mobile-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
}

.mobile-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1900;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Dashboard Metrics & Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2.5rem;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    background: rgba(160, 73, 54, 0.05);
    color: var(--clr-terracotta);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 28px;
    margin: 0;
    color: var(--clr-ink);
    font-weight: 800;
}

.stat-content p {
    font-size: 11px;
    color: #888;
    margin: 4px 0 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress Roadmap Enhancement */
.roadmap-container {
    background: white;
    padding: 3rem;
    border-radius: 35px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-bottom: 4rem;
    overflow-x: auto;
}

/* Data Tables */
.data-table-container {
    background: white;
    border-radius: 30px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 1.5rem;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    background: #fcfbf8;
    border-bottom: 2px solid #f0efeb;
}

.data-table td {
    padding: 1.5rem;
    border-bottom: 1px solid #f0efeb;
    font-size: 14px;
}

/* --- Banner Gallery (Thumbnails) --- */
.banner-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 10px;
}
.banner-option {
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}
.banner-option:hover {
    opacity: 0.9;
    transform: scale(1.05);
}
.banner-option.selected {
    border-color: var(--clr-terracotta);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(160, 73, 54, 0.3);
    transform: scale(1.05);
}
.banner-option img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

    /* CONSOLIDATED MOBILE LAYOUT OVERRIDES */
    @media (max-width: 992px) {
        .app-main {
            margin-left: 0 !important;
            max-width: 100% !important;
            padding: 94px 2vw 4rem !important;
            width: 100% !important;
            display: block !important;
        }

        .mobile-app-header {
            display: flex !important;
            padding: 0 5vw !important;
            height: 70px !important;
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            background: white !important;
            z-index: 1500 !important;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
            align-items: center;
            justify-content: space-between;
        }

        /* Improved Burger Button */
        .burger-btn {
            width: 44px;
            height: 44px;
            background: rgba(160, 73, 54, 0.05) !important;
            border-radius: 12px !important;
            display: flex !important;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .burger-btn:active { transform: scale(0.9); background: rgba(160, 73, 54, 0.1) !important; }
        .burger-btn i { font-size: 24px; color: var(--clr-terracotta); }

        #appSidebar {
            transform: translateX(-100%);
            z-index: 2100;
        }

        #appSidebar.open {
            transform: translateX(0);
            background-color: #FBF9F4 !important;
            box-shadow: 20px 0 50px rgba(0, 0, 0, 0.15);
        }

        #appSidebar.open~.sidebar-overlay {
            display: block;
            opacity: 1;
        }

    .stat-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .matrix-card, .enrollment-card, .creator-card, .data-table-card {
        max-width: 100% !important;
        padding: 1.5rem !important;
    }

    /* Mobile Typography & Polish */
    h1 { font-size: 1.85rem !important; }
    h2 { font-size: 1.5rem !important; }
    .glass-panel { padding: 1.5rem !important; }
    .action-zone { padding: 2.5rem 1.25rem !important; text-align: center; }
    .quiz-btn { width: 100% !important; justify-content: center !important; }
}