/* ==========================================================================
   STUDENT MANAGEMENT SYSTEM & ENROLLED COURSES ARCHITECTURE
   Modern Design System & Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Primary Palettes */
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --primary-soft: rgba(79, 70, 229, 0.08);
    --primary-glow: rgba(99, 102, 241, 0.25);

    --secondary: #0ea5e9;
    --secondary-soft: rgba(14, 165, 233, 0.08);

    --accent: #8b5cf6;
    --accent-soft: rgba(139, 92, 246, 0.08);

    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.1);

    /* Backgrounds & Surfaces */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-alt: #f1f5f9;

    /* Borders & Dividers */
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --border-focus: #818cf8;

    /* Text Colors */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.35);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Container */
.app-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.main-navbar {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
    font-size: 20px;
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: var(--radius-full);
    border: 1px solid rgba(99, 102, 241, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brand-sub {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link-item:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-link-item.active {
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: #fff;
    color: var(--text-main);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-alt);
    border-color: var(--text-muted);
    color: var(--text-main);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary-light);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: #dc2626;
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-outline-danger:hover {
    background: var(--danger-soft);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   ALERTS & FLASH MESSAGES
   ========================================================================== */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
    border-left: 4px solid;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left-color: var(--success);
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: var(--danger);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   HERO / BANNER SECTION
   ========================================================================== */
.page-hero {
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.06) 0%, transparent 40%);
    padding: 32px 0 24px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.page-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ==========================================================================
   SYSTEM ARCHITECTURE METRICS CARDS
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card.card-blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card.card-purple::before { background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.stat-card.card-emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.card-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.1); color: #059669; }
.stat-icon.amber { background: rgba(245, 158, 11, 0.1); color: #d97706; }

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    font-family: var(--font-heading);
}

.stat-footer {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.stat-trend.positive { color: var(--success); }

/* ==========================================================================
   SYSTEM ARCHITECTURE PIPELINE BANNER
   ========================================================================== */
.architecture-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    color: #fff;
    margin-bottom: 32px;
    box-shadow: 0 16px 36px -12px rgba(15, 23, 42, 0.4);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.architecture-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.arch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.arch-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.arch-badge {
    background: rgba(99, 102, 241, 0.3);
    border: 1px solid rgba(165, 180, 252, 0.3);
    color: #c7d2fe;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.arch-pipeline {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

@media (max-width: 860px) {
    .arch-pipeline {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .arch-arrow {
        transform: rotate(90deg);
        margin: 4px auto;
    }
}

.arch-node {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition);
}

.arch-node:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.arch-node-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 6px;
}

.arch-node-val {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.arch-node-sub {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 4px;
}

.arch-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 22px;
    animation: pulseArrow 2s infinite ease-in-out;
}

@keyframes pulseArrow {
    0%, 100% { opacity: 0.6; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(4px); }
}

/* ==========================================================================
   STUDENT DIRECTORY / FILTERS BAR
   ========================================================================== */
.directory-controls {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-alt);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-main);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.select-control {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.select-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* View Mode Toggles */
.view-toggle {
    display: flex;
    background: var(--bg-alt);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.toggle-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   STUDENT CARDS GRID VIEW
   ========================================================================== */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.student-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.student-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.3);
}

.student-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.student-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.student-header-info {
    flex: 1;
}

.student-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.student-id-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    font-family: monospace;
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    border: 1px solid var(--border-color);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active {
    background: var(--success-soft);
    color: #065f46;
}
.status-active .dot {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.status-inactive {
    background: var(--danger-soft);
    color: #991b1b;
}
.status-inactive .dot { background: var(--danger); }

.status-graduated {
    background: var(--primary-soft);
    color: var(--primary);
}
.status-graduated .dot { background: var(--primary); }

.status-suspended {
    background: var(--warning-soft);
    color: #92400e;
}
.status-suspended .dot { background: var(--warning); }

.student-details-list {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    padding: 12px 0;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
}

.detail-val {
    font-weight: 600;
    color: var(--text-main);
}

/* Enrolled Courses Badges */
.enrolled-courses-section {
    margin-bottom: 18px;
}

.enrolled-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.course-chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.course-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.student-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.student-actions .btn {
    flex: 1;
}

/* ==========================================================================
   STUDENT DATA TABLE VIEW
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 32px;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.modern-table th {
    background: var(--bg-alt);
    padding: 14px 20px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.modern-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.modern-table tbody tr {
    transition: var(--transition);
}

.modern-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
}

.table-student-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   FORM STYLES (Add & Edit Student)
   ========================================================================== */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-card);
    margin-bottom: 40px;
}

.form-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-label .required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.input-with-action {
    display: flex;
    gap: 8px;
}

.input-with-action .form-control {
    flex: 1;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* Course Selector Matrix in Forms */
.course-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.course-select-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    cursor: pointer;
    background: var(--bg-alt);
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    user-select: none;
}

.course-select-card:hover {
    border-color: var(--primary-light);
    background: #fff;
}

.course-select-card.selected {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.course-select-card input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.course-card-details {
    flex: 1;
}

.course-card-code {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    font-family: monospace;
}

.course-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin: 2px 0;
}

.course-card-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   STUDENT PROFILE VIEW (Show Page)
   ========================================================================== */
.profile-hero-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
    border-radius: var(--radius-xl);
    padding: 36px 40px;
    color: #fff;
    margin-bottom: 32px;
    box-shadow: 0 18px 40px -12px rgba(30, 27, 75, 0.45);
    position: relative;
    overflow: hidden;
}

.profile-hero-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.profile-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    border: 4px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.profile-name {
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.profile-meta-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.profile-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-layout-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 28px;
    margin-bottom: 40px;
}

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

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th {
    padding: 12px 0;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
    width: 40%;
    border-bottom: 1px solid var(--border-subtle);
}

.detail-table td {
    padding: 12px 0;
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

/* ==========================================================================
   MODAL WINDOW (Delete confirmation & Course add)
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.show {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: zoomIn 0.2s ease-out;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon-danger {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: var(--danger-soft);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
    margin-top: auto;
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
