/* ==========================================================================
   Graduate Success Tracker - Premium Styling
   Style Concept: Modern Academic, Slate/Indigo, Glassmorphism, Responsive
   ========================================================================== */

/* 1. Global Variables & Themes */
:root {
    --font-primary: 'Outfit', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Premium Glassmorphism Light Academic Palette (White, Maroon Red, Black, Amber Yellow) */
    --color-bg-app: radial-gradient(circle at 50% 50%, hsl(350, 15%, 98%) 0%, hsl(350, 10%, 93%) 100%);
    --color-bg-sidebar: linear-gradient(180deg, hsl(350, 80%, 15%) 0%, hsl(350, 80%, 8%) 100%);
    --color-bg-card: rgba(255, 255, 255, 0.72);
    --color-border: rgba(0, 0, 0, 0.08);
    
    /* Academic Maroon Red Gradient Tokens */
    --color-primary: hsl(350, 75%, 28%);
    --color-primary-light: rgba(141, 23, 44, 0.06);
    --color-primary-hover: hsl(350, 75%, 22%);
    
    --color-success: hsl(142, 60%, 30%);
    --color-success-bg: rgba(16, 120, 70, 0.08);
    --color-info: hsl(217, 75%, 35%);
    --color-info-bg: rgba(20, 60, 140, 0.08);
    --color-warning: hsl(45, 95%, 40%); /* Dark Yellow */
    --color-warning-bg: rgba(217, 119, 6, 0.08);
    --color-danger: hsl(350, 85%, 45%);
    --color-danger-bg: rgba(239, 68, 68, 0.08);
    
    --color-text-main: hsl(350, 25%, 12%);
    --color-text-muted: hsl(350, 10%, 42%);
    
    /* Shadows & Glassmorphism Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px rgba(141, 23, 44, 0.05), 0 4px 10px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    --shadow-glass: 0 8px 32px 0 rgba(141, 23, 44, 0.04);
    
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 2. Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: radial-gradient(circle at 50% 50%, hsl(350, 15%, 98%) 0%, hsl(350, 10%, 93%) 100%);
    background-attachment: fixed;
    color: var(--color-text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(141, 23, 44, 0.15);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(141, 23, 44, 0.3);
}

/* Typography Utilities */
.text-muted { color: var(--color-text-muted); }
.fs-sm { font-size: 0.85rem; }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.required { color: var(--color-danger); }
.highlight-text { color: var(--color-primary); font-weight: 600; }

/* 3. App Layout Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background: var(--color-bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 10;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--color-primary), hsl(350, 60%, 15%));
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(141, 23, 44, 0.25);
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: white;
}

.brand-text span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    text-transform: uppercase;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

.menu-icon {
    font-size: 1.1rem;
}

.menu-item:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.menu-item.active {
    color: white;
    background: linear-gradient(90deg, var(--color-primary), hsl(350, 60%, 18%));
    box-shadow: 0 4px 15px rgba(141, 23, 44, 0.2);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary), hsl(350, 60%, 18%));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 10px rgba(141, 23, 44, 0.2);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 0.85rem;
    color: white;
}

.user-info span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

/* Main Content Wrapper */
.main-content {
    flex-grow: 1;
    margin-left: 280px; /* Offset for sidebar */
    padding: 40px;
    min-width: 0; /* Prevents flex children from stretching */
}

/* Header styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: -0.5px;
}

.header-title p {
    font-size: 0.95rem;
    margin-top: 4px;
}

/* Selective UI Inputs in Header */
.selector-group {
    display: flex;
    gap: 12px;
}

.select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.select-wrapper label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.select-wrapper select, select, input[type="text"], input[type="number"] {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    padding: 10px 16px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    transition: var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
    font-family: var(--font-primary);
    font-weight: 500;
    letter-spacing: 0;
    color: var(--color-text-muted);
    opacity: 0.72;
}

.select-wrapper select:focus, select:focus, input[type="text"]:focus, input[type="number"]:focus {
    border-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(141, 23, 44, 0.15);
}

select option {
    background-color: white;
    color: var(--color-text-main);
}

/* Tab Views */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* 4. DASHBOARD DESIGN */
/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(141, 23, 44, 0.15);
    box-shadow: 0 12px 28px rgba(141, 23, 44, 0.08);
}

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

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

.stat-icon {
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--color-text-main);
}

.stat-desc {
    font-size: 0.8rem;
    margin-top: 4px;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Status variants for Stat Cards */
.stat-card.total { border-left: 4px solid var(--color-primary); }
.stat-card.total .stat-icon { background-color: var(--color-primary-light); color: var(--color-primary); }
.stat-card.success { border-left: 4px solid var(--color-success); }
.stat-card.success .stat-icon { background-color: var(--color-success-bg); color: var(--color-success); }
.stat-card.info { border-left: 4px solid var(--color-info); }
.stat-card.info .stat-icon { background-color: var(--color-info-bg); color: var(--color-info); }
.stat-card.warning { border-left: 4px solid var(--color-warning); }
.stat-card.warning .stat-icon { background-color: var(--color-warning-bg); color: var(--color-warning); }

/* Dashboard Charts */
.dashboard-charts {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-box {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    min-height: 240px;
}

/* Custom SVG Donut */
.donut-chart-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
}

.donut-chart {
    transform: rotate(-90deg);
}

.donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
}

#donut-center-num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.donut-center-text small {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-value {
    font-weight: 700;
    color: var(--color-text-main);
}

/* Bar Chart Styles */
.bar-chart-box {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 240px;
    justify-content: center;
}

.bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar-label-group {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.bar-bg {
    width: 100%;
    height: 16px;
    background-color: rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), hsl(350, 75%, 45%));
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Insights banner */
.insights-container {
    background-color: var(--color-primary-light);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(141, 23, 44, 0.08);
    border-left-width: 4px;
    animation: slideUp 0.4s ease;
}

.insight-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.insight-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.insight-body p {
    font-size: 0.85rem;
    color: var(--color-text-main);
    line-height: 1.5;
}

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

/* 5. FILTER & DATA VIEW DESIGN */
.filter-panel {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

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

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

.search-box input {
    width: 100%;
    padding-left: 40px;
}

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

/* Active info banner */
.info-banner {
    background: var(--color-primary-light);
    border: 1px solid rgba(141, 23, 44, 0.15);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    color: var(--color-primary);
    display: inline-block;
}

/* Switch styling for R3 filter */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(0, 0, 0, 0.12);
}

.toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-main);
    cursor: help;
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background: linear-gradient(135deg, var(--color-primary), hsl(350, 75%, 45%));
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Buttons */
.btn {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), hsl(350, 75%, 45%));
    color: white;
    box-shadow: 0 4px 12px rgba(141, 23, 44, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-hover), hsl(350, 75%, 50%));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(141, 23, 44, 0.4);
}

.btn-outline {
    background-color: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--color-text-main);
}

.btn-outline:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.06);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

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

.btn-warning {
    background-color: var(--color-warning-bg);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--color-warning);
}

.btn-warning:hover {
    background-color: rgba(245, 158, 11, 0.2);
}

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

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 6. TABLE STYLING */
.table-container {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    width: 100%;
    scrollbar-gutter: stable;
}

.data-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    text-align: left;
    font-size: 0.85rem;
    min-width: 1360px;
    table-layout: fixed;
}

.data-table th {
    background-color: rgba(141, 23, 44, 0.035);
    color: var(--color-text-muted);
    font-weight: 700;
    padding: 12px 12px;
    border-bottom: 1px solid rgba(141, 23, 44, 0.12);
    font-size: 0.75rem;
    letter-spacing: 0;
    line-height: 1.35;
    vertical-align: bottom;
    white-space: normal;
}

.data-table td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--color-text-main);
    font-weight: 500;
    vertical-align: top;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

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

.data-table tbody tr:hover {
    background-color: rgba(141, 23, 44, 0.02);
}

#students-table th:nth-child(1), #students-table td:nth-child(1) { width: 46px; text-align: center; }
#students-table th:nth-child(2), #students-table td:nth-child(2) { width: 138px; }
#students-table th:nth-child(3), #students-table td:nth-child(3) { width: 190px; }
#students-table th:nth-child(4), #students-table td:nth-child(4) { width: 185px; }
#students-table th:nth-child(5), #students-table td:nth-child(5),
#students-table th:nth-child(6), #students-table td:nth-child(6) { width: 105px; text-align: center; }
#students-table th:nth-child(7), #students-table td:nth-child(7) { width: 180px; }
#students-table th:nth-child(8), #students-table td:nth-child(8) { width: 130px; }
#students-table th:nth-child(9), #students-table td:nth-child(9) { width: 145px; }
#students-table th:nth-child(10), #students-table td:nth-child(10) { width: 120px; }
#students-table th:nth-child(11), #students-table td:nth-child(11) { width: 92px; text-align: center; }

#students-table td:nth-child(2) {
    font-size: 0.9rem;
    white-space: nowrap;
}

#students-table td:nth-child(3) strong {
    display: block;
    line-height: 1.35;
}

#students-table td:nth-child(7) {
    color: var(--color-text-muted);
}

#students-table .btn {
    min-width: 0;
    width: 72px;
    min-height: 46px;
    padding: 7px 8px !important;
    border-radius: 8px;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
    box-shadow: none;
}

/* Status Indicator styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    gap: 4px;
}

.badge-success { background-color: var(--color-success-bg); color: var(--color-success); }
.badge-info { background-color: var(--color-info-bg); color: var(--color-info); }
.badge-warning { background-color: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger { background-color: var(--color-danger-bg); color: var(--color-danger); }
.badge-muted { background-color: rgba(0, 0, 0, 0.06); color: var(--color-text-muted); }

/* Changed rows highlight */
.row-changed {
    position: relative;
    background-color: rgba(245, 158, 11, 0.08) !important;
}

.row-changed::after {
    content: "รอบ 3 เปลี่ยนสถานะ";
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-warning);
    background-color: rgba(245, 158, 11, 0.2);
    padding: 1px 4px;
    border-radius: 3px;
    pointer-events: none;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.pagination {
    display: flex;
    gap: 6px;
}

/* 7. SETTINGS CARD PANEL */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.settings-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.settings-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--color-text-main);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.01);
    transition: var(--transition-fast);
}

.radio-label:hover {
    background-color: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

.radio-label input[type="radio"]:checked {
    border-color: var(--color-primary);
}

.alert-box {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.alert-info {
    background-color: var(--color-info-bg);
    border-left: 4px solid var(--color-info);
    color: var(--color-info);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.action-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.action-desc {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 6px;
}

.action-desc strong {
    line-height: 1.35;
}

.action-desc span {
    line-height: 1.5;
    color: var(--color-text-muted);
}

.action-item .btn {
    width: 100%;
    min-height: 56px;
    justify-content: center;
    text-align: center;
    white-space: normal;
}

.action-desc strong {
    font-size: 0.9rem;
    color: var(--color-text-main);
}

.action-desc span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* IT Admin info board */
.server-info-box {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--color-text-main);
    border-radius: var(--radius-sm);
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.server-info-box h4 {
    color: var(--color-text-main);
    font-size: 0.95rem;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 6px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    font-size: 0.8rem;
    font-family: monospace;
}

/* 8. MODAL SHEET DIALOG */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    width: 100%;
    max-width: 780px;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 50px rgba(141, 23, 44, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.modal-body {
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Student card inside modal */
.student-mini-card {
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.mini-avatar {
    font-size: 2rem;
    background-color: rgba(0, 0, 0, 0.04);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.mini-details h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.mini-details p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 2px;
    font-weight: 600;
}

.advisor-label {
    margin-top: 4px;
    font-size: 0.75rem !important;
}

.advisor-label span {
    color: var(--color-primary);
}

/* Forms layout */
.form-row {
    display: flex;
    gap: 16px;
}

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

.col-6 { width: calc(50% - 8px); }
.col-4 { width: calc(33.33% - 10.6px); }

.conditional-section {
    display: none;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    animation: slideDown 0.25s ease;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
    padding-bottom: 4px;
}

/* Modal Actions */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* 9. NOTIFICATION TOAST */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background: rgba(141, 23, 44, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastIn {
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Overrides */
@media (max-width: 1400px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 12px 6px;
        align-items: center;
    }
    .brand-text, .user-info, .sidebar-footer {
        display: none;
    }
    .menu-item span {
        font-size: 1.3rem;
    }
    .main-content {
        margin-left: 70px;
        padding: 20px;
    }
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .col-6, .col-4 {
        width: 100%;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .action-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .action-item .btn {
        width: 100%;
    }
}
