/* Modern Educational System Styling */
:root {
    --primary-color: #2C3E50;
    --secondary-color: #3498DB;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    --light-bg: #F8F9FA;
    --dark-text: #2C3E50;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', 'Tahoma', 'Geneva', 'Verdana', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-text) !important;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}

/* Navigation */
.navbar {
    box-shadow: var(--shadow-medium);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    border: none !important;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
    border-radius: 8px;
    margin: 0 4px;
    padding: 8px 16px !important;
}

.navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-medium);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 8px;
    min-width: 250px;
}

.dropdown-item {
    border-radius: 8px;
    margin-bottom: 4px;
    padding: 8px 16px;
    transition: var(--transition);
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--light-bg);
    transform: translateX(-4px);
}

.dropdown-header {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cards */
.card {
    border: none !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-light) !important;
    transition: var(--transition) !important;
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium) !important;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    border-bottom: none !important;
    padding: 1.25rem !important;
    color: white !important;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: white !important;
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem !important;
    color: var(--dark-text) !important;
}

.card-title {
    color: var(--primary-color) !important;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 8px 20px !important;
    transition: var(--transition) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #2ECC71 100%) !important;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #E67E22 100%) !important;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #C0392B 100%) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    background: white;
}

.table thead th {
    background: var(--light-bg) !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    border-bottom: 2px solid var(--primary-color) !important;
    padding: 1rem !important;
    text-align: center;
}

.table tbody td {
    color: var(--dark-text) !important;
    padding: 0.75rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #E9ECEF !important;
}

.table tbody tr:hover {
    background: var(--light-bg) !important;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 8px !important;
    border: 2px solid #E9ECEF !important;
    padding: 0.75rem 1rem !important;
    transition: var(--transition) !important;
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
}

.form-label {
    font-weight: 600 !important;
    color: var(--primary-color) !important;
    margin-bottom: 0.5rem !important;
}

/* Alerts */
.alert {
    border: none !important;
    border-radius: var(--border-radius) !important;
    padding: 1rem 1.5rem !important;
    font-weight: 500 !important;
    box-shadow: var(--shadow-light) !important;
}

.alert-success {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%) !important;
    color: var(--success-color) !important;
    border-left: 4px solid var(--success-color) !important;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.1) 100%) !important;
    color: var(--danger-color) !important;
    border-left: 4px solid var(--danger-color) !important;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%) !important;
    color: var(--warning-color) !important;
    border-left: 4px solid var(--warning-color) !important;
}

.alert-info {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(41, 128, 185, 0.1) 100%) !important;
    color: var(--secondary-color) !important;
    border-left: 4px solid var(--secondary-color) !important;
}

/* List Group */
.list-group {
    border-radius: var(--border-radius) !important;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.list-group-item {
    border: none !important;
    border-bottom: 1px solid #E9ECEF !important;
    padding: 1rem 1.5rem !important;
    transition: var(--transition) !important;
    color: var(--dark-text) !important;
    font-weight: 500;
}

.list-group-item:hover {
    background: var(--light-bg) !important;
    transform: translateX(-4px);
}

.list-group-item:last-child {
    border-bottom: none !important;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    text-align: center;
    border-left: 4px solid var(--secondary-color);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.dashboard-card .icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.dashboard-card h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.dashboard-card p {
    color: #6C757D;
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 2rem 0 !important;
    margin-top: 3rem !important;
    border-top: none !important;
}

/* Enhanced Responsive Design */

/* Extra Large devices (1400px and up) */
@media (min-width: 1400px) {
    .container-xxl {
        max-width: 1320px;
    }
    
    .dashboard-card {
        padding: 2.5rem;
    }
    
    .dashboard-card .icon {
        font-size: 3.5rem;
    }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
    .navbar-nav .dropdown-menu {
        min-width: 280px;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .dashboard-card:hover {
        transform: translateY(-8px);
    }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
    .login-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .user-type-selector {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .navbar-collapse {
        justify-content: space-between;
    }
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .alert {
        margin: 1rem auto;
        max-width: 600px;
    }
}

/* Mobile First Approach - Default Mobile Styles */
@media (max-width: 767px) {
    /* Navigation */
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        border-radius: var(--border-radius);
        padding: 1rem;
        margin-top: 1rem;
        backdrop-filter: blur(10px);
    }
    
    .nav-link {
        color: var(--primary-color) !important;
        padding: 0.75rem 1rem !important;
        border-radius: 8px;
        margin: 0.25rem 0;
        transition: var(--transition);
    }
    
    .nav-link:hover {
        background: var(--light-bg) !important;
        color: var(--secondary-color) !important;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background: var(--light-bg);
        margin: 0;
        padding: 0.5rem;
    }
    
    .dropdown-item {
        color: var(--primary-color);
        border-radius: 6px;
        margin-bottom: 2px;
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
    }
    
    .hero-section .alert {
        margin: 1rem;
        padding: 1rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem !important;
    }
    
    .dashboard-card {
        padding: 1.25rem !important;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .dashboard-card .icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .dashboard-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .dashboard-card p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
    }
    
    .btn-lg {
        padding: 12px 24px !important;
        font-size: 1rem !important;
    }
    
    /* Tables */
    .table {
        font-size: 0.8rem;
    }
    
    .table thead th {
        padding: 0.5rem !important;
        font-size: 0.75rem;
    }
    
    .table tbody td {
        padding: 0.5rem !important;
        font-size: 0.8rem;
    }
    
    /* Make tables horizontally scrollable */
    .table-responsive {
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-light);
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 1rem !important;
        padding: 0.75rem !important;
    }
    
    .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Login specific */
    .login-wrapper {
        padding: 1rem;
    }
    
    .login-card {
        margin: 0.5rem !important;
        border-radius: 15px !important;
    }
    
    .login-body {
        padding: 1.5rem !important;
    }
    
    .login-logo {
        font-size: 2.5rem !important;
    }
    
    .login-title {
        font-size: 1.3rem !important;
    }
    
    .login-subtitle {
        font-size: 0.9rem !important;
    }
    
    .user-type-selector {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .form-check-card {
        padding: 0.75rem !important;
    }
    
    .form-check-card .form-check-label {
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 1.5rem 0 !important;
        text-align: center;
    }
    
    .footer p {
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Utilities */
    .d-sm-none {
        display: none !important;
    }
    
    .text-sm-center {
        text-align: center !important;
    }
}

/* Extra small devices (Portrait phones, less than 576px) */
@media (max-width: 575px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .row.g-4 > * {
        margin-bottom: 1rem !important;
    }
    
    .dashboard-card {
        padding: 1rem !important;
    }
    
    .dashboard-card .icon {
        font-size: 1.75rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.25rem;
    }
    
    .login-card {
        margin: 0.25rem !important;
        border-radius: 12px !important;
    }
    
    .login-body {
        padding: 1rem !important;
    }
    
    .form-floating .form-control {
        font-size: 1rem;
        padding: 0.75rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-logo,
    .dashboard-card .icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .table {
        font-size: 0.75rem;
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #2C3E50;
        --dark-text: #ECF0F1;
    }
    
    body {
        background: #1A252F !important;
        color: #ECF0F1 !important;
    }
    
    .card,
    .dashboard-card {
        background: #34495E !important;
        color: #ECF0F1 !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in,
    .slide-in-right {
        animation: none !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 3px solid var(--secondary-color) !important;
    outline-offset: 2px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor !important;
    }
    
    .card {
        border: 2px solid var(--primary-color) !important;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    transform: translateX(100px);
    opacity: 0;
    animation: slideInRight 0.5s ease forwards;
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-muted { color: #6C757D !important; }
.text-dark { color: var(--dark-text) !important; }

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #2ECC71 100%) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-light) !important;
}

.shadow-custom-hover:hover {
    box-shadow: var(--shadow-medium) !important;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Search Enhancement Styles */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper .form-control {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    color: var(--secondary-color);
    z-index: 5;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    left: 0.5rem;
    background: transparent;
    border: none;
    color: var(--danger-color);
    z-index: 5;
    padding: 0.25rem;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-clear:hover {
    background: var(--danger-color);
    color: white;
}

.search-results-count {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 4px;
    display: inline-block;
}

/* Table sorting styles */
.table th[data-sort] {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.table th[data-sort]:after {
    content: '\f0dc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0.5rem;
    opacity: 0.3;
    transition: var(--transition);
}

.table th[data-sort]:hover:after {
    opacity: 0.6;
}

.table th.sort-asc:after {
    content: '\f0de';
    opacity: 1;
    color: var(--secondary-color);
}

.table th.sort-desc:after {
    content: '\f0dd';
    opacity: 1;
    color: var(--secondary-color);
}

/* Enhanced Modal Styles */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Toast Notifications */
.toast {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
}

/* Progress Indicators */
.progress {
    border-radius: var(--border-radius);
    background: var(--light-bg);
    height: 0.75rem;
}

.progress-bar {
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transition: width 0.6s ease;
}

/* Enhanced Badge Styles */
.badge {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.badge-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #2ECC71 100%);
}

.badge-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #E67E22 100%);
}

.badge-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #C0392B 100%);
}

/* Pagination Styles */
.pagination {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.page-item .page-link {
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    margin: 0 2px;
    border-radius: 8px;
    transition: var(--transition);
}

.page-item.active .page-link {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.page-item .page-link:hover {
    background: var(--light-bg);
    color: var(--secondary-color);
    transform: translateY(-1px);
}

/* Breadcrumb Styles */
.breadcrumb {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '\f104';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--secondary-color);
}

/* Accordion Styles */
.accordion {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.accordion-item {
    border: none;
}

.accordion-button {
    background: var(--light-bg);
    color: var(--primary-color);
    font-weight: 600;
    border: none;
    padding: 1.25rem 1.5rem;
}

.accordion-button:not(.collapsed) {
    background: var(--secondary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Spinner and Loading States */
.spinner-grow,
.spinner-border {
    color: var(--secondary-color);
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* File Upload Styles */
.file-upload-area {
    border: 2px dashed var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    background: var(--light-bg);
}

.file-upload-area:hover {
    background: rgba(52, 152, 219, 0.05);
    border-color: var(--primary-color);
}

.file-upload-area.dragover {
    background: rgba(52, 152, 219, 0.1);
    border-color: var(--primary-color);
    transform: scale(1.02);
}

/* Status Indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 0.5rem;
}

.status-online {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-offline {
    background: var(--danger-color);
}

.status-pending {
    background: var(--warning-color);
    animation: blink 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Enhanced Responsive Tables */
.table-responsive-custom {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.table-responsive-custom .table {
    margin-bottom: 0;
}

/* Mobile Table Cards */
@media (max-width: 767px) {
    .table-mobile-cards .table thead {
        display: none;
    }
    
    .table-mobile-cards .table tbody tr {
        display: block;
        border: none;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-light);
        margin-bottom: 1rem;
        padding: 1rem;
        background: white;
    }
    
    .table-mobile-cards .table tbody td {
        display: block;
        border: none;
        padding: 0.5rem 0;
        text-align: right;
    }
    
    .table-mobile-cards .table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color);
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* Quick Actions Menu */
.quick-actions {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
}

.quick-actions-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border: none;
    color: white;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.quick-actions-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.quick-actions-menu {
    position: absolute;
    bottom: 70px;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-actions-menu.show {
    display: flex;
    animation: slideInUp 0.3s ease;
}

.quick-action-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
    white-space: nowrap;
}

.quick-action-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-medium);
    color: var(--secondary-color);
}

.quick-action-item i {
    margin-left: 0.5rem;
    width: 20px;
    text-align: center;
}

/* Enhanced Error Pages */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}
