/* Kamer CRM - Ana Stil Dosyası */
/* WorkRoute CRM V1 — IT Manager Edition */

/* CSS Reset ve Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #374151;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-layout {
    display: flex;
    min-height: 100vh;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Sidebar Styles */
.sidebar-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-modern {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    border-right: 1px solid rgba(226, 232, 240, 0.3);
}

.nav-item {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 0 4px 4px 0;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.05));
    transform: translateX(4px);
}

/* Header Styles */
.page-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

/* Card Styles */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-shadow:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.stat-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(59, 130, 246, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.4);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(239, 68, 68, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.4);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(245, 158, 11, 0.5);
}

.btn-secondary {
    background: #f8fafc;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #9ca3af;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 1);
}

.input-modern {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.9);
}

.input-modern:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 1);
}

/* Table Styles */
.table-modern {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.table-modern thead {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.table-modern tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.table-modern tbody tr:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(29, 78, 216, 0.02));
}

/* Modal Styles */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.modal-modern {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient Backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gradient-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Status Badges */
.status-badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from { 
        transform: translateX(100%) scale(0.95); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0) scale(1); 
        opacity: 1; 
    }
}


.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Notification Styles */
.notification {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Upcoming Payments Card */
.upcoming-payments-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Utility Classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-soft {
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

.border-dashed {
    border-style: dashed;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

.select-none {
    user-select: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar-modern {
        position: fixed;
        z-index: 40;
        height: 100vh;
    }
    
    .main-layout {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .table-modern {
        font-size: 0.875rem;
    }
    
    .modal-modern {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
}

@media (max-width: 640px) {
    .page-header {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .form-input, .form-select, .form-textarea {
        font-size: 16px; /* iOS zoom önleme */
    }
}

/* Print Styles */
@media print {
    .sidebar-modern,
    .page-header,
    footer,
    .btn,
    .modal-backdrop {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .main-layout {
        display: block;
    }
    
    .card-shadow,
    .stat-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Dark Mode Support (Future) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-color: #4b5563;
    }
    
    /* Dark mode stilleri gelecekte eklenecek */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
    
    .form-input:focus {
        border-color: #000;
        box-shadow: 0 0 0 3px #000;
    }
}

/* Reduced Motion */
@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;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.nav-item:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}


/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Error States */
.error {
    border-color: #ef4444 !important;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success States */
.success {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}

.success-message {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Dashboard benzeri hover efektleri */
.gradient-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

/* Hızlı eylem butonları için optimize edilmiş hover efektleri */
.action-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-button:hover {
    transform: scale(1.05);
}

/* Modal animasyonları için optimize edilmiş geçişler */
.modal-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* System Status Indicators */
.status-indicator {
    position: relative;
    display: inline-block;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translateY(-50%);
}

.status-online::before {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.status-warning::before {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.status-offline::before {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* Quick Actions Buttons */
.quick-action-btn {
    transition: all 0.2s ease;
    border-radius: 8px;
}

.quick-action-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Log Modal Styles */
.log-entry {
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    padding-left: 12px;
}

.log-entry.log-error {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.log-entry.log-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.log-entry.log-info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.log-entry.log-debug {
    border-left-color: #6b7280;
    background: rgba(107, 114, 128, 0.05);
}



/* ========================================
   SETTINGS PAGE ENHANCED STYLES
   ======================================== */

/* CSS Variables for Better Maintainability */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
    --success-color: #10b981;
    --success-dark: #059669;
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --info-color: #06b6d4;
    --info-dark: #0891b2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   1. STICKY NAVIGATION BAR STYLES
   ======================================== */

.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    transition: var(--transition-slow);
}

.navbar-sticky.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.nav-link {
    position: relative;
    padding: 0.75rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-radius: var(--border-radius);
    min-height: 44px; /* Touch-friendly */
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.05));
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 1px;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-height: 44px;
    min-width: 44px;
}

.mobile-nav-toggle:hover {
    background: var(--gray-100);
}

.mobile-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease-out;
}

.mobile-nav-menu.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-nav-menu .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--gray-100);
    }
}

/* ========================================
   2. SEARCH BOX STYLES
   ======================================== */

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    transition: var(--transition);
    min-height: 44px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: var(--gray-400);
    transition: var(--transition);
}

.search-input:focus::placeholder {
    color: var(--gray-300);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    transition: var(--transition);
    pointer-events: none;
}

.search-input:focus + .search-icon {
    color: var(--primary-color);
}

.search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    color: var(--gray-500);
}

.search-input:not(:placeholder-shown) ~ .search-clear {
    opacity: 1;
}

.search-clear:hover {
    background: var(--gray-200);
    color: var(--gray-700);
    transform: translateY(-50%) scale(1.1);
}

.search-highlight {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.2));
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% { background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.2)); }
    50% { background: linear-gradient(135deg, rgba(251, 191, 36, 0.5), rgba(245, 158, 11, 0.3)); }
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    animation: fadeInUp 0.2s ease-out;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--gray-50);
    transform: translateX(4px);
}

.search-result-item:last-child {
    border-bottom: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   3. TOOLTIP STYLES
   ======================================== */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 60;
    box-shadow: var(--shadow-lg);
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gray-800);
}

.tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
    animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(0px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(-4px);
    }
}

/* Tooltip Positions */
.tooltip-top .tooltip-content {
    bottom: 125%;
    top: auto;
}

.tooltip-bottom .tooltip-content {
    top: 125%;
    bottom: auto;
}

.tooltip-bottom .tooltip-content::after {
    top: -5px;
    border-top-color: transparent;
    border-bottom-color: var(--gray-800);
}

.tooltip-left .tooltip-content {
    top: 50%;
    left: auto;
    right: 125%;
    transform: translateY(-50%);
}

.tooltip-left .tooltip-content::after {
    top: 50%;
    left: 100%;
    right: auto;
    transform: translateY(-50%);
    border-left-color: var(--gray-800);
    border-top-color: transparent;
}

.tooltip-right .tooltip-content {
    top: 50%;
    right: auto;
    left: 125%;
    transform: translateY(-50%);
}

.tooltip-right .tooltip-content::after {
    top: 50%;
    right: 100%;
    left: auto;
    transform: translateY(-50%);
    border-right-color: var(--gray-800);
    border-top-color: transparent;
}

/* Dark Theme Tooltip */
.tooltip-dark .tooltip-content {
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
}

.tooltip-dark .tooltip-content::after {
    border-top-color: var(--gray-900);
}

/* Light Theme Tooltip */
.tooltip-light .tooltip-content {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
}

.tooltip-light .tooltip-content::after {
    border-top-color: white;
}

/* Responsive Tooltips */
@media (max-width: 768px) {
    .tooltip-content {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
        max-width: 200px;
        white-space: normal;
        text-align: center;
    }
}

/* ========================================
   4. LOADING STATES STYLES
   ======================================== */

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

.loading-spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

.loading-spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Button Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-loading .btn-text {
    opacity: 0;
}

/* Skeleton Loading Effects */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: var(--border-radius);
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    width: 100%;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.loading-overlay-content {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   5. ENHANCED MESSAGE SYSTEM STYLES
   ======================================== */

.message-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
    width: 100%;
}

.message {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.message-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: inherit;
}

.message-text {
    font-size: 0.875rem;
    line-height: 1.4;
    color: inherit;
    opacity: 0.9;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.message-action {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    min-height: 32px;
}

.message-action:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.message-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    opacity: 0.7;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* Message Types */
.message-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.9));
    color: white;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.message-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.9));
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.message-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.9));
    color: white;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.message-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.95), rgba(8, 145, 178, 0.9));
    color: white;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Message Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-exit {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Progress Bar for Auto-dismiss */
.message-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    animation: messageProgress 5s linear forwards;
}

@keyframes messageProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Mobile Message Styles */
@media (max-width: 768px) {
    .message-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
    
    .message {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .message-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .message-action {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   6. FORM VALIDATION STYLES
   ======================================== */

.form-field {
    position: relative;
    margin-bottom: 1rem;
}

.form-field.has-error .form-input,
.form-field.has-error .form-select,
.form-field.has-error .form-textarea {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
    animation: shakeError 0.3s ease-in-out;
}

.form-field.has-error .form-input:focus,
.form-field.has-error .form-select:focus,
.form-field.has-error .form-textarea:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-field.has-success .form-input,
.form-field.has-success .form-select,
.form-field.has-success .form-textarea {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.form-field.has-success .form-input:focus,
.form-field.has-success .form-select:focus,
.form-field.has-success .form-textarea:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Validation Icons */
.form-field-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    transition: var(--transition);
}

.form-field.has-error .form-field-icon {
    color: var(--danger-color);
}

.form-field.has-success .form-field-icon {
    color: var(--success-color);
}

/* Validation Messages */
.form-message {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: fadeInUp 0.2s ease-out;
}

.form-message-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.form-error-message {
    color: var(--danger-color);
}

.form-success-message {
    color: var(--success-color);
}

.form-warning-message {
    color: var(--warning-color);
}

.form-info-message {
    color: var(--info-color);
}

/* Real-time Validation */
.form-field.validating .form-input,
.form-field.validating .form-select,
.form-field.validating .form-textarea {
    border-color: var(--info-color);
}

.form-field.validating .form-field-icon {
    animation: spin 1s linear infinite;
    color: var(--info-color);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.password-strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-weak .password-strength-fill {
    width: 25%;
    background: var(--danger-color);
}

.password-strength-fair .password-strength-fill {
    width: 50%;
    background: var(--warning-color);
}

.password-strength-good .password-strength-fill {
    width: 75%;
    background: var(--info-color);
}

.password-strength-strong .password-strength-fill {
    width: 100%;
    background: var(--success-color);
}

.password-strength-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* ========================================
   7. RESPONSIVE IMPROVEMENTS
   ======================================== */

/* Mobile-First Approach */
@media (max-width: 640px) {
    :root {
        --border-radius: 0.375rem;
        --border-radius-lg: 0.5rem;
    }
    
    /* Touch-friendly controls */
    .btn,
    .form-input,
    .form-select,
    .nav-link,
    .search-input {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing */
    .container {
        padding: 0 1rem;
    }
    
    .settings-grid {
        gap: 1rem;
    }
    
    .settings-card {
        padding: 1rem;
    }
    
    /* Improved mobile navigation */
    .navbar-sticky {
        padding: 0.5rem 1rem;
    }
    
    .search-container {
        max-width: none;
        margin: 0.5rem 0;
    }
    
    /* Mobile tooltips */
    .tooltip-content {
        position: fixed;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        max-width: none;
        text-align: center;
        white-space: normal;
    }
    
    .tooltip-content::after {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Tablet adjustments */
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .message-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    /* Form improvements */
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* Prevent iOS zoom */
    }
}

@media (min-width: 1024px) {
    /* Desktop enhancements */
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-container {
        max-width: 500px;
    }
}

/* ========================================
   8. ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus Indicators */
.focus-visible,
.btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.nav-link:focus-visible,
.search-input:focus-visible,
.tooltip:focus-visible,
.message-action:focus-visible,
.message-close:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* High Contrast Focus */
@media (prefers-contrast: high) {
    .focus-visible,
    .btn:focus-visible,
    .form-input:focus-visible,
    .form-select:focus-visible,
    .form-textarea:focus-visible {
        outline: 3px solid #000;
        outline-offset: 2px;
        box-shadow: 0 0 0 6px #fff, 0 0 0 9px #000;
    }
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip Links */
.skip-links {
    position: absolute;
    top: -40px;
    left: 6px;
    z-index: 1000;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--gray-900);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    z-index: 1000;
    transition: var(--transition);
}

.skip-link:focus {
    top: 6px;
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Keyboard Navigation Support */
.keyboard-navigation .btn:focus,
.keyboard-navigation .form-input:focus,
.keyboard-navigation .form-select:focus,
.keyboard-navigation .nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 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;
    }
    
    .loading-spinner {
        animation: none;
        border: 2px solid var(--primary-color);
    }
    
    .skeleton {
        animation: none;
        background: var(--gray-200);
    }
}

/* Color Contrast Improvements */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --success-color: #008000;
        --danger-color: #ff0000;
        --warning-color: #ff8c00;
    }
    
    .btn-primary {
        background: #0000ff;
        border: 2px solid #ffffff;
    }
    
    .btn-success {
        background: #008000;
        border: 2px solid #ffffff;
    }
    
    .btn-danger {
        background: #ff0000;
        border: 2px solid #ffffff;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        border: 2px solid #000000;
    }
    
    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        border-color: #0000ff;
        box-shadow: 0 0 0 3px #0000ff;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .form-input,
    .form-select,
    .search-input,
    .message-action,
    .tooltip {
        min-height: 44px;
        min-width: 44px;
    }
    
    .tooltip:hover .tooltip-content {
        display: none;
    }
    
    .tooltip:focus .tooltip-content,
    .tooltip:active .tooltip-content {
        opacity: 1;
        visibility: visible;
    }
}

/* Print Accessibility */
@media print {
    .tooltip-content {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        border: 1px solid black !important;
        margin-left: 1rem;
        display: inline-block;
    }
    
    .tooltip-content::after {
        display: none !important;
    }
    
    .message {
        border: 2px solid black !important;
        background: white !important;
        color: black !important;
        page-break-inside: avoid;
    }
}

/* ========================================
   ENHANCED SETTINGS PAGE SPECIFIC STYLES
   ======================================== */








/* Dark Mode Preparation */
[data-theme="dark"] {
    --gray-50: #1f2937;
    --gray-100: #374151;
    --gray-200: #4b5563;
    --gray-300: #6b7280;
    --gray-400: #9ca3af;
    --gray-500: #d1d5db;
    --gray-600: #e5e7eb;
    --gray-700: #f3f4f6;
    --gray-800: #f9fafb;
    --gray-900: #ffffff;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: var(--gray-800);
}


[data-theme="dark"] .tooltip-content {
    background: var(--gray-100);
    color: var(--gray-800);
}

[data-theme="dark"] .message-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .message-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    color: var(--danger-color);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .message-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
    color: var(--warning-color);
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .message-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(8, 145, 178, 0.1));
    color: var(--info-color);
    border-color: rgba(6, 182, 212, 0.3);
}

/* ========================================
   DASHBOARD SPECIFIC STYLES
   ======================================== */

/* Chart Period Buttons */
.chart-period-btn {
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.chart-period-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-period-btn.active {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Loading Spinner for Dashboard */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Dashboard Gradient Classes */
.gradient-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

/* Enhanced Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stat-card:hover::before {
    opacity: 1;
}

/* Activity Items */
.activity-item {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.activity-item:hover {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(2px);
}

/* System Health Status */
.health-status-online {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-color: #10b981;
}

.health-status-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #f59e0b;
}

.health-status-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #ef4444;
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container canvas {
    max-height: 100% !important;
}

/* Dashboard Grid Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-card {
    animation: slideInUp 0.6s ease-out;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }

/* Quick Actions Enhanced */
.quick-action-item {
    position: relative;
    overflow: hidden;
}

.quick-action-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.quick-action-item:hover::before {
    left: 100%;
}

/* Responsive Dashboard Adjustments */
@media (max-width: 1024px) {
    .chart-container {
        height: 250px;
    }
    
    .dashboard-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .chart-container {
        height: 200px;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .chart-period-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    .dashboard-header {
        text-align: center;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .activity-list {
        max-height: 250px;
    }
    
    .system-health-list {
        max-height: 200px;
    }
}

/* Dashboard Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .stat-card {
        background: transparent;
        border: 1px solid rgba(75, 85, 99, 0.3);
    }
    
    .chart-container {
        background: rgba(31, 41, 55, 0.5);
        border-radius: 1rem;
    }
    
    .activity-item {
        background: rgba(31, 41, 55, 0.3);
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .activity-item:hover {
        background: rgba(59, 130, 246, 0.1);
        border-left-color: #3b82f6;
    }
}

/* Print Styles for Dashboard */
@media print {
    .chart-container {
        height: auto !important;
        page-break-inside: avoid;
    }
    
    .quick-actions-grid {
        display: none;
    }
    
    .dashboard-grid-3,
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        border: 2px solid #000;
        background: white;
        box-shadow: none;
    }
    
    .activity-item,
    .system-health-item {
        border: 1px solid #ccc;
        background: white;
    }
}

/* Accessibility Improvements for Dashboard */
.chart-period-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.quick-action-item:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    transform: scale(1.02);
}

.activity-item:focus-visible,
.system-health-item:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode for Dashboard */
@media (prefers-contrast: high) {
    .stat-card {
        border: 3px solid #000;
        background: #fff;
    }
    
    .chart-period-btn {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
    
    .chart-period-btn.active {
        background: #000;
        color: #fff;
    }
    
    .activity-item,
    .system-health-item {
        border: 2px solid #000;
        background: #fff;
    }
}