/**
 * UptimePulse - Premium Theme
 * Modern, Clean, Professional Design
 * Inspired by: Linear, Vercel, Stripe
 * Version: 2.0.0
 */

/* ============================================
   CSS VARIABLES - Design Tokens
   ============================================ */

:root {
    /* Brand Colors */
    --brand-primary: #6366f1;
    --brand-primary-hover: #4f46e5;
    --brand-primary-light: rgba(99, 102, 241, 0.1);
    --brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    
    /* Status Colors */
    --status-success: #10b981;
    --status-success-bg: rgba(16, 185, 129, 0.1);
    --status-warning: #f59e0b;
    --status-warning-bg: rgba(245, 158, 11, 0.1);
    --status-danger: #ef4444;
    --status-danger-bg: rgba(239, 68, 68, 0.1);
    --status-info: #3b82f6;
    --status-info-bg: rgba(59, 130, 246, 0.1);
    
    /* Light Mode Colors */
    --bg-body: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-active: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: var(--brand-primary);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    
    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   DARK MODE
   ============================================ */

body.dark-mode {
    --bg-body: #0a0a0f;
    --bg-sidebar: #111118;
    --bg-card: #16161d;
    --bg-input: #1e1e26;
    --bg-hover: #1e1e26;
    --bg-active: #2a2a35;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    
    --border-color: #2a2a35;
    --border-light: #1e1e26;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* ============================================
   BASE STYLES
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* ============================================
   LAYOUT - Sidebar + Main Content
   ============================================ */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Footer */
.footer {
    margin-left: var(--sidebar-width);
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: margin-left var(--transition-base);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-base), transform var(--transition-base);
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--brand-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
}

.nav-item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item-badge {
    margin-left: auto;
    background: var(--status-danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--bg-hover);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}



/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-hover);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Stat Cards */
.stat-card {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
}

.stat-card[title] {
    cursor: help;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-icon.success { background: var(--status-success-bg); color: var(--status-success); }
.stat-card-icon.warning { background: var(--status-warning-bg); color: var(--status-warning); }
.stat-card-icon.danger { background: var(--status-danger-bg); color: var(--status-danger); }
.stat-card-icon.info { background: var(--status-info-bg); color: var(--status-info); }
.stat-card-icon.primary { background: var(--brand-primary-light); color: var(--brand-primary); }

.stat-card-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-card-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 20px;
}

.stat-card-change.positive {
    background: var(--status-success-bg);
    color: var(--status-success);
}

.stat-card-change.negative {
    background: var(--status-danger-bg);
    color: var(--status-danger);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.btn-success {
    background: var(--status-success);
    color: white;
    border-color: var(--status-success);
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--status-danger);
    color: white;
    border-color: var(--status-danger);
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--status-warning);
    color: white;
    border-color: var(--status-warning);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-group {
    display: inline-flex;
    gap: 0;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.btn-group .btn:not(:last-child) {
    border-right: none;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label-optional {
    color: var(--text-tertiary);
    font-weight: 400;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:hover {
    border-color: var(--text-tertiary);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-control:disabled {
    background: var(--bg-hover);
    cursor: not-allowed;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-text {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 6px;
}

.form-error {
    color: var(--status-danger);
}

/* Input Group */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-control:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-text {
    padding: 10px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-check-input:checked {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

/* ============================================
   TABLES
   ============================================ */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead th {
    background: var(--bg-hover);
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

/* DataTables Override - Ensure consistent padding */
table.dataTable thead th,
table.dataTable tbody td {
    padding: 16px !important;
}

table.dataTable thead th {
    background: var(--bg-hover) !important;
    border-bottom: 2px solid var(--border-color) !important;
}

/* Dashboard Table - First column alignment with status dot */
.dashboard-table tbody td:first-child {
    padding-left: 16px !important;
}

/* Status dot (8px) + gap (12px) = ~16px offset */
.dashboard-table thead th:first-child {
    padding-left: 32px !important; /* 16px base + 16px offset */
}

/* DataTables Controls Spacing - More space from card header */
.dataTables_wrapper .dataTables_length {
    margin-top: 24px !important;
    margin-bottom: 20px !important;
}

.dataTables_wrapper .dataTables_filter {
    margin-top: 24px !important;
    margin-bottom: 20px !important;
}

/* DataTables Info and Pagination Spacing */
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-top: 20px !important;
}

.table-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.table-link:hover {
    text-decoration: underline;
}

/* ============================================
   BADGES & STATUS
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-success {
    background: var(--status-success-bg);
    color: var(--status-success);
}

.badge-warning {
    background: var(--status-warning-bg);
    color: var(--status-warning);
}

.badge-danger {
    background: var(--status-danger-bg);
    color: var(--status-danger);
}

.badge-info {
    background: var(--status-info-bg);
    color: var(--status-info);
}

.badge-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.success { background: var(--status-success); }
.status-dot.warning { background: var(--status-warning); }
.status-dot.danger { background: var(--status-danger); }
.status-dot.info { background: var(--status-info); }

/* Pulse Animation */
.status-dot.pulse {
    position: relative;
}

.status-dot.pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}



/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-success {
    background: var(--status-success-bg);
    color: var(--status-success);
    border: 1px solid var(--status-success);
}

.alert-warning {
    background: var(--status-warning-bg);
    color: #92400e;
    border: 1px solid var(--status-warning);
}

.alert-danger {
    background: var(--status-danger-bg);
    color: var(--status-danger);
    border: 1px solid var(--status-danger);
}

.alert-info {
    background: var(--status-info-bg);
    color: var(--status-info);
    border: 1px solid var(--status-info);
}

.alert-dismissible {
    position: relative;
    padding-right: 48px;
}

.alert-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 16px 20px;
    min-width: 320px;
    max-width: 420px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   MODALS
   ============================================ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.modal-backdrop.show {
    opacity: 1;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    opacity: 0;
    transition: all var(--transition-base);
}

.modal.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-hover);
}

/* ============================================
   DROPDOWN
   ============================================ */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 6px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item-icon {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* Header dropdown z-index fix */
.header-right .dropdown {
    position: relative;
    z-index: 200;
}

.header-right .dropdown-menu {
    z-index: 201;
    right: 0;
    left: auto;
}

/* ============================================
   TABS
   ============================================ */

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-item {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

/* ============================================
   PROGRESS & LOADING
   ============================================ */

.progress {
    height: 8px;
    background: var(--bg-hover);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 4px;
    transition: width var(--transition-slow);
}

.progress-bar.success { background: var(--status-success); }
.progress-bar.warning { background: var(--status-warning); }
.progress-bar.danger { background: var(--status-danger); }

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

body.dark-mode .loading-overlay {
    background: rgba(10, 10, 15, 0.9);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-active) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   UPTIME SPECIFIC COMPONENTS
   ============================================ */

/* Uptime Bar */
.uptime-bar {
    display: flex;
    gap: 2px;
    height: 32px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.uptime-bar-segment {
    flex: 1;
    min-width: 4px;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.uptime-bar-segment:hover {
    transform: scaleY(1.1);
}

.uptime-bar-segment.up { background: var(--status-success); }
.uptime-bar-segment.down { background: var(--status-danger); }
.uptime-bar-segment.degraded { background: var(--status-warning); }
.uptime-bar-segment.unknown { background: var(--bg-hover); }

/* Response Time Chart */
.response-chart {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 8px 0;
}

.response-chart-bar {
    flex: 1;
    min-width: 3px;
    background: var(--brand-primary);
    border-radius: 2px 2px 0 0;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.response-chart-bar:hover {
    background: var(--brand-primary-hover);
}

/* Site Status Card */
.site-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-base);
    position: relative;
    pointer-events: auto;
}

.site-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
}

.site-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.site-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Site card dropdown specific styles */
.site-card-dropdown {
    position: relative;
    z-index: 10;
}

.site-card-dropdown .dropdown-menu {
    z-index: 100;
    pointer-events: auto;
}

.site-card-dropdown.open .dropdown-menu {
    pointer-events: auto;
}

.site-dropdown-btn {
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 11;
}

.site-card-url {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 4px;
    pointer-events: auto;
    cursor: pointer;
}

.site-card a,
.site-card button {
    pointer-events: auto;
    cursor: pointer;
}

.site-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.site-card-stat {
    text-align: center;
}

.site-card-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.site-card-stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--text-tertiary);
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 24px;
}



/* ============================================
   UTILITIES
   ============================================ */

/* Text */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-tertiary { color: var(--text-tertiary) !important; }
.text-success { color: var(--status-success) !important; }
.text-warning { color: var(--status-warning) !important; }
.text-danger { color: var(--status-danger) !important; }
.text-info { color: var(--status-info) !important; }
.text-brand { color: var(--brand-primary) !important; }

.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Spacing */
.m-0 { margin: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }

/* Flexbox */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.flex-1 { flex: 1; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Border */
.border { border: 1px solid var(--border-color); }
.border-t { border-top: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

/* Background */
.bg-card { background: var(--bg-card); }
.bg-hover { background: var(--bg-hover); }
.bg-success { background: var(--status-success-bg); }
.bg-warning { background: var(--status-warning-bg); }
.bg-danger { background: var(--status-danger-bg); }

/* Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-Index */
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

/* Transitions */
.transition { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Responsive Table Container */
.responsive-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.responsive-table-container .table {
    min-width: 700px;
    margin-bottom: 0;
}

.responsive-table-container .table-wrapper {
    border: none;
    border-radius: 0;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .footer {
        margin-left: 0 !important;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
    
    /* Header adjustments - KEEP ALL BUTTONS VISIBLE */
    .top-header {
        padding: 10px 12px;
        height: auto;
        min-height: var(--header-height);
    }
    
    .header-left {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
    
    .header-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Header right - Language and Theme buttons ALWAYS visible */
    .header-right {
        gap: 4px;
        flex-shrink: 0;
    }
    
    .header-right .btn-icon {
        width: 34px;
        height: 34px;
        padding: 0;
    }
    
    .header-right .dropdown {
        position: relative;
    }
    
    .header-right .dropdown-menu {
        position: absolute;
        right: 0;
        left: auto;
        min-width: 140px;
        top: 100%;
        margin-top: 4px;
    }
    
    /* Page content */
    .page-content {
        padding: 12px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Grid - 2 columns on mobile for stat cards */
    .grid-cols-4,
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .md\:grid-cols-2,
    .md\:grid-cols-3,
    .md\:grid-cols-4,
    .lg\:grid-cols-2,
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    /* Stat cards - Compact for mobile */
    .stat-card {
        padding: 12px;
        min-width: 0 !important;
    }
    
    .stat-card-header {
        margin-bottom: 8px;
    }
    
    .stat-card-icon {
        width: 32px;
        height: 32px;
    }
    
    .stat-card-icon i,
    .stat-card-icon svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .stat-card-label {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .stat-card-value {
        font-size: 18px;
    }
    
    .stat-card-change {
        font-size: 10px;
        margin-top: 4px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 12px;
        border-radius: var(--radius-md);
    }
    
    .card-header {
        padding: 12px 16px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .card-title {
        font-size: 13px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    /* Tables - Responsive with hidden columns */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        border-radius: var(--radius-lg);
    }
    
    .table {
        width: 100%;
    }
    
    .table thead th,
    .table tbody td {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    /* Hide columns marked as hide-mobile */
    .hide-mobile {
        display: none !important;
    }
    
    /* Sites list - Horizontal scroll */
    .sites-list-header {
        display: none !important;
    }
    
    .site-list-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    
    .site-list-item > div {
        width: 100% !important;
        min-width: 0 !important;
        text-align: left !important;
    }
    
    .site-list-item > div:last-child {
        justify-content: flex-start !important;
    }
    
    /* Card body scroll for tables */
    .card > .card-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .btn-icon {
        width: 32px;
        height: 32px;
    }
    
    /* Forms */
    .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    /* Flex utilities - Don't break header */
    .page-content .flex {
        flex-wrap: wrap;
    }
    
    .page-content .justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    /* Modal */
    .modal {
        max-width: calc(100% - 24px);
        margin: 12px;
        max-height: calc(100vh - 24px);
    }
    
    /* Toast */
    .toast-container {
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 12px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        padding: 12px 16px;
    }
    
    /* Footer */
    .footer {
        margin-left: 0 !important;
        padding: 16px 12px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    /* Text sizes */
    .text-sm {
        font-size: 11px;
    }
    
    .text-2xl {
        font-size: 18px;
    }
    
    .text-xl {
        font-size: 16px;
    }
    
    /* Charts - ALWAYS VISIBLE */
    .chart-container {
        position: relative;
        width: 100%;
        height: 220px !important;
        min-height: 200px;
        overflow: visible;
    }
    
    .chart-container canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }
    
    /* Response time chart */
    .response-chart {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Uptime bar */
    .uptime-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Alert boxes */
    .alert {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .alert-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
    
    /* Badge */
    .badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* Status dot */
    .status-dot {
        width: 10px;
        height: 10px;
    }
    
    /* Quick stats bar in sites index */
    .quick-stats-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    /* Filter buttons - Horizontal scroll */
    .filter-buttons-container {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 8px;
        width: 100%;
    }
    
    .filter-btn {
        font-size: 11px !important;
        padding: 6px 10px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Search input */
    #siteSearch {
        width: 100% !important;
        max-width: none !important;
    }
    
    /* DataTables mobile */
    .dataTables_wrapper {
        overflow-x: auto;
    }
    
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100%;
        text-align: left !important;
        float: none !important;
        padding: 0 12px;
        margin-bottom: 12px !important;
        margin-top: 12px !important;
    }
    
    .dataTables_wrapper .dataTables_filter label {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-top: 4px;
    }
    
    .dataTables_wrapper .dataTables_length select {
        margin: 0 8px;
    }
    
    /* Pagination */
    .dataTables_wrapper .dataTables_paginate {
        margin-top: 12px;
        text-align: center;
        padding: 12px;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .dataTables_wrapper .dataTables_info {
        text-align: center;
        font-size: 11px;
        padding: 12px;
    }
    
    /* Site detail page - Info grid */
    .site-info-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Breadcrumb */
    nav.mb-4 {
        font-size: 11px;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Quick actions bar */
    .quick-actions-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    /* Single column for very small screens */
    .grid-cols-4,
    .grid-cols-2,
    .lg\:grid-cols-4,
    .md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-card-value {
        font-size: 22px;
    }
    
    .header-title {
        font-size: 13px;
        max-width: 100px;
    }
    
    .chart-container {
        height: 180px !important;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   DATATABLE OVERRIDES
   ============================================ */

.dataTables_wrapper {
    font-size: 14px;
    width: 100%;
}

/* Responsive table wrapper */
.responsive-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 20px;
    margin-top: 8px;
    padding: 0 20px;
}

.dataTables_wrapper .dataTables_length {
    float: left;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    margin: 0 4px;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 200px;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.dataTables_wrapper .dataTables_info {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 16px;
    clear: both;
}

.dataTables_wrapper .dataTables_paginate {
    padding: 16px;
    text-align: right;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 8px 14px;
    margin: 0 2px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary) !important;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Clear floats after datatable controls */
.dataTables_wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* ============================================
   CHART.JS OVERRIDES
   ============================================ */

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .sidebar,
    .top-header,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page-content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-fadeInUp { animation: fadeInUp 0.3s ease; }
.animate-fadeInDown { animation: fadeInDown 0.3s ease; }

/* Stagger animation for lists */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }

