/* =========================================
   FLEET360 - Modern & Responsive
   Tema: Azul Brillante
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-bright: #60a5fa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --blue: #3b82f6;
    
    /* Sidebar moderno - Tema Azul Brillante */
    --sidebar-bg: linear-gradient(180deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    --sidebar-text: rgba(255, 255, 255, 0.9);
    --sidebar-active: rgba(255, 255, 255, 0.15);
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    
    --radius: 8px;
    --radius-sm: 6px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =========================================
   LAYOUT PRINCIPAL
   ========================================= */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: calc(100vw - 260px);
    overflow-x: hidden;
}

.content-area {
    padding: 24px;
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* =========================================
   SIDEBAR MODERNO - AZUL
   ========================================= */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(37, 99, 235, 0.2);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo-text strong {
    display: block;
    color: white;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.sidebar-nav {
    padding: 20px 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 6px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

/* =========================================
   HEADER
   ========================================= */
.top-header {
    background: var(--bg-card);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    max-width: 100%;
    overflow: hidden;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-main);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    color: var(--text-muted);
}

.notification-bell svg {
    width: 20px;
    height: 20px;
}

.notification-bell .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: var(--radius);
}

.user-info {
    text-align: right;
}

.user-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.user-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-bright) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* =========================================
   DASHBOARD
   ========================================= */
.dashboard-wrapper {
    max-width: 100%;
    padding: 0;
}

.dashboard-header {
    margin-bottom: 20px;
}

.dashboard-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-header h1 svg {
    width: 24px;
    height: 24px;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Métricas */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    min-width: 0;
}

.metric-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    overflow: hidden;
}

.metric-box .value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-box .label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Colores para métricas */
.metric-box .value.color-primary { color: var(--primary); }
.metric-box .value.color-success { color: var(--success); }
.metric-box .value.color-warning { color: var(--warning); }
.metric-box .value.color-danger { color: var(--danger); }
.metric-box .value.color-info { color: var(--info); }
.metric-box .value.color-blue { color: var(--blue); }

/* Grid de gráficas */
.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    min-width: 0;
}

.dashboard-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    min-width: 0;
}

.chart-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    overflow: hidden;
}

.chart-box h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-box h3 svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    max-width: 100%;
}

.chart-wrapper canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* Ranking */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.ranking-table thead th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg-body);
    border-bottom: 2px solid var(--border);
}

.ranking-table thead th.center {
    text-align: center;
}

.ranking-table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.ranking-table tbody td.center {
    text-align: center;
}

.progress-bar {
    background: var(--border);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
    width: 120px;
}

.progress-fill {
    height: 100%;
    transition: none;
}

.progress-fill.success { background: var(--success); }
.progress-fill.danger { background: var(--danger); }

/* =========================================
   CARDS GENERALES
   ========================================= */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

/* =========================================
   FORMULARIOS GENERALES
   ========================================= */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* =========================================
   BOTONES
   ========================================= */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-bright) 100%); 
    color: white; 
}
.btn-primary:hover { 
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-secondary { 
    background: var(--bg-body); 
    color: var(--text-main); 
    border: 1px solid var(--border); 
}
.btn-secondary:hover { background: var(--border); }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* =========================================
   TABLAS
   ========================================= */
.table-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    background: var(--bg-body);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

table tbody tr:hover {
    background: var(--bg-body);
}

/* =========================================
   BADGES
   ========================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pendiente { background: #fef3c7; color: #92400e; }
.badge-completado { background: #d1fae5; color: #065f46; }
.badge-crit-1 { background: #fee2e2; color: #991b1b; }
.badge-crit-2 { background: #fef3c7; color: #92400e; }
.badge-crit-3 { background: #d1fae5; color: #065f46; }

/* =========================================
   OVERLAY (móvil)
   ========================================= */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1200px) {
    .metrics-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .dashboard-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid-2,
    .dashboard-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0 !important;
        max-width: 100vw;
    }
    
    .menu-toggle {
        display: block !important;
    }
    
    .content-area {
        padding: 16px !important;
    }
    
    .user-info {
        display: none;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   MODALES
   ========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

.modal-content.modal-large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.modal-close:hover {
    background: var(--bg-body);
    color: var(--text-main);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================
   ALERTAS
   ========================================= */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* =========================================
   DROPDOWN DE NOTIFICACIONES
   ========================================= */
.notif-dropdown {
    position: absolute;
    top: 60px;
    right: 100px;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    z-index: 200;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-body);
}

.notif-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

.notif-list {
    overflow-y: auto;
    max-height: 420px;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.notif-item:hover {
    background: var(--bg-body);
}

.notif-item.unread {
    background: #eff6ff;
    border-left: 3px solid var(--primary);
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: var(--bg-body);
}

.notif-icon.success { background: #d1fae5; }
.notif-icon.warning { background: #fef3c7; }
.notif-icon.danger { background: #fee2e2; }
.notif-icon.info { background: #dbeafe; }

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.notif-message {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-time {
    font-size: 11px;
    color: #94a3b8;
}

.notif-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.notif-item:hover .notif-delete {
    opacity: 1;
}

.notif-delete:hover {
    color: var(--danger);
}

@media (max-width: 768px) {
    .notif-dropdown {
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 380px;
    }
}

/* =========================================
   ALERTAS PROFESIONALES (MODALES)
   ========================================= */
.alert-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.alert-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alert-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 90%;
    padding: 32px 24px;
    text-align: center;
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.alert-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.alert-icon.success {
    background: #d1fae5;
    color: #10b981;
}

.alert-icon.error {
    background: #fee2e2;
    color: #ef4444;
}

.alert-icon.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.alert-icon.info {
    background: #dbeafe;
    color: #3b82f6;
}

.alert-icon.question {
    background: #e0e7ff;
    color: #6366f1;
}

.alert-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

.alert-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.alert-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.alert-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.alert-btn-primary {
    background: var(--primary);
    color: white;
}

.alert-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.alert-btn-secondary {
    background: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.alert-btn-secondary:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.alert-btn-danger {
    background: var(--danger);
    color: white;
}

.alert-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.alert-btn-success {
    background: var(--success);
    color: white;
}

.alert-btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-muted);
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: var(--bg-body);
    color: var(--text-main);
}

/* =========================================
   TABS (Para modales unificados)
   ========================================= */
.tabs-container {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    gap: 0;
}

.tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

/* =========================================
   GRÁFICAS INTERACTIVAS
   ========================================= */
canvas {
    cursor: pointer;
}

.chart-box:hover canvas {
    cursor: pointer;
}

/* Tooltip personalizado para gráficas */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
}