/**
 * Sneha Campus - Modern UI Styles
 * Inspired by professional fee management systems
 */

/* ===========================
   MODERN COLOR SCHEME
   =========================== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary-color: #f8fafc;
    --accent-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --background: #ffffff;
    --background-secondary: #f9fafb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* ===========================
   DATATABLES SCROLLING & DISPLAY
   =========================== */
/* Prevent table shrinking and enable scrolling */
.dataTables_wrapper {
    width: 100%;
    position: relative;
}

.dataTables_wrapper .dataTables_scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper .dataTables_scrollHead {
    overflow: hidden;
    border-bottom: 2px solid var(--border-color);
}

.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    -webkit-overflow-scrolling: touch;
}

/* Table container */
.modern-table {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
}

.modern-table table {
    width: 100% !important;
    min-width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

/* Prevent column shrinking */
.modern-table table thead th,
.modern-table table tbody td {
    white-space: nowrap;
    min-width: 100px;
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Allow text wrapping for specific columns if needed */
.modern-table table tbody td.text-wrap {
    white-space: normal;
    word-wrap: break-word;
    max-width: 300px;
}

/* DataTables styling */
table.dataTable {
    width: 100% !important;
    margin: 0 auto;
    clear: both;
    border-collapse: separate;
    border-spacing: 0;
}

table.dataTable thead th {
    background-color: var(--background-secondary);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
    text-align: left;
    position: relative;
}

table.dataTable tbody td {
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
}

table.dataTable tbody tr:hover {
    background-color: var(--background-secondary);
}

/* Scrollbar styling */
.dataTables_wrapper ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dataTables_wrapper ::-webkit-scrollbar-track {
    background: var(--background-secondary);
    border-radius: 4px;
}

.dataTables_wrapper ::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

.dataTables_wrapper ::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Fixed header when scrolling */
.dataTables_scrollHead table {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.dataTables_scrollBody table {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modern-table {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .modern-table table {
        min-width: 600px;
    }
}

/* ===========================
   MODERN HEADER
   =========================== */
.modern-header {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 1rem;
    z-index: 1001;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile responsiveness for header */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .modern-header {
        padding: 1rem;
    }
    
    .institution-name {
        font-size: 1.1rem;
    }
    
    .academic-year-selector {
        display: none;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: auto;
    height: 40px;
    background: transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.logo-img {
    height: 100%;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.institution-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fullscreen-toggle {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 40px;
    white-space: nowrap;
}

.fullscreen-toggle:hover {
    background: var(--border-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.fullscreen-toggle i {
    transition: transform 0.2s;
    font-size: 1rem;
}

.fullscreen-text {
    font-weight: 500;
}

@media (max-width: 768px) {
    .fullscreen-text {
        display: none;
    }
    
    .fullscreen-toggle {
        width: 40px;
        padding: 0.5rem;
    }
}

.academic-year-selector {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.academic-year-selector:hover {
    background: var(--border-light);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.user-info:hover {
    background: var(--border-light);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Header Dropdown Styles */
.header-dropdown {
    position: fixed;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    min-width: 200px;
    max-width: 300px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.header-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.dropdown-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.dropdown-user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.875rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--background-secondary);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--text-secondary);
}

.dropdown-item:hover i {
    color: var(--primary-color);
}

.dropdown-item-danger {
    color: var(--danger-color);
}

.dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.dropdown-item-danger i {
    color: var(--danger-color);
}

.academic-year-dropdown .dropdown-item {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.academic-year-dropdown .dropdown-item:hover {
    background: var(--background-secondary);
}

/* ===========================
   MODERN SIDEBAR
   =========================== */
.modern-sidebar {
    width: 210px;
    background: var(--background);
    border-right: 1px solid var(--border-color);
    height: calc(100vh - 80px);
    position: fixed;
    left: 0;
    top: 80px;
    overflow-y: auto;
    z-index: 999;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 0;
    position: relative;
}

.nav-link:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-color);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.nav-label {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===========================
   MODERN MAIN CONTENT
   =========================== */
.modern-content {
    margin-left: 210px;
    padding: 2rem;
    padding-bottom: 6rem; /* Add space for footer */
    background: var(--background-secondary);
    min-height: calc(100vh - 80px);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Footer Styles */
.modern-footer {
    background: var(--background) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 1.5rem 2rem !important;
    margin-top: 2rem !important;
    text-align: center !important;
    color: var(--text-secondary) !important;
    font-size: 0.875rem !important;
    position: relative !important;
    z-index: 10 !important;
    /* width: 100% !important; */
    clear: both !important;
    margin-left: 210px !important;
    transition: margin-left 0.3s ease !important;
}

.modern-footer .footer-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    max-width: 100% !important;
}

.modern-footer .footer-left,
.modern-footer .footer-right {
    margin: 0 !important;
}

.modern-footer p {
    margin: 0 !important;
}

/* When full screen mode is active */
body.fullscreen-mode .modern-footer {
    margin-left: 0 !important;
    width: 100% !important;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.back-button:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===========================
   MODERN CARDS
   =========================== */
.modern-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.2s;
}

.modern-card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-secondary);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-color);
}

/* ===========================
   MODERN TABLES
   =========================== */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.modern-table thead {
    background: var(--background-secondary);
}

.modern-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.modern-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.modern-table tbody tr:hover {
    background: var(--background-secondary);
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===========================
   MODERN FORMS
   =========================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--background);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ===========================
   MODERN BUTTONS
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ===========================
   MODERN INPUT GROUPS
   =========================== */
.input-group {
    display: flex;
    align-items: stretch;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.input-group .form-control {
    border-radius: 0;
    border-right: none;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.input-group .form-control:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    border-right: 1px solid var(--border-color);
}

.input-group-append {
    display: flex;
    align-items: center;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-left: none;
    padding: 0 1rem;
    color: var(--text-secondary);
}

/* ===========================
   MODERN STATS CARDS
   =========================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.primary {
    background: var(--primary-color);
}

.stat-icon.success {
    background: var(--success-color);
}

.stat-icon.warning {
    background: var(--warning-color);
}

.stat-icon.danger {
    background: var(--danger-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

/* ===========================
   MODERN FILTERS
   =========================== */
.filter-panel {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.filter-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* ===========================
   MODERN ALERTS
   =========================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fed7aa;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* ===========================
   MODERN PAGINATION
   =========================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 1rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===========================
   MODERN MODALS
   =========================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: all 0.3s;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 1024px) {
    .modern-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .modern-sidebar.show {
        transform: translateX(0);
    }
    
    .modern-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .modern-header {
        padding: 1rem;
    }
    
    .modern-content {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modern-table {
        font-size: 0.75rem;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 0.75rem;
    }
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--primary-color); }
.bg-secondary { background: var(--background-secondary); }

.border { border: 1px solid var(--border-color); }
.border-0 { border: none; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.m-5 { margin: 1.25rem; }
.m-6 { margin: 1.5rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
