/* Global styles */
:root {
    --primary-color: #B72467;
    --secondary-color: #007BBA;

    /* Bootstrap variable overrides */
    --bs-primary: var(--primary-color);
    --bs-primary-rgb: 183, 36, 103;
    --bs-secondary: var(--secondary-color);
    --bs-secondary-rgb: 0, 123, 186;
    --bs-link-color: var(--primary-color);
    --bs-link-hover-color: var(--primary-color-dark);
    --primary-color-dark: #811948;
    --secondary-color-dark: #0069a1;
    /* App-specific variables */
    --bg: #f6f9fb;
    --card: #ffffff;
    --muted: #6b7280;
}
body .main-container{padding:18px 14px}
.dashboard-grid{display:grid;grid-template-columns:1fr 320px;gap:18px;align-items:start}
@media (max-width:1000px){ .dashboard-grid{grid-template-columns:1fr} }

.hero{display:flex;gap:14px;align-items:center;padding:16px;border-radius:12px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 10px 24px rgba(2,6,23,0.06)}
.hero .meta{flex:1}
.hello{font-size:18px;margin:0}
.sub{color:var(--muted);margin-top:6px}
.stats-row{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.stat-pill{background:var(--card);padding:10px;border-radius:10px;min-width:120px;box-shadow:0 8px 20px rgba(2,6,23,0.04);text-align:left}
.stat-pill b{display:block;font-size:16px}
.card-panel{background:var(--card);padding:12px;border-radius:12px;box-shadow:0 10px 24px rgba(2,6,23,0.04)}
.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.accordion .btn {font-weight:600}
.small-muted{color:var(--muted);font-size:13px;line-height:1.4}
.recent-table th, .recent-table td{padding:8px;border-bottom:1px solid #f1f5f9;text-align:left}
.badge-pulse{display:inline-block;padding:6px 10px;background:linear-gradient(90deg,var(--primary-color),var(--secondary-color));color:#fff;border-radius:999px;font-weight:700}
.action-row{display:flex;gap:8px;flex-wrap:wrap}
.empty-state{padding:18px;text-align:center;color:var(--muted)}

body {
    font-family: 'Inter', sans-serif;
    background: #f8f9fa;
}

.main-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* Index page */
.index-page .main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
}

/* Login and Register pages */
.login-page .main-container,
.register-page .main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-box,
.register-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}
.registration_logo {
            width: 100%;
            max-width: 100%;
            height: auto;
            margin-bottom: 20px;
            animation: fadeInDown 0.8s ease; 
        }

/* Dashboard page */
.dashboard-page .box {
    background: #fff;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 0 10px #eee;
}

/* Quiz page */
.quiz-page .quiz-container {
    max-width: 750px;
    margin: auto;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* Result page */
.result-page .result-box {
    background: #fff;
    padding: 25px;
    max-width: 550px;
    border-radius: 10px;
    margin: auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Review page */
.review-page .question {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid var(--secondary-color);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* Admin panel */
.admin-body {
    background: #f8f9fa;
    font-family: Arial, sans-serif;
}

.sidebar {
    height: 100vh;
    background: #343a40;
    color: white;
    padding-top: 20px;
    position: fixed;
}

.sidebar h4 {
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: #adb5bd;
    text-decoration: none;
}

.sidebar a:hover, .sidebar a.active {
    background: #495057;
    color: white;
}

.content {
    margin-left: 16.666%;
    padding: 30px;
}

@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
    }
    .content {
        margin-left: 0;
    }
}

/* Profile page styles */
.profile-page body {
    background: #f0f8ff;
    display: flex;
    justify-content: center;
    padding: 40px 0;
}
.profile-box {
    background: #fff;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.08);
}
.profile-box h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}
.profile-box input[type="text"], .profile-box input[type="email"], .profile-box input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}
.profile-box button {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.profile-box button:hover {
    background-color: var(--primary-color-dark);
}
.profile-box .message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
}
.profile-box .success {
    background-color: #d4edda;
    color: #155724;
}
.profile-box .error {
    background-color: #f8d7da;
    color: #721c24;
}
.profile-box .footer {
    margin-top: 20px;
    text-align: center;
}
.profile-box a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Forgot password page styles */
.forgot_password-page body {
    font-family: Arial, sans-serif;
    background: #f9f9f9;
}
.forgot_password-page h2 {
    color: var(--primary-color);
}
.forgot_password-page form input[type="email"],
.forgot_password-page form button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
}
.forgot_password-page form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
}
.forgot_password-page form button:hover {
    background-color: var(--primary-color-dark);
}
.forgot_password-page p {
    color: red;
}

/* History page styles */
.history-page body {
    font-family: Arial, sans-serif;
    padding: 30px;
    background: #f9f9f9;
}
.history-page h2 {
    color: var(--primary-color);
}
.history-page table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}
.history-page th, .history-page td {
    padding: 12px 15px;
    border: 1px solid #ccc;
    text-align: center;
}
.history-page th {
    background: var(--secondary-color);
    color: white;
}
.history-page a.btn {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
}
.history-page a.btn:hover {
    background: var(--primary-color-dark);
}

/* My notes page styles */
.my_notes-page body {
    background: #f8f9fa;
    padding: 30px;
}
.my_notes-page .note-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.my_notes-page .topic-title {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: bold;
}
.my_notes-page .question-text {
    margin-top: 5px;
    font-weight: 500;
}
.my_notes-page .note-text {
    margin-top: 10px;
}
.my_notes-page .note-meta {
    font-size: 0.85em;
    color: gray;
    margin-top: 5px;
}

/* Payment page styles */
.payment-page body {
    background: linear-gradient(to right, #e0f7fa, #f1f8ff);
    font-family: 'Segoe UI', sans-serif;
}
.payment-page .premium-card {
    max-width: 750px;
    margin: auto;
    border-radius: 15px;
}

/* Reset password page styles */
.reset_password-page body {
    font-family: Arial, sans-serif;
    background: #f9f9f9;
}
.reset_password-page h2 {
    color: var(--primary-color);
}
.reset_password-page form input[type="password"],
.reset_password-page form button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
}
.reset_password-page form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
}
.reset_password-page form button:hover {
    background-color: var(--primary-color-dark);
}
.reset_password-page p {
    color: red;
}

/* Admin login page styles */
.admin-admin_login-page body {
    background: #f8f9fa;
    font-family: Arial, sans-serif;
}
.admin-admin_login-page .card {
    max-width: 400px;
    margin: auto;
}
.admin-admin_login-page .card-title {
    color: var(--primary-color);
}
.admin-admin_login-page .alert {
    margin-bottom: 15px;
}
.admin-admin_login-page .form-label {
    font-weight: bold;
}
.admin-admin_login-page .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.admin-admin_login-page .btn-primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
}
.admin-admin_login-page a {
    color: var(--primary-color);
    text-decoration: none;
}
.admin-admin_login-page a:hover {
    text-decoration: underline;
}

/*
================================================
CUSTOM BOOTSTRAP OVERRIDES
================================================
*/

/* Ensure theme colors are applied to primary buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
}

/* Outlined primary buttons */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
/* Ensure theme colors are applied to secondary buttons */
.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}
.btn-secondary:hover {
    background-color: var(--secondary-color-dark);
    border-color: var(--secondary-color-dark);
    color: #fff;
}
.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.btn-outline-secondary:hover {
    color: #fff;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Ensure theme colors are applied to primary links */
a {
    color: var(--primary-color);
}
a:hover {
    color: var(--primary-color-dark);
}

/* Ensure theme colors are applied to navigation components */
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: var(--primary-color);
    color: #fff;
}

/*
================================================
HEADER & NAVIGATION STYLES
================================================
*/
.site-header { background: linear-gradient(360deg, rgba(var(--bs-primary-rgb), 0.1), rgba(var(--bs-secondary-rgb), 0.08)) !important; border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.12); }
.site-brand { font-weight:700; letter-spacing: -0.2px; color:#0f172a; display:flex; align-items:center; }
.brand-logo { height: 50px; width: auto; object-fit: contain; }
.nav-search { max-width:520px; width:100%; }
.breadcrumb-modern { padding: 8px 12px; background: #fff; border-radius: 10px; box-shadow: 0 6px 18px rgba(15,23,42,0.06); }
.breadcrumb-list { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 14px; align-items: center; }
.breadcrumb-list li { color: #6b7280; display: flex; align-items: center; }
.breadcrumb-list li:not(:last-child)::after { content: '›'; margin-left: 8px; color: #6b7280; }
.breadcrumb-list li a { color: #0f172a; text-decoration: none; font-weight: 600; }
.breadcrumb-list li.current { color: #0b5ed7; font-weight: 700; }
.quiz-header { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.header-stats { text-align:right; }
.notif-badge { font-size:12px; min-width:22px; height:22px; line-height:20px; padding:0 6px; border-radius:999px }
.user-avatar { width:36px;height:36px;border-radius:8px;object-fit:cover }
.dropdown-item.active, .dropdown-item:active{background-color: var(--primary-color);}
@media (max-width:767px){ .nav-search { max-width:100%; } }

/* Search page snippets */
.search-snippets {
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid #e9ecef;
}
