/**
 * TGES GPS Tracking System - Complete Responsive CSS
 * Color: #2b2a29 (Dark) + #a82682 (Magenta)
 */

:root {
    --primary: #a82682;
    --primary-light: #fdf2f9;
    --primary-dark: #831d64;
    --dark: #2b2a29;
    --dark-light: #3d3d3d;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --bg-body: #f5f5f7;
    --bg-card: #fff;
    --text-primary: #2b2a29;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 60px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    font-size: 14px; 
    line-height: 1.6; 
    color: var(--text-primary); 
    background: var(--bg-body);
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }
table { border-collapse: collapse; width: 100%; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* Code element */
code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: var(--primary);
}

/* ==================== LAYOUT ==================== */
.app-container { 
    display: flex; 
    min-height: 100vh; 
    position: relative;
}

.main-content { 
    flex: 1; 
    margin-left: var(--sidebar-width); 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin var(--transition); 
}

.content-area { 
    flex: 1;
    max-width: 1600px; 
    width: 100%;
    margin: 0 auto; 
    padding: 24px;
}

/* ==================== SIDEBAR ==================== */
.sidebar { 
    position: fixed; 
    left: 0; 
    top: 0; 
    bottom: 0; 
    width: var(--sidebar-width); 
    background: var(--dark); 
    color: #fff; 
    display: flex; 
    flex-direction: column; 
    transition: all var(--transition); 
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header { 
    padding: 16px 20px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 72px;
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.logo-icon { 
    width: 42px; 
    height: 42px; 
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
    border-radius: var(--radius); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(168,38,130,0.3);
}

.logo-text { 
    display: flex; 
    flex-direction: column; 
    line-height: 1.3;
    overflow: hidden;
}

.logo-text span:first-child { 
    font-weight: 700; 
    font-size: 16px;
    white-space: nowrap;
}

.logo-text span:last-child { 
    font-size: 11px; 
    opacity: 0.6;
    white-space: nowrap;
}

.sidebar-toggle { 
    width: 36px; 
    height: 36px; 
    border-radius: var(--radius); 
    color: #fff; 
    opacity: 0.7; 
    transition: all var(--transition); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-toggle:hover { 
    opacity: 1; 
    background: rgba(255,255,255,0.1); 
}

/* Sidebar Navigation */
.sidebar-nav { 
    flex: 1; 
    overflow-y: auto; 
    overflow-x: hidden;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.nav-section { 
    margin-bottom: 8px; 
}

.nav-section-title { 
    padding: 10px 24px 8px; 
    font-size: 10px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    opacity: 0.4; 
    font-weight: 600;
    white-space: nowrap;
}

.nav-item { 
    display: flex; 
    align-items: center; 
    gap: 14px; 
    padding: 11px 24px; 
    color: rgba(255,255,255,0.7); 
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
    transition: height var(--transition);
}

.nav-item:hover { 
    color: #fff; 
    background: rgba(255,255,255,0.05);
}

.nav-item.active { 
    color: #fff; 
    background: linear-gradient(90deg, rgba(168,38,130,0.2), transparent);
}

.nav-item.active::before {
    height: 24px;
}

.nav-item i { 
    width: 20px; 
    text-align: center; 
    font-size: 15px;
    flex-shrink: 0;
}

.nav-item span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Footer */
.sidebar-footer { 
    padding: 16px 20px; 
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.1);
}

.user-info { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.user-avatar { 
    width: 40px; 
    height: 40px; 
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.user-details { 
    display: flex; 
    flex-direction: column;
    overflow: hidden;
}

.user-name { 
    font-weight: 600; 
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role { 
    font-size: 11px; 
    opacity: 0.5;
    white-space: nowrap;
}

/* Sidebar Collapsed State */
body.sidebar-collapsed .main-content { 
    margin-left: var(--sidebar-collapsed); 
}

body.sidebar-collapsed .sidebar { 
    width: var(--sidebar-collapsed); 
}

body.sidebar-collapsed .logo-text,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .user-details { 
    display: none; 
}

body.sidebar-collapsed .nav-item { 
    justify-content: center; 
    padding: 14px 0;
}

body.sidebar-collapsed .nav-item::before {
    display: none;
}

body.sidebar-collapsed .logo { 
    justify-content: center; 
}

body.sidebar-collapsed .user-info { 
    justify-content: center; 
}

body.sidebar-collapsed .sidebar-header {
    padding: 16px 12px;
    justify-content: center;
}

body.sidebar-collapsed .sidebar-toggle {
    display: none;
}

/* ==================== TOPBAR ==================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--gray-100);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition);
}

.mobile-toggle:hover {
    background: var(--gray-200);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
    position: relative;
}

.topbar-btn:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.topbar-btn .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    pointer-events: none;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ==================== PAGE HEADER ==================== */
.page-header { 
    margin-bottom: 24px;
}

.page-header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header h1 { 
    font-size: 26px; 
    font-weight: 700; 
    color: var(--text-primary); 
    display: flex; 
    align-items: center; 
    gap: 12px;
    line-height: 1.3;
}

.page-header h1 i { 
    color: var(--primary); 
}

.page-header p { 
    color: var(--text-muted); 
    margin-top: 4px;
    font-size: 14px;
}

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

/* ==================== CARDS ==================== */
.card, .dashboard-card { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header, .dashboard-card-header { 
    padding: 16px 20px; 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    background: var(--gray-100);
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h3, .dashboard-card-header h3 { 
    font-size: 15px; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 10px;
    color: var(--text-primary);
}

.card-header h3 i { 
    color: var(--primary);
    font-size: 16px;
}

.card-body, .dashboard-card-body { 
    padding: 20px; 
}

/* ==================== STAT CARDS ==================== */
.stat-card { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    padding: 20px; 
    box-shadow: var(--shadow); 
    display: flex; 
    align-items: flex-start; 
    gap: 16px;
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

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

.stat-card .stat-icon { 
    width: 52px; 
    height: 52px; 
    border-radius: var(--radius-lg); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card .stat-icon.primary, .stat-card .stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-card .stat-icon.success, .stat-card .stat-icon.green { background: #ecfdf5; color: var(--success); }
.stat-card .stat-icon.warning, .stat-card .stat-icon.orange { background: #fff7ed; color: var(--warning); }
.stat-card .stat-icon.danger, .stat-card .stat-icon.red { background: #fef2f2; color: var(--danger); }
.stat-card .stat-icon.info { background: #ecfeff; color: var(--info); }
.stat-card .stat-icon.yellow { background: #fefce8; color: #ca8a04; }

.stat-card .stat-content { 
    flex: 1;
    min-width: 0;
}

.stat-card .stat-value { 
    font-size: 32px; 
    font-weight: 700; 
    color: var(--text-primary); 
    line-height: 1.1;
}

.stat-card .stat-label { 
    font-size: 13px; 
    color: var(--text-muted); 
    margin-top: 4px;
}

.stat-card .stat-breakdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    width: 100%;
}

.stat-card .breakdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.stat-card .breakdown-item i {
    width: 16px;
    color: var(--primary);
}

.stat-card .breakdown-item strong {
    margin-left: auto;
    color: var(--text-primary);
}

/* ==================== GRIDS ==================== */
.stats-grid,
.stats-grid-4 { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
    margin-bottom: 24px; 
}

.grid { 
    display: grid; 
    gap: 20px; 
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.rankings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* Row/Column Grid (Bootstrap-like) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col {
    padding: 0 10px;
    flex: 1;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Stat card alternate styles */
.stat-card .stat-info {
    display: flex;
    flex-direction: column;
}

/* Card title */
.card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* Search box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    min-width: 200px;
    background: #fff;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168,38,130,0.1);
}

/* ==================== BUTTONS ==================== */
.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    padding: 10px 18px; 
    border-radius: var(--radius); 
    font-weight: 500; 
    font-size: 14px; 
    transition: all var(--transition);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn-primary { 
    background: var(--primary); 
    color: #fff;
    box-shadow: 0 2px 8px rgba(168,38,130,0.3);
}

.btn-primary:hover { 
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168,38,130,0.4);
}

.btn-secondary { 
    background: var(--gray-100); 
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover { 
    background: var(--gray-200); 
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

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

.btn-lg { 
    padding: 14px 28px; 
    font-size: 15px; 
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

/* Action buttons group */
.action-buttons {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.action-buttons .btn {
    background: var(--gray-100);
    border: 1px solid var(--border);
}

.action-buttons .btn:hover {
    background: var(--gray-200);
}

.action-buttons .btn.text-danger:hover {
    background: #fef2f2;
    border-color: var(--danger);
}

/* ==================== FORMS ==================== */
.form-group { 
    margin-bottom: 20px; 
}

.form-label { 
    display: block; 
    font-weight: 500; 
    margin-bottom: 8px; 
    color: var(--text-primary);
    font-size: 13px;
}

.form-input, .form-select, .form-control { 
    width: 100%; 
    padding: 10px 14px; 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    font-size: 14px; 
    transition: all var(--transition); 
    background: #fff;
    color: var(--text-primary);
}

.form-input:focus, .form-select:focus, .form-control:focus { 
    outline: none; 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(168,38,130,0.1); 
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-hint { 
    font-size: 12px; 
    color: var(--text-muted); 
    margin-top: 6px; 
}

.form-row { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 16px; 
}

/* ==================== TABLES ==================== */
.table-container { 
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.data-table { 
    width: 100%;
    min-width: 600px;
}

.data-table th, .data-table td { 
    padding: 14px 16px; 
    text-align: left; 
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table th { 
    background: var(--gray-100); 
    font-weight: 600; 
    font-size: 12px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    color: var(--text-secondary);
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover { 
    background: var(--gray-100); 
}

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

/* ==================== BADGES ==================== */
.badge { 
    display: inline-flex; 
    align-items: center; 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 12px; 
    font-weight: 500;
    white-space: nowrap;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #ecfdf5; color: var(--success); }
.badge-warning { background: #fffbeb; color: var(--warning); }
.badge-danger { background: #fef2f2; color: var(--danger); }
.badge-info { background: #ecfeff; color: var(--info); }

/* Status Badges */
.status-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 5px 12px; 
    border-radius: 20px; 
    font-size: 12px; 
    font-weight: 500;
}

.status-badge::before { 
    content: ''; 
    width: 7px; 
    height: 7px; 
    border-radius: 50%;
    flex-shrink: 0;
}

.status-badge.online { background: #ecfdf5; color: #059669; }
.status-badge.online::before { background: #10b981; }
.status-badge.offline { background: var(--gray-100); color: var(--gray-500); }
.status-badge.offline::before { background: var(--gray-400); }
.status-badge.moving { background: #dbeafe; color: #2563eb; }
.status-badge.moving::before { background: #3b82f6; }
.status-badge.idle { background: #fffbeb; color: #d97706; }
.status-badge.idle::before { background: #f59e0b; }

/* ==================== ALERTS ==================== */
.alert { 
    padding: 14px 18px; 
    border-radius: var(--radius); 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 16px;
    font-size: 14px;
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #ecfeff; color: #155e75; border: 1px solid #a5f3fc; }

/* Demo Mode Alert - Special styling */
.alert-demo {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1;
    border: 1px solid #7dd3fc;
    border-left: 4px solid #0ea5e9;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
}

.alert-demo i {
    color: #0ea5e9;
}

.alert-demo strong {
    color: #0c4a6e;
}

/* ==================== TABS ==================== */
.tabs { 
    display: flex; 
    gap: 4px; 
    border-bottom: 2px solid var(--border); 
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-item { 
    padding: 12px 20px; 
    font-weight: 500; 
    color: var(--text-muted); 
    border-bottom: 2px solid transparent; 
    margin-bottom: -2px; 
    cursor: pointer; 
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-item:hover { 
    color: var(--text-primary); 
}

.tab-item.active { 
    color: var(--primary); 
    border-bottom-color: var(--primary); 
}

.tab-content { 
    display: none; 
}

.tab-content.active { 
    display: block; 
}

/* ==================== MODAL ==================== */
.modal { 
    position: fixed; 
    inset: 0; 
    z-index: 2000; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    padding: 20px;
}

.modal.active { 
    display: flex; 
}

.modal-overlay { 
    position: absolute; 
    inset: 0; 
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content { 
    position: relative; 
    background: var(--bg-card); 
    border-radius: var(--radius-xl); 
    width: 100%; 
    max-width: 520px; 
    max-height: 90vh; 
    overflow: auto; 
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header { 
    padding: 20px 24px; 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.modal-header h3 { 
    font-size: 18px; 
    font-weight: 600; 
}

.modal-close { 
    width: 36px; 
    height: 36px; 
    border-radius: var(--radius); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--text-muted);
    transition: all var(--transition);
}

.modal-close:hover { 
    background: var(--gray-100);
    color: var(--text-primary);
}

.modal-body { 
    padding: 24px; 
}

.modal-footer { 
    padding: 16px 24px; 
    border-top: 1px solid var(--border); 
    display: flex; 
    justify-content: flex-end; 
    gap: 12px;
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
}

/* ==================== EMPTY STATE ==================== */
.empty-state { 
    text-align: center; 
    padding: 60px 20px; 
    color: var(--text-muted); 
}

.empty-state i { 
    font-size: 56px; 
    margin-bottom: 20px; 
    opacity: 0.25;
    color: var(--gray-400);
}

.empty-state h3 { 
    font-size: 18px; 
    color: var(--text-primary); 
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-state p {
    max-width: 320px;
    margin: 0 auto;
}

/* ==================== LOADING ==================== */
.loading { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 60px 20px;
    flex-direction: column;
    gap: 16px;
}

.spinner { 
    width: 40px; 
    height: 40px; 
    border: 3px solid var(--gray-200); 
    border-top-color: var(--primary); 
    border-radius: 50%; 
    animation: spin 0.8s linear infinite; 
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

/* ==================== MONITORING LAYOUT ==================== */
.monitoring-layout { 
    display: grid; 
    grid-template-columns: 340px 1fr; 
    gap: 20px; 
    height: calc(100vh - 180px);
    min-height: 500px;
}

.device-panel { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
    border: 1px solid var(--border);
}

.device-panel-header,
.panel-header { 
    padding: 16px 20px; 
    border-bottom: 1px solid var(--border);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.device-panel-header h3,
.panel-header h3 { 
    font-size: 15px; 
    font-weight: 600; 
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-search,
.panel-search { 
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.device-search input,
.panel-search input { 
    width: 100%; 
    padding: 10px 14px; 
    border: 1px solid var(--border); 
    border-radius: var(--radius);
    background: #fff;
    font-size: 14px;
}

.device-search input:focus,
.panel-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168,38,130,0.1);
}

.device-search i { 
    position: absolute; 
    left: 14px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--text-muted); 
}

.device-list { 
    flex: 1; 
    overflow-y: auto; 
}

.device-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 14px 20px; 
    border-bottom: 1px solid var(--border); 
    cursor: pointer; 
    transition: all var(--transition); 
}

.device-item:hover, .device-item.active { 
    background: var(--gray-100); 
}

.device-item.active {
    border-left: 3px solid var(--primary);
}

.device-item .device-icon { 
    width: 44px; 
    height: 44px; 
    background: var(--gray-100); 
    border-radius: var(--radius); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--text-muted);
    font-size: 18px;
    flex-shrink: 0;
}

.device-item.online .device-icon { 
    background: #ecfdf5; 
    color: var(--success); 
}

.device-item .device-info { 
    flex: 1; 
    min-width: 0; 
}

.device-item .device-name { 
    font-weight: 500; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.device-item .device-meta { 
    font-size: 12px; 
    color: var(--text-muted); 
}

.device-item .device-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-left: auto;
}

.device-item .device-speed {
    font-size: 12px;
    color: var(--text-muted);
}

.device-item .device-id {
    font-size: 12px;
    color: var(--text-muted);
}

/* Clickable stat cards */
.stat-card.clickable {
    cursor: pointer;
    transition: all var(--transition);
}

.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168,38,130,0.1);
}

.map-panel { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow); 
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.map-controls {
    display: flex;
    gap: 8px;
}

.map-container {
    flex: 1;
    min-height: 400px;
    position: relative;
}

#map { 
    width: 100%; 
    height: 100%; 
    min-height: 400px;
}

/* ==================== SETTINGS LAYOUT ==================== */
.settings-layout { 
    display: grid; 
    grid-template-columns: 240px 1fr; 
    gap: 24px; 
}

.settings-nav { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    padding: 16px; 
    box-shadow: var(--shadow); 
    height: fit-content; 
    position: sticky; 
    top: 24px;
    border: 1px solid var(--border);
}

.settings-nav-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 12px 16px; 
    border-radius: var(--radius); 
    color: var(--text-muted); 
    transition: all var(--transition); 
    margin-bottom: 4px;
    font-weight: 500;
}

.settings-nav-item:hover { 
    background: var(--gray-100); 
    color: var(--text-primary); 
}

.settings-nav-item.active { 
    background: var(--primary); 
    color: #fff; 
}

.settings-nav-item i { 
    width: 20px;
    text-align: center;
}

.settings-content { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    padding: 28px; 
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.settings-section { 
    display: none; 
}

.settings-section.active { 
    display: block; 
}

.settings-section-header { 
    margin-bottom: 28px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid var(--border); 
}

.settings-section-title { 
    font-size: 20px; 
    font-weight: 600; 
    margin-bottom: 6px; 
}

.settings-section-desc { 
    color: var(--text-muted); 
}

.settings-row { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    margin-bottom: 20px; 
}

.settings-row.single { 
    grid-template-columns: 1fr; 
    max-width: 400px; 
}

.settings-actions { 
    display: flex; 
    gap: 12px; 
    margin-top: 28px; 
    padding-top: 24px; 
    border-top: 1px solid var(--border); 
}

/* Logo Upload */
.logo-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.logo-upload input[type="file"] {
    display: none;
}

.logo-preview {
    width: 100%;
    max-width: 200px;
    height: 100px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    background: var(--gray-100);
    overflow: hidden;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-preview i {
    font-size: 24px;
}

.logo-preview span {
    font-size: 12px;
}

/* ==================== DASHBOARD SPECIFIC ==================== */
.section-header {
    margin-bottom: 16px;
    margin-top: 8px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--primary);
    font-size: 18px;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: auto;
}

/* Event Cards */
.event-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.event-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.event-card.adas::before { background: var(--info); }
.event-card.dms::before { background: var(--warning); }
.event-card.general::before { background: var(--danger); }

.event-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.event-card.adas .event-icon { background: #ecfeff; color: var(--info); }
.event-card.dms .event-icon { background: #fffbeb; color: var(--warning); }
.event-card.general .event-icon { background: #fef2f2; color: var(--danger); }

.event-content {
    flex: 1;
}

.event-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.event-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.event-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 500;
    font-size: 13px;
    transition: all var(--transition);
}

.event-link:hover {
    gap: 12px;
}

/* Device Type Chart */
.device-type-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.type-item {
    display: flex;
    align-items: center;
}

.type-bar {
    flex: 1;
    height: 36px;
    background: linear-gradient(90deg, var(--primary-light) var(--percentage, 0%), var(--gray-100) var(--percentage, 0%));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    font-size: 13px;
}

.type-name {
    font-weight: 500;
}

.type-count {
    font-weight: 600;
    color: var(--primary);
}

/* Map Placeholder */
.map-placeholder {
    height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius);
    color: var(--text-muted);
}

.map-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.map-placeholder p {
    margin-bottom: 16px;
}

/* Ranking List */
.ranking-list {
    display: flex;
    flex-direction: column;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item .rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.ranking-item .rank.top {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.ranking-item .name {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-item .value {
    font-weight: 600;
    color: var(--primary);
    font-size: 13px;
}

/* Trend Chart */
.trend-chart-placeholder {
    height: 280px;
    position: relative;
}

.trend-chart-placeholder canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Status Indicators */
.status-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.indicator-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.indicator-dot.es { background: var(--success); }
.indicator-dot.ain1 { background: var(--info); }
.indicator-dot.ain2 { background: var(--warning); }
.indicator-dot.din1h { background: var(--danger); }
.indicator-dot.din1l { background: var(--gray-400); }
.indicator-dot.vcc { background: var(--primary); }

.indicator-item.channel {
    background: var(--dark);
    color: #fff;
    min-width: 36px;
    justify-content: center;
}

/* Full Width Card */
.dashboard-card.full-width {
    grid-column: 1 / -1;
}

/* ==================== MOBILE OVERLAY ==================== */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    backdrop-filter: blur(4px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== UTILITIES ==================== */
.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { 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: 24px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.text-info { color: var(--info); }

/* Font Awesome size helpers */
.fa-2x { font-size: 2em; }
.fa-3x { font-size: 3em; }
.fa-lg { font-size: 1.33em; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-xs { font-size: 11px; }
.fs-sm { font-size: 12px; }
.fs-md { font-size: 14px; }
.fs-lg { font-size: 16px; }
.fs-xl { font-size: 18px; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.border { border: 1px solid var(--border); }
.border-top { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }

/* ==================== RESPONSIVE - LARGE SCREENS ==================== */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== RESPONSIVE - TABLETS ==================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }
    
    .monitoring-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .device-panel {
        max-height: 350px;
    }
    
    .settings-layout {
        grid-template-columns: 1fr;
    }
    
    .settings-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        position: static;
        padding: 12px;
    }
    
    .settings-nav-item {
        flex: 1 1 auto;
        min-width: 120px;
        justify-content: center;
        margin: 0;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .rankings-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    /* Row columns responsive */
    .col-4, .col-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
        min-width: auto;
    }
}

/* ==================== RESPONSIVE - MOBILE ==================== */
@media (max-width: 768px) {
    :root {
        --topbar-height: 56px;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .topbar {
        padding: 0 16px;
    }
    
    .page-title {
        font-size: 16px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .page-header p {
        font-size: 13px;
    }
    
    .stats-grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card .stat-value {
        font-size: 28px;
    }
    
    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .stat-card .stat-breakdown {
        grid-template-columns: 1fr 1fr;
    }
    
    .event-card {
        padding: 16px;
        flex-wrap: wrap;
    }
    
    .event-value {
        font-size: 28px;
    }
    
    .event-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .event-link {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    
    .form-row,
    .settings-row {
        grid-template-columns: 1fr;
    }
    
    .card-body,
    .dashboard-card-body,
    .settings-content {
        padding: 16px;
    }
    
    .card-header,
    .dashboard-card-header {
        padding: 14px 16px;
    }
    
    .btn {
        padding: 10px 16px;
    }
    
    .modal-content {
        margin: 12px;
        max-height: calc(100vh - 24px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .tabs {
        margin-bottom: 16px;
    }
    
    .tab-item {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .section-header h2 {
        font-size: 15px;
    }
    
    .section-subtitle {
        display: none;
    }
    
    .map-placeholder {
        height: 200px;
    }
    
    .trend-chart-placeholder {
        height: 220px;
    }
    
    .status-indicators {
        padding: 14px;
        gap: 8px;
    }
    
    .indicator-item {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .ranking-item {
        padding: 10px 0;
    }
    
    .ranking-item .rank {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .device-panel {
        max-height: 280px;
    }
    
    .device-item {
        padding: 12px 16px;
    }
    
    .device-item .device-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .topbar-right {
        gap: 4px;
    }
    
    .topbar-btn {
        width: 36px;
        height: 36px;
    }
    
    .tooltip::after {
        display: none;
    }
}

/* ==================== RESPONSIVE - SMALL MOBILE ==================== */
@media (max-width: 480px) {
    .content-area {
        padding: 12px;
    }
    
    .topbar {
        padding: 0 12px;
    }
    
    .page-header {
        margin-bottom: 16px;
    }
    
    .page-header h1 {
        font-size: 18px;
    }
    
    .page-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-actions {
        width: 100%;
    }
    
    .page-actions .btn {
        flex: 1;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-card .stat-icon {
        margin: 0 auto;
    }
    
    .stat-card .stat-breakdown {
        justify-content: center;
    }
    
    /* Row columns small mobile */
    .row {
        margin: 0 -8px;
    }
    
    .col {
        padding: 0 8px;
    }
    
    .col-4, .col-3, .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 12px;
    }
    
    .event-card {
        flex-direction: column;
        text-align: center;
    }
    
    .event-icon {
        margin: 0 auto;
    }
    
    .card-header h3,
    .dashboard-card-header h3 {
        font-size: 14px;
    }
    
    .settings-nav-item {
        min-width: 100px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .settings-nav-item i {
        display: none;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .status-badge {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .badge {
        padding: 3px 8px;
        font-size: 11px;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .sidebar,
    .topbar,
    .mobile-toggle,
    .mobile-overlay,
    .page-actions {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-area {
        padding: 0;
        max-width: none;
    }
    
    .card,
    .dashboard-card,
    .stat-card,
    .event-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease;
}

.animate-slideUp {
    animation: slideInUp 0.4s ease;
}

.animate-slideLeft {
    animation: slideInLeft 0.4s ease;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
}

/* ==================== SELECTION ==================== */
::selection {
    background: var(--primary);
    color: #fff;
}

::-moz-selection {
    background: var(--primary);
    color: #fff;
}

/* ==================== FOCUS VISIBLE ==================== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-notification {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
}

/* ==================== LOADING STATES ==================== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn.loading {
    opacity: 0.7;
}

.btn .spinner {
    margin-left: 8px;
}

/* ==================== FIELD ERRORS ==================== */
.field-error {
    display: block;
    margin-top: 4px;
    font-size: 0.875rem;
}

.is-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25) !important;
}

.is-invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25);
}

/* ==================== ALERT STYLES ==================== */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    position: relative;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #7f1d1d;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #713f12;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1e3a8a;
    border-left: 4px solid #3b82f6;
}

/* ==================== SPINNER ==================== */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 2px solid;
    border-radius: 50%;
    border-color: currentColor;
    border-right-color: transparent;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.spinner-border-sm {
    width: 0.75rem;
    height: 0.75rem;
    border-width: 1px;
}

/* ==================== UTILITY CLASSES ==================== */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

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

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

/* ==================== RESPONSIVE TOASTS ==================== */
@media (max-width: 768px) {
    .toast-notification {
        min-width: 280px;
        max-width: 95vw;
        right: 10px;
        left: 10px;
        margin: 0 auto;
    }
}

/* ==================== ANIMATION CLASSES ==================== */
.animate-fadeIn {
    animation: fadeIn 0.3s ease forwards;
}

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

.animate-slideInUp {
    animation: slideInUp 0.3s ease forwards;
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* ==================== STATUS INDICATORS ==================== */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online { background-color: var(--success); }
.status-offline { background-color: var(--danger); }
.status-warning { background-color: var(--warning); }
.status-moving { background-color: var(--info); }
.status-stopped { background-color: var(--warning); }

/* ==================== BADGE STYLES ==================== */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge:empty {
    display: none;
}

.badge-success { background-color: var(--success); color: white; }
.badge-danger { background-color: var(--danger); color: white; }
.badge-warning { background-color: var(--warning); color: white; }
.badge-info { background-color: var(--info); color: white; }
.badge-secondary { background-color: var(--gray-500); color: white; }

/* ==================== PROGRESS BAR ==================== */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: var(--gray-200);
    border-radius: var(--radius);
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: var(--primary);
    transition: width 0.6s ease;
}

/* ==================== CARD ENHANCEMENTS ==================== */
.card {
    transition: box-shadow 0.2s ease;
}

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

.card-header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    background-color: var(--gray-100);
}

.card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

/* ==================== FORM ENHANCEMENTS ==================== */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(168, 38, 130, 0.25);
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(168, 38, 130, 0.25);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--gray-500);
    border-color: var(--gray-500);
}

.btn-secondary:hover {
    background-color: var(--gray-600);
    border-color: var(--gray-600);
}

/* ==================== MODAL ENHANCEMENTS ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    overflow: hidden;
    outline: 0;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal-content {
    position: relative;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1055;
    margin: 1.75rem auto;
    max-width: 500px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-body {
    position: relative;
    padding: 1rem 1.25rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    cursor: pointer;
}

.modal-close:hover {
    opacity: 0.75;
}

/* ==================== TABLE ENHANCEMENTS ==================== */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-primary);
    vertical-align: top;
    border-color: var(--border);
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--border);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--border);
    background-color: var(--gray-100);
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ==================== SEARCH BOX ==================== */
.search-box {
    position: relative;
    display: inline-block;
}

.search-box input {
    padding-left: 2.5rem;
    padding-right: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s ease-in-out;
}

.search-box input:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(168, 38, 130, 0.25);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

/* ==================== DASHBOARD ENHANCEMENTS ==================== */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
}

/* ==================== RANKING LIST ==================== */
.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item .rank {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--gray-200);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1rem;
}

.ranking-item .rank.top {
    background-color: var(--warning);
    color: white;
}

.ranking-item .name {
    flex: 1;
    font-weight: 500;
}

.ranking-item .value {
    font-weight: 600;
    color: var(--primary);
}

/* ==================== EVENT CARDS ==================== */
.event-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: all 0.2s ease;
    border-left: 4px solid;
}

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

.event-card.adas {
    border-left-color: var(--danger);
}

.event-card.dms {
    border-left-color: var(--warning);
}

.event-card.general {
    border-left-color: var(--info);
}

.event-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.event-content .event-value {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.event-content .event-label {
    color: var(--text-secondary);
    display: block;
}

.event-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
}

.event-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==================== GRID SYSTEM ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ==================== SECTION HEADER ==================== */
.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-header .section-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ==================== DEVICE TYPE CHART ==================== */
.device-type-chart {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.type-item {
    display: flex;
    align-items: center;
}

.type-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin: 0 1rem;
}

.type-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--percentage, 0%);
    background: var(--primary);
    transition: width 0.5s ease;
}

.type-name {
    font-weight: 500;
    min-width: 80px;
}

.type-count {
    font-weight: 600;
    color: var(--primary);
    min-width: 30px;
    text-align: right;
}

/* ==================== MAP PLACEHOLDER ==================== */
.map-placeholder {
    height: 300px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

.map-placeholder p {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

/* ==================== TREND CHART PLACEHOLDER ==================== */
.trend-chart-placeholder {
    height: 300px;
    background: var(--bg-card);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

/* ==================== STATUS INDICATORS ==================== */
.status-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.indicator-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.indicator-dot.es { background-color: #10b981; }
.indicator-dot.ain1 { background-color: #3b82f6; }
.indicator-dot.ain2 { background-color: #8b5cf6; }
.indicator-dot.din1h { background-color: #f59e0b; }
.indicator-dot.din1l { background-color: #ef4444; }
.indicator-dot.vcc { background-color: #06b6d4; }

.indicator-item.channel {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

/* ==================== BREAKDOWN ITEMS ==================== */
.breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.breakdown-item i {
    width: 16px;
    text-align: center;
}

.breakdown-item strong {
    margin-left: auto;
    color: var(--primary);
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-header p {
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

/* ==================== BUTTON ENHANCEMENTS ==================== */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: var(--radius);
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.2rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    color: #fff;
    background-color: var(--gray-500);
    border-color: var(--gray-500);
}

.btn-secondary:hover {
    color: #fff;
    background-color: var(--gray-600);
    border-color: var(--gray-600);
}

.btn-success {
    color: #fff;
    background-color: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    color: #fff;
    background-color: #059669;
    border-color: #047857;
}

.btn-danger {
    color: #fff;
    background-color: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    color: #fff;
    background-color: #dc2626;
    border-color: #b91c1c;
}

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

.btn-warning:hover {
    color: #000;
    background-color: #d97706;
    border-color: #b45309;
}

.btn-info {
    color: #fff;
    background-color: var(--info);
    border-color: var(--info);
}

.btn-info:hover {
    color: #fff;
    background-color: #0891b2;
    border-color: #0e7490;
}

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

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ==================== UTILITY CLASSES ==================== */
.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.gap-2 { gap: 0.5rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.p-0 { padding: 0 !important; }
.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-end { text-align: end !important; }
.text-start { text-align: start !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-medium { font-weight: 500 !important; }
.small { font-size: 0.875em !important; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-grid,
    .stats-grid,
    .rankings-grid,
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card,
    .event-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .event-content .event-value {
        font-size: 1.5rem;
    }
    
    .page-actions {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .stat-card,
    .event-card {
        padding: 0.75rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .status-indicators {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .indicator-item {
        width: 100%;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #1a1a1a;
        --bg-card: #2d2d2d;
        --text-primary: #e5e5e5;
        --text-secondary: #a3a3a3;
        --text-muted: #737373;
        --border: #404040;
    }
    
    .map-placeholder,
    .trend-chart-placeholder {
        background: var(--bg-card);
        border-color: var(--border);
    }
    
    .table {
        color: var(--text-primary);
        border-color: var(--border);
    }
    
    .table thead th {
        background-color: var(--bg-card);
        border-color: var(--border);
    }
    
    .table th,
    .table td {
        border-color: var(--border);
    }
    
    .form-control,
    .form-select {
        background-color: var(--bg-card);
        border-color: var(--border);
        color: var(--text-primary);
    }
    
    .form-control:focus,
    .form-select:focus {
        background-color: var(--bg-card);
        border-color: var(--primary);
        color: var(--text-primary);
    }
    
    .card {
        background-color: var(--bg-card);
        border-color: var(--border);
    }
    
    .modal-content {
        background-color: var(--bg-card);
        border-color: var(--border);
    }
    
    .modal-header,
    .modal-footer {
        border-color: var(--border);
    }
    
    .alert-success {
        background-color: rgba(16, 185, 129, 0.15);
        color: #6ee7b7;
    }
    
    .alert-danger {
        background-color: rgba(239, 68, 68, 0.15);
        color: #fca5a5;
    }
    
    .alert-warning {
        background-color: rgba(245, 158, 11, 0.15);
        color: #fcd34d;
    }
    
    .alert-info {
        background-color: rgba(59, 130, 246, 0.15);
        color: #93c5fd;
    }
}
