:root {
    /* Core Brand Palette */
    --ag-primary: #0095d7; /* Exact brand cyan */
    --ag-primary-dark: #007bb5;
    --ag-secondary: #a2c53e; /* Exact brand green */
    --ag-accent: #f59e0b;
    --ag-success: #22c55e;
    --ag-danger: #ef4444;
    --ag-warning: #f59e0b;
    --ag-info: #0ea5e9;
    
    /* Neutral Palette */
    --ag-ink: #0f172a;
    --ag-muted: #64748b;
    --ag-bg: #f8fafc;
    --ag-border: #e2e8f0;
    
    /* Layout Tokens */
    --ag-sidebar-width: 280px;
    --ag-header-height: 80px;
    --ag-border-radius: 1.25rem;
    --ag-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --ag-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Base Reset & Typography */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--ag-bg);
    color: var(--ag-ink);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
}

/* Shared Utility Components */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--ag-border-radius);
    box-shadow: var(--ag-shadow);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-scale:hover {
    transform: translateY(-5px);
}

.btn-premium {
    border-radius: 0.85rem;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--ag-shadow);
}

/* Scrollbar Customization */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ag-muted); }

/* Premium styling for Select2 to match the theme */
.select2-container--default .select2-selection--single {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    height: auto;
    padding: 0.95rem 0.75rem;
    transition: all 0.2s ease;
}
.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--open .select2-selection--single {
    background: #fff;
    border-color: var(--ag-primary);
    box-shadow: 0 0 0 4px rgba(0, 149, 215, 0.1);
    outline: none;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #475569;
    line-height: 1.5;
    padding-left: 0;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 15px;
}
.select2-dropdown {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* --- Extracted Global Styles --- */

/* Extracted from lesson.blade.php */
/* Styling for the content injected from rich text editor */
        .article-content h1,
        .article-content h2,
        .article-content h3 {
            font-weight: bold;
            margin-top: 1.5rem;
            margin-bottom: 1rem;
            color: #212529;
        }

        .article-content p {
            margin-bottom: 1.25rem;
        }

        .article-content ul,
        .article-content ol {
            margin-bottom: 1.25rem;
            padding-left: 2rem;
        }

        .article-content li {
            margin-bottom: 0.5rem;
        }

/* Extracted from navigation_sidebar.blade.php */
.nav-link-sidebar {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.85rem 1.25rem;
        color: #64748b;
        text-decoration: none;
        font-weight: 500;
        border-radius: 1rem;
        transition: all 0.2s ease;
    }

    .nav-link-sidebar i { font-size: 1.25rem; opacity: 0.8; }

    .nav-link-sidebar:hover {
        background: #f1f5f9;
        color: var(--ag-primary);
    }

    .nav-link-sidebar.active {
        background: var(--ag-primary-subtle, #eff6ff);
        color: var(--ag-primary);
        font-weight: 600;
    }

    .nav-link-sidebar.active i { color: var(--ag-primary); opacity: 1; }

    .sidebar-divider { height: 1px; background: rgba(0,0,0,0.05); }

/* Extracted from edit-profile.blade.php */
.form-control-premium, .form-select-premium {
        background: #fcfdfe;
        border: 1px solid #e2e8f0;
        border-radius: 0.85rem;
        padding: 0.85rem 1.25rem;
        transition: all 0.2s ease;
        width: 100%;
    }
    .form-control-premium:focus, .form-select-premium:focus {
        background: #fff;
        border-color: var(--ag-primary);
        box-shadow: 0 0 0 5px rgba(0, 149, 215, 0.1);
        outline: none;
    }
    .form-label-premium {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        color: #64748b;
        letter-spacing: 0.05em;
        margin-bottom: 0.6rem;
        display: block;
    }

/* Extracted from manage-business.blade.php */
.banner-upload-container:hover {
            border-color: var(--ag-primary) !important;
            background: rgba(0, 149, 215, 0.05) !important;
        }

        .logo-upload-container:hover {
            border-color: var(--ag-primary) !important;
            transform: scale(1.02);
        }

        .business-hero {
            height: 200px;
            background: #1e293b;
        }

        .hero-pattern {
            position: absolute;
            inset: 0;
            background-image: radial-gradient(#ffffff1a 1px, transparent 1px);
            background-size: 20px 20px;
            opacity: 0.1;
        }

        .hero-gradient {
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 100%);
        }

        .business-logo-container {
            width: 120px;
            height: 120px;
            margin-bottom: -60px;
        }

        .form-control-premium,
        .form-select-premium {
            background: #f8fafc;
            border: 2px solid #e2e8f0;
            border-radius: 1rem;
            padding: 1rem 1.25rem;
            transition: all 0.2s ease;
            width: 100%;
        }

        .form-control-premium:focus,
        .form-select-premium:focus {
            background: #fff;
            border-color: var(--ag-primary);
            box-shadow: 0 0 0 4px rgba(0, 149, 215, 0.1);
            outline: none;
        }

        .form-label-premium {
            font-size: 0.8rem;
            font-weight: 700;
            text-transform: uppercase;
            color: #475569;
            letter-spacing: 0.05em;
            margin-bottom: 0.6rem;
            display: block;
        }

        .hvr-grow {
            transition: transform 0.2s ease;
        }

        .hvr-grow:hover {
            transform: scale(1.02);
        }

        .opacity-05 { opacity: 0.05; }
        .ls-wide { letter-spacing: 0.1em; }

/* Extracted from business-directory.blade.php */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Extracted from business-profile.blade.php */
.business-hero {
            height: 240px;
            background: #1e293b;
            overflow: visible;
        }

        .hero-pattern {
            position: absolute;
            inset: 0;
            background-image: radial-gradient(#ffffff1a 1px, transparent 1px);
            background-size: 20px 20px;
            opacity: 0.2;
        }

        .hero-gradient {
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 100%);
        }

        .business-logo-container {
            width: 140px;
            height: 140px;
            border: 4px solid #fff;
            margin-bottom: -70px;
        }

        .profile-header-content {
            z-index: 10;
        }

        .contact-icon {
            width: 42px;
            height: 42px;
            min-width: 42px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .verification-bg-icon {
            position: absolute;
            top: -10px;
            right: -10px;
            font-size: 6rem;
            opacity: 0.1;
            transform: rotate(15deg);
        }

        .hvr-grow {
            transition: transform 0.2s ease;
        }

        .hvr-grow:hover {
            transform: scale(1.02);
        }

        @media (max-width: 768px) {
            .business-hero {
                height: 180px;
            }
            .business-logo-container {
                width: 100px;
                height: 100px;
                margin-bottom: -50px;
            }
        }

/* Extracted from course-list.blade.php */
.bg-gradient-dark { background: linear-gradient(transparent, rgba(0,0,0,0.8)); }
    .line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Extracted from course-player.blade.php */
.scroll-y {
        overflow-y: auto;
    }

    .active-lesson-indicator {
        border-left: 4px solid var(--ag-primary) !important;
        background: rgba(0, 149, 215, 0.05) !important;
    }

    .prose img {
        max-width: 100%;
        border-radius: 1.5rem;
        margin: 3rem 0;
        box-shadow: var(--ag-shadow);
    }

    .hvr-grow {
        transition: transform 0.2s ease;
    }

    .hvr-grow:hover {
        transform: scale(1.05);
    }

    .gold-text {
        background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        font-weight: 800;
    }

    .restricted-content-wrapper {
        position: relative;
        overflow: hidden;
    }

    .restricted-content-wrapper::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,215,0,0.05) 0%, transparent 70%);
        pointer-events: none;
    }

/* Extracted from event-detail.blade.php */
.bg-gradient-dark { background: linear-gradient(transparent, rgba(0,0,0,0.8)); }

/* Extracted from event-list.blade.php */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Extracted from quiz-engine.blade.php */
.quiz-option-card {
        background: #f8fafc;
        border: 2px solid #e2e8f0;
        color: #1e293b;
    }
    .quiz-option-card .option-index {
        background: #fff;
        border: 2px solid #e2e8f0;
        color: #64748b;
        transition: all 0.2s ease;
    }
    .quiz-option-card:hover {
        background: #fff;
        border-color: var(--ag-primary);
        box-shadow: 0 10px 15px -3px rgba(0, 149, 215, 0.1);
        transform: translateX(10px);
    }
    .quiz-option-card:hover .option-index {
        background: var(--ag-primary);
        border-color: var(--ag-primary);
        color: #fff;
    }
    .max-w-600 { max-width: 600px; }

/* Extracted from index.blade.php */
.certificate-preview {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        }
        .cert-border-inner {
            border: 1px solid rgba(255,255,255,0.1) !important;
            transform: rotate(-2deg);
        }

/* Extracted from show.blade.php */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Playfair+Display:wght@700;900&family=Pinyon+Script&family=Dancing+Script&display=swap');

        :root {
            --cert-gold: #AF9500;
            --cert-gold-light: #D4AF37;
            --cert-navy: #0f172a;
            --cert-bg: #fdfdfd;
        }

        .certificate-canvas {
            width: 1000px;
            height: 700px;
            background: var(--cert-bg);
            color: var(--cert-navy);
            font-family: 'Libre Baskerville', serif;
            overflow: hidden;
            border: 1px solid #e2e8f0;
        }

        /* Watermark Background */
        .cert-watermark {
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            opacity: 0.03;
            background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l15 30-15 30-15-30z' fill='%23000' fill-rule='evenodd'/%3E%3C/svg%3E");
            background-size: 80px 80px;
            pointer-events: none;
        }

        .cert-outer-border {
            padding: 30px;
            height: 100%;
        }

        .cert-middle-border {
            border: 8px double var(--cert-gold);
            height: 100%;
            padding: 10px;
        }

        .cert-inner-border {
            border: 1px solid var(--cert-gold-light);
            height: 100%;
            padding: 40px;
            position: relative;
            background: rgba(255, 255, 255, 0.5);
        }

        /* Ornate Corners */
        .corner-ornament {
            position: absolute;
            width: 40px;
            height: 40px;
            border: 4px solid var(--cert-gold);
            z-index: 10;
        }
        .top-left { top: -5px; left: -5px; border-right: 0; border-bottom: 0; }
        .top-right { top: -5px; right: -5px; border-left: 0; border-bottom: 0; }
        .bottom-left { bottom: -5px; left: -5px; border-right: 0; border-top: 0; }
        .bottom-right { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }

        .cert-platform-name { font-size: 0.8rem; letter-spacing: 5px; color: #64748b; font-weight: 700; }
        .cert-divider { width: 60px; height: 3px; background: var(--cert-gold); border-radius: 2px; }
        
        .cert-main-title {
            font-family: 'Playfair Display', serif;
            font-size: 2.5rem;
            color: var(--cert-navy);
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: -1px;
        }

        .cert-declaration { font-style: italic; color: #475569; font-size: 1.1rem; }
        
        .cert-user-name {
            font-family: 'Libre Baskerville';
            font-size: 5rem;
            color: var(--cert-gold);
            line-height: 1;
            margin: 20px 0;
            text-shadow: 1px 1px 0 rgba(0,0,0,0.05);
        }

        .cert-course-title {
            font-family: 'Playfair Display', serif;
            font-size: 2.2rem;
            color: var(--cert-navy);
            font-weight: 700;
        }

        /* Wax Seal */
        .cert-wax-seal {
            width: 90px;
            height: 90px;
            background: #cd1818; /* Wax red */
            background: radial-gradient(#ef4444, #cd1818);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 20;
            position: relative;
            border: 2px solid #991b1b;
        }

        .wax-seal-inner {
            width: 70px;
            height: 70px;
            border: 2px dashed rgba(255,255,255,0.3);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 2.5rem;
        }

        .cert-seal-ribbons .ribbon-red {
            position: absolute;
            top: 20px;
            width: 30px;
            height: 80px;
            background: #991b1b;
            z-index: 15;
            clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
        }
        .ribbon-red.left { left: 40%; transform: rotate(15deg); }
        .ribbon-red.right { right: 40%; transform: rotate(-15deg); }

        .cert-signature-font { font-family: 'Dancing Script', cursive; font-size: 1.8rem; color: #334155; }
        .cert-signature-line { height: 2px; background: #cbd5e1; width: 100%; }
        .cert-signature-label { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: #64748b; letter-spacing: 2px; }

        .ls-extra-wide { letter-spacing: 3px; }
        .cert-seal-text { font-size: 0.65rem; color: #64748b; font-weight: 800; }
        .cert-meta-item { font-family: 'Monaco', 'Consolas', monospace; font-size: 0.7rem; color: #94a3b8; }

        @media print {
            .btn, nav, header { display: none !important; }
            .certificate-canvas { border: none !important; shadow: none !important; margin: 0 !important; }
        }
