/* Colores Bootstrap alineados con el sistema: Primary=teal, Secondary=gris, Success=verde */
:root {
    --bs-primary: #0f766e;
    --bs-primary-rgb: 15, 118, 110;
    --bs-primary-hover: #0d9488;
    --bs-secondary: #6c757d;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success: #198754;
    --bs-success-rgb: 25, 135, 84;
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-primary: #0f766e;
    --color-primary-hover: #0d9488;
    --color-primary-light: #ccfbf1;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-error: #dc2626;
    --color-error-bg: #fef2f2;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
    /* Login: azul de imagen como base, degradado moderno */
    --login-bg: #0a1628;
    --login-bg-mid: #0f2847;
    --login-bg-soft: #132f4c;
    --login-accent: #2563eb;
    --login-accent-hover: #1d4ed8;
    --login-accent-soft: rgba(37, 99, 235, 0.15);
    --login-card-bg: #ffffff;
    --login-card-border: rgba(148, 163, 184, 0.18);
    --login-text: #0f172a;
    --login-text-muted: #475569;
    --login-input-border: #e2e8f0;
    --login-input-focus: #2563eb;
    --login-safe-bottom: env(safe-area-inset-bottom, 0px);
    --login-safe-top: env(safe-area-inset-top, 0px);
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

/* Botones: Primary = teal, Secondary = gris, Success = verde (en toda la app) */
.btn-primary {
    background-color: #0f766e !important;
    border-color: #0f766e !important;
}

.btn-primary:hover {
    background-color: #0d9488 !important;
    border-color: #0d9488 !important;
}

.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

.btn-secondary:hover {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
    color: #fff !important;
}

.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.btn-success:hover {
    background-color: #157347 !important;
    border-color: #146c43 !important;
}

.main-header {
    background: var(--color-primary);
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

/* Footer moderno (mismo color que la barra lateral) */
.main-footer {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 0.875rem 1.5rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    margin-top: auto;
}

.main-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-width: 1400px;
    margin: 0 auto;
}

.main-footer-copy {
    font-size: 0.8125rem;
    opacity: 0.95;
}

.main-footer-dev {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.2s, transform 0.1s;
}

.main-footer-dev:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.main-footer-dev i {
    font-size: 1.1rem;
}

.main-footer-mobile .main-footer-inner {
    justify-content: center;
    text-align: center;
}

.main-footer-mobile .main-footer-copy {
    width: 100%;
    text-align: center;
}

.main-footer-mobile .main-footer-dev {
    justify-content: center;
}

.main-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-header .logo img {
    height: 36px;
    width: auto;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.95);
    margin-left: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #fff;
}

.main-content {
    padding: 24px;
}

/* ---------- Toast (mensajes modernos) ---------- */
.toast-host {
    position: fixed;
    top: calc(20px + var(--login-safe-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: calc(100% - 32px);
    max-width: 380px;
    pointer-events: none;
}

.toast-host .toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.toast-host .toast.toast--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-host .toast.toast--out {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
}

.toast--error {
    background: #fff;
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.25);
}

.toast-icon-wrap {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    color: #b91c1c;
}

.toast-icon-wrap .toast-icon {
    width: 26px;
    height: 26px;
    stroke-width: 2.5;
}

.toast--success .toast-icon-wrap {
    background: transparent;
    color: #16a34a;
}

.toast-message {
    flex: 1;
    min-width: 0;
}

.toast-dismiss {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent !important;
    box-shadow: none !important;
    color: #7f1d1d;
    cursor: pointer;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toast-dismiss svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

.toast-dismiss:hover,
.toast-dismiss:focus {
    color: #991b1b;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
}

@media (min-width: 769px) {
    .toast-host {
        left: auto;
        right: 24px;
        top: 24px;
        transform: none;
        max-width: 360px;
    }
}

/* ---------- Login: escritorio (PC) ---------- */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--login-bg);
    background-image:
        radial-gradient(ellipse 120% 100% at 50% -20%, var(--login-bg-soft) 0%, transparent 50%),
        linear-gradient(165deg, var(--login-bg) 0%, var(--login-bg-mid) 45%, var(--login-bg) 100%);
    position: relative;
    overflow-x: hidden;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.login-bg-pattern {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 85%, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.06) 0%, transparent 45%);
    pointer-events: none;
}

.login-card {
    background: var(--login-card-bg);
    border-radius: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 24px 48px -12px rgba(0, 0, 0, 0.22);
    padding: 48px 44px 36px;
    border: 1px solid var(--login-card-border);
}

.login-brand {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 120px;
    height: 120px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px;
}

.login-title {
    margin: 0 0 8px;
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--login-text);
    letter-spacing: -0.04em;
}

.login-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--login-text-muted);
    font-weight: 500;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--login-text);
    margin-bottom: 8px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--login-input-border);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #fff;
}

.login-form .password-field input {
    padding-right: 52px;
}

.login-form input::placeholder {
    color: #94a3b8;
}

.login-form input:hover {
    border-color: #cbd5e1;
}

.login-form input:focus {
    outline: none;
    border-color: var(--login-input-focus);
    box-shadow: 0 0 0 3px var(--login-accent-soft);
}

.btn-login {
    width: 100%;
    padding: 16px 20px;
    margin-top: 12px;
    background: linear-gradient(180deg, var(--login-accent) 0%, var(--login-accent-hover) 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: box-shadow 0.2s, transform 0.1s, filter 0.2s;
}

.btn-login:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    filter: brightness(1.05);
}

.btn-login:active {
    transform: scale(0.99);
}

.btn-login-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--login-input-border);
}

.login-footer-text {
    text-align: center;
    margin: 0;
    font-size: 0.75rem;
    color: var(--login-text-muted);
    font-weight: 500;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 52px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: transparent !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    border-radius: 0;
    color: #0f172a;
    transition: color 0.2s;
}

.toggle-password .icon-eye,
.toggle-password .icon-eye-off {
    color: inherit;
}

.toggle-password:hover {
    color: var(--login-accent);
    background: transparent !important;
}

.toggle-password:focus,
.toggle-password:focus-visible {
    outline: none;
    background: transparent !important;
    box-shadow: none !important;
}

.toggle-password:not(.is-active):focus,
.toggle-password:not(.is-active):focus-visible {
    color: #0f172a;
}
.toggle-password.is-active:focus,
.toggle-password.is-active:focus-visible {
    color: var(--login-accent);
}

.toggle-password .icon-eye,
.toggle-password .icon-eye-off {
    width: 26px;
    height: 26px;
    display: block;
    flex-shrink: 0;
}

.toggle-password .icon-eye-off {
    display: none !important;
}

.toggle-password .icon-eye {
    display: block !important;
}

.toggle-password.is-active .icon-eye {
    display: none !important;
}

.toggle-password.is-active .icon-eye-off {
    display: block !important;
}

.toggle-password:not(.is-active) {
    color: #0f172a;
}

.toggle-password:not(.is-active) .icon-eye {
    opacity: 1;
    visibility: visible;
}

.toggle-password.is-active {
    color: var(--login-accent);
}

.login-options {
    margin: 6px 0 10px;
    font-size: 0.8125rem;
    color: var(--login-text-muted);
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--login-accent);
}

/* ---------- Login: móvil (estilo app) ---------- */
@media (max-width: 768px) {
    .login-page {
        padding: 16px;
        padding-top: calc(24px + var(--login-safe-top));
        padding-bottom: calc(24px + var(--login-safe-bottom));
        align-items: flex-start;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-wrapper {
        max-width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
    }

    .login-card {
        padding: 36px 24px 28px;
        border-radius: 28px;
        border-width: 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08), 0 24px 48px -12px rgba(0, 0, 0, 0.15);
        flex: 0 1 auto;
    }

    .login-brand {
        margin-bottom: 28px;
    }

    .login-logo {
        width: 110px;
        height: 110px;
        margin-bottom: 18px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-subtitle {
        font-size: 0.8125rem;
    }

        .login-form input {
        padding: 16px 18px;
        border-radius: 14px;
        font-size: 16px;
        min-height: 52px;
    }

    .login-form .password-field input {
        padding-right: 56px;
    }

    .btn-login {
        padding: 18px 20px;
        border-radius: 14px;
        font-size: 1rem;
        min-height: 54px;
        margin-top: 16px;
    }

    .toggle-password {
        width: 48px;
        height: 48px;
        right: 8px;
    }

    .toggle-password .icon-eye,
    .toggle-password .icon-eye-off {
        width: 26px;
        height: 26px;
    }

    .login-footer {
        margin-top: 24px;
        padding-top: 20px;
    }

    .toast-host {
        width: calc(100% - 24px);
        max-width: none;
    }
}

/* Legacy: alert en página (oculto si usamos toast) */
.alert-danger {
    display: none;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: var(--color-error);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* Form groups y botones genéricos (resto del sistema) */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    font-size: 13px;
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    font-size: 14px;
    box-sizing: border-box;
}

button:not(.btn-login) {
    padding: 10px 16px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

button:not(.btn-login):hover {
    background: var(--color-primary-hover);
}

.error-page,
.error-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.error-container h1 {
    font-size: 64px;
    margin: 0 0 10px;
}

.error-container a {
    margin-top: 10px;
    color: #0b3c5d;
    text-decoration: none;
}

/* ---------- Panel (dashboard): sidebar + contenido ---------- */
.panel-body {
    min-height: 100vh;
    background: #f1f5f9;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    height: 36px;
    width: auto;
}

.sidebar-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-menu {
    padding: 0.75rem 0;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sidebar-menu-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-menu-item.active {
    background: rgba(15, 118, 110, 0.25);
    color: #fff;
    border-left-color: var(--color-primary);
}

.sidebar-menu-item i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.sidebar-menu-item-logout {
    margin-top: 0.5rem;
    color: rgba(255,255,255,0.7);
}

.sidebar-menu-item-logout:hover {
    color: #fca5a5;
}

.panel-body .main-content {
    margin-left: 260px;
    min-height: 100vh;
    min-width: 0; /* evita que tablas anchas ensanchen toda la página */
    padding-top: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* scroll horizontal solo dentro de .table-responsive / wraps */
}

.top-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.top-header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-wrapper {
    padding: 1.5rem;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Aspecto moderno: tarjetas y tablas */
.content-wrapper .card {
    border-radius: 12px;
    overflow: hidden;
}

/* Tarjetas con dropdown (ej. filtros socios): permitir que el menú se vea */
.content-wrapper .card.card-dropdown-visible {
    overflow: visible;
}
.content-wrapper .card.card-dropdown-visible .card-body {
    overflow: visible;
}

.content-wrapper .card-header {
    font-weight: 600;
    font-size: 0.9375rem;
}

.content-wrapper .table {
    font-size: 0.875rem;
}

.content-wrapper .table thead th {
    font-weight: 600;
    text-transform: none;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.content-wrapper .form-control,
.content-wrapper .form-select {
    border-radius: 8px;
    font-size: 0.9375rem;
}

.content-wrapper .form-control:focus,
.content-wrapper .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

/* Modal más limpio */
.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
    gap: 0.5rem;
}

.panel-body .main-footer {
    margin-left: 260px;
}

/* Panel móvil */
.panel-body-mobile .sidebar {
    display: none;
}

.panel-body-mobile .main-content {
    margin-left: 0;
    min-width: 0;
    overflow-x: hidden;
}

.panel-body-mobile .main-footer {
    margin-left: 0;
}

.app-top-bar {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-logo-text {
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.1rem;
}

.main-content-mobile .content-wrapper {
    padding-bottom: 2rem;
}

.top-header-title-row { display: flex; align-items: center; min-width: 0; }
.top-header-menu-toggle { color: var(--color-text); text-decoration: none; }
.top-header-menu-toggle:hover { color: var(--color-primary); }
@media (max-width: 768px) {
    .panel-body .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1050;
        width: 280px;
        max-width: 85vw;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        overflow-y: auto;
    }
    .panel-body.sidebar-open .sidebar {
        display: block;
    }
    .panel-body.sidebar-open .sidebar-backdrop {
        display: block;
    }
    .panel-body .main-content {
        margin-left: 0;
    }
    .panel-body .main-footer {
        margin-left: 0;
    }
}
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
}

/* ---------- Tablas responsivas: en móvil se muestran como tarjetas (data-label) ---------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: visible;
        border: none;
        width: 100%;
    }
    .table-responsive .table {
        display: block;
        width: 100%;
    }
    .table-responsive .table tbody {
        display: block;
        width: 100%;
    }
    .table-responsive .table thead {
        display: none;
    }
    .table-responsive .table tbody tr,
    .table.table-responsive + tbody tr,
    .table tbody tr.table-mobile-card {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 1rem;
        border: 1px solid var(--color-border);
        border-radius: 10px;
        padding: 0.75rem 1rem;
        background: var(--color-surface);
        box-shadow: var(--shadow-sm);
    }
    .table-responsive .table tbody td,
    .table tbody td.table-mobile-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        text-align: right !important;
        gap: 0.75rem;
    }
    .table-responsive .table tbody td:before,
    .table tbody td[data-label]:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-text-muted);
        text-align: left;
        flex: 1;
        min-width: 0;
    }
    .table-responsive .table tbody td[data-label=""]:before,
    .table tbody td[data-label=""]:before {
        display: none;
        content: none;
    }
    .table-responsive .table tbody td[data-label="Apellidos y nombres"]:before,
    .table tbody td[data-label="Apellidos y nombres"]:before {
        display: none;
        content: none;
    }
    .table-responsive .table tbody td.acciones-cell,
    .table tbody td:last-child {
        border-top: 1px solid var(--color-border);
        padding-top: 0.75rem;
        margin-top: 0.25rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    .table-responsive .table tbody td.acciones-cell:before,
    .table tbody td:last-child:before {
        content: none;
        display: none;
    }
    .table-responsive .table tbody td.acciones-cell,
    .table tbody td:last-child {
        display: flex;
        justify-content: center;
    }
    .content-wrapper {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .top-header {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    .btn, .form-control, .form-select {
        min-height: 44px;
    }
}
@media (max-width: 576px) {
    .table-responsive .table tbody td .btn,
    .table tbody td .btn {
        flex: 1;
        max-width: 48%;
        min-height: 40px;
    }
}
@media (hover: none) and (pointer: coarse) {
    input, select, textarea, .form-control, .form-select {
        font-size: 16px !important;
    }
}

/* ---------- Dashboard PRO (gráficos + KPI) ---------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');
.dash-pro {
    font-family: 'DM Sans', system-ui, sans-serif;
    --dash-ink: #0f172a;
    --dash-muted: #64748b;
    --dash-line: #e2e8f0;
    --dash-teal: #0d9488;
    --dash-rose: #e11d48;
    --dash-blue: #3b82f6;
}
.dash-pro__hero { margin-bottom: 0.5rem; }
.dash-pro__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--dash-ink);
    margin: 0 0 0.2rem 0;
}
.dash-pro__subtitle { font-size: 0.8125rem; color: var(--dash-muted); margin: 0; }
.dash-kpi {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
    background: #fff;
    border: 1px solid var(--dash-line);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    height: 100%;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.dash-kpi:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); border-color: #cbd5e1; }
.dash-kpi--accent {
    background: linear-gradient(135deg, #f0fdfa 0%, #fff 50%);
    border-color: rgba(13, 148, 136, 0.2);
}
.dash-kpi--sm { padding: 0.75rem 0.85rem; gap: 0.65rem; }
.dash-kpi__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-kpi__icon--slate { background: #f1f5f9; color: #475569; }
.dash-kpi__icon--in { background: rgba(13, 148, 136, 0.12); color: var(--dash-teal); }
.dash-kpi__icon--out { background: rgba(225, 29, 72, 0.1); color: var(--dash-rose); }
.dash-kpi__icon--bal { background: rgba(15, 23, 42, 0.06); color: var(--dash-ink); }
.dash-kpi__meta { min-width: 0; }
.dash-kpi__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dash-muted);
    margin-bottom: 0.25rem;
}
.dash-kpi__value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dash-ink);
    letter-spacing: -0.02em;
    line-height: 1.2;
    word-break: break-word;
}
.dash-kpi__value--in { color: #0f766e; }
.dash-kpi__value--out { color: #be123c; }
.dash-panel {
    background: #fff;
    border: 1px solid var(--dash-line);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    height: 100%;
}
.dash-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--dash-line);
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.dash-panel__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--dash-ink);
    margin: 0;
    letter-spacing: -0.02em;
}
.dash-panel__link, .dash-panel__hint {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dash-teal);
    text-decoration: none;
}
.dash-panel__link:hover { text-decoration: underline; color: #0f766e; }
.dash-panel__hint { color: var(--dash-muted); font-weight: 500; }
.dash-panel__body { padding: 1.15rem 1.25rem 1.25rem; }
.dash-panel__body--tipos { background: #f8fafc; padding: 1rem 1.1rem 1.15rem; }
.dash-chart-wrap { position: relative; width: 100%; }
.dash-legend__swatch { width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; display: inline-block; vertical-align: middle; }
.dash-legend__swatch--in { background: var(--dash-teal); }
.dash-legend__swatch--out { background: #f43f5e; }
.dash-pro--mobile { padding-bottom: 1.25rem; }

@media (max-width: 768px) {
    .dash-pro--mobile {
        padding: 0.85rem 0.85rem 1.6rem;
        min-height: 100vh;
        background: #f3f4f6;
    }
    .dash-pro--mobile .dash-pro__hero {
        padding: 0.4rem 0.15rem 0.9rem;
        margin-bottom: 0.8rem;
    }
    .dash-pro--mobile .dash-pro__title {
        font-size: 1.05rem;
    }
    .dash-pro--mobile .dash-pro__subtitle {
        font-size: 0.7rem;
    }
    .dash-pro--mobile .dash-kpi {
        padding: 0.8rem 0.9rem;
    }
    .dash-pro--mobile .dash-kpi--sm {
        border-radius: 14px;
    }
    .dash-pro--mobile .dash-kpi__label {
        font-size: 0.72rem;
    }
    .dash-pro--mobile .dash-kpi__value {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: 0;
    }
    .dash-pro--mobile .dash-panel {
        border-radius: 18px;
    }
    .dash-pro--mobile .dashboard-tipo-tile {
        border-radius: 14px;
    }
}

/* ---------- Dashboard profesional (legacy) ---------- */
.dashboard-page .dashboard-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.card-kpi {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-icon-primary { background: rgba(15, 118, 110, 0.12); color: var(--color-primary); }
.kpi-icon-success { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.kpi-icon-danger  { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.kpi-icon-info    { background: rgba(13, 148, 136, 0.12); color: #0d9488; }

.kpi-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.kpi-value-saldo { color: #0d9488; }

.kpi-unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.dashboard-card-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 12px 12px 0 0;
}

.list-socios-estado .list-group-item {
    border: none;
    padding: 0.75rem 0;
}

.estado-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.estado-activo    { background: #22c55e; }
.estado-retirado  { background: #94a3b8; }
.estado-inactivo  { background: #f59e0b; }
.estado-renuncia  { background: #64748b; }
.estado-difunto   { background: #475569; }
.estado-expulsado { background: #dc2626; }
.estado-conyuge   { background: #8b5cf6; }
.estado-viuda     { background: #ec4899; }

.estado-desc { font-size: 0.875rem; }
.estado-total { font-size: 0.9375rem; color: var(--color-text); min-width: 2rem; text-align: right; }

/* Socios por tipo tiles (dentro dash-panel) */
.dashboard-tipos-body {
    padding: 1rem 1.1rem 1.15rem !important;
    background: #f8fafc;
}
.dashboard-tipos-row:last-child {
    margin-bottom: 0 !important;
}
.dashboard-tipo-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.65rem 0.5rem 0.55rem;
    min-height: 112px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e8e8ea;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-tipo-tile:hover {
    border-color: #cfd4dc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: inherit;
}
.dashboard-tipo-tile:focus-visible {
    outline: 2px solid #3d3d42;
    outline-offset: 2px;
}
.dashboard-tipo-tile__icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
    background: #f3f3f5;
    color: #3d3d42;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.dashboard-tipo-tile__count {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #1a1a1e;
    font-variant-numeric: tabular-nums;
}
.dashboard-tipo-tile__label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b6b70;
    margin-top: 0.25rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}
.dashboard-tipos-card {
    border: 1px solid #ececed;
}
.dashboard-tipos-card .dashboard-card-header {
    background: #fff;
    border-bottom-color: #ececed;
}
@media (max-width: 575.98px) {
    .dashboard-tipo-tile {
        min-height: 102px;
        padding: 0.55rem 0.4rem 0.45rem;
        border-radius: 9px;
    }
    .dashboard-tipo-tile__icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    .dashboard-tipo-tile__count { font-size: 1.05rem; }
    .dashboard-tipo-tile__label { font-size: 0.55rem; }
}

.resumen-caja-item {
    padding: 0.5rem 0;
}

.resumen-caja-item.resumen-saldo {
    padding-top: 0.25rem;
}

.card-acceso {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-acceso:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.acceso-icon { font-size: 2.25rem; }

/* ---------- Página Socios ---------- */
.page-socios { padding-bottom: 1.5rem; }
.socios-header { margin-bottom: 1.5rem; }
.socios-header-content { display: flex; align-items: center; gap: 1rem; }
.socios-header-icon { width: 48px; height: 48px; border-radius: var(--radius); background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.socios-title { font-size: 1.5rem; font-weight: 700; color: var(--color-text); margin: 0 0 0.25rem 0; letter-spacing: -0.02em; }
.socios-subtitle { font-size: 0.9375rem; color: var(--color-text-muted); margin: 0; }
.socios-filtros-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.socios-filtros-body { padding: 1.25rem 1.5rem; }
.socios-label { font-size: 0.8125rem; font-weight: 500; color: var(--color-text-muted); margin-bottom: 0.375rem; display: block; }
.socios-input, .socios-select { border-radius: 8px; border-color: var(--color-border); }
.btn-socios-search { background: var(--color-primary); border-color: var(--color-primary); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-socios-search:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.btn-socios-new { background: var(--bs-success); border-color: var(--bs-success); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-socios-new:hover { background: #157347; border-color: #146c43; color: #fff; }
.btn-socios-export { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-socios-export:hover { background: var(--color-bg); border-color: var(--color-text-muted); color: var(--color-text); }
.socios-dropdown-menu { border-radius: 8px; border: 1px solid var(--color-border); }

/* Socios – filtros centrados en móvil */
@media (max-width: 767.98px) {
    .page-socios .socios-filtros-body .row { align-items: stretch; }
    .page-socios .socios-filtros-body .row > .col-md-4,
    .page-socios .socios-filtros-body .row > .col-md-2 { width: 100%; max-width: 100%; }
    .page-socios .socios-filtros-body .row > .col-md-auto {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
    }
    .page-socios .socios-filtros-body .row > .col-md-auto .btn,
    .page-socios .socios-filtros-body .row > .col-md-auto .dropdown { margin-left: 0 !important; margin-right: 0 !important; }
    .page-socios .socios-filtros-body .row > .col-md-auto.ms-md-auto { margin-left: 0 !important; }
}

.socios-table-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.socios-table-wrap { overflow-x: auto; }
.socios-table { margin-bottom: 0; }
.socios-table thead th { background: #f8fafc; color: var(--color-text-muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.875rem 1rem; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.socios-table tbody td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; font-size: 0.9375rem; }
.socios-table tbody tr:hover { background: #f8fafc; }
.socios-cell-nro { font-weight: 600; color: var(--color-text); }
.socios-cell-nombre { font-weight: 500; }
.socios-cell-fecha { white-space: nowrap; color: var(--color-text-muted); }
.socios-badge-estado { display: inline-block; padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; }
.socios-badge-estado-ACTIVO { background: #dcfce7; color: #166534; }
.socios-badge-estado-RETIRADO { background: #f1f5f9; color: #475569; }
.socios-badge-estado-INACTIVO { background: #fef3c7; color: #b45309; }
.socios-badge-estado-RENUNCIA { background: #e2e8f0; color: #64748b; }
.socios-badge-estado-DIFUNTO { background: #fce7f3; color: #831843; }
.socios-badge-estado-EXPULSADO { background: #fee2e2; color: #b91c1c; }
.socios-badge-estado-CONYUGE { background: #ede9fe; color: #5b21b6; }
.socios-badge-estado-VIUDA { background: #fce7f3; color: #9d174d; }
.socios-badge-estado-default { background: var(--color-primary-light); color: var(--color-primary); }
.socios-badge-beneficio { display: inline-flex; align-items: center; padding: 0.2rem 0.45rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; }
.socios-badge-beneficio-si { background: #dcfce7; color: #166534; }
.socios-badge-beneficio-no { background: #f1f5f9; color: #64748b; }
.socios-cell-actions { white-space: nowrap; }
.socios-cell-actions .btn-socio-action { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.6rem; font-size: 0.8125rem; font-weight: 500; border-radius: 6px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); text-decoration: none; margin-left: 0.25rem; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.socios-cell-actions .btn-socio-action:hover { background: #f1f5f9; border-color: var(--color-primary); color: var(--color-primary); }
.socios-cell-actions .btn-socio-editar { border-color: var(--color-primary); color: var(--color-primary); }
.socios-cell-actions .btn-socio-editar:hover { background: var(--color-primary-light); }
.socios-cell-actions .btn-socio-docs { border-color: #0ea5e9; color: #0ea5e9; }
.socios-cell-actions .btn-socio-docs:hover { background: rgba(14, 165, 233, 0.08); }
.socios-cell-actions .btn-socio-beneficios { border-color: #ec4899; color: #ec4899; }
.socios-cell-actions .btn-socio-beneficios:hover { background: rgba(236, 72, 153, 0.08); }
.socios-cell-actions .btn-socio-aportes { border-color: var(--bs-success); color: var(--bs-success); }
.socios-cell-actions .btn-socio-aportes:hover { background: rgba(25, 135, 84, 0.08); }
.socios-cell-actions .btn-socio-portal { border: 1px solid #4f46e5; border-radius: 6px; color: #4f46e5; background: rgba(79, 70, 229, 0.06); }
.socios-cell-actions .btn-socio-portal:hover { background: rgba(79, 70, 229, 0.12); border-color: #4338ca; color: #4338ca; }
.modal-aportes-nuevo .aporte-monto-input { min-width: 0; }
.socios-paginador { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid var(--color-border); background: #f8fafc; font-size: 0.875rem; color: var(--color-text-muted); }
.socios-loading-cell, .socios-empty-cell, .socios-error-cell { text-align: center; padding: 2.5rem 1rem !important; color: var(--color-text-muted); }
.socios-loading-cell { display: flex !important; align-items: center; justify-content: center; gap: 0.5rem; flex-direction: column; }
.socios-loading-spinner { width: 28px; height: 28px; border: 3px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: socios-spin 0.8s linear infinite; }
@keyframes socios-spin { to { transform: rotate(360deg); } }
.socios-empty-cell .socios-empty-icon { font-size: 2.5rem; color: var(--color-border); margin-bottom: 0.5rem; }
.socios-empty-cell p { margin: 0; font-size: 0.9375rem; }
.socios-error-cell { color: var(--color-error); }

/* ---------- Página Beneficios ---------- */
.page-beneficios { padding-bottom: 1.5rem; }
.beneficios-header { margin-bottom: 1.5rem; }
.beneficios-header-content { display: flex; align-items: center; gap: 1rem; }
.beneficios-header-icon { width: 48px; height: 48px; border-radius: var(--radius); background: linear-gradient(135deg, #db2777 0%, #ec4899 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.beneficios-title { font-size: 1.5rem; font-weight: 700; color: var(--color-text); margin: 0 0 0.25rem 0; letter-spacing: -0.02em; }
.beneficios-subtitle { font-size: 0.9375rem; color: var(--color-text-muted); margin: 0; }
.beneficios-filtros-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.beneficios-filtros-body { padding: 1.25rem 1.5rem; }
.beneficios-filtros-body .row.flex-nowrap { flex-wrap: nowrap; }
.beneficios-label { font-size: 0.8125rem; font-weight: 500; color: var(--color-text-muted); margin-bottom: 0.375rem; display: block; }
.beneficios-input { border-radius: 8px; border-color: var(--color-border); }
.beneficios-col-fecha { flex: 0 0 auto; }
.beneficios-input-fecha { max-width: 125px; width: 100%; }
.btn-beneficios-filtrar { background: var(--color-primary); border-color: var(--color-primary); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-beneficios-filtrar:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.btn-beneficios-new { background: var(--bs-success); border-color: var(--bs-success); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-beneficios-new:hover { background: #157347; border-color: #146c43; color: #fff; }
.btn-beneficios-export { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-beneficios-export:hover { background: var(--color-bg); border-color: var(--color-text-muted); color: var(--color-text); }
.beneficios-dropdown-menu { border-radius: 8px; border: 1px solid var(--color-border); }
/* Botones de acción en tabla Beneficios */
.beneficios-th-desc { width: 1%; max-width: 7.5rem; }
.beneficios-th-acciones { width: 1%; white-space: nowrap; }
.beneficios-cell-desc {
    max-width: 7.5rem;
    min-width: 0;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    vertical-align: middle;
}
.beneficios-cell-desc .beneficios-desc-inner {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--color-text-muted);
}
.beneficios-cell-desc .beneficios-badge-factura { vertical-align: middle; flex-shrink: 0; }
.beneficios-cell-actions {
    white-space: nowrap;
    width: 1%;
    min-width: 17rem;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    vertical-align: middle;
}
.beneficios-cell-actions .beneficios-acciones-wrap {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}
.beneficios-cell-actions .btn-ben-action { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.3rem 0.5rem; font-size: 0.75rem; font-weight: 500; border-radius: 6px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); margin-left: 0; transition: background 0.2s, border-color 0.2s, color 0.2s; flex-shrink: 0; }
.beneficios-cell-actions .btn-ben-action:hover { background: #f1f5f9; border-color: var(--color-primary); color: var(--color-primary); }
.beneficios-cell-actions .btn-ben-ver { border-color: #0284c7; color: #0369a1; background: #e0f2fe; }
.beneficios-cell-actions .btn-ben-ver:hover { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }
.beneficios-cell-actions .btn-ben-editar { border-color: var(--color-primary); color: var(--color-primary); }
.beneficios-cell-actions .btn-ben-editar:hover { background: var(--color-primary-light); }
.beneficios-cell-actions .btn-ben-eliminar { border-color: #dc2626; color: #dc2626; }
.beneficios-cell-actions .btn-ben-eliminar:hover { background: #fef2f2; }
/* Buscar socio: lista flotante por encima, sin agrandar el div */
.beneficios-filtros-card { overflow: visible; }
.beneficios-filtros-body { overflow: visible; }
.beneficios-col-buscar { overflow: visible; }
.beneficios-buscar-socio-wrap { position: relative; min-height: 38px; overflow: visible; }
.beneficios-socios-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 1060; margin-top: 2px; max-height: 220px; overflow-y: auto; overflow-x: hidden; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; box-shadow: var(--shadow-lg); }
.beneficios-socios-list .list-group-item { border-radius: 0; border-left: 0; border-right: 0; padding: 0.5rem 0.75rem; font-size: 0.875rem; cursor: pointer; }
.beneficios-socios-list .list-group-item:first-child { border-top: 0; }
.beneficios-socios-list .list-group-item:hover { background: #f1f5f9; }
.beneficios-table-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.beneficios-table-wrap { overflow-x: auto; }
.beneficios-table { margin-bottom: 0; }
.beneficios-table thead th { background: #f8fafc; color: var(--color-text-muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.875rem 1rem; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.beneficios-table tbody td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; font-size: 0.9375rem; }
.beneficios-table tbody tr:hover { background: #f8fafc; }
.beneficios-paginador { padding: 0.75rem 1rem; border-top: 1px solid var(--color-border); background: #f8fafc; font-size: 0.875rem; color: var(--color-text-muted); }
.beneficios-empty-cell { text-align: center; padding: 2rem 1rem !important; color: var(--color-text-muted); font-size: 0.9375rem; }

/* Beneficios – filtros y botones centrados en móvil */
@media (max-width: 767.98px) {
    .page-beneficios .beneficios-filtros-body .row { align-items: stretch; }
    .page-beneficios .beneficios-filtros-body .row > .col-auto.beneficios-col-fecha,
    .page-beneficios .beneficios-filtros-body .row > .col.beneficios-col-buscar { width: 100%; max-width: 100%; flex: 0 0 100%; }
    .page-beneficios .beneficios-filtros-body .row > .col-auto:not(.beneficios-col-fecha) {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
    }
    .page-beneficios .beneficios-filtros-body .row > .col-auto:not(.beneficios-col-fecha) .btn,
    .page-beneficios .beneficios-filtros-body .row > .col-auto:not(.beneficios-col-fecha) .dropdown { margin-left: 0 !important; margin-right: 0 !important; }
    .page-beneficios .beneficios-filtros-body .row > .col-auto.ms-auto { margin-left: 0 !important; }
}

/* ---------- Página Aportes ---------- */
.page-aportes { padding-bottom: 1.5rem; }
.aportes-header { margin-bottom: 1.5rem; }
.aportes-header-content { display: flex; align-items: center; gap: 1rem; }
.aportes-header-icon { width: 48px; height: 48px; border-radius: var(--radius); background: linear-gradient(135deg, var(--bs-success) 0%, #20b2aa 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.aportes-title { font-size: 1.5rem; font-weight: 700; color: var(--color-text); margin: 0 0 0.25rem 0; letter-spacing: -0.02em; }
.aportes-subtitle { font-size: 0.9375rem; color: var(--color-text-muted); margin: 0; }
.aportes-filtros-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1rem; overflow: visible; }
.aportes-filtros-body { padding: 1.25rem 1.5rem; overflow: visible; }
.aportes-label { font-size: 0.8125rem; font-weight: 500; color: var(--color-text-muted); margin-bottom: 0.375rem; display: block; }
.aportes-input { border-radius: 8px; border-color: var(--color-border); }
.aportes-card-buscar { overflow: visible; }
.aportes-col-buscar { overflow: visible; }
.aportes-buscar-socio-wrap { position: relative; min-height: 38px; overflow: visible; }
.aportes-socios-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 1060; margin-top: 2px; max-height: 220px; overflow-y: auto; overflow-x: hidden; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; box-shadow: var(--shadow-lg); }
.aportes-socios-list.is-open { position: fixed !important; z-index: 9999 !important; margin-top: 2px; }
.aportes-socios-list .list-group-item { border-radius: 0; border-left: 0; border-right: 0; padding: 0.5rem 0.75rem; font-size: 0.875rem; cursor: pointer; }
.aportes-socios-list .list-group-item:first-child { border-top: 0; }
.aportes-socios-list .list-group-item:hover { background: #f1f5f9; }
/* Panel socio seleccionado */
.aportes-panel-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 1rem; }
.aportes-panel-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border); background: #f8fafc; }
.aportes-panel-nombre { font-weight: 600; color: var(--color-text); }
.aportes-badge-nro { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 6px; font-size: 0.8125rem; font-weight: 600; background: var(--color-primary); color: #fff; }
.aportes-consecutivo { font-size: 0.8125rem; }
.aportes-panel-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.btn-aportes-generar-panel { border: 1px solid #0d9488; background: rgba(13, 148, 136, 0.1); color: #0d9488; border-radius: 8px; font-weight: 500; padding: 0.45rem 0.9rem; font-size: 0.875rem; }
.btn-aportes-generar-panel:hover { background: rgba(13, 148, 136, 0.2); border-color: #0f766e; color: #0f766e; }
.btn-aportes-export { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); border-radius: 8px; font-weight: 500; padding: 0.45rem 0.9rem; font-size: 0.875rem; }
.btn-aportes-export:hover { background: var(--color-bg); border-color: var(--color-primary); color: var(--color-primary); }
.btn-aportes-estado { background: var(--color-primary); border: 1px solid var(--color-primary); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.45rem 0.9rem; font-size: 0.875rem; }
.btn-aportes-estado:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.aportes-dropdown-menu { border-radius: 8px; border: 1px solid var(--color-border); }
.aportes-table-wrap { overflow-x: auto; }
.aportes-table { margin-bottom: 0; width: 100%; }
.aportes-table thead th { background: var(--color-primary) !important; color: #ffffff !important; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.875rem 1rem; border-bottom: 0; white-space: nowrap; text-align: center; }
.aportes-table thead th a,
.aportes-table thead th span { color: #ffffff !important; }
.aportes-table thead th.aportes-th-chk { width: 3.25rem; min-width: 3.25rem; color: #ffffff !important; vertical-align: middle !important; padding: 0.75rem 0.5rem !important; }
/* Checkboxes: más grandes; sin background en :checked (si no, en Chrome/Edge no se ve la palomita) */
.page-aportes .aportes-table input.aporte-chk-lg {
    width: 1.35rem !important;
    height: 1.35rem !important;
    min-width: 1.35rem !important;
    min-height: 1.35rem !important;
    margin: 0 auto !important;
    cursor: pointer;
    flex-shrink: 0;
    vertical-align: middle;
    accent-color: var(--bs-success);
}
.page-aportes .aportes-table thead input.aporte-chk-lg {
    accent-color: #fff;
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 1px;
}
.aportes-table thead th:last-child { text-align: center; }
.aportes-table tbody td:last-child { text-align: right; }
.aportes-table tbody td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; font-size: 0.9375rem; }
.page-aportes .aportes-table tbody td:first-child { text-align: center; padding: 1rem 0.75rem !important; vertical-align: middle; }
.aportes-table tbody tr:hover { background: #f8fafc; }
.aportes-table .aporte-badge { display: inline-block; padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; }
.aportes-table .aporte-badge-PAGADO { background: #dcfce7; color: #166534; }
.aportes-table .aporte-badge-PENDIENTE { background: #fef3c7; color: #b45309; }
.aportes-table .aporte-badge-EXONERADO { background: #e0e7ff; color: #3730a3; }
.aportes-table .aporte-badge-ANULADO { background: #f1f5f9; color: #64748b; }
.aportes-panel-footer { display: flex; gap: 0.5rem; padding: 0.75rem 1.25rem; border-top: 1px solid var(--color-border); background: #f8fafc; }
.btn-aportes-cobrar { background: var(--bs-success); border-color: var(--bs-success); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-aportes-cobrar:hover { background: #157347; border-color: #146c43; color: #fff; }
.btn-aportes-cobrar:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-aportes-exonerar { background: #f59e0b; border-color: #f59e0b; color: #fff; border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-aportes-exonerar:hover { background: #d97706; border-color: #b45309; color: #fff; }
.btn-aportes-exonerar:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-aportes-habilitar { background: var(--color-primary); border: 1px solid var(--color-primary); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-aportes-habilitar:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.btn-aportes-habilitar:disabled { opacity: 0.65; cursor: not-allowed; }

/* Aportes: móvil — footer fijo abajo, botones apilados y visibles */
@media (max-width: 768px) {
    .page-aportes .aportes-panel-card {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .aportes-panel-footer {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)) 1rem;
    }
    .aportes-panel-footer .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
    .aportes-panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .aportes-panel-actions {
        flex-direction: column;
    }
    .aportes-panel-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}
.aportes-sin-socio-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.aportes-sin-socio-body { text-align: center; padding: 3rem 1.5rem; color: var(--color-text-muted); }
.aportes-sin-socio-icon { font-size: 3.5rem; color: var(--color-border); display: block; margin-bottom: 1rem; }
.aportes-sin-socio-text { margin: 0; font-size: 0.9375rem; }
/* Modal estado de cuenta */
#modalEstadoCuenta .modal-header { border-bottom: 1px solid var(--color-border); padding: 1rem 1.25rem; }
#modalEstadoCuenta .modal-title { font-weight: 600; color: var(--color-text); }
#modalEstadoCuenta .modal-btn-close { background: none; border: 0; font-size: 1.25rem; color: var(--color-text-muted); padding: 0.25rem; line-height: 1; cursor: pointer; }
#modalEstadoCuenta .modal-btn-close:hover { color: var(--color-text); }
#modalEstadoCuenta .modal-body { padding: 1.25rem; }
#modalEstadoCuenta .modal-footer { border-top: 1px solid var(--color-border); padding: 1rem 1.25rem; }
#modalEstadoCuenta .form-select { border-radius: 8px; border-color: var(--color-border); }

/* ---------- Página Caja ---------- */
.page-caja { padding-bottom: 1.5rem; }
.caja-header { margin-bottom: 1.5rem; }
.caja-header-content { display: flex; align-items: center; gap: 1rem; }
.caja-header-icon { width: 48px; height: 48px; border-radius: var(--radius); background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25); }
.caja-title { font-size: 1.5rem; font-weight: 700; color: var(--color-text); margin: 0 0 0.25rem 0; letter-spacing: -0.02em; }
.caja-subtitle { font-size: 0.9375rem; color: var(--color-text-muted); margin: 0; }

.caja-resumen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.caja-resumen-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1rem 1.25rem; display: flex; align-items: center; gap: 1rem; transition: box-shadow 0.2s, border-color 0.2s; }
.caja-resumen-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-primary); }
.caja-resumen-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.caja-resumen-saldo .caja-resumen-icon { background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); color: #fff; }
.caja-resumen-ingresos .caja-resumen-icon { background: #dcfce7; color: #166534; }
.caja-resumen-egresos .caja-resumen-icon { background: #fee2e2; color: #b91c1c; }
.caja-resumen-movimientos .caja-resumen-icon { background: #e0e7ff; color: #3730a3; }
.caja-resumen-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.caja-resumen-label { font-size: 0.75rem; font-weight: 500; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.caja-resumen-value { font-size: 1.125rem; font-weight: 700; color: var(--color-text); }
.caja-resumen-ingresos .caja-resumen-value { color: #166534; }
.caja-resumen-egresos .caja-resumen-value { color: #b91c1c; }

.caja-filtros-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.caja-filtros-body { padding: 1rem 1.25rem; }
.caja-filtros-row { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.caja-filtro-item { flex: 0 0 auto; }
.caja-filtro-item .caja-label { margin-bottom: 0.25rem; }
.caja-filtro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-left: auto; }
.caja-label { font-size: 0.75rem; font-weight: 500; color: var(--color-text-muted); margin-bottom: 0.375rem; display: block; }
.caja-input, .caja-select { border-radius: 8px; border-color: var(--color-border); font-size: 0.875rem; }
.caja-input-fecha { width: 100%; max-width: 118px; padding: 0.4rem 0.5rem; }
.caja-select-sm { max-width: 140px; min-width: 100px; padding: 0.4rem 0.6rem; }
.btn-caja-filtrar { background: var(--color-primary); border: 1px solid var(--color-primary); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-caja-filtrar:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.btn-caja-borrar-filtros { background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-muted); border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-caja-borrar-filtros:hover { background: var(--color-bg); border-color: var(--color-text-muted); color: var(--color-text); }
.btn-caja-export { background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text); border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-caja-export:hover { background: var(--color-bg); border-color: var(--color-primary); color: var(--color-primary); }
.caja-dropdown-export { border-radius: 8px; border: 1px solid var(--color-border); }
.btn-caja-nuevo { background: var(--bs-success); border: 1px solid var(--bs-success); color: #fff; border-radius: 8px; font-weight: 500; padding: 0.5rem 1rem; }
.btn-caja-nuevo:hover { background: #157347; border-color: #146c43; color: #fff; }

/* Caja: móvil — uso completo del ancho, filtros y botones apilados */
@media (max-width: 768px) {
    .page-caja .caja-header,
    .page-caja .caja-resumen-grid {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        width: calc(100% + 1.5rem);
        max-width: 100vw;
        box-sizing: border-box;
    }
    .page-caja .caja-header-content { padding-left: 1rem; padding-right: 1rem; }
    .page-caja .caja-resumen-grid { padding: 0 1rem; gap: 0.75rem; }
    .page-caja .caja-filtros-card,
    .page-caja .caja-table-card {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        width: calc(100% + 1.5rem);
        max-width: 100vw;
        box-sizing: border-box;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
    .page-caja .caja-filtros-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .page-caja .caja-table-wrap {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .page-caja .caja-paginador {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .page-caja .caja-filtros-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .page-caja .caja-filtro-item {
        flex: 1 1 auto;
        min-width: 0;
    }
    .page-caja .caja-input-fecha,
    .page-caja .caja-select-sm {
        max-width: none;
        width: 100%;
        min-height: 44px;
    }
    .page-caja .caja-filtro-actions {
        flex-direction: column;
        margin-left: 0;
        margin-top: 0.25rem;
        gap: 0.75rem;
    }
    .page-caja .caja-filtro-actions .btn,
    .page-caja .caja-filtro-actions .dropdown .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        font-size: 0.9375rem;
    }
    .page-caja .caja-filtro-actions .dropdown {
        width: 100%;
    }
    .page-caja .caja-filtro-actions .dropdown .btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .page-caja .caja-resumen-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .page-caja .caja-resumen-value { font-size: 1rem; }
}
@media (max-width: 480px) {
    .page-caja .caja-resumen-grid {
        grid-template-columns: 1fr;
    }
}

.caja-table-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.caja-table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.caja-table { margin-bottom: 0; width: 100%; min-width: 1010px; table-layout: fixed; border-collapse: collapse; }
@media (max-width: 768px) {
    .page-caja .caja-table-wrap.table-responsive {
        width: 100%;
        display: block;
    }
    .page-caja .caja-table-wrap.table-responsive .caja-table {
        min-width: 0;
        width: 100% !important;
        table-layout: auto;
        display: block;
    }
    .page-caja .caja-table-wrap .caja-table tbody {
        display: block;
        width: 100%;
    }
    .page-caja .caja-table-wrap .caja-table tbody tr {
        width: 100%;
        box-sizing: border-box;
    }
    .page-caja .table-responsive .caja-table tbody td {
        align-items: flex-start;
    }
    .page-caja .table-responsive .caja-table tbody td:not(.acciones-cell) {
        flex-wrap: wrap;
    }
    .page-caja .table-responsive .caja-table tbody td:before {
        flex: 0 0 auto;
        min-width: 7rem;
        margin-right: 0.75rem;
    }
    .page-caja .table-responsive .caja-table tbody td .caja-desc-inner,
    .page-caja .table-responsive .caja-table tbody td.caja-cell-categoria {
        display: block !important;
        -webkit-line-clamp: unset !important;
        line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        overflow: visible !important;
        white-space: normal !important;
        word-break: break-word;
        min-height: 0;
    }
    .page-caja .table-responsive .caja-table tbody td:not(.acciones-cell) > * {
        flex: 1 1 0;
        min-width: 0;
    }
    .page-caja .caja-paginador-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .page-caja .caja-paginador-controls {
        justify-content: center;
    }
}
/* Anchos fijos por columna (colgroup) */
.caja-col-fecha { width: 95px; }
.caja-col-tipo { width: 88px; }
.caja-col-categoria { width: 170px; }
.caja-col-desc { width: 220px; }
.caja-col-monto { width: 118px; }
.caja-col-saldo { width: 118px; }
.caja-col-usuario { width: 100px; }
.caja-col-estado { width: 92px; }
.caja-col-acciones { width: 112px; }
.caja-table thead th { background: var(--color-primary); color: #fff !important; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.6rem 0.5rem; border-bottom: 0; white-space: nowrap; text-align: left; }
.caja-table thead th.text-end { text-align: right; }
.caja-table thead th.text-center { text-align: center; }
.caja-table tbody td { padding: 0.5rem 0.5rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; font-size: 0.8125rem; box-sizing: border-box; }
.caja-table tbody tr:hover { background: #f8fafc; }
.caja-cell-fecha { white-space: nowrap; color: var(--color-text-muted); font-size: 0.8rem; }
.caja-th-categoria, .caja-th-desc, .caja-th-monto, .caja-th-saldo, .caja-th-usuario, .caja-th-estado, .caja-th-acciones { }
.caja-cell-categoria { font-size: 0.8125rem; line-height: 1.3; overflow: hidden; padding-top: 0.45rem; padding-bottom: 0.45rem; vertical-align: top; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; text-overflow: ellipsis; word-break: break-word; min-height: 2.6em; }
.caja-cell-desc { overflow: hidden; font-size: 0.8125rem; line-height: 1.35; padding-top: 0.5rem; padding-bottom: 0.5rem; vertical-align: top; }
.caja-cell-desc .caja-desc-inner { width: 100%; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; word-break: break-word; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; display: -webkit-box; min-height: 2.8em; box-sizing: border-box; }
.caja-cell-monto { font-size: 0.8rem; }
.caja-cell-saldo { font-weight: 600; color: var(--color-text); font-size: 0.8rem; }
.caja-monto-inline { white-space: nowrap; }
.caja-cell-usuario { font-size: 0.7rem; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caja-cell-estado { font-size: 0.65rem; color: var(--color-text-muted); white-space: nowrap; }
.caja-cell-acciones { white-space: nowrap; }
.caja-acciones-cell { display: inline-flex; gap: 0.25rem; align-items: center; justify-content: center; flex-wrap: nowrap; }
.caja-table .caja-btn-ver,
.caja-table .caja-btn-editar,
.caja-table .caja-btn-anular { width: 30px; height: 30px; padding: 0; border-radius: 8px; border: none; display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s, transform 0.1s; }
.caja-table .caja-btn-ver { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.caja-table .caja-btn-ver:hover { background: #2563eb; color: #fff; transform: scale(1.06); }
.caja-table .caja-btn-editar { background: rgba(13, 148, 136, 0.12); color: var(--color-primary); }
.caja-table .caja-btn-editar:hover { background: var(--color-primary); color: #fff; transform: scale(1.06); }
.caja-table .caja-btn-anular { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.caja-table .caja-btn-anular:hover { background: #dc2626; color: #fff; transform: scale(1.06); }
/* Modal ver detalle - moderno */
.caja-modal-ver-dialog { max-width: 620px; }
.caja-modal-ver .modal-content { border-radius: 12px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.12); }
.caja-modal-ver-header { background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%); color: #fff; padding: 1rem 1.25rem; border-bottom: 0; }
.caja-modal-ver-header .caja-modal-title-wrap { display: flex; align-items: center; gap: 0.75rem; }
.caja-modal-ver-header .modal-title { color: #fff; font-weight: 700; font-size: 1.1rem; }
.caja-modal-ver-header .caja-modal-subtitle { color: rgba(255,255,255,0.85); font-size: 0.8rem; margin: 0; }
.caja-modal-icon-ver { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.caja-modal-ver-header .btn-close-caja { color: rgba(255,255,255,0.9); }
.caja-modal-ver-header .btn-close-caja:hover { color: #fff; background: rgba(255,255,255,0.15); }
.caja-modal-ver-body { padding: 1.25rem 1.25rem 0.5rem; font-size: 0.875rem; }
.caja-ver-card { background: #f8fafc; border-radius: 10px; padding: 1rem 1.15rem; margin-bottom: 1rem; border: 1px solid #e2e8f0; }
.caja-ver-card-title { font-size: 0.8rem; font-weight: 700; color: var(--color-primary); margin: 0 0 0.75rem 0; display: flex; align-items: center; }
.caja-ver-card-subtitle { font-size: 0.75rem; font-weight: 600; color: #64748b; margin: 0 0 0.5rem 0; }
.caja-ver-item { display: block; margin-bottom: 0.5rem; }
.caja-ver-item-label { display: block; font-size: 0.7rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.15rem; }
.caja-ver-item-value { font-size: 0.8125rem; color: #0f172a; font-weight: 500; }
.caja-ver-monto { font-weight: 700; }
.caja-ver-total { font-weight: 700; color: var(--color-primary); }
.caja-ver-detalle-wrap { border-radius: 8px; overflow: hidden; border: 1px solid #e2e8f0; }
.caja-ver-detalle-table { font-size: 0.75rem; margin: 0; }
.caja-ver-detalle-table thead th { background: #e2e8f0; color: #475569; font-size: 0.7rem; font-weight: 600; padding: 0.4rem 0.5rem; }
.caja-ver-detalle-table tbody td { padding: 0.35rem 0.5rem; font-size: 0.75rem; border-color: #f1f5f9; }
.caja-modal-ver-footer { padding: 0.75rem 1.25rem; border-top: 1px solid #e2e8f0; background: #f8fafc; }
.caja-btn-cerrar-ver-footer { background: #64748b; color: #fff; border: none; border-radius: 8px; padding: 0.45rem 1rem; font-weight: 600; font-size: 0.8125rem; transition: background 0.2s; }
.caja-btn-cerrar-ver-footer:hover { background: #475569; color: #fff; }
.caja-table .caja-monto-ingreso { color: #15803d !important; font-weight: 700; }
.caja-table .caja-monto-egreso { color: #b91c1c !important; font-weight: 700; }
.caja-badge { display: inline-block; padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.caja-badge-ingreso { background: #dcfce7; color: #166534; }
.caja-badge-egreso { background: #fee2e2; color: #b91c1c; }
.caja-empty-cell { text-align: center; padding: 2.5rem 1rem !important; color: var(--color-text-muted); }
.caja-empty-cell .caja-empty-icon { font-size: 2.5rem; color: var(--color-border); display: block; margin-bottom: 0.5rem; }
.caja-empty-cell p { margin: 0; font-size: 0.9375rem; }
.caja-paginador { padding: 0.75rem 1.25rem; border-top: 1px solid var(--color-border); background: #f8fafc; font-size: 0.875rem; }
.caja-paginador-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.caja-paginador-text { color: var(--color-text-muted); }
.caja-paginador-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.caja-paginador-por-pagina { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--color-text-muted); font-weight: 500; margin: 0; }
.caja-select-por-pagina { width: auto; min-width: 4rem; padding: 0.25rem 0.5rem; font-size: 0.8125rem; border-radius: 6px; border-color: var(--color-border); }
.caja-paginador-nav { display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-caja-page { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); border-radius: 6px; font-weight: 500; padding: 0.35rem 0.65rem; font-size: 0.8125rem; }
.btn-caja-page:hover:not(:disabled) { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn-caja-page:disabled { opacity: 0.5; cursor: not-allowed; }
.caja-paginador-page-info { font-size: 0.8125rem; color: var(--color-text-muted); white-space: nowrap; }

.caja-modal-content { border-radius: var(--radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-lg); overflow: hidden; }
.caja-modal-header { border-bottom: 1px solid var(--color-border); padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.caja-modal-header .modal-title { font-weight: 600; color: var(--color-text); }
.btn-close-caja { background: none; border: 0; font-size: 1.25rem; color: var(--color-text-muted); padding: 0.25rem; line-height: 1; cursor: pointer; border-radius: 6px; }
.btn-close-caja:hover { color: var(--color-text); background: var(--color-bg); }
.caja-modal-body { padding: 1.25rem 1.5rem; }
.caja-form-group { margin-bottom: 1rem; }
.caja-form-group:last-of-type { margin-bottom: 0; }
.caja-form-label { font-size: 0.8125rem; font-weight: 500; color: var(--color-text); margin-bottom: 0.375rem; display: block; }
.caja-form-label i { color: var(--color-text-muted); }
.caja-form-control { border-radius: 8px; border-color: var(--color-border); }
.caja-form-control-lg { padding: 0.6rem 0.75rem; font-size: 1rem; }
.caja-input-disabled { background: #f1f5f9 !important; color: var(--color-text-muted) !important; cursor: not-allowed; }
.caja-monto-hint { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 0.25rem; display: block; }

/* Modal Nuevo movimiento - estética moderna */
.caja-modal-mov-dialog { max-width: 480px; }
.caja-modal-mov-header { background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); color: #fff; border-bottom: 0; }
.caja-modal-mov-header .modal-title { color: #fff; font-size: 1.25rem; }
.caja-modal-mov-header .caja-modal-subtitle { color: rgba(255,255,255,0.9); font-size: 0.8125rem; margin-top: 0.15rem; }
.caja-modal-mov-header .btn-close-caja { color: rgba(255,255,255,0.9); }
.caja-modal-mov-header .btn-close-caja:hover { color: #fff; background: rgba(255,255,255,0.15); }
.caja-modal-title-wrap { display: flex; align-items: center; gap: 1rem; }
.caja-modal-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; background: rgba(255,255,255,0.2); }
.caja-modal-mov-body { padding: 1.5rem; }
.caja-mov-seccion { margin-bottom: 1.25rem; }
.caja-mov-seccion:last-of-type { margin-bottom: 0; }
.caja-egreso-opciones { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--color-border); }
.caja-factura-option-card { background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%); border: 1px solid #99f6e4; border-radius: 12px; padding: 1.25rem; }
.caja-form-check-factura { margin-bottom: 1rem; }
.caja-form-check-factura .form-check-label { font-weight: 600; color: var(--color-text); }
.caja-btn-cargar-factura { display: inline-flex; align-items: center; background: var(--color-primary); color: #fff; border: none; border-radius: 10px; padding: 0.6rem 1.25rem; font-weight: 600; font-size: 0.9375rem; transition: background 0.2s, transform 0.15s; }
.caja-btn-cargar-factura:hover:not(:disabled) { background: var(--color-primary-hover); color: #fff; transform: translateY(-1px); }
.caja-btn-cargar-factura:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.caja-modal-mov-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--color-border); gap: 0.75rem; }
.caja-btn-cancel { display: inline-flex; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text); border-radius: 10px; padding: 0.6rem 1.25rem; font-weight: 600; transition: background 0.2s, border-color 0.2s; }
.caja-btn-cancel:hover { background: var(--color-bg); border-color: var(--color-text-muted); color: var(--color-text); }
.caja-btn-save { display: inline-flex; align-items: center; background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); color: #fff; border: none; border-radius: 10px; padding: 0.6rem 1.25rem; font-weight: 600; box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3); transition: box-shadow 0.2s, transform 0.15s; }
.caja-btn-save:hover { color: #fff; box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4); transform: translateY(-1px); }

/* Modal Factura - estética moderna */
.caja-modal-factura-dialog { max-width: 920px; }
.caja-modal-factura-content { border-radius: var(--radius-lg); overflow: hidden; }
.caja-modal-factura-header { background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%); color: #fff; border-bottom: 0; padding: 1.25rem 1.5rem; }
.caja-modal-factura-header .modal-title { color: #fff; font-size: 1.2rem; }
.caja-modal-factura-header .caja-modal-subtitle { color: rgba(255,255,255,0.9); font-size: 0.8125rem; margin-top: 0.15rem; }
.caja-modal-factura-header .btn-close-caja { color: rgba(255,255,255,0.9); }
.caja-modal-factura-header .btn-close-caja:hover { color: #fff; background: rgba(255,255,255,0.15); }
.caja-modal-icon-factura { background: rgba(255,255,255,0.25); color: #fff; }
.caja-modal-factura-body { padding: 1.5rem; max-height: 70vh; overflow-y: auto; }
.caja-factura-encabezado { padding: 1.25rem; background: #f8fafc; border-radius: 12px; border: 1px solid var(--color-border); margin-bottom: 1.25rem; }
.caja-factura-seccion-titulo { font-size: 0.9375rem; font-weight: 700; color: var(--color-primary); margin-bottom: 0.75rem; display: flex; align-items: center; }
.caja-factura-detalle { margin-bottom: 1.25rem; }
.caja-factura-detalle-toolbar { margin-bottom: 0.75rem; }
.caja-btn-add-line {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d9488 100%);
    color: #fff; border: none; border-radius: 12px;
    padding: 0.6rem 1.25rem; font-weight: 600; font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(13, 148, 136, 0.35);
    transition: box-shadow 0.2s, transform 0.15s, background 0.2s;
}
.caja-btn-add-line:hover { color: #fff; box-shadow: 0 4px 14px rgba(13, 148, 136, 0.45); transform: translateY(-2px); }
.caja-btn-add-line:active { transform: translateY(0); box-shadow: 0 1px 6px rgba(13, 148, 136, 0.3); }
.caja-table-detalle-wrap { border-radius: 10px; overflow: hidden; border: 1px solid var(--color-border); }
.caja-table-detalle { font-size: 0.875rem; margin-bottom: 0; }
.caja-table-detalle thead th { background: var(--color-primary); color: #fff !important; padding: 0.6rem 0.5rem; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.caja-table-detalle tbody td { padding: 0.4rem 0.5rem; vertical-align: middle; }
.caja-table-detalle .form-control-sm, .caja-table-detalle .form-select-sm { font-size: 0.8125rem; padding: 0.3rem 0.5rem; border-radius: 6px; }
.caja-cell-accion { width: 56px; text-align: center; vertical-align: middle !important; }
.caja-table-detalle .btn-quitar-linea {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; border: none; border-radius: 50%;
    background: rgba(239, 68, 68, 0.08); color: #dc2626;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.caja-table-detalle .btn-quitar-linea:hover { background: #dc2626; color: #fff; transform: scale(1.08); }
.caja-table-detalle .btn-quitar-linea:active { transform: scale(0.96); }
.caja-table-detalle .btn-quitar-linea i { font-size: 1.1rem; }
.caja-factura-totales { padding: 1.25rem; background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%); border-radius: 12px; border: 1px solid #99f6e4; }
.caja-totales-table { width: auto; min-width: 200px; margin-bottom: 0; font-size: 0.9375rem; }
.caja-totales-table td { padding: 0.35rem 0.5rem; border: 0; }
.caja-totales-total-row td { font-size: 1.05rem; padding-top: 0.5rem; color: var(--color-primary); }
.caja-factura-aviso { color: var(--color-text-muted); font-size: 0.8125rem; margin-top: 0.5rem; }
.caja-modal-factura-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--color-border); gap: 0.75rem; }
.caja-btn-apply { display: inline-flex; align-items: center; background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); color: #fff; border: none; border-radius: 10px; padding: 0.6rem 1.25rem; font-weight: 600; box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3); transition: box-shadow 0.2s, transform 0.15s; }
.caja-btn-apply:hover { color: #fff; box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4); transform: translateY(-1px); }

.caja-modal-footer { border-top: 1px solid var(--color-border); padding: 1rem 1.25rem; gap: 0.5rem; }

/* ---------- Página 404 moderna ---------- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    padding: 2rem;
}

.error-page .error-wrap {
    text-align: center;
    max-width: 420px;
}

.error-page .error-code {
    font-size: clamp(5rem, 15vw, 8rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 40px rgba(13, 148, 136, 0.3);
    letter-spacing: -0.04em;
}

.error-page .error-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 1rem 0 0.5rem;
}

.error-page .error-desc {
    font-size: 0.9375rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.error-page .btn-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #0d9488;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.error-page .btn-home:hover {
    background: #0f766e;
    color: #fff;
    transform: translateY(-1px);
}

.error-page .error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    background: rgba(13, 148, 136, 0.15);
    color: #0d9488;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

/* ---------- Modales: bloqueados y botón cerrar solo icono (sin fondo) ---------- */
.modal[data-bs-backdrop="static"] {
    pointer-events: auto;
}

.modal .modal-header .modal-btn-close,
.modal .modal-header .btn.modal-btn-close {
    width: 2rem;
    height: 2rem;
    padding: 0;
    margin: 0;
    background: transparent !important;
    border: none !important;
    border-radius: 8px;
    color: #64748b !important;
    opacity: 1;
}

.modal .modal-header .modal-btn-close:hover,
.modal .modal-header .btn.modal-btn-close:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #1e293b !important;
}

.modal .modal-header .modal-btn-close .bi {
    font-size: 1.25rem;
}

.modal .modal-header .modal-btn-close:focus {
    outline: none;
    box-shadow: none;
}

/* Botones en modales: Cerrar gris, Guardar teal */
.modal .modal-footer .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.modal .modal-footer .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: #fff;
}

.modal .modal-footer .btn-primary {
    background-color: #0f766e;
    border-color: #0f766e;
}

.modal .modal-footer .btn-primary:hover {
    background-color: #0d9488;
    border-color: #0d9488;
}

.modal .modal-footer .btn-success {
    background-color: #198754;
    border-color: #198754;
}

.modal .modal-footer .btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

/* ---------- SweetAlert2: colores forzados (Cancelar gris, Guardar teal, Procesar verde) ---------- */
.swal2-container .swal2-popup .swal2-actions .swal2-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 10px;
    border: none !important;
    cursor: pointer;
    transition: background 0.2s, transform 0.05s;
}

.swal2-container .swal2-popup .swal2-actions .swal2-btn:hover {
    transform: translateY(-1px);
}

/* Cancelar: siempre gris */
.swal2-container .swal2-popup .swal2-actions .swal2-btn-cancel,
.swal2-container .swal2-popup .swal2-actions button.swal2-cancel {
    background: #6c757d !important;
    color: #fff !important;
    border: none !important;
}

.swal2-container .swal2-popup .swal2-actions .swal2-btn-cancel:hover,
.swal2-container .swal2-popup .swal2-actions button.swal2-cancel:hover {
    background: #5a6268 !important;
    color: #fff !important;
}

/* Confirmar teal (Guardar / Aceptar / Cerrar sesión / OK) */
.swal2-container .swal2-popup .swal2-actions .swal2-btn-confirm:not(.swal2-btn-success):not(.swal2-btn-danger),
.swal2-container .swal2-popup .swal2-actions .swal2-btn-teal,
.swal2-container .swal2-popup .swal2-actions .swal2-btn-primary,
.swal2-container .swal2-popup .swal2-actions .swal2-btn-alert,
.swal2-container .swal2-popup .swal2-actions button.swal2-confirm:not(.swal2-btn-success):not(.swal2-btn-danger) {
    background: #0f766e !important;
    color: #fff !important;
    border: none !important;
}

.swal2-container .swal2-popup .swal2-actions .swal2-btn-confirm:hover:not(.swal2-btn-success):not(.swal2-btn-danger),
.swal2-container .swal2-popup .swal2-actions .swal2-btn-teal:hover,
.swal2-container .swal2-popup .swal2-actions .swal2-btn-alert:hover {
    background: #0d9488 !important;
    color: #fff !important;
}

/* Eliminar / Anular: rojo */
.swal2-container .swal2-popup .swal2-actions .swal2-btn-danger,
.swal2-container .swal2-popup .swal2-actions button.swal2-confirm.swal2-btn-danger {
    background: #dc2626 !important;
    color: #fff !important;
    border: none !important;
}

.swal2-container .swal2-popup .swal2-actions .swal2-btn-danger:hover {
    background: #b91c1c !important;
    color: #fff !important;
}

/* Procesar / Cobrar / Sí ejecutar: verde */
.swal2-container .swal2-popup .swal2-actions .swal2-btn-confirm.swal2-btn-success,
.swal2-container .swal2-popup .swal2-actions button.swal2-confirm.swal2-btn-success {
    background: #198754 !important;
    color: #fff !important;
    border: none !important;
}

.swal2-container .swal2-popup .swal2-actions .swal2-btn-confirm.swal2-btn-success:hover {
    background: #157347 !important;
    color: #fff !important;
}

.swal2-container .swal2-popup .swal2-actions {
    gap: 0.75rem;
}

/* ---------- Modal Documentos (socios): profesional y moderno ---------- */
.modal-documentos .modal-content-docs {
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.modal-documentos .modal-header-docs {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    border-bottom: none;
}

.modal-documentos .modal-header-docs .modal-title {
    font-weight: 600;
    font-size: 1.15rem;
}

.modal-documentos .modal-docs-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.modal-documentos .modal-header-docs .modal-btn-close {
    color: #fff;
    opacity: 0.9;
}

.modal-documentos .modal-header-docs .modal-btn-close:hover {
    opacity: 1;
    color: #fff;
}

.modal-documentos .modal-body-docs {
    padding: 1.5rem;
    background: #f8fafc;
}

.modal-documentos .documentos-lista {
    min-height: 80px;
}

.modal-documentos .documentos-loading {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.modal-documentos .documentos-loading-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 0.75rem;
    border: 3px solid #e2e8f0;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: documentos-spin 0.7s linear infinite;
}

@keyframes documentos-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Modal Portal (socios): profesional y moderno ---------- */
.modal-portal .modal-content-portal {
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.modal-portal .modal-header-portal {
    background: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #6366f1 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.modal-portal .modal-portal-title-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-portal .modal-portal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.modal-portal .modal-header-portal .modal-title {
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.modal-portal .modal-portal-subtitle {
    font-size: 0.8125rem;
    opacity: 0.9;
    margin-top: 0.2rem;
}

.modal-portal .modal-portal-close {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.modal-portal .modal-portal-close:hover {
    color: #fff;
}

.modal-portal .modal-body-portal {
    padding: 1.5rem 1.5rem 1.25rem;
    background: #f8fafc;
}

.modal-portal .portal-socio-card,
.modal-portal .portal-estado-card,
.modal-portal .portal-acciones-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin-bottom: 0.75rem;
}

.modal-portal .portal-socio-label,
.modal-portal .portal-estado-label,
.modal-portal .portal-acciones-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}

.modal-portal .portal-socio-nombre {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
}

.modal-portal .portal-estado-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.modal-portal .portal-estado-badge.estado-deshabilitado {
    background: #f1f5f9;
    color: #64748b;
}

.modal-portal .portal-estado-badge.estado-habilitado {
    background: #dcfce7;
    color: #166534;
}

.modal-portal .portal-estado-badge.estado-bloqueado {
    background: #fef2f2;
    color: #b91c1c;
}

.modal-portal .portal-acciones-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-portal .btn-portal-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.modal-portal .btn-portal-habilitar {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.modal-portal .btn-portal-habilitar:hover {
    background: #bbf7d0;
    border-color: #22c55e;
    color: #15803d;
}

.modal-portal .btn-portal-deshabilitar {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.modal-portal .btn-portal-deshabilitar:hover {
    background: #fde68a;
    border-color: #f59e0b;
    color: #b45309;
}

.modal-portal .btn-portal-resetear {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.modal-portal .btn-portal-resetear:hover {
    background: #bfdbfe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.modal-portal .btn-portal-desbloquear {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #a5b4fc;
}

.modal-portal .btn-portal-desbloquear:hover {
    background: #c7d2fe;
    border-color: #6366f1;
    color: #4f46e5;
}

.modal-portal .portal-info {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.modal-portal .portal-info .bi {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.modal-portal .modal-footer-portal {
    border-top: 1px solid var(--color-border);
    padding: 0.875rem 1.5rem;
    background: var(--color-surface);
}

/* ---------- Modal Socio (Nuevo / Editar): profesional e intuitivo ---------- */
.modal-socio .modal-content-socio {
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.modal-socio .modal-header-socio {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.modal-socio .modal-socio-title-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-socio .modal-socio-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-socio .modal-header-socio .modal-title {
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.modal-socio .modal-socio-subtitle {
    font-size: 0.8125rem;
    opacity: 0.92;
    margin-top: 0.2rem;
}

.modal-socio .modal-socio-close {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.modal-socio .modal-socio-close:hover {
    color: #fff;
}

.modal-socio .modal-body-socio {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
}

.modal-socio .socio-form-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem 1.15rem;
    margin-bottom: 0.85rem;
}

.modal-socio .socio-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-socio .modal-footer-socio {
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    background: var(--color-surface);
    gap: 0.75rem;
}

.modal-socio .btn-socio-cerrar {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.modal-socio .btn-socio-cerrar:hover {
    background: #e2e8f0;
    color: #475569;
    border-color: #cbd5e1;
}

.modal-socio .btn-socio-guardar {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
}

.modal-socio .btn-socio-guardar:hover {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.4);
    transform: translateY(-1px);
}

/* ---------- Modal Generar Aportes (rediseño moderno) ---------- */
.modal-aportes-nuevo .modal-dialog { max-width: 520px; }
.modal-aportes-nuevo .modal-content-aportes-nuevo {
    border-radius: 20px;
    box-shadow: 0 32px 64px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    border: none;
}

.modal-aportes-nuevo .modal-header-aportes-nuevo {
    background: linear-gradient(160deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
    color: #fff;
    padding: 1.5rem 1.75rem;
    border-bottom: none;
}

.modal-aportes-nuevo .modal-aportes-nuevo-title-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-aportes-nuevo .modal-aportes-nuevo-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.modal-aportes-nuevo .modal-header-aportes-nuevo .modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.modal-aportes-nuevo .modal-aportes-nuevo-subtitle {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-top: 0.25rem;
    font-weight: 500;
}

.modal-aportes-nuevo .modal-aportes-nuevo-close {
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.modal-aportes-nuevo .modal-aportes-nuevo-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-aportes-nuevo .modal-body-aportes-nuevo {
    padding: 1.5rem 1.75rem;
    background: #fafbfc;
}

.modal-aportes-nuevo .modal-aportes-desc {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.modal-aportes-nuevo .modal-aportes-monto-row {
    margin-bottom: 1.25rem;
}
.modal-aportes-nuevo .modal-aportes-monto-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}
.modal-aportes-nuevo .modal-aportes-monto-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
.modal-aportes-nuevo .modal-aportes-monto-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #0f766e;
    font-size: 1.1rem;
}
.modal-aportes-nuevo .aporte-monto-formato {
    width: 140px;
    min-width: 0;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
}
.modal-aportes-nuevo .aporte-monto-formato:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.modal-aportes-nuevo .modal-aportes-btn-meses {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.25);
    border-radius: 10px;
    padding: 0.5rem 0.9rem;
    transition: background 0.2s, border-color 0.2s;
}
.modal-aportes-nuevo .modal-aportes-btn-meses:hover {
    background: rgba(15, 118, 110, 0.14);
    border-color: #0f766e;
    color: #0f766e;
}
.modal-aportes-nuevo .modal-aportes-btn-meses i { font-size: 1rem; }

.modal-aportes-nuevo .modal-aportes-meses-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.6rem;
}

/* Lista vertical de meses: uno debajo del otro, mismo diseño Socios y Aportes */
.modal-aportes-nuevo .aportes-nuevo-meses-grid,
.modal-aportes-nuevo .aportes-nuevo-lista {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
}
.modal-aportes-nuevo .aporte-mes-cell {
    flex: 0 0 auto;
    min-width: 0;
}
.modal-aportes-nuevo .form-check-aporte {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin: 0;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.modal-aportes-nuevo .form-check-aporte:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.modal-aportes-nuevo .form-check-aporte.form-check-aporte-disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    opacity: 0.85;
}
.modal-aportes-nuevo .form-check-aporte.form-check-aporte-disabled:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}
.modal-aportes-nuevo .form-check-aporte:has(.form-check-input:checked) {
    border-color: #0d9488;
    background: rgba(13, 148, 136, 0.06);
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.2);
}
.modal-aportes-nuevo .form-check-aporte .form-check-label {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
}
.modal-aportes-nuevo .form-check-aporte.form-check-aporte-disabled .form-check-label {
    cursor: default;
    color: #64748b;
}
.modal-aportes-nuevo .form-check-aporte .aporte-mes-ya-registrado {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}
.modal-aportes-nuevo .form-check-aporte .form-check-input {
    margin: 0;
    flex-shrink: 0;
}
.modal-aportes-nuevo .form-check-aporte .form-check-input:checked {
    background-color: #0d9488;
    border-color: #0d9488;
}
.modal-aportes-nuevo .form-check-aporte .form-check-input:disabled {
    cursor: not-allowed;
}

.modal-aportes-nuevo .modal-footer-aportes-nuevo {
    border-top: 1px solid #e2e8f0;
    padding: 1.25rem 1.75rem;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}
.modal-aportes-nuevo .modal-aportes-btn-skip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    transition: background 0.2s, color 0.2s;
}
.modal-aportes-nuevo .modal-aportes-btn-skip:hover {
    background: #e2e8f0;
    color: #475569;
    border-color: #cbd5e1;
}
.modal-aportes-nuevo .btn-aportes-generar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(160deg, #0f766e 0%, #0d9488 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.55rem 1.25rem;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.modal-aportes-nuevo .btn-aportes-generar:hover {
    background: linear-gradient(160deg, #0d9488 0%, #14b8a6 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
    transform: translateY(-1px);
}
.modal-aportes-nuevo .btn-aportes-generar i { font-size: 1.1rem; }
.modal-aportes-nuevo .btn-aportes-generar span { font-weight: 600; }

.modal-documentos .documentos-aviso {
    background: #fef3c7;
    color: #92400e;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Estado vacío */
.modal-documentos .documentos-empty {
    text-align: center;
    padding: 2rem 1rem;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed var(--color-border);
}

.modal-documentos .documentos-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 14px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.modal-documentos .documentos-empty-text {
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.25rem 0;
}

.modal-documentos .documentos-empty-hint {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* Tabla documentos */
.modal-documentos .documentos-tabla-wrap {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.modal-documentos .documentos-tabla {
    margin: 0;
    font-size: 0.9375rem;
}

.modal-documentos .documentos-tabla thead th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.875rem 1rem;
    border: none;
}

.modal-documentos .documentos-tabla tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-color: #f1f5f9;
}

.modal-documentos .documentos-tabla tbody tr:hover {
    background: #f8fafc;
}

.modal-documentos .documentos-cell-tipo {
    font-weight: 500;
    color: var(--color-text);
}

.modal-documentos .documentos-badge-uso {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: #e0f2fe;
    color: #0369a1;
}

/* Botones de acción en tabla */
.modal-documentos .btn-doc-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.05s;
    margin-left: 0.25rem;
}

.modal-documentos .btn-doc-action:hover {
    transform: translateY(-1px);
}

.modal-documentos .btn-doc-ver {
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
}

.modal-documentos .btn-doc-ver:hover {
    background: rgba(15, 118, 110, 0.18);
    color: #0d9488;
}

.modal-documentos .btn-doc-enlace {
    background: #f1f5f9;
    color: #475569;
}

.modal-documentos .btn-doc-enlace:hover {
    background: #e2e8f0;
    color: #334155;
}

.modal-documentos .btn-doc-eliminar {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

.modal-documentos .btn-doc-eliminar:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #b91c1c;
}

/* Card agregar documento */
.modal-documentos .documentos-agregar-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.modal-documentos .documentos-agregar-header {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.modal-documentos .documentos-agregar-header .bi {
    color: var(--color-primary);
}

.modal-documentos .documentos-agregar-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.modal-documentos .documentos-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.35rem;
}

.modal-documentos .form-control-docs,
.modal-documentos .form-select-docs {
    border-radius: 8px;
    border-color: #e2e8f0;
    font-size: 0.9375rem;
}

.modal-documentos .form-control-docs:focus,
.modal-documentos .form-select-docs:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.modal-documentos .form-control-file-docs {
    padding: 0.4rem 0.75rem;
}

.modal-documentos .btn-doc-agregar {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3);
    transition: transform 0.1s, box-shadow 0.2s;
}

.modal-documentos .btn-doc-agregar:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
}

.modal-documentos .btn-doc-agregar:disabled {
    opacity: 0.7;
    transform: none;
}

.modal-documentos .modal-footer-docs {
    padding: 1rem 1.5rem;
    background: #fff;
    border-top: 1px solid var(--color-border);
}

.modal-documentos .btn-modal-close {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.modal-documentos .btn-modal-close:hover {
    background: #e2e8f0;
    color: #334155;
}

/* ========== Reportes ========== */
.page-reportes { padding-bottom: 1.5rem; }
.reportes-header { margin-bottom: 1.5rem; }
.reportes-header-content { display: flex; align-items: center; gap: 1rem; }
.reportes-header-icon {
    width: 48px; height: 48px; border-radius: var(--radius);
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0; box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}
.reportes-title { font-size: 1.5rem; font-weight: 700; color: var(--color-text); margin: 0 0 0.25rem 0; }
.reportes-subtitle { font-size: 0.9375rem; color: var(--color-text-muted); margin: 0; }

.reportes-tabs {
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
}
.reportes-tabs .nav-link {
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.65rem 1.1rem;
    border: none;
    color: #64748b;
    background: transparent;
    transition: color 0.2s, background 0.2s;
}
.reportes-tabs .nav-link:hover { color: var(--color-text); background: #f1f5f9; }
.reportes-tabs .nav-link.active { color: #fff; }
.reportes-tab-mef.active { background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%); }
.reportes-tab-aportes.active { background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%); }
.reportes-tab-socios.active { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.reportes-tab-caja.active { background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%); }
.reportes-tab-importaciones.active { background: linear-gradient(135deg, #ea580c 0%, #f97316 100%); }
.reportes-tab-formularios { background: #cbd5e1; color: #334155; }
.reportes-tab-formularios:hover { background: #94a3b8; color: #fff; }
.reportes-tab-formularios.active { background: linear-gradient(135deg, #475569 0%, #64748b 100%); color: #fff; }
.reportes-tab-cumpleanos.active { background: linear-gradient(135deg, #be185d 0%, #ec4899 100%); }
.reportes-card-header-cumpleanos { background: linear-gradient(135deg, #be185d 0%, #ec4899 100%); }

.reportes-card { border-radius: var(--radius-lg); overflow: hidden; }
.reportes-card-header {
    font-weight: 600;
    padding: 1rem 1.25rem;
    color: #fff;
    border: none;
}
.reportes-card-header-mef { background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%); }
.reportes-card-header-aportes { background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%); }
.reportes-card-header-socios { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.reportes-card-header-caja { background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%); }
.reportes-card-header-importaciones { background: linear-gradient(135deg, #ea580c 0%, #f97316 100%); }
.reportes-card-header-formularios { background: linear-gradient(135deg, #475569 0%, #64748b 100%); }
.reportes-card .card-body { padding: 1.25rem 1.5rem; }

.btn-reportes-csv {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: transform 0.1s, box-shadow 0.2s;
}
.btn-reportes-csv:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35); }
.btn-reportes-excel {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.1s, box-shadow 0.2s;
}
.btn-reportes-excel:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35); }
.btn-reportes-pdf {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.1s, box-shadow 0.2s;
}
.btn-reportes-pdf:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(185, 28, 28, 0.35); }

/* ---------- Importación MEF: adaptación móvil ---------- */
.page-importacion { padding-bottom: 1.5rem; }
@media (max-width: 767.98px) {
    .page-importacion .importacion-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .page-importacion .importacion-form-row > [class^="col"] {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    .page-importacion .importacion-form-row .importacion-select,
    .page-importacion .importacion-form-row .importacion-select-mes,
    .page-importacion .importacion-form-row .importacion-select-col {
        width: 100%;
        max-width: none;
    }
    .page-importacion .importacion-form-row > .col-auto:last-child {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 0.25rem;
    }
    .page-importacion .importacion-form-row > .col-auto:last-child .d-flex {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .page-importacion #panelPreview .card-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.75rem;
    }
    .page-importacion #panelPreview .card-header .d-flex {
        justify-content: center;
        flex-wrap: wrap;
    }
    .page-importacion .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}


.socios-badge-estado-EN_MORA { background: #fee2e2; color: #991b1b; }
