* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid rgba(231, 0, 11, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section h1 {
    font-size: 56px;
    font-weight: 700;
    color: #e7000b;
    letter-spacing: 3px;
    margin-bottom: 0;
    line-height: 1;
}

.logo-section h2 {
    font-size: 24px;
    font-weight: 300;
    color: #f1f1f1;
    letter-spacing: 1px;
    margin-top: 5px;
}

.header-info {
    display: flex;
    align-items: center;
    grid-gap: 30px;
    gap: 30px;
}

.week-info {
    font-size: 32px;
    font-weight: 600;
    color: #e7000b;
    background-color: #fee1e2;
    /* border: 1px solid #e7000b; */
    background: rgba(231,0,11, 0.15);
    border: 1px solid rgba(231,0,11, 0.5);
    padding: 12px 24px;
    border-radius: 8px;
}

.header-time {
    font-size: 36px;
    font-weight: 600;
    color: #f1f1f1;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 24px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
}

/* Slides Container */
.slides-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 20px 40px;
}

.slide {
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    bottom: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.slide.exit-left {
    transform: translateX(-100%);
    opacity: 0;
}

/* Slide Title */
.slide-title {
    text-align: center;
    margin-bottom: 30px;
}

.slide-title h3 {
    font-size: 42px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.slide-title .subtitle {
    font-size: 24px;
    color: #b8c6db;
    font-weight: 300;
}

/* Summary Grid - Slide 1 */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.5);
}

.summary-card.highlight {
    /* background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.3); */
    background: rgba(231,0,11, 0.10);
    border: 1px solid rgba(231,0,11, 0.5);
}

.summary-card.warning {
    background: rgba(255, 152, 0, 0.15);
    border-color: rgba(255, 152, 0, 0.3);
}

.card-icon {
    flex-shrink: 0;
    color: #e7000b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-card.warning .card-icon {
    color: #ff9800;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
}

.card-content .metric-label {
    font-size: 28px;
    color: #f2f2f2;
    font-weight: 600;
    line-height: 1.2;
}

.card-content .metric-value {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.card-content .metric-unit {
    font-size: 32px;
    color: #d1d1d1;
    font-weight: 300;
}

/* Leaders Overview */
.leaders-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.leader-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.leader-card:hover {
    transform: translateY(-3px);
    border-color: rgba(74, 144, 226, 0.5);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.2);
}

.leader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leader-name {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
}

.leader-badge {
    /* background: rgba(74, 144, 226, 0.2); */
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 24px;
    font-weight: 500;
    /* border: 1px solid rgba(74, 144, 226, 0.3); */
    color: #e7000b;
    background: rgba(231,0,11, 0.10);
    border: 1px solid rgba(231,0,11, 0.5);
}

.leader-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leader-stats .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leaders-card-footer {
    padding: 8px;
    /* font-size: 32; */
    font-weight: bold;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);;
    margin-top: 24px;
    margin-bottom: -24px;
    margin-left: -24px;
    margin-right: -24px;
}

.en-proceso {
    background-color: rgb(30, 144, 255);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.finalizado {
    background-color: rgb(76, 175, 80);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.pendiente {
    background-color: rgb(255, 152, 0);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.stat-label {
    font-size: 28px;
    color: #f1f1f1;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
}

/* Progress Bars */
.progress-container {
    margin-top: 8px;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2 0%, #357abd 100%);
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-fill.success {
    background: linear-gradient(90deg, #4caf50 0%, #388e3c 100%);
}

.progress-fill.warning {
    background: linear-gradient(90deg, #ff9800 0%, #f57c00 100%);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #f44336 0%, #d32f2f 100%);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #b8c6db;
}

.progress-text > span:first-child {
    font-weight: 600;
    color: #ffffff;
    font-size: 28px;
}

.progress-label {
    font-size: 28px;
    color: #d3d3d3;
}

/* Chart Container */
.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 400px;
    position: relative;
}

.chart-container canvas {
    max-height: 100%;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #b8c6db;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

/* Compliance Stats */
.compliance-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    border-color: rgba(74, 144, 226, 0.5);
}

.stat-box.target {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.3);
}

.stat-box .stat-label {
    font-size: 18px;
    color: #b8c6db;
    margin-bottom: 12px;
}

.stat-box .stat-value {
    font-size: 56px;
    font-weight: 700;
    color: #ffffff;
    margin: 8px 0;
}

.stat-box .stat-value.consolidado {
    color: #ff9800;
}

.stat-box .stat-value.anterior {
    color: #4a90e2;
}

.stat-box.target .stat-value {
    color: #4caf50;
}

.stat-box .stat-subtitle {
    font-size: 16px;
    color: #7f8c8d;
}

/* Analysis Container - Slide 4 */
.analysis-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    height: calc(100% - 100px);
}

.analysis-chart {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.analysis-table {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

/* Table Container */
.table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.weekly-table th,
.weekly-table td {
    text-align: center;
    padding: 16px 12px;
}

.weekly-table th:first-child,
.weekly-table td:first-child {
    text-align: left;
}

.data-table th {
    background: rgba(0, 0, 0, 0.2);
    color: #ed2737;
    padding: 16px;
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    border-bottom: 2px solid rgba(0, 0, 0, 0.3);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 26px;
    color: #f1f1f1;
    text-align: center;
}

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

.data-table tfoot tr {
    background: rgba(0, 0, 0, 0.1);
    border-top: 2px solid rgba(0, 0, 0, 0.3);
}

.data-table tfoot td {
    font-size: 28px;
    padding: 20px 16px;
}

.status-pending {
    color: #ff9800;
    font-weight: 600;
}

.status-success {
    color: #4caf50;
    font-weight: 600;
}

.status-danger {
    color: #f44336;
    font-weight: 600;
}

/* Footer */
.main-footer {
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 2px solid rgba(231, 0, 11, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.main-footer p {
    font-size: 18px;
    color: #b8c6db;
    margin: 0;
}

/* Navigation Dots */
.navigation-dots {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: #e7000b;
    width: 32px;
    border-radius: 6px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Responsive adjustments for TV displays */
@media screen and (max-width: 1920px) {
    .header-content h1 {
        font-size: 48px;
    }

    .header-content h2 {
        font-size: 32px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 144, 226, 0.7);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #e7000b;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    font-size: 20px;
    font-weight: 500;
}

/* Error Overlay */
.error-overlay {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.95);
    color: white;
    padding: 20px 40px;
    border-radius: 12px;
    z-index: 9998;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    max-width: 80%;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.error-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.error-content p {
    margin: 5px 0;
    font-size: 16px;
}

.retry-message {
    font-style: italic;
    opacity: 0.9;
    font-size: 14px;
}

.divider {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}
