:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-1: #3b82f6;
    --accent-2: #8b5cf6;
    --accent-3: #ec4899;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background animated orbs for premium look */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: #0f172a;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 { width: 400px; height: 400px; background: var(--accent-1); top: -100px; left: -100px; }
.orb-2 { width: 500px; height: 500px; background: var(--accent-2); bottom: -150px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: var(--accent-3); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem !important;
}

header h1 { 
    margin: 0 0 0.5rem 0; 
    font-weight: 800; 
    font-size: 2.5rem; 
    background: linear-gradient(to right, #60a5fa, #c084fc); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}
header p { 
    margin: 0; 
    color: var(--text-secondary); 
    font-size: 1.1rem; 
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.main-chart {
    grid-column: 1 / -1;
}

h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
}

.kpi-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-1);
    margin: 1rem 0;
}

.kpi-stats {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
}

.kpi-stats div {
    text-align: center;
}

.kpi-stats .label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.kpi-stats .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 200px;
    width: 100%;
}

.chart-container-large {
    position: relative;
    height: 400px;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .top-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    .nav-links a {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }
    header {
        padding: 1.5rem !important;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .kpi-value {
        font-size: 2.5rem;
    }
    .glass-panel {
        padding: 1rem;
    }
    .filter-container {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .glass-select {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
}

.filter-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.filter-container label {
    font-weight: 600;
    color: var(--text-secondary);
}

.glass-select {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.glass-select:hover {
    border-color: var(--accent-1);
}

.glass-select option {
    background: var(--bg-color);
}

/* Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--accent-1);
    background: rgba(59, 130, 246, 0.1);
}

.chart-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* --- Nuevos Estilos para Tablas y Componentes --- */

.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
    font-size: 0.95rem;
}

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

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

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

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.btn-page {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-1);
    border: 1px solid var(--accent-1);
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-page:hover:not(:disabled) {
    background: var(--accent-1);
    color: white;
}

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

#page-info {
    font-weight: 600;
    color: var(--text-secondary);
}

.badge {
    background: rgba(236, 72, 153, 0.15);
    color: #fbcfe8;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(236, 72, 153, 0.3);
    display: inline-block;
}

.btn-action {
    background: var(--accent-1);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.3s, transform 0.1s;
    display: inline-block;
    text-align: center;
}

.btn-action:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
}

.timeline li:last-child {
    border-bottom: none;
}

.timeline li strong {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
