/* ==========================================================
   GLOBAL DESIGN VARIABLES & THEME SETUP
   ========================================================== */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.12);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Core Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-size: 0.95rem;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

/* ==========================================================
   ELEGANT CARD LAYOUTS & CONTAINERS
   ========================================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.75rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card h2, .card h3 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ==========================================================
   BUTTONS & INTERACTIVE ELEMENTS
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--primary);
    color: #ffffff;
    padding: 0.65rem 1.3rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-danger {
    background: var(--danger);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--danger-hover);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: var(--success);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: var(--success-hover);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* ==========================================================
   PROFESSIONAL TABLES & DATA DISPLAY
   ========================================================== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

th, td {
    padding: 0.85rem 1.15rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f8fafc;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background-color: #f1f5f9;
}

/* ==========================================================
   FORM CONTROLS & INPUT STYLING
   ========================================================== */
label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-top: 0.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.35rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text);
    background-color: #ffffff;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background-color: #ffffff;
}

input::placeholder, textarea::placeholder {
    color: #94a3b8;
}

/* ==========================================================
   BADGES, PILLS, & STATUS INDICATORS
   ========================================================== */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-approved { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* ==========================================================
   EXAM QUESTION NAVIGATION PALETTE
   ========================================================== */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.nav-btn {
    padding: 0.6rem 0;
    text-align: center;
    border: 1px solid var(--border);
    background: #ffffff;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: var(--transition);
}

.nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0fdf4;
}

.nav-btn.current {
    border-color: var(--primary);
    background: #e0e7ff;
    color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}

.nav-btn.answered {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.nav-btn.flagged {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* ==========================================================
   RESPONSIVE DESIGN CONTROLS
   ========================================================== */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }

    .card {
        padding: 1.25rem;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th, td {
        padding: 0.65rem 0.85rem;
    }
}