/* 1. Variables */
:root {
    --primary-bg: #f8f9fa;
    --secondary-bg: #e3e6ea;
    --accent-color: #90caf9;
    --text-color: #222;
    --text-muted: #607d8b;
    --border-color: #b0bec5;
    --critical-alert: #ff4d4d;
    --warning-alert: #ffcc00;
    --info-alert: #90caf9;
    --success-color: #28a745;
}

/* 2. Base Styles */
body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    margin: 0;
    overflow-x: hidden;
}
* { box-sizing: border-box; }
a { color: var(--accent-color); text-decoration: none; }

/* 3. Layout */
.fms-container { display: flex; height: 100vh; }
.fms-sidebar {
    width: 260px;
    background-color: var(--secondary-bg);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
}
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-header .logo { font-size: 2rem; color: var(--accent-color); margin-left: 1rem; }
.sidebar-header h1 { margin: 0; font-size: 1.8rem; }
.fms-nav { flex-grow: 1; padding: 1.5rem 0; }
.fms-nav ul { list-style: none; padding: 0; margin: 0; }
.fms-nav li a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.fms-nav li a i { width: 25px; font-size: 1.2rem; margin-left: 1rem; }
.fms-nav li a.active, .fms-nav li a:hover {
    background-color: #e3f2fd;
    color: var(--text-color);
    border-right: 3px solid var(--accent-color);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(144,202,249,0.08);
}
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-color); }
.sidebar-footer a { display: flex; align-items: center; color: var(--text-muted); padding: 0.5rem 0; }
.sidebar-footer a:hover { color: var(--text-color); }
.sidebar-footer i { margin-left: 1rem; }
.fms-main-content { flex-grow: 1; padding: 2rem; overflow-y: auto; }

/* 4. Components & Page Styles */
.header { margin-bottom: 2rem; }
.header h2 { margin: 0 0 0.5rem 0; font-size: 2rem; }
.header p { margin: 0; color: var(--text-muted); font-size: 1.1rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.kpi-card { background-color: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.5rem; display: flex; align-items: center; }
.kpi-card i { font-size: 2.5rem; color: var(--accent-color); margin-left: 1.5rem; }
.kpi-card h3 { margin: 0 0 0.5rem 0; font-size: 1rem; color: var(--text-muted); font-weight: normal; }
.kpi-card p { margin: 0; font-size: 1.8rem; font-weight: bold; }

.alerts-section { background-color: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.5rem; }
.alerts-section h3 { margin-top: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; margin-bottom: 1rem; }
.alerts-section h3 i { margin-left: 0.5rem; }
.alert-item { padding: 1rem; border-radius: 5px; margin-bottom: 1rem; }
.alert-item:last-child { margin-bottom: 0; }
.alert-item.critical { background-color: rgba(255, 77, 77, 0.15); border-left: 4px solid var(--critical-alert); }
.alert-item.warning { background-color: rgba(255, 204, 0, 0.15); border-left: 4px solid var(--warning-alert); }
.alert-item.info { background-color: rgba(0, 170, 255, 0.15); border-left: 4px solid var(--info-alert); }

.table-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.search-box { position: relative; }
.search-box i { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); color: var(--text-muted); }
.search-box input { background-color: var(--primary-bg); border: 1px solid var(--border-color); border-radius: 5px; padding: 0.75rem 2.5rem 0.75rem 1rem; color: var(--text-color); width: 300px; }
.search-box input:focus { outline: none; border-color: var(--accent-color); }
.filter-options { display: flex; gap: 1rem; }
.filter-options select { background-color: var(--secondary-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 0.75rem; border-radius: 5px; }
.btn-primary { background-color: var(--accent-color); color: #fff; border: none; padding: 0.75rem 1.5rem; border-radius: 5px; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; }
.btn-primary {
    background-color: var(--accent-color);
    color: #222;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.btn-primary:hover {
    background-color: #e3f2fd;
    color: #222;
    box-shadow: 0 4px 16px rgba(144,202,249,0.15);
    transform: translateY(-2px) scale(1.04);
}

.responsive-table { overflow-x: auto; }
.fms-table { width: 100%; border-collapse: collapse; background-color: var(--secondary-bg); }
.fms-table thead tr { background-color: #202227; /* darken(secondary-bg, 5%) */ }
.fms-table th { padding: 1rem 1.5rem; text-align: right; font-weight: bold; border-bottom: 2px solid var(--border-color); }
.fms-table tbody tr { border-bottom: 1px solid var(--border-color); }
.fms-table tbody tr:last-child { border-bottom: none; }
.fms-table td { padding: 1rem 1.5rem; vertical-align: middle; }
.fms-table .actions { display: flex; gap: 0.75rem; }
.fms-table .action-btn { color: var(--text-muted); font-size: 1.1rem; }
.fms-table .action-btn:hover { color: var(--accent-color); }
.fms-table .action-btn.delete:hover { color: var(--critical-alert); }

.status-badge { padding: 0.3rem 0.8rem; border-radius: 15px; font-weight: bold; font-size: 0.8rem; }
.status-badge.active { background-color: rgba(40, 167, 69, 0.2); color: var(--success-color); }
.status-badge.suspended { background-color: rgba(255, 193, 7, 0.2); color: var(--warning-alert); }
.status-badge.graduated { background-color: rgba(108, 117, 125, 0.2); color: #6c757d; }

.profile-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.section { background-color: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.5rem; margin-bottom: 2rem; }
.profile-main .profile-card .profile-header { display: flex; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
.profile-pic { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--border-color); margin-left: 1.5rem; }
.profile-name { flex-grow: 1; }
.profile-name h3 { margin: 0 0 0.5rem; font-size: 1.8rem; }
.profile-name p { margin: 0 0 0.5rem; color: var(--text-muted); }
.performance-gauge { text-align: center; }
.gauge-circle { width: 80px; height: 80px; border-radius: 50%; background: conic-gradient(var(--accent-color) 75%, var(--primary-bg) 0); display: grid; place-content: center; margin: 0 auto 0.5rem; }
.gauge-circle:before { content: ''; background: var(--secondary-bg); width: 65px; height: 65px; border-radius: 50%; }
.gauge-value { position: absolute; transform: translate(27px, -75px); font-size: 1.4rem; font-weight: bold; }
.performance-gauge p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

.profile-sidebar .section h4 { margin-top: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; margin-bottom: 1rem; }
.profile-sidebar .status-ok { color: var(--success-color); font-weight: bold; }
.profile-sidebar ul { list-style: none; padding: 0; margin: 0; }
.profile-sidebar li a { display: flex; justify-content: space-between; padding: 0.75rem 0; }

.qr-card-container { display: flex; justify-content: center; align-items: center; padding-top: 2rem; }
.qr-card { width: 350px; background-color: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 15px; overflow: hidden; }
.qr-header { display: flex; align-items: center; padding: 1.5rem; background-color: #202227; }
.qr-header img { width: 80px; height: 80px; border-radius: 50%; margin-left: 1rem; }
.qr-student-info h4 { margin: 0 0 0.5rem; font-size: 1.4rem; }
.qr-student-info p { margin: 0; color: var(--text-muted); }
.qr-body { padding: 2rem; display: flex; justify-content: center; align-items: center; }
#qrcode { border: 5px solid var(--primary-bg); border-radius: 10px; padding: 10px; display: flex; justify-content: center; align-items: center; }
.qr-footer { padding: 1rem 1.5rem; text-align: center; background-color: #202227; border-top: 1px solid var(--border-color); }
.license-status.valid { color: var(--success-color); }

.rating { color: var(--warning-alert); font-weight: bold; }
.rating i { font-size: 0.9rem; }

.schedule-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.schedule-main { background-color: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 8px; }
.schedule-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); }
.schedule-header h3 { margin: 0; font-size: 1.2rem; }
.schedule-header button { background: none; border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 5px; width: 35px; height: 35px; cursor: pointer; }
.schedule-grid { display: grid; grid-template-columns: repeat(7, 1fr); min-height: 600px; }
.day-column { border-left: 1px solid var(--border-color); }
.day-header { padding: 0.75rem; text-align: center; font-weight: bold; background-color: #202227; border-bottom: 1px solid var(--border-color); }
.day-body { padding: 0.5rem; height: 100%; }
.schedule-slot { border-radius: 5px; padding: 0.75rem; margin-bottom: 0.5rem; font-size: 0.9rem; }
.schedule-slot.theory { background-color: rgba(0, 170, 255, 0.15); border-left: 3px solid var(--info-alert); }
.schedule-slot.available { background-color: rgba(40, 167, 69, 0.1); border: 1px dashed var(--success-color); text-align: center; }

.form-container { max-width: 800px; margin: 0 auto; background-color: var(--secondary-bg); padding: 2rem; border-radius: 8px; border: 1px solid var(--border-color); }
.fms-form .form-section { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.fms-form .form-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.fms-form h4 { color: var(--accent-color); margin-top: 0; margin-bottom: 1.5rem; }
.fms-form .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.fms-form .form-group { display: flex; flex-direction: column; }
.fms-form label { color: var(--text-muted); margin-bottom: 0.5rem; font-size: 0.9rem; }
.fms-form input, .fms-form select { width: 100%; background-color: var(--primary-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 0.75rem; border-radius: 5px; }
.fms-form .form-actions { text-align: left; padding-top: 1.5rem; }
/* 1. Variables (Updated for a Modern Look & Dark Mode Prep) */
:root {
    /* Base Colors */
    --primary-bg: #ffffff; /* Lighter base */
    --secondary-bg: #f5f7fa; /* Card/Section background */
    --main-text: #1a202c; /* Deep Charcoal */
    --muted-text: #4a5568; /* Grayish text */
    --border-light: #e2e8f0; /* Soft border */

    /* Accent & Brand Colors (Vibrant Blue Palette) */
    --brand-main: #4299e1; /* Primary Blue */
    --brand-hover: #3182ce; /* Darker Blue for hover */
    --brand-light: #ebf8ff; /* Lightest Blue (for active state/background) */

    /* Status Colors */
    --critical-alert: #e53e3e;
    --warning-alert: #f6ad55;
    --info-alert: #4299e1;
    --success-color: #38a169;
}

/* 2. Base Styles (Refined) */
body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-bg);
    color: var(--main-text);
    margin: 0;
    overflow-x: hidden;
    line-height: 1.6;
}
* { box-sizing: border-box; }
a { color: var(--brand-main); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--brand-hover); }

/* --- GLOBAL UTILITIES (for better organization) --- */
.shadow-sm { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.02); }
.rounded-lg { border-radius: 12px; } /* Increased border radius for modern feel */
.p-6 { padding: 1.5rem; }

/* 3. Layout (Sidebar/Main Content Styles - Assuming they exist elsewhere) */
.fms-main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
    /* Remove padding: 2rem if you have body padding */
}

/* 4. Components & Page Styles */

/* Header */
.header { margin-bottom: 2.5rem; } /* More vertical space */
.header h2 { margin: 0; font-size: 2.5rem; font-weight: 700; color: var(--main-text); }
.header p { margin: 0; color: var(--muted-text); font-size: 1rem; }


/* Table Controls (Search, Filters, Button) */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; /* Allows wrapping on small screens */
    gap: 1rem; /* Space between controls */
}

/* Search Box (Modernized) */
.search-box { position: relative; width: 300px; max-width: 100%; }
.search-box i {
    position: absolute;
    top: 50%;
    right: 15px; /* Icon placement */
    transform: translateY(-50%);
    color: var(--muted-text);
    font-size: 1rem;
}
.search-box input {
    background-color: var(--primary-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px; /* Slightly rounded */
    padding: 0.85rem 3rem 0.85rem 1rem; /* Increased padding and space for icon */
    color: var(--main-text);
    width: 100%;
    transition: all 0.3s ease;
}
.search-box input:focus {
    outline: none;
    border-color: var(--brand-main);
    box-shadow: 0 0 0 3px var(--brand-light); /* Focus Ring effect */
}

/* Primary Button (Refined/Modernized) */
.btn-primary {
    background-color: var(--brand-main);
    color: #fff; /* White text for contrast */
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.btn-primary i { font-size: 1rem; }
.btn-primary:hover {
    background-color: var(--brand-hover);
    box-shadow: 0 4px 10px rgba(66, 153, 225, 0.2);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
}


/* Table Styles (Clean & Modern) */
.responsive-table {
    overflow-x: auto;
    background-color: var(--primary-bg); /* Table inside a container */
    border: 1px solid var(--border-light);
    border-radius: 12px; /* Container rounded edges */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Soft shadow */
}
.fms-table {
    width: 100%;
    border-collapse: collapse;
}

/* Table Header (Cleaner Look) */
.fms-table thead tr {
    background-color: var(--secondary-bg); /* Light background for header */
}
.fms-table th {
    padding: 1rem 1.5rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted-text); /* Muted header text */
    border-bottom: 2px solid var(--border-light);
    user-select: none; /* For sorting feature later */
}

/* Table Body Rows */
.fms-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.3s;
}
.fms-table tbody tr:last-child {
    border-bottom: none;
}
.fms-table tbody tr:hover {
    background-color: var(--brand-light); /* Subtle row highlight on hover */
}
.fms-table td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    color: var(--main-text);
}

/* Actions Column */
.fms-table .actions {
    display: flex;
    gap: 1rem; /* Increased gap */
    justify-content: flex-start; /* Align actions to start */
}
.fms-table .action-btn {
    color: var(--muted-text);
    font-size: 1.1rem;
    padding: 0.4rem; /* For better click target */
    border-radius: 4px;
    transition: color 0.3s, background-color 0.3s;
}
.fms-table .action-btn:hover {
    color: var(--brand-main);
    background-color: rgba(66, 153, 225, 0.1);
}
.fms-table .action-btn.delete:hover {
    color: var(--critical-alert);
    background-color: rgba(229, 62, 62, 0.1);
}

/* 5. Responsive Adjustments (Mobile Optimization) */
@media (max-width: 768px) {
    .fms-main-content { padding: 1rem; }
    .header h2 { font-size: 2rem; }

    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box { width: 100%; order: 1; margin-bottom: 0.5rem; }
    .filter-options { width: 100%; order: 2; }
    .btn-primary { width: 100%; }
}

/* ... (Keep all previous CSS definitions, including :root, body, etc.) ... */

/* 4. Components & Page Styles - KPI Grid Improvements */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Wider cards on large screens */
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.kpi-card {
    background-color: var(--primary-bg); /* Use primary BG for cleaner look */
    border: 1px solid var(--border-light); /* Use soft border */
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.kpi-card:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}
.kpi-card i {
    font-size: 2.5rem;
    color: var(--brand-main);
    margin-left: 1.5rem;
    background-color: var(--brand-light); /* Icon background for emphasis */
    padding: 1rem;
    border-radius: 8px;
}
.kpi-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--muted-text);
    font-weight: 500;
}
.kpi-info p {
    margin: 0;
    font-size: 2.2rem; /* Larger value */
    font-weight: 700;
    color: var(--main-text);
}
.kpi-trend { /* New style for trend indicator */
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: block;
}

/* 2. New Dashboard Grid (For Charts and Alerts) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2 parts Chart, 1 part Alerts */
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background-color: var(--primary-bg);
    padding: 1.5rem;
}
.chart-container h4 {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--main-text);
}

/* 3. Alerts Section Refinement */
.alerts-section {
    background-color: var(--primary-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
}
.alerts-section h3 {
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.alert-item {
    padding: 1rem;
    border-radius: 8px; /* Slightly more rounded */
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-size: 0.95rem;
}
.alert-item strong { font-weight: 700; }
.alert-item .view-details {
    margin-left: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--brand-main);
}
.alert-item .view-details:hover {
    text-decoration: underline;
}

/* 4. Responsive Adjustment for Dashboard Grid */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr; /* Stack charts and alerts vertically on tablets/mobiles */
    }
}
/* ... (Keep all previous CSS, including :root and base styles) ... */

/* QR Card Container */
.qr-card-container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to start, not center vertically */
    padding-top: 2rem;
    min-height: 70vh; /* Ensure some vertical space */
}

.qr-card {
    width: 380px; /* Slightly wider for modern look */
    max-width: 90%;
    background-color: var(--primary-bg); /* Use primary BG */
    border: 1px solid var(--border-light);
    border-radius: 15px;
    overflow: hidden;
    /* Added shadow-sm in HTML, but here for reference: box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); */
    transition: transform 0.3s;
}
.qr-card:hover {
    transform: translateY(-2px); /* Subtle lift effect */
}

/* Header Section */
.qr-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--secondary-bg); /* Use secondary BG for the header background */
    border-bottom: 1px solid var(--border-light);
}

/* New: Small Profile Picture Style */
.profile-pic-small {
    width: 70px; /* Slightly smaller */
    height: 70px;
    border-radius: 50%;
    border: 3px solid var(--brand-main); /* Accent color border */
    margin-left: 1.5rem;
    object-fit: cover;
}
.qr-student-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
    color: var(--main-text);
}
.qr-student-info p {
    margin: 0;
    color: var(--muted-text);
    font-size: 0.95rem;
}

/* QR Code Body */
.qr-body {
    padding: 2.5rem 1.5rem; /* Increased vertical padding */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff; /* Ensure white background for QR code functionality */
}
.qr-code-display {
    border: 5px solid var(--secondary-bg); /* Secondary BG border */
    border-radius: 10px;
    padding: 10px;
    display: inline-block; /* To contain the border nicely */
    background-color: #fff;
}

/* Footer Section */
.qr-footer {
    padding: 1rem 1.5rem;
    text-align: center;
    background-color: var(--secondary-bg);
    border-top: 1px solid var(--border-light);
    font-size: 0.95rem;
}
.card-expiry {
    color: var(--muted-text);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* New: Status Badge (Refined) */
.status-badge {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}
.status-badge.valid-status {
    background-color: rgba(56, 161, 105, 0.15); /* Success color light */
    color: var(--success-color);
}

/* New: Card Actions (Button) */
.card-actions {
    padding: 0 1.5rem 1.5rem;
    text-align: center;
}
.btn-sm { /* Smaller button style for card actions */
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
}
/* ... (Keep all previous CSS, including :root, base styles, and utility classes like .rounded-lg) ... */

/* 4. Components & Page Styles - Profile Layout Improvements */

.profile-layout {
    display: grid;
    grid-template-columns: 2fr 300px; /* Wider main column, 300px for sidebar */
    gap: 2rem;
    align-items: start;
}

.profile-main {
    /* No changes needed here, holds the main sections */
}
.section {
    background-color: var(--primary-bg); /* Use primary BG for inner cleanliness */
    border: 1px solid var(--border-light); /* Use soft border */
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Profile Card Header (Basic Info) */
.profile-card .profile-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-light); /* Use soft border */
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.profile-pic {
    width: 120px; /* Slightly larger picture */
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--brand-main); /* Stronger accent border */
    margin-left: 1.5rem;
    object-fit: cover;
}
.profile-name { flex-grow: 1; }
.profile-name h3 { margin: 0 0 0.5rem; font-size: 2rem; color: var(--main-text); }
.profile-name p { margin: 0 0 0.5rem; color: var(--muted-text); font-size: 1rem; }
.status-badge.active-profile {
    background-color: rgba(56, 161, 105, 0.15); 
    color: var(--success-color);
    font-weight: 600;
}

/* New: Title for sections within the card */
.section-title {
    color: var(--brand-hover);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}
.section-title i {
    margin-left: 0.5rem;
    color: var(--brand-main);
}

/* Profile Details Grid (Key Info) */
.profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.detail-item {
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--border-light);
}
.detail-item:last-child { border-bottom: none; }
.detail-item span {
    color: var(--muted-text);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.25rem;
}
.detail-item span i { margin-left: 0.5rem; }
.detail-item p {
    margin: 0;
    font-weight: 600;
    color: var(--main-text);
}

/* Sidebar Links */
.profile-sidebar h4 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.profile-sidebar ul { list-style: none; padding: 0; margin: 0; }
.profile-sidebar li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: var(--muted-text);
    transition: color 0.3s;
}
.profile-sidebar li a:hover {
    color: var(--brand-main);
}
.profile-sidebar li a i { margin-left: 0.75rem; color: var(--brand-main); font-size: 0.9rem;}
.profile-sidebar li .delete-action { color: var(--critical-alert); }
.profile-sidebar li .delete-action:hover { color: #f00; }

.status-ok { color: var(--success-color); font-weight: bold; font-size: 0.85rem; }
.critical-alert { color: var(--critical-alert); font-weight: bold; font-size: 0.85rem;}


/* 2. New Feature Styles: Performance Gauge (Based on previous code) */
.performance-gauge {
    text-align: center;
    width: 150px; /* Fixed width */
    position: absolute; /* Positioned absolutely to the top-left */
    top: 1.5rem;
    left: 1.5rem;
}
.gauge-circle {
    /* Uses CSS variable to set the fill percentage */
    --gauge-value: 50%; /* Default value if not set in HTML */
    width: 100px;
    height: 100px;
    border-radius: 50%;
    /* Apply the custom property for the conic gradient fill */
    background: conic-gradient(var(--brand-main) var(--gauge-value), var(--border-light) var(--gauge-value));
    display: grid;
    place-content: center;
    margin: 0 auto 0.5rem;
    position: relative;
    box-shadow: 0 0 0 5px var(--primary-bg) inset; /* Inner ring effect */
}
.gauge-circle:before {
    content: '';
    background: var(--primary-bg);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    z-index: 1;
}
.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--main-text);
    z-index: 2;
}
.performance-gauge p { font-size: 0.85rem; color: var(--muted-text); margin: 0; }


/* 3. New Feature Styles: Academic Summary (Summary Grid) */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
.kpi-card-small {
    background-color: var(--secondary-bg);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--brand-main);
}
.kpi-card-small h5 {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    color: var(--muted-text);
}
.kpi-card-small p {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--main-text);
}
.warning-text { color: var(--critical-alert); } /* Use red for high absence */

/* Responsive Adjustment */
@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: right;
    }
    .profile-pic { margin: 0 0 1rem; }
    .performance-gauge {
        position: static; /* Move gauge back to flow */
        margin-top: 1rem;
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        text-align: right;
    }
    .performance-gauge .gauge-circle { margin: 0 1rem 0 0; }
}
/* ... (Keep all previous CSS, including :root, base styles, and .fms-table) ... */

/* Table Header Enhancements */
.fms-table th {
    padding: 1rem 1.5rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted-text);
    border-bottom: 2px solid var(--border-light);
    user-select: none;
}
.fms-table th.sortable { /* Class for columns that can be sorted */
    cursor: pointer;
    transition: color 0.3s;
}
.fms-table th.sortable:hover {
    color: var(--brand-main);
}
.fms-table th.sortable i {
    margin-right: 0.5rem; /* Space before the icon */
    font-size: 0.8rem;
    color: var(--muted-text);
    transition: transform 0.3s;
}
.fms-table th.sorted-asc i {
    transform: rotate(180deg);
}
/* Ensure the link inside <td> is styled */
.fms-table tbody td a {
    color: var(--main-text);
    font-weight: 500;
}
.fms-table tbody td a:hover {
    color: var(--brand-main);
    text-decoration: underline;
}

/* New: Row Specific Styles (for warnings/critical data) */
.fms-table tbody .table-row-warning {
    background-color: rgba(255, 204, 0, 0.05); /* Very light warning background */
}
.fms-table tbody .table-row-warning:hover {
    background-color: rgba(255, 204, 0, 0.1);
}

/* Status Badges Refined (using existing CSS from previous steps) */
.status-badge { 
    padding: 0.3rem 0.8rem; border-radius: 15px; font-weight: bold; font-size: 0.8rem; display: inline-block;
}
.status-badge.active { background-color: rgba(40, 167, 69, 0.2); color: var(--success-color); }
.status-badge.suspended { background-color: rgba(255, 193, 7, 0.2); color: var(--warning-alert); }
.status-badge.graduated { background-color: rgba(108, 117, 125, 0.2); color: #6c757d; }

/* Action Buttons Refined */
.fms-table .action-btn {
    color: var(--muted-text);
    font-size: 1.1rem;
    padding: 0.4rem;
    border-radius: 4px;
    transition: color 0.3s, background-color 0.3s;
}
.fms-table .action-btn.view:hover {
    color: var(--brand-main);
    background-color: rgba(66, 153, 225, 0.1);
}
.fms-table .action-btn.edit:hover {
    color: var(--success-color);
    background-color: rgba(56, 161, 105, 0.1);
}
/* Table Footer and Pagination Styles */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-light);
}
.rows-info {
    font-size: 0.9rem;
    color: var(--muted-text);
    font-weight: 500;
}
.pagination {
    display: flex;
    align-items: center;
}
.pagination a {
    color: var(--muted-text);
    padding: 0.5rem 0.9rem;
    margin: 0 0.2rem;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
}
.pagination a:hover:not(.active):not(.disabled) {
    background-color: var(--secondary-bg);
    color: var(--main-text);
}
.pagination a.active {
    background-color: var(--brand-main);
    color: #fff;
    font-weight: 600;
}
.pagination a.disabled {
    opacity: 0.5;
    pointer-events: none;
}
.pagination-btn i {
    font-size: 0.75rem;
}

/* Responsive adjustment for footer */
@media (max-width: 600px) {
    .table-footer {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}
/* ... (Keep all previous CSS definitions, especially table, action-btn, and status-badge) ... */

/* 4. Components & Page Styles - Instructor Specific Styles */

/* Rating Badge Enhancement */
.rating {
    color: var(--warning-alert); /* Use the warning color (usually yellow/orange) for stars */
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background-color: rgba(255, 204, 0, 0.1); /* Light yellow background */
}
.rating i {
    font-size: 0.9rem;
}

/* Action Button Colors (Refinement) */
.fms-table .actions {
    display: flex;
    gap: 0.75rem; 
}
.fms-table .action-btn {
    color: var(--muted-text);
    /* ... (rest of action-btn styles remain) ... */
}
.fms-table .action-btn.view-schedule:hover { /* New: Schedule icon color */
    color: var(--info-alert); /* Blue/Info color */
    background-color: rgba(0, 170, 255, 0.1);
}
.fms-table .action-btn.edit:hover { /* Edit icon color */
    color: var(--success-color); /* Green/Success color */
    background-color: rgba(56, 161, 105, 0.1);
}
.fms-table .action-btn.delete:hover { /* Delete icon color */
    color: var(--critical-alert); /* Red/Critical color */
    background-color: rgba(229, 62, 62, 0.1);
}
/* ... (Keep all previous CSS definitions, including :root, fms-table, status-badge, etc.) ... */

/* 4. Components & Page Styles - Admission Specific Styles */

/* Status Badges for Admissions */
.status-badge.suspended { /* Used for 'قيد المراجعة' */
    background-color: rgba(255, 193, 7, 0.2); 
    color: var(--warning-alert); 
}
.status-badge.active { /* Used for 'مقبول' */
    background-color: rgba(40, 167, 69, 0.2); 
    color: var(--success-color); 
}
.status-badge.graduated { /* Can be used for 'مرفوض' */
    background-color: rgba(229, 62, 62, 0.2); /* Light Red */
    color: var(--critical-alert); 
}

/* Actions in Admissions Table (Clearer Decision Buttons) */
.fms-table .action-btn {
    /* Base styles for action buttons */
    font-size: 1rem;
    padding: 0.5rem; /* Slightly larger padding for easier clicking */
    border-radius: 6px;
    margin: 0 0.2rem;
    width: 38px; /* Fixed width for uniformity */
    height: 38px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

/* Action: View Details (Eye Icon) */
.fms-table .action-btn.view:hover {
    color: var(--brand-main);
    background-color: rgba(66, 153, 225, 0.1);
}

/* New Action: Accept Button */
.fms-table .action-btn.accept {
    color: var(--success-color);
    border: 1px solid var(--success-color);
    background: none;
    transition: background-color 0.3s, color 0.3s;
}
.fms-table .action-btn.accept:hover {
    background-color: var(--success-color);
    color: #fff;
}
.fms-table .action-btn.accept.disabled {
    opacity: 0.7;
    pointer-events: none;
    background-color: rgba(56, 161, 105, 0.1);
    color: var(--success-color);
}

/* Action: Reject Button (Using Delete Class for red color) */
.fms-table .action-btn.delete {
    color: var(--critical-alert);
    border: 1px solid var(--critical-alert);
    background: none;
}
.fms-table .action-btn.delete:hover {
    background-color: var(--critical-alert);
    color: #fff;
}
:root {
    /* Base Colors */
    --primary-bg: #ffffff; 
    --secondary-bg: #f5f7fa; 
    --main-text: #1a202c; 
    --muted-text: #4a5568; 
    --border-light: #e2e8f0; 

    /* Accent & Brand Colors */
    --brand-main: #4299e1; 
    --brand-hover: #3182ce; 
    --brand-light: #ebf8ff; 

    /* Status & Utility Colors */
    --critical-alert: #e53e3e; /* Red for rejection/critical */
    --warning-alert: #f6ad55; /* Yellow/Orange for pending */
    --info-alert: #4299e1;
    --success-color: #38a169; /* Green for acceptance/active */
}

/* Base & Utility Styles */
body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-bg); /* Use secondary BG for the body */
    color: var(--main-text);
    margin: 0;
    line-height: 1.6;
}
* { box-sizing: border-box; }
a { text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--brand-hover); }
.fms-main-content { padding: 2rem; }
.shadow-sm { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }
.rounded-lg { border-radius: 12px; }

/* Header */
.header { margin-bottom: 1.5rem; }
.header h2 { margin: 0; font-size: 2.5rem; font-weight: 700; color: var(--main-text); }
.header p { margin: 0; color: var(--muted-text); }

/* --- Table Controls (Search, Filters, Button) --- */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; 
    gap: 1rem; 
}
.search-box { position: relative; width: 300px; max-width: 100%; }
.search-box i { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); color: var(--muted-text); }
.search-box input, .filter-options select {
    background-color: var(--primary-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px; 
    padding: 0.75rem 3rem 0.75rem 1rem;
    color: var(--main-text);
    width: 100%;
    transition: all 0.3s ease;
}
.search-box input { padding-right: 3rem; }
.search-box input:focus { outline: none; border-color: var(--brand-main); box-shadow: 0 0 0 3px var(--brand-light); }
.filter-options { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.filter-options select { width: auto; padding: 0.75rem 1rem; }

/* Primary Button */
.btn-primary {
    background-color: var(--brand-main);
    color: #fff; 
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}
.btn-primary:hover { background-color: var(--brand-hover); transform: translateY(-1px); }

/* --- Table Styles (fms-table) --- */
.responsive-table {
    overflow-x: auto;
    background-color: var(--primary-bg); 
    border: 1px solid var(--border-light);
}
.fms-table { width: 100%; border-collapse: collapse; }
.fms-table thead tr { background-color: var(--secondary-bg); }

/* Table Header */
.fms-table th {
    padding: 1rem 1.5rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted-text); 
    border-bottom: 2px solid var(--border-light);
    user-select: none;
}
.fms-table th.sortable { cursor: pointer; transition: color 0.3s; }
.fms-table th.sortable:hover { color: var(--brand-main); }
.fms-table th.sortable i { margin-right: 0.5rem; font-size: 0.8rem; color: var(--muted-text); }

/* Table Body */
.fms-table tbody tr { border-bottom: 1px solid var(--border-light); transition: background-color 0.3s; }
.fms-table tbody tr:last-child { border-bottom: none; }
.fms-table tbody tr:hover { background-color: var(--brand-light); }
.fms-table td { padding: 1rem 1.5rem; vertical-align: middle; color: var(--main-text); }

/* Row Status Highlight (For pending applications) */
.fms-table tbody .table-row-warning {
    background-color: rgba(255, 204, 0, 0.05);
}
.fms-table tbody .table-row-warning:hover {
    background-color: rgba(255, 204, 0, 0.1);
}

/* Status Badges */
.status-badge { 
    padding: 0.3rem 0.8rem; border-radius: 15px; font-weight: bold; font-size: 0.8rem; display: inline-block;
}
.status-badge.suspended { /* Used for 'قيد المراجعة' */
    background-color: rgba(255, 193, 7, 0.2); 
    color: var(--warning-alert); 
}
.status-badge.active { /* Used for 'مقبول' */
    background-color: rgba(40, 167, 69, 0.2); 
    color: var(--success-color); 
}

/* --- Actions in Admissions Table (Decision Buttons) --- */
.fms-table .actions { display: flex; gap: 0.5rem; justify-content: flex-start; }
.fms-table .action-btn {
    font-size: 1rem;
    padding: 0.5rem; 
    border-radius: 6px;
    width: 38px; 
    height: 38px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

/* Action: View Details */
.fms-table .action-btn.view { color: var(--muted-text); }
.fms-table .action-btn.view:hover { color: var(--brand-main); background-color: rgba(66, 153, 225, 0.1); }

/* Action: Accept Button */
.fms-table .action-btn.accept {
    color: var(--success-color);
    border: 1px solid var(--success-color);
    background: none;
}
.fms-table .action-btn.accept:hover {
    background-color: var(--success-color);
    color: #fff;
}

/* Action: Reject Button (Using Delete Class) */
.fms-table .action-btn.delete {
    color: var(--critical-alert);
    border: 1px solid var(--critical-alert);
    background: none;
}
.fms-table .action-btn.delete:hover {
    background-color: var(--critical-alert);
    color: #fff;
}

/* --- Table Footer & Pagination --- */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-light);
}
.rows-info { font-size: 0.9rem; color: var(--muted-text); }
.pagination { display: flex; align-items: center; }
.pagination a {
    color: var(--muted-text);
    padding: 0.5rem 0.9rem;
    margin: 0 0.2rem;
    border-radius: 6px;
    font-weight: 500;
}
.pagination a:hover:not(.active):not(.disabled) { background-color: var(--secondary-bg); color: var(--main-text); }
.pagination a.active { background-color: var(--brand-main); color: #fff; font-weight: 600; }
.pagination a.disabled { opacity: 0.5; pointer-events: none; }


/* 13. Page-Specific Styles (Student Comparison) */
.comparison-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.comparison-card {
    background-color: var(--primary-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comparison-card h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--main-text);
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.metric {
    flex: 1;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-bottom: 0.5rem;
}

.metric-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.metric-value.positive {
    color: var(--success-color);
}

.metric-change {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.metric-change.up {
    color: var(--success-color);
}

.metric-change.down {
    color: var(--critical-alert);
}

.change {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
}

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

.change.negative {
    color: var(--critical-alert);
}

.status-badge.positive {
    background-color: rgba(56, 161, 105, 0.15);
    color: var(--success-color);
}

.status-badge.negative {
    background-color: rgba(229, 62, 62, 0.15);
    color: var(--critical-alert);
}

.status-badge.neutral {
    background-color: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

.chart-placeholder {
    position: relative;
    height: 300px;
    margin-top: 1rem;
}

.chart-bars {
    display: flex;
    align-items: end;
    justify-content: space-around;
    height: 250px;
    border-bottom: 1px solid var(--border-light);
    padding: 0 1rem;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 60px;
}

.bar {
    width: 20px;
    background-color: var(--muted-text);
    border-radius: 3px 3px 0 0;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.bar.current-quarter {
    background-color: var(--brand-main);
}

.bar-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted-text);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted-text);
}

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

.legend-color.previous {
    background-color: var(--muted-text);
}

.legend-color.current {
    background-color: var(--brand-main);
}

.analysis-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.analysis-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.analysis-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.analysis-icon.positive {
    background-color: rgba(56, 161, 105, 0.15);
    color: var(--success-color);
}

.analysis-icon.negative {
    background-color: rgba(229, 62, 62, 0.15);
    color: var(--critical-alert);
}

.analysis-icon.neutral {
    background-color: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

.analysis-text h5 {
    margin: 0 0 0.5rem 0;
    color: var(--main-text);
    font-size: 1rem;
    font-weight: 600;
}

.analysis-text p {
    margin: 0;
    color: var(--muted-text);
    line-height: 1.5;
}

.report-card {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.report-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-main);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: gap 0.3s;
}

.report-link:hover {
    gap: 0.75rem;
}

.reports-section {
    margin-bottom: 2rem;
}

.reports-section h3 {
    margin-bottom: 1.5rem;
    color: var(--main-text);
    font-size: 1.2rem;
}

/* 14. Dashboard Charts Styles */
.charts-section {
    margin-bottom: 2rem;
}

.charts-section h3 {
    margin-bottom: 1.5rem;
    color: var(--main-text);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.chart-container {
    background-color: var(--primary-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.chart-container h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--main-text);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-container h4 i {
    color: var(--brand-main);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Responsive adjustments for charts */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-wrapper {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 1rem;
    }

    .chart-wrapper {
        height: 200px;
    }
}