:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --secondary: #edf2f7;
    --accent: #3182ce;
    --text-dark: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --bg: #f7fafc;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-dark);
    line-height: 1.6;
}

header {
    background: var(--primary);
    color: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.title-section {
    margin-bottom: 2rem;
}

.title-section h1 {
    font-size: 1.875rem;
    color: var(--primary);
    font-weight: 700;
}

.title-section p {
    color: var(--text-light);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 5px solid var(--accent);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-container {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.chart-container h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    border-bottom: 1px solid var(--secondary);
    padding-bottom: 0.75rem;
}

/* Data Table Styles */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 2rem;
}

.table-header {
    padding: 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--secondary);
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--primary);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--secondary);
}

tr:hover {
    background-color: #f9fafb;
}

.th-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header-counter {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
}

.filter-row td {
    padding: 8px;
    background: #f8fafc;
}

.filter-input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
}

.filter-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.1);
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: 0.2s;
}

nav a:hover, nav a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* Forms & Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

input, select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--secondary);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    border-color: var(--accent);
}

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

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

/* Responsive */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    padding: 1.25rem 1rem;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.65rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--primary);
    background: var(--secondary);
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

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

.page-btn.active {
    background: var(--accent);
    color: white;
    font-weight: 700;
    border-color: var(--accent);
    pointer-events: none;
}

.page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.page-ellipsis {
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 0 0.25rem;
}

/* Si / No badges */
.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 99px;
    letter-spacing: 0.03em;
}

.badge-si {
    background: #c6f6d5;
    color: #276749;
}

.badge-no {
    background: #fed7d7;
    color: #9b2c2c;
}
