:root {
    --primary-color: #4f46e5;
    --primary-light: #eef2ff;
    /* Indigo theme */
    --sidebar-width: 250px;
    --sidebar-width-collapsed: 70px;
    --header-height: 64px;
    --bg-color: #f8f9fa;
    --text-color: #202124;
    --card-blue: #4338ca;
    /* Rich indigo for cards */
}

body {
    font-family: 'Ubuntu', sans-serif;
    /* Changed to Ubuntu */
    background-color: var(--bg-color);
    overflow-x: hidden;
}

a {
    transition: all 0.2s ease;
}

/* Header */
.navbar {
    height: var(--header-height);
    background-color: #fff;
    border-bottom: 1px solid #dadce0;
    z-index: 1001;
    position: fixed;
    top: 0;
    width: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #5f6368;
}

.navbar-brand img {
    height: 20px;
    margin-right: 8px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #dadce0;
    transition: width 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
    padding-top: 10px;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar .nav-link {
    color: #6b7280;
    font-weight: 500;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 12px;
    margin: 4px 12px;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.sidebar .nav-link.active {
    background-color: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 20px;
    margin-right: 16px;
    min-width: 24px;
    text-align: center;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link {
    padding: 10px 0;
    justify-content: center;
    margin-right: 0;
    border-radius: 0;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 32px;
    background-color: #f9fafb;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed+.main-content {
    margin-left: var(--sidebar-width-collapsed);
}

/* Cards */
.dashboard-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dashboard-card .card-header {
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    padding: 20px 24px;
}

.dashboard-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.dashboard-card .card-body {
    padding: 24px;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 400;
}

.metric-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.metric-change {
    font-size: 0.75rem;
    margin-top: 4px;
}

.metric-change i {
    font-size: 0.7rem;
}

.card-announcement {
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    overflow: hidden;
}

.card-announcement .card-header {
    background-color: var(--card-blue);
    color: white;
    border-bottom: none;
    padding: 12px 16px;
    font-weight: 500;
}

.announcement-item {
    border-left: 3px solid var(--primary-color);
    padding-left: 12px;
    margin-bottom: 16px;
}

.announcement-date {
    font-size: 0.75rem;
    color: #5f6368;
}

.announcement-title {
    font-weight: 500;
    color: #202124;
    margin-bottom: 2px;
    display: block;
}

.announcement-text {
    font-size: 0.875rem;
    color: #5f6368;
}

/* Utilities */
.text-white-70 {
    color: rgba(255, 255, 255, 0.7);
}

.btn-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #5f6368;
    margin-right: 16px;
    cursor: pointer;
}

/* Login Page Styles */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #f0f2f5;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 8px 16px rgba(0, 0, 0, .1);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 32px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        width: var(--sidebar-width);
        /* Always full width on mobile when shown */
    }

    .sidebar.collapsed {
        /* On mobile, allow the sidebar to be visible even when JS toggles `.collapsed`. */
        transform: translateX(0);
        width: var(--sidebar-width);
    }

    .main-content {
        margin-left: 0 !important;
        padding: 16px;
    }

    /* Member Dashboard - mobile adjustments */
    .dashboard-page .page-header {
        margin-bottom: 1.25rem;
    }

    .dashboard-page .stat-card {
        padding: 1.25rem 1rem;
    }

    .dashboard-page .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .dashboard-page .upcoming-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        /* Card-like look on mobile */
        border: 1px solid rgba(0, 0, 0, 0.06) !important;
        border-radius: 16px;
        margin: 0 0 0.75rem 0;
        border-bottom: none !important;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    }

    .dashboard-page .upcoming-list-item .btn-sm {
        align-self: flex-start;
    }

    /* Remove extra bottom spacing on last card */
    .dashboard-page .upcoming-list-item:last-child {
        margin-bottom: 0;
    }
}

.left-section {
    background: linear-gradient(135deg, #0b2c4d 0%, #1e4d8c 100%);
    position: relative;
    color: #fff;
    min-height: 100vh;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.left-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #ff8c2f);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: #ff8c2f;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(255, 140, 47, 0.2);
    z-index: -1;
}

.feature-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-box:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(10px);
}

.feature-icon {
    background: rgba(255, 140, 47, 0.15);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 22px;
    color: #ff8c2f;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.right-section {
    background-color: #ffffff;
    background-image: radial-gradient(#e5e7eb 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    padding: 45px;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin-bottom: 8px;
}

.input-group {
    background: #f9fafb;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: #1e73d8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 115, 216, 0.1);
}

.input-group-text {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding-left: 15px;
}

.input-group .form-control {
    background: transparent;
    border: none !important;
    height: 54px;
    padding-left: 10px;
    font-weight: 500;
    color: #1f2937;
    box-shadow: none !important;
}

.input-group .form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.btn-primary {
    background: linear-gradient(to right, #1e73d8, #155ec1);
    border: none;
    height: 54px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(30, 115, 216, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(30, 115, 216, 0.3);
    background: linear-gradient(to right, #155ec1, #1e73d8);
}

.btn-primary:active {
    transform: translateY(0);
}

.social-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 500;
}

.social-separator::before,
.social-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #f3f4f6;
}

.social-separator:not(:empty)::before {
    margin-right: .75em;
}

.social-separator:not(:empty)::after {
    margin-left: .75em;
}

.btn-google {
    background: #fff;
    border: 2px solid #f3f4f6;
    height: 54px;
    border-radius: 12px;
    font-weight: 600;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 16px;
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .left-section {
        padding: 40px 30px;
        text-align: center;
    }
}

/* Child Form Styles */
.form-card {
    border-radius: 12px;
    border: none;
    background: #fff;
}

.form-card-add-quiz {
    background: #fff;
    border-radius: 20px;
    border: none;
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3e38c5 100%);
    padding: 35px 30px;
    color: white;
    border-bottom: none;
}

.form-header .btn-back {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.form-header .btn-back:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateX(-3px);
}

.form-header h5 {
    font-size: 1.4rem;
    margin-bottom: 0;
}

.form-header p {
    font-size: 0.85rem;
    margin-bottom: 0;
    opacity: 0.85;
    margin-top: 4px;
}

.form-label {
    font-weight: 500;
    color: #444;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

/* Publish Quiz page heading */
.publish-quiz-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.publish-quiz-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.45;
}

/* Publish date & time block (nested inside Scheduled card) */
.publish-date-block {
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    width: 100%;
}

.publish-date-block-inner {
    padding: 1rem 1.25rem;
}

.publish-date-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.publish-datetime-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 0 0.5rem 0 1rem;
}

.publish-datetime-wrap:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.publish-datetime-input {
    flex: 1;
    min-width: 0;
    height: 46px !important;
    padding: 0.5rem 0 !important;
    border: none !important;
    background: transparent !important;
    font-size: 0.9375rem !important;
    color: #334155 !important;
}

.publish-datetime-input:focus {
    box-shadow: none !important;
    outline: none !important;
}

.publish-datetime-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.publish-datetime-btn:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.publish-date-hint {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.45;
}

/* Quiz create: Add quiz form */
.quiz-instructions-textarea {
    min-height: 120px;
}

/* Quiz create: Publish & Availability sections */
.quiz-section {
    margin-bottom: 0.5rem;
}

.quiz-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.quiz-section-title i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.quiz-section-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.45;
}

.quiz-section-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
    margin: 1.5rem 0;
    opacity: 1;
}

.quiz-option-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quiz-option-row-one-per-row {
    grid-template-columns: 1fr;
}

.quiz-option-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.quiz-option-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.quiz-option-card:has(.quiz-option-radio:checked) {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.06);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Visible radio: top-right of card or next to label */
.quiz-option-radio {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
    cursor: pointer;
    margin: 0;
}

.quiz-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.quiz-option-icon-instant {
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
}

.quiz-option-card:has(.quiz-option-radio:checked) .quiz-option-icon:not(.quiz-option-icon-instant) {
    background: var(--primary-color);
    color: #fff;
}

.quiz-option-label-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.quiz-option-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
}

.quiz-option-meta {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 400;
}

.quiz-option-desc {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}

.quiz-option-card-scheduled {
    align-items: stretch;
}

.quiz-option-hint {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

/* Quiz action buttons */
.btn-cancel-quiz {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.btn-cancel-quiz:hover {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

.btn-save-quiz {
    background: var(--primary-color);
    border: none;
    color: #fff;
}

.btn-save-quiz:hover {
    background: #4338ca;
    color: #fff;
}

/* Consistent height for all inputs and select2 containers */
.form-control,
.form-select,
.select2-container--bootstrap-5 .select2-selection {
    height: 48px !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
    font-size: 0.95rem !important;
    line-height: normal !important;
    display: flex !important;
    align-items: center !important;
}

/* Light Placeholder Text */
.form-control::placeholder {
    color: #adb5bd !important;
    opacity: 0.8 !important;
    font-weight: 300 !important;
}

.select2-container--bootstrap-5 .select2-selection__rendered {
    line-height: normal !important;
    padding: 0 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1) !important;
}

.btn-submit {
    height: 48px;
    padding: 0 35px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-cancel {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

/* Today's Test Card Styling */
.test-card {
    border-radius: 16px;
    border: none;
    transition: all 0.3s ease;
    background: #fff;
    overflow: hidden;
}

.test-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.test-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #444;
}

.test-card-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
}

.test-info-item {
    margin-bottom: 12px;
}

.test-info-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.test-info-value {
    font-weight: 600;
    color: #333;
}

.btn-take-test {
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
}

/* Tenure Option Styles */
.tenure-option {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    background: #fff;
}

.tenure-option:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd !important;
}

.tenure-option.active {
    background-color: #e8f0fe;
    border-color: #0d6efd !important;
    border-width: 2px !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Subscription Row Card Styles */
.sub-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    transition: all 0.2s ease;
    padding: 16px 24px;
    margin-bottom: 12px;
}

.sub-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

.sub-id {
    font-size: 0.8rem;
    color: #a0aec0;
    font-weight: 600;
}

.sub-date {
    font-size: 0.9rem;
    color: #4a5568;
}

.sub-child-name {
    font-weight: 700;
    color: #2d3748;
}

.sub-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.sub-package {
    font-size: 0.85rem;
    font-weight: 600;
    background: #f7fafc;
    padding: 2px 10px;
    border-radius: 4px;
}

.btn-view-sub {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a73e8;
    background: #e8f0fe;
    border: none;
    transition: all 0.2s;
}

.btn-view-sub:hover {
    background: #1a73e8;
    color: white;
}

/* Past Test Row Card Styles */
.test-row-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    transition: all 0.2s ease;
    padding: 16px 24px;
    margin-bottom: 12px;
}

.test-row-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

.test-row-child {
    font-weight: 700;
    color: #2d3748;
}

.test-row-subject {
    font-weight: 600;
    color: #1a73e8;
}

.test-row-score {
    font-size: 1.25rem;
    font-weight: 700;
}

.test-row-score.excellent {
    color: #28a745;
}

.test-row-score.good {
    color: #fd7e14;
}

.test-row-score.poor {
    color: #dc3545;
}

.btn-view-result {
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    background: #e8f0fe;
    color: #1a73e8;
    border: none;
    transition: all 0.2s;
}

.btn-view-result:hover {
    background: #1a73e8;
    color: white;
}

/* Profile Redesign Styles - Vertical & Compact */
.profile-vertical-layout {
    max-width: 800px;
    margin: 0 auto;
}

.profile-compact-header {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #f1f3f5;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.profile-avatar-compact {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 3px solid #e8f0fe;
}

.profile-section-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #f1f3f5;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.profile-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    align-items: center;
}

.profile-section-title i {
    margin-right: 10px;
    color: #1a73e8;
}

.profile-nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: 2px;
}

.profile-nav-tab {
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.profile-nav-tab:hover {
    color: #1a73e8;
    background: #f8f9fa;
}

.profile-nav-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

/* Support Ticket Styles */
.support-ticket-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    transition: all 0.2s ease;
    padding: 16px 24px;
    margin-bottom: 12px;
}

.support-ticket-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #1a73e8;
}

.btn-view-ticket {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a73e8;
    background: #e8f0fe;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-view-ticket:hover {
    background: #1a73e8;
    color: white;
}

/* Chat & View Ticket Styles */
.chat-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.chat-bubble {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    position: relative;
    font-size: 0.95rem;
}

.chat-bubble.user {
    background: #e8f0fe;
    color: #202124;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.chat-bubble.support {
    background: #fff;
    color: #202124;
    align-self: flex-start;
    border: 1px solid #edf2f7;
    border-bottom-left-radius: 2px;
}

.chat-meta {
    font-size: 0.75rem;
    color: #5f6368;
    margin-top: 5px;
    display: block;
}

.ticket-status-badge {
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 600;
}

/* Quiz Host Styles */
.btn-host-test {
    background: #4f46e5;
    border: none;
    color: #fff;
}

.btn-host-test:hover {
    background: #4338ca;
    color: #fff;
}

.filter-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.data-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table thead th {
    background-color: #f9fafb;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding: 16px 24px;
    border-bottom: 1px solid #f3f4f6;
}

.table tbody td {
    padding: 16px 24px;
    vertical-align: middle;
    color: #374151;
    font-size: 0.9rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background-color: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.status-draft {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.status-completed {
    background-color: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.btn-view {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #f3f4f6;
    color: #4f46e5;
    transition: all 0.2s;
}

.btn-view:hover {
    background-color: #4f46e5;
    color: #fff;
}

.sortable:hover {
    background-color: #f3f4f6 !important;
    color: #4f46e5 !important;
}

/* Quiz Invite (members) page */
.credits-card-invite {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.invite-credit-hint {
    font-size: 0.7rem;
}

.btn-buy-credits-invite {
    height: 38px;
}

.form-card-invite {
    background: #fff;
    border-radius: 16px;
}

.invite-modal-content-rounded {
    border-radius: 20px;
}

.invite-contact-list-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.invite-contact-th-checkbox {
    width: 40px;
}

.invite-modal-icon-lg {
    font-size: 4rem;
}

.invite-modal-icon-md {
    font-size: 3rem;
}

.invite-item-disabled {
    opacity: 0.5;
}

/* Quiz Invite Index (Test Invites list) page */
.invite-index-info-card {
    background: #fff;
    border-radius: 12px;
}

.invite-index-sortable-th {
    cursor: pointer;
}

.invite-index-host-email {
    font-size: 0.75rem;
}

.invite-status-pending {
    background: #fffbeb;
    color: #b45309;
}

.invite-status-rejected {
    background: #fef2f2;
    color: #991b1b;
}

.invite-confirm-modal-icon {
    font-size: 3.5rem;
}

/* Contact index (My Contacts) page */
.contact-modal-rounded {
    border-radius: 20px;
}

.contact-edit-email-input {
    background: #f8f9fa;
}

.contact-delete-modal-icon {
    font-size: 3rem;
}

/* Support (Get Help) page */
.support-page-card {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.support-page-contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
}

.support-page-faq-text {
    font-size: 0.85rem;
}

/* User Guide (support page tabs and sections) */
.user-guide-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.user-guide-subtitle {
    font-size: 0.9375rem;
    line-height: 1.45;
}

.user-guide-card .user-guide-tabs {
    border-bottom: 2px solid #e2e8f0;
}

.user-guide-card .user-guide-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    padding: 0.6rem 1rem;
    margin-bottom: -2px;
}

.user-guide-card .user-guide-tabs .nav-link:hover {
    color: #4f46e5;
}

.user-guide-card .user-guide-tabs .nav-link.active {
    color: #4f46e5;
    background: transparent;
    border-bottom-color: #4f46e5;
}

.user-guide-content .tab-pane {
    padding-top: 1rem;
}

.user-guide-module-intro {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 14px;
    border-left: 4px solid #4f46e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.user-guide-module-intro .user-guide-text:last-child {
    margin-bottom: 0;
}

.user-guide-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.user-guide-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.user-guide-section-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4f46e5;
    display: inline-block;
}

.user-guide-section .user-guide-text,
.user-guide-section .user-guide-list {
    margin-top: 0.25rem;
}

.user-guide-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #475569;
}

.user-guide-list {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #475569;
    padding-left: 1.35rem;
}

.user-guide-list li {
    margin-bottom: 0.45rem;
}

.user-guide-section ul.user-guide-list {
    padding-left: 1.35rem;
}

.user-guide-section ul.user-guide-list li {
    margin-bottom: 0.45rem;
}

/* Profile page (Account settings) */
.profile-page .page-header {
    margin-bottom: 1.75rem;
}

.profile-page .page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.profile-page .page-header p {
    color: #64748b;
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.profile-page .alert {
    border-radius: 16px;
    border: none;
}

.profile-page .nav-pills-custom {
    gap: 0.25rem;
}

.profile-page .nav-pills-custom .nav-link {
    white-space: nowrap;
    padding: 0.875rem 1.25rem;
    border-radius: 14px;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.profile-page .nav-pills-custom .nav-link i {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    opacity: 0.85;
}

.profile-page .nav-pills-custom .nav-link:hover {
    background: #f1f5f9;
    color: #334155;
}

.profile-page .nav-pills-custom .nav-link.active {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    font-weight: 600;
}

.profile-page .nav-pills-custom .nav-link.active i {
    opacity: 1;
}

.profile-page .profile-nav-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 100%;
}

.profile-page .profile-form-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 2rem 2.25rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.profile-page .profile-form-card .card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.profile-page .profile-form-card .card-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.75rem;
}

.profile-page .profile-form-card .form-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
}

.profile-page .profile-form-card .form-control {
    border-radius: 12px;
    padding: 0.65rem 1rem;
    border: 1px solid #e2e8f0;
}

.profile-page .profile-form-card .form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.profile-page .btn-save {
    border-radius: 12px;
    padding: 0.65rem 1.75rem;
    font-weight: 600;
}

/* Credits index (My Credits) page */
.btn-credits-buy-more {
    background: #4f46e5;
    border: none;
    height: 42px;
    color: #fff;
}

.btn-credits-buy-more:hover {
    background: #4338ca;
    color: #fff;
}

.credit-balance-card {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 40%, #115e59 100%);
    color: #fff;
    border-radius: 24px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 10px 40px -10px rgba(13, 148, 136, 0.4), 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    border: none;
}

.credit-balance-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.credit-balance-card .display-4 {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.credit-stat-card {
    border-radius: 20px;
    border: none;
}

.credit-stat-card.card-spend {
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}

.credit-stat-card.card-purchased {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.credit-stat-card.card-consumed {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

.credit-stat-card.card-last {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
}

.credit-stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    margin-bottom: 0.75rem;
}

.credit-stat-icon .bi {
    font-size: 1.35rem;
    line-height: 1;
    display: inline-block;
    font-style: normal;
}

/* Quiz View Styles */
.quiz-sidebar-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.quiz-view-sidebar-card {
    border-radius: 16px;
}

.quiz-view-question-img {
    max-height: 200px;
}

.quiz-view-option-img {
    max-height: 80px;
}

.quiz-edit-marks-input {
    width: 70px;
    border-radius: 8px;
}

.quiz-edit-preview-img {
    max-height: 140px;
}

.quiz-edit-option-preview-img {
    max-height: 60px;
}

.info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.info-value {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.question-item-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s;
    margin-bottom: 16px;
}

.question-item-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #4f46e5;
}

.q-number {
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    color: #4f46e5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.option-tag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-right: 12px;
    font-weight: 600;
}

.option-item.correct .option-tag {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

.option-item.correct .option-text {
    color: #059669;
    font-weight: 600;
}

/* Questions Add Page Styles */
.quiz-summary-mini {
    background: #fff;
    border-radius: 12px;
    padding: 15px 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.quiz-summary-add-page {
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
}

.question-block {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    transition: all 0.3s ease;
}

.question-block:hover {
    border-color: #4f46e5;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.q-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.option-input-group {
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #f3f4f6;
}

.correct-check {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.remove-q-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #f8f9fa;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.remove-q-btn:hover {
    transform: scale(1.1);
    background: #dc2626;
}

/* Dropdown Z-Index and Visibility Fix */
.dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    z-index: 2000 !important;
}

.dropdown {
    position: relative;
    z-index: 5;
}

/* Member Dashboard Page */
.dashboard-page .page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.dashboard-page .page-header p {
    color: #64748b;
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.dashboard-page .stat-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem 1.25rem;
    /* Make the card boundaries more visible on mobile */
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-page .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.dashboard-page .stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    /* Default (overridden for each dashboard stat card below) */
    background: #f1f5f9;
    color: #475569;
}

.dashboard-page .stat-card .stat-icon i {
    font-size: 1.5rem;
}

/* Member Dashboard stat icons - make them colorful */
.dashboard-page .row.g-4.mb-4 > div:nth-child(1) .stat-icon {
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
}

.dashboard-page .row.g-4.mb-4 > div:nth-child(2) .stat-icon {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
}

.dashboard-page .row.g-4.mb-4 > div:nth-child(3) .stat-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.dashboard-page .row.g-4.mb-4 > div:nth-child(4) .stat-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #f59e0b;
}

.dashboard-page .stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.dashboard-page .stat-card .stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.dashboard-page .upcoming-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.dashboard-page .upcoming-card .card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
}

.dashboard-page .upcoming-list-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.dashboard-page .upcoming-list-item:last-child {
    border-bottom: none;
}

.dashboard-page .upcoming-list-item:hover {
    background: #f8fafc;
}

.dashboard-page .upcoming-list-item .quiz-title {
    font-weight: 600;
    color: #1e293b;
}

.dashboard-page .upcoming-list-item .quiz-meta {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.dashboard-page .upcoming-list-item .btn-sm {
    border-radius: 10px;
    font-weight: 600;
    /* Ensure the label is centered vertically */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Member App Layout - Profile / Settings (shared) */
.profile-header-card {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 24px;
    padding: 3rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.profile-header-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.profile-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-avatar-btn:hover {
    transform: scale(1.1);
    background: #f8fafc;
}

.settings-card {
    background: white;
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    height: 100%;
}

.settings-card .form-label,
.profile-section-card .form-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.settings-card .form-control,
.profile-section-card .form-control {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.settings-card .form-control:focus,
.profile-section-card .form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn-save {
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
    color: white;
}

.badge-verified {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.badge-verified i {
    margin-right: 0.4rem;
}

/* Navbar brand title (member app header) */
.navbar .navbar-brand .brand-title {
    background: linear-gradient(to right, #4f46e5, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== Take Test (member/test/index) ========== */
.live-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    position: relative;
    overflow: hidden;
}

.live-banner-deco-top {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.live-banner-deco-bottom {
    position: absolute;
    bottom: -30px;
    left: 10%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.live-banner .pulse-dot {
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.4);
}

.btn-live-banner {
    background: white;
    color: #4f46e5;
    border: none;
    transition: all 0.3s ease;
}

.btn-live-banner:hover {
    background: #f8fafc;
    color: #4f46e5;
}

.btn-upcoming-take-test {
    border: none;
}

/* ========== Test Session (member/test/session) ========== */
.test-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.timer-card {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    border: 1px solid #fee2e2;
}

.question-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 400px;
}

.q-card {
    background: white;
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.q-card .q-card-title {
    line-height: 1.5;
}

.q-card-question-img {
    max-height: 220px;
}

.q-card-option-img {
    max-height: 100px;
}

.q-number-label {
    display: inline-block;
    background: var(--primary-light, #eef2ff);
    color: var(--primary-color, #4f46e5);
    padding: 0.4rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 15px;
    text-align: left;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.option-btn:hover {
    border-color: var(--primary-color, #4f46e5);
    background: var(--primary-light, #eef2ff);
}

.option-btn.selected {
    border-color: var(--primary-color, #4f46e5);
    background: var(--primary-light, #eef2ff);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.option-marker {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.2rem;
    font-weight: 700;
    color: #64748b;
    flex-shrink: 0;
}

.option-btn.selected .option-marker {
    background: var(--primary-color, #4f46e5);
    color: white;
}

.nav-footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.question-palette {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.q-circle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #f1f5f9;
    transition: all 0.2s;
    background: white;
}

.q-circle:hover {
    border-color: var(--primary-color, #4f46e5);
}

.q-circle.active {
    border-color: var(--primary-color, #4f46e5);
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.q-circle.answered {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.q-circle.flagged {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.q-circle-legend {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.test-session-completion-rate {
    font-size: 0.75rem;
}

.progress-bar-custom {
    height: 8px;
    border-radius: 4px;
    background-color: #e2e8f0;
    overflow: hidden;
    margin-top: 2rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #4f46e5, #ec4899);
    width: 0%;
    transition: width 0.3s ease;
}

.test-session .btn-next-test {
    background: var(--primary-color, #4f46e5);
}

.test-finish-modal .modal-content {
    border-radius: 20px;
}

.test-finish-modal .modal-body .icon-success {
    font-size: 4rem;
}

.test-finish-modal .btn-modal-back,
.test-finish-modal .btn-confirm-submit {
    height: 48px;
}

.test-finish-modal .btn-confirm-submit {
    background: var(--primary-color, #4f46e5);
}

@media (max-width: 991px) {
    .side-panel {
        display: none;
    }
}

/* ========== Test Result (member/test/result) ========== */
.result-score-card {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.2);
}

.result-score-card .score-circle {
    width: 150px;
    height: 150px;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.question-review-card {
    border: 1px solid #e2e8f0;
}

.question-review-card.correct {
    border-left: 6px solid #22c55e;
}

.question-review-card.incorrect {
    border-left: 6px solid #ef4444;
}

.question-review-card .status-pill-correct {
    background: #dcfce7;
    color: #166534;
}

.question-review-card .status-pill-incorrect {
    background: #fee2e2;
    color: #991b1b;
}

.review-option {
    border: 1px solid #e2e8f0;
    background: #fff;
}

.review-option.selected-correct {
    background-color: #f0fdf4;
    border: 1px solid #22c55e;
    color: #166534;
}

.review-option.selected-incorrect {
    background-color: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.review-option.correct-not-selected {
    background-color: #f0fdf4;
    border: 1px dashed #22c55e;
    color: #166534;
}

/* ========== Three-Column Test Layout ========== */
.test-layout-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f0f2f5;
}

.ad-sidebar {
    width: 20%;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
}

.ad-content {
    width: 160px;
    height: 600px;
    background-color: #e9ecef;
    border: 1px dashed #ced4da;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #adb5bd;
    text-align: center;
    border-radius: 8px;
}

.ad-content i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.ad-content p {
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.ad-content span {
    font-size: 0.75rem;
}

.test-main {
    width: 60%;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    padding-bottom: 100px;
    /* Space for footer */
}

/* Responsive Ads */
@media (max-width: 1200px) {
    .ad-sidebar {
        width: 15%;
    }

    .test-main {
        width: 70%;
    }
}

@media (max-width: 991px) {
    .ad-sidebar.ad-right {
        display: none;
    }

    .ad-sidebar.ad-left {
        width: 20%;
    }

    .test-main {
        width: 80%;
    }
}

@media (max-width: 767px) {
    .ad-sidebar {
        display: none !important;
    }

    .test-main {
        width: 100%;
    }
}

/* Inner Test Container Styles */
.test-content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 1.5rem auto;
    width: 95%;
    max-width: 1100px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.test-inner-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 2rem;
}

.test-body-row {
    display: flex;
    flex: 1;
}

.test-palette-column {
    width: 280px;
    border-right: 1px solid #e2e8f0;
    padding: 2rem;
    background-color: #fafbfc;
}

.test-question-column {
    flex: 1;
    padding: 2.5rem;
}

/* Adjustments for existing styles */
.test-header {
    position: static !important;
    padding: 1.25rem 2.5rem !important;
}

.nav-footer {
    position: absolute !important;
    padding: 1.5rem 2.5rem !important;
}

.q-card {
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

.question-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
}

.question-palette {
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
}

@media (max-width: 767px) {
    .test-body-row {
        flex-direction: column;
    }

    .test-palette-column {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .test-header {
        padding: 1rem !important;
    }

    .nav-footer {
        padding: 1rem !important;
    }

    .test-question-column {
        padding: 1.5rem;
    }
}

.diag-placeholder {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-style: italic;
    margin: 2rem auto;
    max-width: 400px;
}

.option-btn {
    border-width: 1px !important;
    padding: 1rem 1.5rem !important;
}

.option-btn.selected {
    border-color: #4f46e5 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2) !important;
}

.option-btn .bi-record-circle-fill {
    font-size: 1.25rem;
}