@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ══════════════════════════════════════════════════════
   DReps y Pools Hispanos — styles.css
   Diseño: Cardano-inspired · Moderno · Responsive
══════════════════════════════════════════════════════ */


/* ── Variables ── */
:root {
    --blue:         #0033AD;
    --blue-dark:    #001f6b;
    --blue-mid:     #0047CC;
    --blue-light:   #EEF3FF;
    --blue-glow:    rgba(0, 51, 173, 0.15);
    --teal:         #00C2C2;
    --teal-dark:    #009999;
    --text:         #0D1B3E;
    --text-soft:    #4A5568;
    --muted:        #8896A5;
    --border:       #DDE3EE;
    --border-light: #EEF1F8;
    --card-bg:      #FFFFFF;
    --page-bg:      #F0F4FA;
    --success:      #059669;
    --success-bg:   #ECFDF5;
    --success-bdr:  #6EE7B7;
    --danger:       #DC2626;
    --danger-bg:    #FEF2F2;
    --danger-bdr:   #FCA5A5;
    --gold:         #F59E0B;
    --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
    --shadow-md:    0 4px 16px rgba(0,51,173,0.10);
    --shadow-lg:    0 8px 32px rgba(0,51,173,0.14);
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    16px;
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background: var(--page-bg);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    font-size: 0.93rem;
    line-height: 1.6;
    margin: 0;
}

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.site-navbar {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    padding: 0;
    box-shadow: 0 2px 20px rgba(0,31,107,0.35);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    text-decoration: none;
}

.logo-circle {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #fff 0%, #e8f0ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.8);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.site-navbar .navbar-brand:hover .logo-circle {
    transform: rotate(-10deg) scale(1.05);
}

.brand-text { line-height: 1.1; }
.brand-main {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: block;
    line-height: 1.2;
    letter-spacing: -0.2px;
}
.brand-sub {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.55);
    letter-spacing: 1.4px;
    text-transform: uppercase;
    display: block;
}

.site-navbar .nav-link {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 7px 14px !important;
    border-radius: var(--radius-sm);
    transition: all 0.18s;
    letter-spacing: 0.1px;
}
.site-navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
}
.site-navbar .navbar-toggler {
    border-color: rgba(255,255,255,0.25);
    padding: 5px 8px;
}
.site-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.page-hero {
    background: linear-gradient(135deg, #EBF0FF 0%, #E0EEFF 50%, #E8F8FF 100%);
    border-bottom: 1px solid var(--border);
    padding: 32px 0 24px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '₳';
    position: absolute;
    right: -20px;
    top: -20px;
    font-size: 160px;
    font-weight: 900;
    color: rgba(0,51,173,0.04);
    line-height: 1;
    pointer-events: none;
}
.page-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 6px;
    text-align: left;
    letter-spacing: -0.4px;
}
.page-hero p {
    color: var(--text-soft);
    font-size: 0.88rem;
    margin: 0;
}

/* ══════════════════════════════════════════
   HEADINGS
══════════════════════════════════════════ */
h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text);
    margin-bottom: 16px;
}
h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0;
    padding-left: 14px;
    border-left: 4px solid var(--blue);
    letter-spacing: -0.2px;
}

/* ══════════════════════════════════════════
   SECTION WRAP
══════════════════════════════════════════ */
.section-wrap {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px 22px;
    margin-bottom: 28px;
    border: 1px solid var(--border-light);
}

/* ══════════════════════════════════════════
   RECOMENDACIÓN
══════════════════════════════════════════ */
.rec-box {
    background: linear-gradient(135deg, var(--blue) 0%, #0055CC 50%, var(--teal-dark) 100%);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.rec-box::after {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.rec-box .rec-icon { font-size: 1.7rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.rec-box .rec-label { font-size: 0.72rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.8px; }
.rec-box .rec-name  { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; }

/* ══════════════════════════════════════════
   TABLAS
══════════════════════════════════════════ */
.table-responsive {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.table th {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
    color: rgba(255,255,255,0.92);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.6px;
    padding: 13px 15px;
    border: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}
.table th:first-child { border-radius: 0; }

.table td {
    color: var(--text);
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    font-size: 0.875rem;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover td { background: var(--blue-light); }

.table tbody tr.table-warning td {
    background: #FFFBEB !important;
}
.table tbody tr.table-warning td:first-child {
    border-left: 3px solid var(--gold);
}
.table tbody tr.table-warning:hover td {
    background: #FFF8DC !important;
}

.table-striped tbody tr:nth-of-type(odd) td { background: #F7FAFF; }
.table-striped tbody tr:nth-of-type(odd):hover td { background: var(--blue-light); }

/* ══════════════════════════════════════════
   BADGES
══════════════════════════════════════════ */
.badge-active {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-bdr);
    font-size: 0.71rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-inactive {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-bdr);
    font-size: 0.71rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-na {
    background: #F1F5F9;
    color: #94A3B8;
    border: 1px solid #E2E8F0;
    font-size: 0.71rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
    display: inline-block;
}

/* ══════════════════════════════════════════
   VALORES / STAKE
══════════════════════════════════════════ */
.stake-val {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--blue);
    font-size: 0.9rem;
}

.drep-addr {
    font-family: 'Courier New', monospace;
    font-size: 0.70rem;
    color: var(--muted);
    cursor: pointer;
    background: var(--border-light);
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}
.drep-addr:hover { background: var(--blue-light); color: var(--blue); }

/* ══════════════════════════════════════════
   BOTONES
══════════════════════════════════════════ */
.btn-copy {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    transition: all 0.18s;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--blue-glow);
}
.btn-copy:hover {
    background: var(--blue-mid);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--blue-glow);
}
.btn-copy:disabled { background: #CBD5E1; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-copy.copied { background: var(--success); }

.btn-stats {
    background: transparent;
    color: var(--blue);
    border: 1.5px solid var(--blue);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.18s;
}
.btn-stats:hover {
    background: var(--blue);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--blue-glow);
}

/* Bootstrap overrides */
.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.18s;
}
.btn-primary:hover {
    background: var(--blue-mid);
    border-color: var(--blue-mid);
    transform: translateY(-1px);
}
.btn-outline-primary {
    color: var(--blue);
    border-color: var(--blue);
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.btn-outline-primary:hover { background: var(--blue); border-color: var(--blue); }
.btn-outline-secondary { border-radius: var(--radius-sm); font-size: 0.82rem; }

/* ══════════════════════════════════════════
   ICONOS REDES
══════════════════════════════════════════ */
.svg-inline--fa { height: 1.25em; }
.fsmall { width: 15px; height: 15px; }
table a i {
    margin-right: 6px;
    color: var(--muted);
    transition: color 0.2s, transform 0.2s;
}
table a:hover i { color: var(--blue); transform: scale(1.15); }

/* ══════════════════════════════════════════
   DATATABLES
══════════════════════════════════════════ */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 11px;
    font-size: 0.83rem;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    background: var(--card-bg);
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,51,173,0.1);
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 8px;
}
.page-link { color: var(--blue); border-color: var(--border); }
.page-link:hover { color: var(--blue-dark); background: var(--blue-light); border-color: var(--border); }
.page-item.active .page-link {
    background: var(--blue);
    border-color: var(--blue);
}
.page-item.disabled .page-link { color: var(--muted); }

/* ══════════════════════════════════════════
   STAT CARDS (dreps.php / pool-stats.php)
══════════════════════════════════════════ */
.stat-card {
    border-radius: var(--radius-md);
    padding: 20px 16px;
    color: #fff;
    text-align: center;
    height: 100%;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.stat-card .value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.15;
    display: block;
}
.stat-card .label {
    font-size: 0.75rem;
    opacity: 0.82;
    margin-top: 5px;
    letter-spacing: 0.3px;
    display: block;
}

/* ══════════════════════════════════════════
   CHART CARDS
══════════════════════════════════════════ */
.chart-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}
.chart-card h5 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 16px;
}
canvas { max-height: 260px; }

/* ══════════════════════════════════════════
   VOTOS
══════════════════════════════════════════ */
.vote-yes     { color: var(--success); font-weight: 700; }
.vote-no      { color: var(--danger);  font-weight: 700; }
.vote-abstain { color: var(--muted);   font-weight: 600; }

/* ══════════════════════════════════════════
   ALERTS / INFO BOXES
══════════════════════════════════════════ */
.alert-info {
    background: var(--blue-light);
    border: 1px solid #C7D7FF;
    color: var(--blue-dark);
    border-radius: var(--radius-md);
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
    margin-top: 40px;
    padding: 20px 0 30px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
}
footer a { color: var(--blue); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   RESPONSIVE MÓVIL
══════════════════════════════════════════ */
@media (max-width: 768px) {
    .page-hero { padding: 22px 0 16px; margin-bottom: 18px; }
    .page-hero h1 { font-size: 1.25rem; }
    .page-hero::before { font-size: 100px; }
    h2 { font-size: 1.05rem; }
    .section-wrap { padding: 16px 14px; border-radius: var(--radius-md); }
    .rec-box { padding: 12px 14px; gap: 10px; }
    .rec-box .rec-name { font-size: 0.95rem; }

    /* Tablas → tarjetas */
    .table-responsive { border: none; background: transparent; box-shadow: none; }
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tbody tr {
        background: var(--card-bg);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
        padding: 12px 14px;
    }
    .table tbody tr.table-warning { border-left: 3px solid var(--gold); }
    .table tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 7px 0;
        border: none;
        border-bottom: 1px solid var(--border-light);
        font-size: 0.84rem;
    }
    .table tbody tr td:last-child { border-bottom: none; padding-top: 10px; }
    .table tbody tr td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        flex-shrink: 0;
        margin-right: 10px;
    }
    .text-nowrap { white-space: normal !important; }
    .stat-card { margin-bottom: 12px; padding: 16px 12px; }
    .stat-card .value { font-size: 1.4rem; }
    .chart-card { padding: 16px; }
    .btn-copy, .btn-stats { padding: 6px 12px; font-size: 0.82rem; }
}

@media (max-width: 480px) {
    .page-hero h1 { font-size: 1.1rem; }
    .brand-text { line-height: 1.1; }
.brand-main { font-size: 0.9rem; }
}

/* ══════════════════════════════════════════
   ACCESIBILIDAD — Controles navbar
══════════════════════════════════════════ */
.btn-nav-tool {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    line-height: 1.4;
}
.btn-nav-tool:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

/* ══════════════════════════════════════════
   MODO OSCURO
══════════════════════════════════════════ */
html.dark-mode {
    --blue:       #4D8BFF;
    --blue-dark:  #2563EB;
    --blue-mid:   #3B82F6;
    --blue-light: #1E2D4A;
    --blue-glow:  rgba(77,139,255,0.2);
    --teal:       #2DD4D4;
    --text:       #E2E8F0;
    --text-soft:  #94A3B8;
    --muted:      #64748B;
    --border:     #2D3748;
    --border-light:#1E2433;
    --card-bg:    #1A2233;
    --page-bg:    #0F1624;
    --success:    #34D399;
    --success-bg: #064E3B;
    --success-bdr:#065F46;
    --danger:     #F87171;
    --danger-bg:  #450A0A;
    --danger-bdr: #7F1D1D;
    --gold:       #FCD34D;
    --shadow-sm:  0 1px 4px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
}

html.dark-mode body {
    background: var(--page-bg);
    color: var(--text);
}

html.dark-mode .site-navbar {
    background: linear-gradient(135deg, #0A1628 0%, #0D1F3C 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

html.dark-mode .logo-circle {
    background: linear-gradient(135deg, #1E3A5F, #2563EB);
    color: #fff;
}

html.dark-mode .page-hero {
    background: linear-gradient(135deg, #0F1E38 0%, #0A1628 100%);
    border-bottom-color: var(--border);
}
html.dark-mode .page-hero h1 { color: #7EB3FF; }
html.dark-mode .page-hero::before { color: rgba(77,139,255,0.06); }

html.dark-mode .section-wrap,
html.dark-mode .chart-card {
    background: var(--card-bg);
    border-color: var(--border);
}

html.dark-mode .table th {
    background: linear-gradient(135deg, #0D1F3C, #1A2D50);
    color: rgba(255,255,255,0.85);
}
html.dark-mode .table td { border-bottom-color: var(--border); }
html.dark-mode .table-striped tbody tr:nth-of-type(odd) td { background: #141E30; }
html.dark-mode .table tbody tr:hover td { background: var(--blue-light); }
html.dark-mode .table tbody tr.table-warning td { background: #2D1F00 !important; }

html.dark-mode .table-responsive { border-color: var(--border); }

html.dark-mode .rec-box {
    background: linear-gradient(135deg, #0D2460 0%, #0A3D6B 50%, #0E4D4D 100%);
}

html.dark-mode .badge-active  { background: var(--success-bg); color: var(--success); border-color: var(--success-bdr); }
html.dark-mode .badge-inactive { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-bdr); }
html.dark-mode .badge-na      { background: #1E293B; color: #64748B; border-color: var(--border); }

html.dark-mode .drep-addr     { background: #1E2D4A; color: var(--muted); }
html.dark-mode .drep-addr:hover { background: var(--blue-light); color: var(--blue); }

html.dark-mode .stake-val     { color: #7EB3FF; }

html.dark-mode .btn-copy      { box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
html.dark-mode .btn-stats     { background: transparent; color: var(--blue); border-color: var(--blue); }
html.dark-mode .btn-stats:hover { background: var(--blue-light); }

html.dark-mode .btn-primary   { background: var(--blue-dark); border-color: var(--blue-dark); }
html.dark-mode .btn-outline-primary { color: var(--blue); border-color: var(--blue); }

html.dark-mode .alert-info    { background: #0D1F3C; border-color: #1E3A5F; color: #7EB3FF; }

html.dark-mode .dataTables_wrapper .dataTables_filter input,
html.dark-mode .dataTables_wrapper .dataTables_length select {
    background: #1A2233;
    border-color: var(--border);
    color: var(--text);
}
html.dark-mode .page-link     { color: var(--blue); background: var(--card-bg); border-color: var(--border); }
html.dark-mode .page-item.active .page-link { background: var(--blue-dark); border-color: var(--blue-dark); }

html.dark-mode footer         { border-top-color: var(--border); color: var(--muted); }
html.dark-mode footer a       { color: var(--blue); }

html.dark-mode h1, html.dark-mode h2, html.dark-mode h3 { color: var(--text); }
html.dark-mode h2             { border-left-color: var(--blue); }

/* Responsive dark */
@media (max-width: 768px) {
    html.dark-mode .table tbody tr {
        background: var(--card-bg);
        border-color: var(--border);
    }
    html.dark-mode .table tbody tr td { border-bottom-color: var(--border-light); }
}


/* ══════════════════════════════════════════
   LAYOUT RESPONSIVE — split cols
══════════════════════════════════════════ */
.split-50 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
}
.split-50 > .section-wrap {
    margin-bottom: 0 !important;
    min-width: 0;
    overflow: hidden;
}
.split-50 .section-wrap .table th { font-size: 0.68rem; padding: 8px 6px; letter-spacing: 0; }
.split-50 .section-wrap .table td { font-size: 0.76rem; padding: 7px 6px; }
.split-50 .dataTables_filter,
.split-50 .dataTables_length,
.split-50 .dataTables_info { font-size: 0.72rem; }
.split-50 .dataTables_filter input,
.split-50 .dataTables_length select { font-size: 0.72rem; padding: 3px 6px; }
@media (max-width: 992px) {
    .split-50 { grid-template-columns: 1fr; }
    .split-50 > .section-wrap { margin-bottom: 28px !important; overflow: visible; }
}


/* ══════════════════════════════════════════
   CONTRASTE SECCIONES drep.php
══════════════════════════════════════════ */

/* Fondo de página más oscuro para que las cajas blancas destaquen */
body { background: #E4EAF5; }
html.dark-mode body { background: var(--page-bg); }

/* section-wrap: sombra más pronunciada + borde más visible */
.section-wrap {
    box-shadow: 0 2px 12px rgba(0,33,107,0.10), 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #D5DCF0;
}

/* h5 dentro de section-wrap: estilo igual que h2 para consistencia */
.section-wrap h5 {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    padding-left: 12px;
    border-left: 3px solid var(--blue);
    margin-bottom: 16px;
}

/* Stat cards row: pequeño fondo para agruparlas visualmente */
.stat-row-wrap {
    background: transparent;
}

/* Subcajas dentro de section-wrap (donut + tabla votos) */
.section-wrap .inner-box {
    background: var(--page-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
}
html.dark-mode .section-wrap .inner-box {
    background: rgba(0,0,0,0.15);
    border-color: var(--border);
}

/* dark mode section-wrap */
html.dark-mode .section-wrap {
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    border-color: var(--border);
}
