/*
 * PMB Portal Premium Custom Design System
 * Theme: Cosmic Dark Glassmorphism with Blue & Gold Accents
 */

:root {
    --bg-base: #0f172a;       /* Slate 900 */
    --bg-surface: #1e293b;    /* Slate 800 */
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(59, 130, 246, 0.2);
    
    /* Brand Colors */
    --color-primary: #3b82f6;      /* Electric Blue */
    --color-primary-hover: #2563eb;
    --color-secondary: #f59e0b;    /* Warm Amber/Gold */
    --color-secondary-hover: #d97706;
    --color-accent: #06b6d4;       /* Cyan */
    
    /* Semantic Colors */
    --color-success: #10b981;      /* Emerald Green */
    --color-danger: #ef4444;       /* Rose Red */
    --color-warning: #f59e0b;      /* Amber */
    --color-info: #06b6d4;         /* Cyan */
    --color-gray: #64748b;         /* Slate 500 */
    
    /* Text Colors */
    --text-primary: #f8fafc;       /* Slate 50 */
    --text-secondary: #cbd5e1;     /* Slate 300 */
    --text-muted: #94a3b8;         /* Slate 400 */
    
    /* Shadow and Blur */
    --glass-blur: blur(16px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --neon-glow-blue: 0 0 15px rgba(59, 130, 246, 0.5);
    --neon-glow-gold: 0 0 15px rgba(245, 158, 11, 0.5);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   Base Styles & Resets
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    background-image: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.82)),
        url('../images/bg-lpkia.jpg');
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--color-accent);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--color-gray);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================================================
   Layouts
   ========================================================================== */

/* Auth Pages Layout */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

/* Dashboard & Portal Layout */
.dashboard-body {
    min-height: 100vh;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.sidebar-logo {
    font-size: 2.25rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-title span {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    border: 1px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.sidebar-nav li.active a {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-primary);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.1);
}

.sidebar-nav .nav-icon {
    font-size: 1.2rem;
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.admin-profile, .student-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-profile .avatar, .student-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: var(--neon-glow-blue);
}

.student-profile .avatar {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    box-shadow: var(--neon-glow-gold);
}

.profile-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-info strong {
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.profile-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    padding: 2rem 2.5rem;
    overflow-y: auto;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.main-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.date-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.content-container {
    max-width: 1200px;
}

/* ==========================================================================
   UI Components (Cards, Buttons, Tables, Alerts)
   ========================================================================== */

/* Glass Card */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--glass-shadow);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

.card {
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.3);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.bg-primary { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.bg-success { background: linear-gradient(135deg, #10b981, #047857); }
.bg-info    { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.bg-warning { background: linear-gradient(135deg, #f59e0b, #b45309); }
.bg-danger  { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.stat-details h3 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
}

.btn:active {
    transform: translateY(1px);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-hover), #1d4ed8);
    transform: translateY(-2px);
    box-shadow: var(--neon-glow-blue);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-hover));
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}
.btn-secondary:hover {
    background: linear-gradient(135deg, var(--color-secondary-hover), #b45309);
    transform: translateY(-2px);
    box-shadow: var(--neon-glow-gold);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger), #b91c1c);
}
.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-light {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-light:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th, .table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: rgba(15, 23, 42, 0.4);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid transparent;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.badge-danger  { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.badge-info    { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border-color: rgba(6, 182, 212, 0.3); }
.badge-secondary{ background: rgba(100, 116, 139, 0.15); color: #cbd5e1; border-color: rgba(100, 116, 139, 0.3); }

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success { background: rgba(16, 185, 129, 0.1); color: #34d399; border-color: rgba(16, 185, 129, 0.2); }
.alert-danger  { background: rgba(239, 68, 68, 0.1); color: #f87171; border-color: rgba(239, 68, 68, 0.2); }
.alert-warning { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border-color: rgba(245, 158, 11, 0.2); }

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Input Wrapper for Icons */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.125rem;
    font-size: 1.1rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-wrapper input.form-control {
    padding-left: 3rem !important;
}

/* Custom Custom Option Radio / Checkbox wrappers */
.option-wrapper {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-wrapper:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.option-wrapper input[type="radio"],
.option-wrapper input[type="checkbox"] {
    margin-right: 1rem;
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.option-wrapper.selected {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--color-primary);
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.05);
}

/* ==========================================================================
   Student Portal Specific Styling
   ========================================================================== */

/* Step Tracker / Progress Bar */
.step-tracker {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.step-tracker::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 4rem;
    right: 4rem;
    height: 3px;
    background: rgba(255,255,255,0.08);
    z-index: 1;
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.step-label {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    transition: all 0.4s ease;
}

/* Active Step */
.step-node.active .step-circle {
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
    box-shadow: var(--neon-glow-blue);
}
.step-node.active .step-label {
    color: var(--color-primary);
}

/* Completed Step */
.step-node.completed .step-circle {
    border-color: var(--color-success);
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}
.step-node.completed .step-label {
    color: var(--color-success);
}

/* ==========================================================================
   Exam Workspace / Quiz Engine
   ========================================================================== */
.quiz-workspace {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 992px) {
    .quiz-workspace {
        grid-template-columns: 1fr;
    }
}

/* Quiz Timer styling */
.timer-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.timer-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.timer-countdown {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.timer-countdown.critical {
    color: var(--color-danger);
    animation: pulse-danger 1s infinite alternate;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

@keyframes pulse-danger {
    from { opacity: 1; }
    to { opacity: 0.6; }
}

/* Quiz Navigation Grid (Sidebar) */
.quiz-nav-card {
    position: sticky;
    top: 2rem;
}

.quiz-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.nav-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover {
    border-color: var(--color-primary);
    color: var(--text-primary);
    transform: scale(1.05);
}

/* Question Status Colors in Navigation */
.nav-btn.current {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--color-primary);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.nav-btn.answered {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--color-success);
    color: #34d399;
}

.nav-btn.doubtful {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--color-secondary);
    color: #fbbf24;
}

.nav-btn.unanswered {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* Active Question Area (Main Panel) */
.question-container {
    margin-bottom: 2rem;
}

.question-card {
    display: none; /* Controlled by JavaScript switcher */
}

.question-card.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.question-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.question-body {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.question-options {
    display: flex;
    flex-direction: column;
}

/* Action Area / Footer */
.quiz-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.doubtful-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.doubtful-checkbox-wrapper:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--color-secondary);
}

.doubtful-checkbox-wrapper input[type="checkbox"] {
    accent-color: var(--color-secondary);
    width: 1.1rem;
    height: 1.1rem;
}

.doubtful-checkbox-wrapper span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fbbf24;
}

/* ==========================================================================
   Quiz Result / Score Card
   ========================================================================== */
.score-circle-wrapper {
    display: flex;
    justify-content: center;
    margin: 2.5rem 0;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--bg-surface) 60%, rgba(59, 130, 246, 0.1) 100%);
    border: 8px solid rgba(59, 130, 246, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
}

.score-circle.pass {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.score-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-primary);
}
.score-circle.pass .score-value {
    color: var(--color-success);
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-recap {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.recap-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.recap-row:last-child {
    border-bottom: none;
}

.recap-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.recap-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive and General Tweaks
   ========================================================================== */
@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        height: auto;
        position: relative;
        padding: 1.5rem;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .step-tracker::before {
        display: none;
    }
    
    .step-tracker {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .step-node {
        flex-direction: row;
        gap: 1rem;
        width: 100%;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }
    
    .step-label {
        margin-top: 0;
        text-align: left;
    }
}

/* ==========================================================================
   Bootstrap Grid & Helper Classes Fallbacks
   ========================================================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -1rem;
    margin-left: -1rem;
    row-gap: 1.5rem;
}

.col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8 {
    position: relative;
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
}

@media (min-width: 768px) {
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
}

/* Flex Utilities */
.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.flex-wrap { flex-wrap: wrap !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* Spacing Utilities */
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

/* Color Helpers */
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-primary { color: var(--color-primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* ==========================================================================
   Admin Panel Specific UI Components
   ========================================================================== */

/* Cards and lists inside manage pages */
.question-item-card, .quiz-question-card, .quiz-answer-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.question-item-card:hover, .quiz-question-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.question-item-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.badge-outline-secondary {
    background: transparent;
    border: 1px solid var(--color-gray);
    color: var(--text-secondary);
}

.btn-xs {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 0.35rem;
}

/* Forms Help & Error States */
.form-help {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.error-text {
    display: block;
    font-size: 0.75rem;
    color: var(--color-danger);
    margin-top: 0.35rem;
    font-weight: 500;
}

/* Custom Checkbox Container */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 2rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--color-primary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Quiz questions scrollable block */
.quiz-questions-scroll {
    max-height: 700px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Option preview row in admin quiz index */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-row, .option-detail-row {
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.option-row.correct, .option-detail-row.correct {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
    color: #34d399;
}

.option-detail-row.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--color-danger);
    color: #f87171;
}

/* Student Detail view components */
.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 1rem auto;
    box-shadow: var(--neon-glow-blue);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.divider-thin {
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
    margin: 1.25rem 0;
}

.profile-meta .meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.profile-meta .meta-item span {
    color: var(--text-muted);
}

.profile-meta .meta-item strong {
    color: var(--text-primary);
}

.quiz-summary-panel {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.summary-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.summary-val {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ==========================================================================
   Light Auth Pages Theme (Login/Register override)
   ========================================================================== */

/* Page Body override for Auth pages */
body.auth-body {
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.75)),
        url('../images/bg-lpkia.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    color: #1e293b !important;
}

/* Card override for Light Theme */
.auth-body .auth-card {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
    padding: 2.5rem !important;
    width: 100% !important;
}

.auth-body .auth-header {
    text-align: center !important;
    margin-bottom: 2rem !important;
}

.auth-body .auth-logo {
    width: 64px !important;
    height: 64px !important;
    background: #eff6ff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2rem !important;
    margin: 0 auto 1.25rem auto !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08) !important;
}

.auth-body .auth-header h2 {
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 0.5rem !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

.auth-body .auth-header p {
    font-size: 0.9rem !important;
    color: #64748b !important;
}

/* Form controls in light theme */
.auth-body .form-group {
    margin-bottom: 1.25rem !important;
}

.auth-body .form-group label {
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}

.auth-body .form-control {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    transition: all 0.25s ease !important;
}

.auth-body .form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.auth-body .form-control:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.auth-body .input-icon {
    color: #94a3b8 !important;
}

/* Checkbox (Remember Me) in light theme */
.auth-body .checkbox-container {
    color: #475569 !important;
    font-weight: 500 !important;
}

.auth-body .checkmark {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

.auth-body .checkbox-container:hover input ~ .checkmark {
    border-color: #3b82f6 !important;
}

.auth-body .checkbox-container input:checked ~ .checkmark {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.auth-body .checkbox-container .checkmark:after {
    border-color: #ffffff !important;
}

/* Auth Footer */
.auth-body .auth-footer {
    margin-top: 1.75rem !important;
    text-align: center !important;
    font-size: 0.9rem !important;
    color: #64748b !important;
}

.auth-body .auth-footer a {
    color: #3b82f6 !important;
    font-weight: 600 !important;
}

.auth-body .auth-footer a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* Alert Styling inside Light Theme */
.auth-body .alert {
    border-width: 1px !important;
    font-size: 0.875rem !important;
}

