:root {
    --primary: #003fc4; /* Royal Blue from logo */
    --secondary: #e60000; /* Vibrant Red from logo */
    --accent: #e60000; /* Vibrant Red from logo */
    --success: #10b981; /* Emerald */
    --danger: #e60000; /* Vibrant Red */
    --bg: #f8fafc;
    --dark: #0f172a;
}

body {
    background: var(--bg);
    color: var(--dark);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { text-decoration: none; }
.navbar {
    min-height: 72px;
}
.navbar-brand {
    padding: .45rem .8rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
}
.navbar .nav-link {
    font-weight: 700;
    color: #334155;
}
.navbar .nav-link:hover {
    color: var(--primary);
}
.brand-gradient, .eyebrow { color: var(--primary); }
.btn-gradient {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 20px rgba(79, 70, 229, .25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}
.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: inherit;
}
.btn-gradient:hover { 
    color: #fff; 
    transform: translateY(-3px) scale(1.02); 
    box-shadow: 0 15px 30px rgba(79, 70, 229, .4);
}
.btn-gradient:hover::before { opacity: 1; }
.btn-soft { background: #EEF2FF; color: var(--primary); border: 0; }
.eyebrow { display: inline-flex; font-weight: 800; text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; margin-bottom: .75rem; }

.hero-band {
    padding: 4rem 0 3rem;
    color: var(--dark);
    background:
        linear-gradient(135deg, rgba(79, 70, 229, .08), rgba(6, 182, 212, .14)),
        #fff;
    border-bottom: 1px solid #E2E8F0;
}
.hero-band h1, .course-hero h1 { font-size: clamp(2.35rem, 5vw, 4.8rem); font-weight: 900; line-height: 1; letter-spacing: 0; }
.hero-band p, .course-hero p { font-size: 1.15rem; max-width: 42rem; opacity: .92; }
.hero-panel {
    min-height: 22rem;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #EEF2FF, #ECFEFF);
    border: 1px solid #CBD5E1;
}
.hero-card {
    width: min(100%, 17rem);
    padding: 1.5rem;
    border: 1px solid rgba(79, 70, 229, .18);
    border-radius: 8px;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(14px);
    text-align: center;
}
.hero-card span { display: block; font-size: 2.4rem; font-weight: 900; color: var(--primary); }
.hero-card.active { transform: scale(1.05); box-shadow: 0 20px 45px rgba(79, 70, 229, .16); }

.section-head { margin-bottom: 2rem; }
.section-head span { color: var(--secondary); font-weight: 800; }
.section-head h1, .section-head h2 { font-weight: 900; letter-spacing: 0; }
.section-head.compact { margin-bottom: 1rem; }

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

.fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.course-card, .book-card, .panel, .auth-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.course-card, .book-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.course-card:hover, .book-card:hover, .hover-lift:hover { 
    transform: translateY(-8px) scale(1.01); 
    box-shadow: 0 30px 60px rgba(79, 70, 229, .12); 
    border-color: rgba(79, 70, 229, .3);
}
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.course-thumb, .book-cover, .video-placeholder {
    min-height: 12rem;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.course-thumb i, .book-cover i, .video-placeholder i { font-size: 4rem; }
.course-card h3, .book-card h3 { font-size: 1.2rem; font-weight: 800; margin-top: 1rem; }
.pill { display: inline-flex; padding: .35rem .65rem; border-radius: 999px; background: #ECFEFF; color: #0E7490; font-weight: 700; font-size: .75rem; }
.price-line { display: flex; align-items: baseline; gap: .75rem; margin: 1rem 0; }
.price-line strong { font-size: 1.45rem; color: var(--success); }
.price-line span { color: #64748B; text-decoration: line-through; }
.price-line.big strong { font-size: 2.2rem; }

.soft-band { background: #fff; }
.stat-row > div > div {
    padding: 1.75rem;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #F1F5F9);
    text-align: center;
}
.stat-row strong { display: block; font-size: 2rem; color: var(--primary); }
.stat-row span { color: #475569; font-weight: 700; }

.list-tile {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    color: var(--dark);
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.list-tile:hover {
    transform: translateX(5px) translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.2);
    color: var(--primary);
}
.list-tile i { color: var(--primary); font-size: 1.25rem; transition: transform 0.3s ease; }
.list-tile:hover i { transform: scale(1.1); }
.list-tile small { margin-left: auto; color: #64748B; font-weight: 600; }
.why-box, .faq-box, .note-view, .cms-page { 
    padding: 2.5rem; 
    height: 100%; 
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.4);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.04);
}
.mini-feature { 
    padding: 1.25rem; 
    background: #fff; 
    border-radius: 12px; 
    font-weight: 700; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}
.mini-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}
.mini-feature i { color: var(--success); margin-right: .75rem; font-size: 1.25rem; }
details { 
    padding: 1.25rem 0; 
    border-bottom: 1px solid rgba(15, 23, 42, 0.05); 
    transition: all 0.3s ease;
}
details[open] {
    padding-bottom: 1.5rem;
}
summary { 
    font-weight: 800; 
    cursor: pointer; 
    color: var(--dark);
    font-size: 1.1rem;
    transition: color 0.2s ease;
}
summary:hover { color: var(--primary); }
details p { margin-top: 1rem; color: #475569; line-height: 1.7; animation: fadeUp 0.3s ease forwards; }
.contact-band { 
    background: linear-gradient(135deg, #EEF2FF 0%, #ECFEFF 100%);
    position: relative;
    overflow: hidden;
}
.contact-band::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 60%);
    animation: rotateSlow 20s linear infinite;
}
@keyframes rotateSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.course-hero { color: #fff; background: linear-gradient(135deg, #111827, var(--primary)); }
.video-frame, .playlist { border-radius: 8px; overflow: hidden; box-shadow: 0 20px 50px rgba(15,23,42,.15); }
.playlist { padding: 1rem; background: #fff; }
.playlist a { display: flex; justify-content: space-between; padding: .85rem; color: var(--dark); border-radius: 8px; }
.playlist a.active { background: #EEF2FF; color: var(--primary); font-weight: 800; }
.book-card { padding: 1rem; }
.book-cover.detail { min-height: 28rem; border-radius: 8px; }
.note-view { text-align: center; max-width: 760px; margin: auto; }
.note-view > i { font-size: 5rem; color: var(--danger); }

.auth-section { min-height: 75vh; display: grid; place-items: center; padding: 2rem; }
.auth-card { width: min(100%, 420px); padding: 2rem; display: grid; gap: 1rem; }
.auth-card h1 { font-weight: 900; }

.footer-band { color: #CBD5E1; background: #0F172A; }
.footer-band a { display: block; color: #E2E8F0; margin-bottom: .35rem; }

.dashboard-bg { background: #EEF2FF; }
.admin-shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.25rem;
    color: #fff;
    background: #0F172A;
    overflow-y: auto;
}
.student-side { background: #111827; }
.sidebar-brand { display: block; color: #fff; font-size: 1.25rem; font-weight: 900; margin-bottom: 1rem; }
.sidebar a:not(.sidebar-brand) {
    display: flex;
    gap: .6rem;
    align-items: center;
    color: #CBD5E1;
    padding: .8rem .9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.sidebar a:hover { 
    background: rgba(255,255,255,.1); 
    color: #fff; 
    transform: translateX(4px);
}
.form-control, .form-select {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}
.dashboard-main { padding: 1.5rem; }
.dashboard-top, .dash-card, .panel {
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15,23,42,.08);
}
.dashboard-top { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.dash-card { padding: 1.25rem; }
.dash-card i { font-size: 1.8rem; color: var(--primary); }
.dash-card span { display: block; color: #64748B; margin-top: .6rem; }
.dash-card strong { font-size: 1.8rem; }
.panel { padding: 1.25rem; }
.profile-panel { text-align: center; max-width: 560px; }
.avatar { width: 72px; height: 72px; margin: auto auto 1rem; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--primary); font-size: 2rem; font-weight: 900; }

@media (max-width: 992px) {
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; }
    .hero-band { padding-top: 3rem; }
}

.page-shell {
    max-width: 1480px;
}

.wire-feature-strip {
    margin-top: -1.5rem;
    position: relative;
    z-index: 2;
}
.wire-feature {
    min-height: 108px;
    display: grid;
    place-items: center;
    gap: .25rem;
    padding: 1rem .75rem;
    color: var(--dark);
    background: #fff;
    border: 1px solid #E2E8F0;
    text-align: center;
    transition: .2s ease;
}
.wire-feature:hover {
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}
.wire-feature i {
    font-size: 1.65rem;
    color: var(--primary);
}
.wire-feature strong {
    font-size: .95rem;
}
.wire-feature span {
    color: #64748B;
    font-size: .82rem;
}
.view-all-link {
    color: var(--dark);
    font-weight: 800;
}

.filter-panel,
.performance-card,
.doubt-card,
.lecture-overview {
    padding: 1rem;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}
.filter-panel {
    position: sticky;
    top: 88px;
}
.filter-panel h5,
.performance-card h5,
.doubt-card h5 {
    font-weight: 900;
}
.filter-group {
    display: grid;
    gap: .45rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
}
.filter-group strong {
    color: #475569;
}
.filter-group label,
.filter-panel a {
    color: #334155;
    font-size: .95rem;
}
.filter-panel a {
    display: block;
    padding: .55rem .7rem;
    border-radius: 8px;
}
.filter-panel a.active-filter,
.filter-panel a:hover {
    background: #EEF2FF;
    color: var(--primary);
    font-weight: 800;
}

.wire-search {
    padding: .85rem;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: #fff;
}
.search-input {
    position: relative;
}
.search-input i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748B;
}
.search-input .form-control {
    padding-left: 2.6rem;
}
.wire-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
}
.wire-pagination a,
.wire-pagination span {
    min-width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    color: var(--dark);
    background: #fff;
    font-weight: 800;
}
.wire-pagination a.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.breadcrumb-line {
    color: #475569;
    font-weight: 800;
}
.lecture-tabs,
.test-tabs {
    display: flex;
    gap: 1.25rem;
    border-bottom: 1px solid #CBD5E1;
    background: #fff;
    padding: .85rem 1rem 0;
}
.lecture-tabs a,
.test-tabs a {
    padding-bottom: .75rem;
    color: #475569;
    font-weight: 800;
}
.lecture-tabs a.active,
.test-tabs a.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}
.lecture-overview {
    border-top: 0;
    border-radius: 0 0 8px 8px;
}
.lecture-overview h1 {
    margin-top: .5rem;
    font-size: 1.8rem;
    font-weight: 900;
}
.next-lecture {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #F8FAFC;
}
.next-lecture span {
    display: block;
    color: #64748B;
    font-size: .85rem;
}
.mini-thumb {
    width: 72px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: var(--primary);
    background: #EEF2FF;
}
.chapter-head {
    display: flex;
    justify-content: space-between;
    padding: .75rem .85rem;
    margin-top: .5rem;
    border-radius: 8px;
    background: #F8FAFC;
    font-weight: 900;
}
.chapter-head.muted {
    color: #64748B;
}
.doubt-card textarea {
    min-height: 118px;
}

.notes-list,
.test-list {
    display: grid;
    gap: .8rem;
}
.note-row,
.test-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: #fff;
}
.note-row h3,
.test-row h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
}
.note-row p,
.test-row p {
    margin: .2rem 0 0;
    color: #64748B;
    font-size: .9rem;
}
.pdf-icon {
    width: 48px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 2px solid #EF4444;
    border-radius: 6px;
    color: #EF4444;
    font-weight: 900;
    background: #FEF2F2;
}
.bookmark-btn {
    border: 0;
    color: #475569;
    background: transparent;
    font-size: 1.35rem;
}
.test-row > i {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--primary);
    background: #EEF2FF;
    font-size: 1.5rem;
}
.performance-card {
    position: sticky;
    top: 88px;
}
.score-ring {
    width: 128px;
    height: 128px;
    display: grid;
    place-items: center;
    margin: 1rem auto;
    border-radius: 50%;
    border: 10px solid #D1FAE5;
    outline: 10px solid #EEF2FF;
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 900;
}
.score-ring span {
    display: block;
    margin-top: -2.2rem;
    color: #64748B;
    font-size: .75rem;
}

@media (max-width: 768px) {
    .wire-feature-strip {
        margin-top: 0;
    }
    .note-row,
    .test-row,
    .next-lecture {
        align-items: flex-start;
        flex-direction: column;
    }
    .note-row .ms-auto,
    .test-row .ms-auto,
    .next-lecture .ms-auto {
        margin-left: 0 !important;
    }
}
