/* 
 * WhatsApp Broadcast Admin Panel - Enhanced Stylesheet
 * Version: 2.5 - Enhanced with modern design and improved functionality
 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --box-shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 14px;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f5f6fa 0%, #e9ecef 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Enhanced Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: var(--transition);
}

.navbar-brand:hover {
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none;
    transform: scale(1.02);
}

.navbar-brand i {
    font-size: 1.6rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.navbar-menu {
    display: flex;
    gap: 10px;
    margin-left: auto;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-item {
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

.navbar-item:hover {
    color: white !important;
    background: rgba(255,255,255,0.15);
    text-decoration: none;
    transform: translateY(-1px);
}

.navbar-item.active {
    color: white !important;
    background: rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Enhanced Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    padding: 10px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: inherit;
    font-family: inherit;
    font-weight: 500;
}

.dropdown-toggle:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.dropdown-toggle::after {
    content: '';
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    transition: transform 0.3s ease;
}

.dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 200px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 1050;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.dropdown-divider {
    height: 1px;
    margin: 8px 0;
    overflow: hidden;
    background: #e9ecef;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px 30px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.page-header h1 i {
    color: var(--primary-color);
    font-size: 1.6rem;
}

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

/* Enhanced Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.2;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary { 
    background: var(--primary-color); 
    color: white; 
}

.btn-primary:hover {
    background: #5a6fd8;
    color: white;
}

.btn-secondary { 
    background: #6c757d; 
    color: white; 
}

.btn-success { 
    background: var(--success-color); 
    color: white; 
}

.btn-danger { 
    background: var(--danger-color); 
    color: white; 
}

.btn-warning { 
    background: var(--warning-color); 
    color: #212529; 
}

.btn-info { 
    background: var(--info-color); 
    color: white; 
}

.btn-light { 
    background: var(--light-color); 
    color: #333; 
    border: 1px solid #dee2e6; 
}

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

.btn-group {
    display: flex;
    gap: 2px;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.btn-group .btn:only-child {
    border-radius: var(--border-radius);
}

/* Enhanced Statistics Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-left: 4px solid currentColor;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: currentColor;
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(20px, -20px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
    min-width: 60px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1;
    color: currentColor;
}

.stat-label {
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

.stat-card-primary { color: var(--primary-color); }
.stat-card-success { color: var(--success-color); }
.stat-card-danger { color: var(--danger-color); }
.stat-card-warning { color: var(--warning-color); }
.stat-card-info { color: var(--info-color); }

/* Enhanced Cards */
.card {
    background: white;
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background: white;
    border-bottom: 2px solid #f8f9fa;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
    margin: 0;
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--primary-color);
}

.card-body {
    padding: 0;
}

.card-body.p-3 {
    padding: 20px;
}

.card-footer {
    background: var(--light-color);
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Enhanced Tables */
.table-responsive {
    position: relative;
    overflow-x: auto;
    border-radius: var(--border-radius-lg);
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    background: white;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: #495057;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    border-top: none;
    padding: 15px 12px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table th:first-child {
    padding-left: 20px;
    border-radius: var(--border-radius) 0 0 0;
}

.table th:last-child {
    padding-right: 20px;
    border-radius: 0 var(--border-radius) 0 0;
}

.table td {
    vertical-align: middle;
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
    border-top: none;
}

.table td:first-child {
    padding-left: 20px;
}

.table td:last-child {
    padding-right: 20px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 var(--border-radius);
}

.table tbody tr:last-child td:last-child {
    border-radius: 0 0 var(--border-radius) 0;
}

/* Enhanced Badges */
.badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    white-space: nowrap;
}

.badge i {
    font-size: 0.75rem;
}

.badge-primary { background: var(--primary-color); color: white; }
.badge-secondary { background: #6c757d; color: white; }
.badge-success { background: var(--success-color); color: white; }
.badge-danger { background: var(--danger-color); color: white; }
.badge-warning { background: var(--warning-color); color: #212529; }
.badge-info { background: var(--info-color); color: white; }
.badge-light { background: var(--light-color); color: #333; border: 1px solid #dee2e6; }
.badge-dark { background: var(--dark-color); color: white; }

/* Enhanced Progress Bars */
.progress {
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
    position: relative;
}

.progress.progress-lg {
    height: 20px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--success-color), #20c997);
    height: 100%;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 75%, transparent 75%);
    background-size: 20px 20px;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% { background-position-x: 0; }
    100% { background-position-x: 20px; }
}

.bg-primary { background: var(--primary-color) !important; }
.bg-success { background: var(--success-color) !important; }
.bg-info { background: var(--info-color) !important; }
.bg-warning { background: var(--warning-color) !important; }
.bg-danger { background: var(--danger-color) !important; }

/* Enhanced Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
    background: white;
    color: #333;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fefefe;
}

.form-control::placeholder {
    color: #999;
    opacity: 1;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 40px;
    appearance: none;
}

.form-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    line-height: 1.4;
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    margin-bottom: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group .form-control:focus {
    z-index: 3;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    border-right: 2px solid var(--primary-color);
}

.input-group-append {
    margin-left: 0;
    display: flex;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
    background: var(--light-color);
    color: #666;
    border: 2px solid #e9ecef;
    border-left: none;
}

.input-group-append .btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

/* Enhanced Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1055;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    position: relative;
    width: auto;
    max-width: 600px;
    margin: 1.75rem auto;
    pointer-events: none;
    transform: scale(0.9) translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-dialog {
    pointer-events: auto;
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-dialog.modal-sm {
    max-width: 400px;
}

.modal-dialog.modal-lg {
    max-width: 800px;
}

.modal-dialog.modal-xl {
    max-width: 1200px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: white;
    background-clip: padding-box;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    outline: 0;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: var(--primary-color);
    color: white;
    border-bottom: none;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 20px 25px;
    background: var(--light-color);
    border-top: 1px solid #e9ecef;
    gap: 10px;
}

.close {
    padding: 0;
    background: transparent;
    border: 0;
    color: white;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    text-shadow: none;
    opacity: 0.8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: scale(1.1);
}

.close:focus {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* Enhanced Navigation Tabs */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 0;
    background: white;
    padding: 0 20px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    box-shadow: var(--box-shadow);
}

.nav-item {
    margin-bottom: -2px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 15px 25px;
    color: #666;
    text-decoration: none;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: var(--transition);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    gap: 8px;
    white-space: nowrap;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px 2px 0 0;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
    text-decoration: none;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.08);
    font-weight: 600;
}

.nav-link.active::before {
    width: 100%;
}

.nav-link.disabled {
    color: #6c757d;
    pointer-events: none;
    cursor: default;
    opacity: 0.5;
}

.tab-content {
    min-height: 400px;
    background: white;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.tab-pane {
    display: none;
}

.tab-pane.active,
.tab-pane.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Enhanced Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: none;
    border-radius: var(--border-radius);
    position: relative;
    border-left: 4px solid;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert i {
    margin-top: 2px;
    font-size: 1.1rem;
}

.alert-success {
    color: #155724;
    background-color: rgba(40, 167, 69, 0.1);
    border-left-color: var(--success-color);
}

.alert-danger {
    color: #721c24;
    background-color: rgba(220, 53, 69, 0.1);
    border-left-color: var(--danger-color);
}

.alert-warning {
    color: #856404;
    background-color: rgba(255, 193, 7, 0.1);
    border-left-color: var(--warning-color);
}

.alert-info {
    color: #0c5460;
    background-color: rgba(23, 162, 184, 0.1);
    border-left-color: var(--info-color);
}

.alert-dismissible {
    padding-right: 4rem;
}

.alert-dismissible .close {
    position: absolute;
    top: 15px;
    right: 20px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.5;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.alert-dismissible .close:hover {
    opacity: 0.8;
    background: rgba(0,0,0,0.05);
}

/* Loading States */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

.spinner-grow {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    background-color: currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: grow 0.75s linear infinite;
}

.spinner-grow-sm {
    width: 1rem;
    height: 1rem;
}

/* Enhanced Footer */
.footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #2c3e50 100%);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.footer p {
    margin: 0;
    opacity: 0.9;
}

/* Utility Classes */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }

.text-muted { color: #6c757d !important; }
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-light { color: var(--light-color) !important; }
.text-dark { color: var(--dark-color) !important; }
.text-white { color: white !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-light { background-color: var(--light-color) !important; }
.bg-dark { background-color: var(--dark-color) !important; }
.bg-white { background-color: white !important; }

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mr-0 { margin-right: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.ml-0 { margin-left: 0 !important; }

.m-1 { margin: 0.25rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.ml-1 { margin-left: 0.25rem !important; }

.m-2 { margin: 0.5rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.ml-2 { margin-left: 0.5rem !important; }

.m-3 { margin: 1rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.ml-3 { margin-left: 1rem !important; }

.m-4 { margin: 1.5rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.ml-4 { margin-left: 1.5rem !important; }

.m-5 { margin: 3rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mr-5 { margin-right: 3rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.ml-5 { margin-left: 3rem !important; }

.p-0 { padding: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.pr-0 { padding-right: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }
.pl-0 { padding-left: 0 !important; }

.p-1 { padding: 0.25rem !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pr-1 { padding-right: 0.25rem !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pl-1 { padding-left: 0.25rem !important; }

.p-2 { padding: 0.5rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pr-2 { padding-right: 0.5rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pl-2 { padding-left: 0.5rem !important; }

.p-3 { padding: 1rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pr-3 { padding-right: 1rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pl-3 { padding-left: 1rem !important; }

.p-4 { padding: 1.5rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pr-4 { padding-right: 1.5rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pl-4 { padding-left: 1.5rem !important; }

.p-5 { padding: 3rem !important; }
.pt-5 { padding-top: 3rem !important; }
.pr-5 { padding-right: 3rem !important; }
.pb-5 { padding-bottom: 3rem !important; }
.pl-5 { padding-left: 3rem !important; }

/* Flexbox Utilities */
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-inline { display: inline !important; }
.d-none { display: none !important; }

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-1 { flex-shrink: 1 !important; }

/* Enhanced Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.row.no-gutters {
    margin: 0;
}

.row.no-gutters > [class*="col-"] {
    padding: 0;
}

.col,
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-sm, .col-md, .col-lg, .col-xl,
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,
.col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6,
.col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 {
    position: relative;
    width: 100%;
    padding: 10px;
}

.col { flex-grow: 1; max-width: 100%; }
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Medium screens and up */
@media (min-width: 768px) {
    .col-md { flex-grow: 1; max-width: 100%; }
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Large screens and up */
@media (min-width: 992px) {
    .col-lg { flex-grow: 1; max-width: 100%; }
    .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
    .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes grow {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -30px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}

/* Animation Classes */
.animate__fadeIn { animation: fadeIn 0.5s ease; }
.animate__fadeInUp { animation: fadeInUp 0.5s ease; }
.animate__fadeInDown { animation: fadeInDown 0.5s ease; }
.animate__slideInRight { animation: slideInRight 0.5s ease; }
.animate__pulse { animation: pulse 2s infinite; }
.animate__bounce { animation: bounce 1s; }

/* Responsive Utility Classes */
/* Display utilities for different screen sizes */
@media (max-width: 575px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-inline-block { display: inline-block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (min-width: 576px) and (max-width: 767px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-inline { display: inline !important; }
    .d-md-inline-block { display: inline-block !important; }
    .d-md-flex { display: flex !important; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-inline { display: inline !important; }
    .d-lg-inline-block { display: inline-block !important; }
    .d-lg-flex { display: flex !important; }
}

@media (min-width: 992px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
    .d-xl-inline { display: inline !important; }
    .d-xl-inline-block { display: inline-block !important; }
    .d-xl-flex { display: flex !important; }
}

/* Responsive spacing utilities */
@media (max-width: 768px) {
    .p-mobile-0 { padding: 0 !important; }
    .p-mobile-1 { padding: 0.25rem !important; }
    .p-mobile-2 { padding: 0.5rem !important; }
    .p-mobile-3 { padding: 1rem !important; }
    
    .m-mobile-0 { margin: 0 !important; }
    .m-mobile-1 { margin: 0.25rem !important; }
    .m-mobile-2 { margin: 0.5rem !important; }
    .m-mobile-3 { margin: 1rem !important; }
    
    .px-mobile-0 { padding-left: 0 !important; padding-right: 0 !important; }
    .px-mobile-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
    .px-mobile-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
    .px-mobile-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
    
    .py-mobile-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
    .py-mobile-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
    .py-mobile-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
    .py-mobile-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
}

/* Responsive text utilities */
@media (max-width: 768px) {
    .text-mobile-center { text-align: center !important; }
    .text-mobile-left { text-align: left !important; }
    .text-mobile-right { text-align: right !important; }
    
    .fs-mobile-sm { font-size: 0.8rem !important; }
    .fs-mobile-md { font-size: 1rem !important; }
    .fs-mobile-lg { font-size: 1.2rem !important; }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn, .navbar-item, .dropdown-item, .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    .table td, .table th {
        padding: 12px 8px;
    }
}

/* Form Validation */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.valid-feedback {
    display: none;
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback {
    display: none;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.was-validated .form-control:valid ~ .valid-feedback,
.form-control.is-valid ~ .valid-feedback {
    display: block;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    /* Improve large screen layouts */
    .stats-cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .nav-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 992px) {
    .stats-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .page-header h1 {
        justify-content: center;
        font-size: 1.6rem;
    }
    
    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Improve table responsiveness */
    .table-responsive {
        border-radius: 0;
        margin: 0 -20px;
        width: calc(100% + 40px);
    }
    
    .table {
        min-width: 600px;
    }
    
    /* Better card layouts on tablets */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Optimize navigation for tablets */
    .navbar-menu {
        gap: 0.25rem;
    }
    
    .navbar-item {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Mobile-first navigation */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
        width: 100%;
        justify-content: center;
    }
    
    .navbar-item {
        text-align: center;
        padding: 8px 10px;
        font-size: 0.85rem;
        border-radius: 6px;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
    }
    
    .navbar-item i {
        display: block;
        margin-bottom: 2px;
        font-size: 1rem;
    }
    
    /* Mobile page headers */
    .page-header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
    }
    
    /* Mobile stats cards */
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .stat-card {
        padding: 15px;
        border-radius: 10px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    /* Mobile navigation tabs */
    .nav-tabs {
        padding: 0 10px;
        border-radius: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
        min-width: 80px;
    }
    
    /* Mobile cards */
    .card-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
    }
    
    .card-header h3 {
        text-align: center;
        justify-content: center;
        font-size: 1.1rem;
    }
    
    /* Mobile tables */
    .table-responsive {
        margin: 0 -15px;
        width: calc(100% + 30px);
        border-radius: 0;
    }
    
    .table {
        font-size: 0.8rem;
        min-width: 500px;
    }
    
    .table th,
    .table td {
        padding: 6px 4px;
        white-space: nowrap;
    }
    
    .table th:first-child,
    .table td:first-child {
        padding-left: 10px;
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 1;
    }
    
    .table th:last-child,
    .table td:last-child {
        padding-right: 10px;
    }
    
    /* Mobile buttons */
    .btn-group {
        flex-direction: column;
        gap: 6px;
    }
    
    .btn-group .btn {
        width: 100%;
        border-radius: var(--border-radius) !important;
    }
    
    /* Mobile modals */
    .modal-dialog {
        width: 95%;
        margin: 10px auto;
        max-height: calc(100vh - 20px);
    }
    
    .modal-content {
        max-height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 15px;
        max-height: calc(100vh - 200px);
    }
    
    .modal-header,
    .modal-footer {
        padding: 12px 15px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile cards footer */
    .card-footer {
        flex-direction: column;
        gap: 8px;
        padding: 12px 15px;
    }
    
    .card-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile form groups */
    .input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .input-group .form-control {
        border-radius: var(--border-radius);
        border: 2px solid #e9ecef;
    }
    
    .input-group-append {
        margin-left: 0;
    }
    
    .input-group-append .btn {
        border-radius: var(--border-radius);
        width: 100%;
    }
    
    /* Hide/show elements on mobile */
    .d-none-mobile {
        display: none !important;
    }
    
    .d-block-mobile {
        display: block !important;
    }
    
    /* Mobile quick actions */
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .quick-action-btn {
        padding: 12px;
        min-height: 60px;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    /* Extra small screens - optimize spacing */
    .page-header {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .stats-cards {
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .nav-tabs {
        padding: 0 5px;
    }
    
    .nav-link {
        padding: 8px 10px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .btn-sm {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .form-control {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .modal-dialog {
        margin: 5px;
        width: calc(100% - 10px);
        min-height: calc(100vh - 10px);
    }
    
    /* Optimize navbar for very small screens */
    .navbar-menu {
        gap: 0.125rem;
    }
    
    .navbar-item {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .navbar-item i {
        font-size: 0.9rem;
    }
    
    /* Smaller spacing */
    .card {
        margin-bottom: 0.75rem;
    }
    
    .card-header {
        padding: 10px 12px;
    }
    
    .card-body.p-3 {
        padding: 12px;
    }
    
    /* Optimize table for tiny screens */
    .table {
        font-size: 0.75rem;
        min-width: 450px;
    }
    
    .table th,
    .table td {
        padding: 4px 2px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #2c3e50;
        --dark-color: #ecf0f1;
    }
    
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
    
    .card,
    .modal-content,
    .page-header,
    .dropdown-menu {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .card-header,
    .modal-footer,
    .nav-tabs {
        background: #2c3e50;
        border-color: #495057;
    }
    
    .table th {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #495057;
    }
    
    .table td {
        border-color: #495057;
    }
    
    .table tbody tr:hover {
        background: rgba(102, 126, 234, 0.1);
    }
    
    .form-control {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #495057;
    }
    
    .form-control:focus {
        background: #34495e;
        border-color: var(--primary-color);
        color: #ecf0f1;
    }
    
    .form-control::placeholder {
        color: #bdc3c7;
    }
    
    .dropdown-item {
        color: #ecf0f1;
    }
    
    .dropdown-item:hover {
        background: #2c3e50;
        color: var(--primary-color);
    }
    
    .alert-success {
        background-color: rgba(40, 167, 69, 0.2);
        color: #a3e5a8;
    }
    
    .alert-danger {
        background-color: rgba(220, 53, 69, 0.2);
        color: #f8a5aa;
    }
    
    .alert-warning {
        background-color: rgba(255, 193, 7, 0.2);
        color: #fde5a7;
    }
    
    .alert-info {
        background-color: rgba(23, 162, 184, 0.2);
        color: #a8e6f0;
    }
}

/* Enhanced Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    width: 100%;
}

/* Improved Accessibility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus improvements */
.btn:focus,
.form-control:focus,
.nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .navbar,
    .page-header .header-actions,
    .card-footer,
    .btn,
    .modal,
    .dropdown-menu,
    .no-print {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .card,
    .page-header {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        background: white !important;
        color: black !important;
        page-break-inside: avoid;
    }
    
    .table {
        font-size: 10pt !important;
    }
    
    .table th,
    .table td {
        padding: 8px !important;
        border: 1px solid #ccc !important;
    }
    
    .page-break {
        page-break-before: always;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --success-color: #008000;
        --danger-color: #ff0000;
        --warning-color: #ffff00;
        --info-color: #00ffff;
    }
    
    .btn {
        border: 2px solid currentColor;
        font-weight: 700;
    }
    
    .form-control {
        border: 2px solid #333;
    }
    
    .form-control:focus {
        border: 2px solid var(--primary-color);
        box-shadow: 0 0 5px var(--primary-color);
    }
    
    .card, .modal-content {
        border: 2px solid #333;
    }
    
    .nav-link {
        font-weight: 600;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate__pulse,
    .progress-bar::before,
    .spinner-border,
    .spinner-grow {
        animation: none !important;
    }
}

/* Container Queries Support (Future-proofing) */
@supports (container-type: inline-size) {
    .responsive-container {
        container-type: inline-size;
    }
    
    @container (max-width: 400px) {
        .btn-group {
            flex-direction: column;
        }
    }
}

/* Improved scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}