﻿/* =====================================================
   ADESCO - SISTEMA DE COBRO DE AGUA POTABLE
   STYLE.CSS LIMPIO v4.0
===================================================== */

/* =====================================================
   VARIABLES
===================================================== */

:root{
    --sidebar:#0f172a;
    --sidebar-dark:#111827;
    --sidebar-hover:#1e293b;

    --primary:#0ea5e9;
    --primary-dark:#0284c7;

    --success:#10b981;
    --success-dark:#059669;

    --warning:#f59e0b;
    --warning-dark:#d97706;

    --danger:#ef4444;
    --danger-dark:#dc2626;

    --info:#2563eb;
    --secondary:#64748b;
    --secondary-dark:#475569;

    --bg:#f1f5f9;
    --card:#ffffff;

    --text:#0f172a;
    --text-soft:#334155;
    --text-light:#64748b;

    --border:#e2e8f0;
    --border-dark:#cbd5e1;

    --radius-sm:8px;
    --radius-md:12px;
    --radius-lg:16px;
    --radius-xl:18px;

    --shadow-sm:0 2px 8px rgba(15,23,42,.05);
    --shadow-md:0 8px 25px rgba(15,23,42,.08);
    --shadow-lg:0 14px 35px rgba(15,23,42,.14);

    --sidebar-width:280px;
    --header-height:72px;
}

/* =====================================================
   RESET GENERAL
===================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}

html{
    scroll-behavior:smooth;
    overflow-x:hidden;
}

body{
    background:var(--bg);
    color:var(--text);
    overflow-x:hidden;
}

a{
    text-decoration:none;
}

button,
input,
select,
textarea{
    font-family:inherit;
}

button{
    cursor:pointer;
}

img{
    max-width:100%;
}

/* =====================================================
   LAYOUT PRINCIPAL
===================================================== */

.content{
    margin-left:var(--sidebar-width);
    width:calc(100% - var(--sidebar-width));
    max-width:calc(100vw - var(--sidebar-width));
    min-height:100vh;
    padding-top:var(--header-height);
    overflow-x:hidden;
}

.page-content{
    padding:16px 18px;
    width:100%;
    overflow-x:hidden;
}

.page-title{
    margin-bottom:16px;
}

.page-title h1{
    font-size:38px;
    line-height:1.05;
    font-weight:800;
    margin-bottom:4px;
    color:var(--text);
}

.page-title p{
    color:var(--text-light);
    font-size:14px;
}

/* =====================================================
   SIDEBAR
===================================================== */

.sidebar{
    width:var(--sidebar-width);
    height:100vh;
    min-height:100vh;
    background:
        radial-gradient(circle at 50% 0%, rgba(14,165,233,.18), transparent 34%),
        linear-gradient(180deg,#0b1220 0%,#111827 56%,#0f172a 100%);
    color:white;
    position:fixed;
    top:0;
    left:0;
    z-index:999;
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:thin;
    scrollbar-color:#334155 #0f172a;
    border-right:1px solid rgba(148,163,184,.14);
    box-shadow:8px 0 28px rgba(15,23,42,.18);
}

/* Configuracion: patron administrativo compacto compartido */
.config-page,
.operators-page .page-content,
.periodos-page,
.audit-page .page-content{
    max-width:none;
}

.config-page .report-hero,
.operators-page .report-hero,
.periodos-page .report-hero,
.audit-page .report-hero{
    align-items:flex-start;
    margin-bottom:14px;
}

.config-page .report-hero h1,
.operators-page .report-hero h1,
.periodos-page .report-hero h1,
.audit-page .report-hero h1{
    margin-top:4px;
    font-size:34px;
    line-height:1.05;
}

.config-page .report-hero p,
.operators-page .report-hero p,
.periodos-page .report-hero p,
.audit-page .report-hero p{
    max-width:720px;
    margin-top:5px;
    font-size:13px;
    line-height:1.4;
}

.config-page .report-hero-actions,
.operators-page .report-hero-actions,
.periodos-page .report-hero-actions,
.audit-page .report-hero-actions{
    gap:8px;
}

.config-page .report-hero-actions a,
.config-page .report-hero-actions button,
.operators-page .report-hero-actions a,
.periodos-page .report-hero-actions a,
.audit-page .report-hero-actions a,
.audit-page .report-hero-actions button{
    min-height:38px;
    padding:0 13px;
    border-radius:8px;
    font-size:12px;
    white-space:nowrap;
}

.config-mini-grid,
.operators-mini-grid,
.periodos-mini-grid,
.audit-mini-grid,
.system-mini-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:0;
    overflow:hidden;
    margin-bottom:14px;
    border:1px solid #d8e1ea;
    border-radius:11px;
    background:#fff;
    box-shadow:0 7px 18px rgba(23,36,52,.055);
}

.config-mini-grid .dashboard-mini-card,
.operators-mini-grid .dashboard-mini-card,
.periodos-mini-grid .dashboard-mini-card,
.audit-mini-grid .dashboard-mini-card,
.system-mini-grid .dashboard-mini-card{
    min-height:78px;
    margin:0;
    padding:12px 15px;
    border:0;
    border-right:1px solid #dfe6ed;
    border-radius:0;
    box-shadow:none;
}

.config-mini-grid .dashboard-mini-card:last-child,
.operators-mini-grid .dashboard-mini-card:last-child,
.periodos-mini-grid .dashboard-mini-card:last-child,
.audit-mini-grid .dashboard-mini-card:last-child,
.system-mini-grid .dashboard-mini-card:last-child{
    border-right:0;
}

.config-mini-grid .dashboard-mini-card strong,
.operators-mini-grid .dashboard-mini-card strong,
.periodos-mini-grid .dashboard-mini-card strong,
.audit-mini-grid .dashboard-mini-card strong,
.system-mini-grid .dashboard-mini-card strong{
    margin:2px 0;
    font-size:18px;
    line-height:1.15;
}

.config-mini-grid .dashboard-mini-card > i,
.operators-mini-grid .dashboard-mini-card > i,
.periodos-mini-grid .dashboard-mini-card > i,
.audit-mini-grid .dashboard-mini-card > i,
.system-mini-grid .dashboard-mini-card > i{
    width:38px;
    height:38px;
    font-size:17px;
}

.admin-data-card,
.config-form-card,
.operator-form-card,
.operator-side-card,
.operator-roles-card,
.operator-account-card,
.periodos-create-card,
.periodos-preview-card,
.periodos-table-card,
.audit-table-card{
    padding:15px 16px;
    border:1px solid #d8e1ea;
    border-radius:11px;
    background:#fff;
    box-shadow:0 7px 18px rgba(23,36,52,.055);
}

.admin-inline-filter{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:9px;
    align-items:end;
    margin:0 0 11px;
    padding:9px;
    border:1px solid #e1e8ef;
    border-radius:9px;
    background:#f8fafc;
}

.admin-inline-filter .operators-filter-grid,
.admin-inline-filter .audit-filter-grid,
.admin-inline-filter .periodos-form-grid{
    margin:0;
}

.admin-inline-filter .operators-filter-grid{
    grid-template-columns:minmax(240px,1fr) 150px 170px;
    gap:8px;
}

.admin-inline-filter .periodos-form-grid{
    grid-template-columns:repeat(4,minmax(130px,1fr));
    gap:8px;
}

.admin-inline-filter .audit-filter-grid{
    grid-template-columns:130px 130px minmax(155px,.8fr) minmax(135px,.7fr) minmax(125px,.65fr) 105px minmax(210px,1fr);
    gap:7px;
}

.admin-inline-filter .form-group{
    min-width:0;
    margin:0;
}

.admin-inline-filter label{
    margin-bottom:4px;
    color:#536276;
    font-size:10px;
    font-weight:800;
}

.admin-inline-filter input,
.admin-inline-filter select{
    min-height:34px;
    padding:7px 9px;
    border-radius:7px;
    font-size:11px;
}

.admin-inline-filter .report-filter-actions{
    align-self:end;
    flex-wrap:nowrap;
    margin:0;
}

.admin-inline-filter .report-filter-actions .btn-primary,
.admin-inline-filter .report-filter-actions .btn-secondary{
    min-height:34px;
    padding:0 11px;
    border-radius:7px;
    font-size:11px;
    white-space:nowrap;
}

.admin-data-card > .report-section-heading,
.admin-data-card > .periodos-toolbar,
.config-form-card > .config-section-heading{
    padding-bottom:9px;
    margin-bottom:9px;
    border-bottom:1px solid #e5ebf1;
}

.admin-data-card .context-help{
    margin:0 0 10px;
    padding:9px 11px;
    font-size:11px;
}

.operators-table,
.periodos-table,
.audit-table,
.config-table{
    font-size:12px;
}

.operators-table th,
.operators-table td,
.periodos-table th,
.periodos-table td,
.audit-table th,
.audit-table td,
.config-table th,
.config-table td{
    padding:9px 10px;
    line-height:1.3;
    vertical-align:middle;
}

.operator-form-layout,
.config-layout{
    grid-template-columns:220px minmax(0,1fr);
    gap:14px;
    align-items:start;
}

.operator-side-card,
.config-logo-card{
    position:sticky;
    top:84px;
}

.operator-photo-preview,
.config-logo-preview{
    width:104px;
    height:104px;
    margin:0 auto 10px;
}

.operator-form-grid,
.config-form-grid{
    gap:11px 12px;
}

.operator-form-grid .form-group,
.config-form-grid .form-group{
    margin:0;
}

.operator-roles-card{
    margin-top:14px;
}

.operator-role-grid{
    gap:8px;
}

.operator-role-card{
    min-height:0;
    padding:11px 12px;
}

.config-hub-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}

.config-hub-card{
    min-height:180px;
    padding:22px 24px;
    border-radius:11px;
}

.config-hub-icon{
    width:50px;
    height:50px;
    border-radius:10px;
}

.config-hub-content > strong{
    font-size:21px;
}

@media(max-width:1250px){
    .admin-inline-filter{
        grid-template-columns:1fr;
    }

    .admin-inline-filter .audit-filter-grid{
        grid-template-columns:repeat(4,minmax(130px,1fr));
    }

    .admin-inline-filter .report-filter-actions{
        justify-content:flex-end;
    }
}

@media(max-width:900px){
    .config-mini-grid,
    .operators-mini-grid,
    .periodos-mini-grid,
    .audit-mini-grid,
    .system-mini-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .config-mini-grid .dashboard-mini-card:nth-child(2n),
    .operators-mini-grid .dashboard-mini-card:nth-child(2n),
    .periodos-mini-grid .dashboard-mini-card:nth-child(2n),
    .audit-mini-grid .dashboard-mini-card:nth-child(2n),
    .system-mini-grid .dashboard-mini-card:nth-child(2n){
        border-right:0;
    }

    .operator-form-layout,
    .config-layout,
    .config-hub-grid{
        grid-template-columns:1fr;
    }

    .operator-side-card,
    .config-logo-card{
        position:static;
    }

    .admin-inline-filter .audit-filter-grid,
    .admin-inline-filter .operators-filter-grid,
    .admin-inline-filter .periodos-form-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:620px){
    .config-page .report-hero h1,
    .operators-page .report-hero h1,
    .periodos-page .report-hero h1,
    .audit-page .report-hero h1{
        font-size:28px;
    }

    .config-mini-grid,
    .operators-mini-grid,
    .periodos-mini-grid,
    .audit-mini-grid,
    .system-mini-grid,
    .admin-inline-filter .audit-filter-grid,
    .admin-inline-filter .operators-filter-grid,
    .admin-inline-filter .periodos-form-grid{
        grid-template-columns:1fr;
    }

    .config-mini-grid .dashboard-mini-card,
    .operators-mini-grid .dashboard-mini-card,
    .periodos-mini-grid .dashboard-mini-card,
    .audit-mini-grid .dashboard-mini-card,
    .system-mini-grid .dashboard-mini-card{
        border-right:0;
        border-bottom:1px solid #dfe6ed;
    }

    .admin-inline-filter .report-filter-actions,
    .admin-inline-filter .report-filter-actions a,
    .admin-inline-filter .report-filter-actions button{
        width:100%;
    }
}

/* Panel general inspirado en la composicion de Inventario IT */
.dashboard-page{
    width:min(100%,1440px);
    margin:0 auto;
}

.dashboard-it-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:24px;
    margin:0 0 20px;
}

.dashboard-it-head h1{
    margin:0 0 4px;
    color:#17202b;
    font-size:30px;
    line-height:1.15;
    letter-spacing:0;
}

.dashboard-it-head p,
.dashboard-it-section-head p{
    margin:0;
    color:#6b7c91;
    font-size:14px;
    line-height:1.45;
}

.dashboard-it-primary-action{
    flex:0 0 auto;
    min-height:42px;
    padding:0 18px;
}

.dashboard-it-card,
.dashboard-it-stat{
    border:1px solid #dde4eb;
    border-radius:15px;
    background:#fff;
    box-shadow:0 8px 20px rgba(23,32,43,.055);
}

.dashboard-it-search{
    margin-bottom:20px;
    padding:15px;
}

.dashboard-it-search form{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    margin:0;
}

.dashboard-it-search-field{
    position:relative;
    min-width:0;
}

.dashboard-it-search-field i{
    position:absolute;
    top:50%;
    left:15px;
    z-index:1;
    color:#718096;
    font-size:13px;
    transform:translateY(-50%);
}

.dashboard-it-search-field input{
    width:100%;
    min-height:44px;
    margin:0;
    padding:10px 14px 10px 42px;
    border:1px solid #cad5e1;
    border-radius:8px;
    background:#fff;
    font-size:14px;
}

.dashboard-it-search button{
    min-height:44px;
    padding:0 19px;
    border-radius:8px;
}

.dashboard-it-stat-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:14px;
    margin-bottom:20px;
}

.dashboard-it-stat{
    position:relative;
    display:flex;
    min-width:0;
    min-height:145px;
    flex-direction:column;
    justify-content:center;
    padding:21px;
    overflow:hidden;
    border-top:4px solid #8c98a4;
}

.dashboard-it-stat.is-green{border-top-color:#72a833}
.dashboard-it-stat.is-blue{border-top-color:#328bc4}
.dashboard-it-stat.is-amber{border-top-color:#dc9217}
.dashboard-it-stat.is-red{border-top-color:#c94751}

.dashboard-it-stat span{
    margin-bottom:11px;
    color:#68798e;
    font-size:13px;
    font-weight:500;
}

.dashboard-it-stat strong{
    display:block;
    margin-bottom:10px;
    color:#17202b;
    font-size:29px;
    line-height:1.05;
    overflow-wrap:anywhere;
}

.dashboard-it-stat small{
    color:#748399;
    font-size:12px;
    line-height:1.4;
}

.dashboard-it-alerts{
    margin-bottom:20px;
    padding:21px;
}

.dashboard-it-section-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:12px;
}

.dashboard-it-section-head h2{
    margin:0 0 4px;
    color:#17202b;
    font-size:18px;
    line-height:1.25;
}

.dashboard-it-count{
    display:inline-flex;
    min-width:32px;
    height:32px;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#fff1d4;
    color:#9a6200;
    font-size:12px;
    font-weight:800;
}

.dashboard-it-alert-list,
.dashboard-it-list{
    border-top:1px solid #e5eaf0;
}

.dashboard-it-alert-row{
    display:grid;
    grid-template-columns:34px minmax(0,1fr) auto;
    gap:11px;
    align-items:center;
    min-height:58px;
    padding:10px 2px;
    border-bottom:1px solid #e5eaf0;
}

.dashboard-it-alert-row:last-child,
.dashboard-it-list-row:last-child{
    border-bottom:0;
}

.dashboard-it-alert-icon{
    display:flex;
    width:32px;
    height:32px;
    align-items:center;
    justify-content:center;
    border-radius:9px;
    background:#fff1d4;
    color:#b06a00;
}

.dashboard-it-alert-row.is-critica .dashboard-it-alert-icon{
    background:#fde8e9;
    color:#b4232d;
}

.dashboard-it-alert-row.is-informativa .dashboard-it-alert-icon{
    background:#e8f3fb;
    color:#287bad;
}

.dashboard-it-alert-row strong,
.dashboard-it-alert-row small{
    display:block;
}

.dashboard-it-alert-row strong{
    margin-bottom:2px;
    color:#17202b;
    font-size:13px;
}

.dashboard-it-alert-row small{
    color:#6f8094;
    font-size:12px;
    line-height:1.4;
}

.dashboard-it-alert-row>a,
.dashboard-it-view-all{
    color:#5b8b26;
    font-size:12px;
    font-weight:800;
    text-decoration:none;
    white-space:nowrap;
}

.dashboard-it-alert-row>a i,
.dashboard-it-view-all i{
    margin-left:5px;
}

.dashboard-it-insights{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}

.dashboard-it-insight-card{
    min-width:0;
    padding:21px;
}

.dashboard-it-list-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto 125px 12px;
    gap:12px;
    align-items:center;
    min-height:62px;
    padding:10px 4px;
    border-bottom:1px solid #e5eaf0;
    color:inherit;
    text-decoration:none;
    transition:background-color .18s ease,transform .18s ease;
}

.dashboard-it-list-row:hover{
    background:#f7faf2;
    transform:translateX(2px);
}

.dashboard-it-list-row div strong,
.dashboard-it-list-row div small{
    display:block;
}

.dashboard-it-list-row div strong{
    margin-bottom:3px;
    color:#17202b;
    font-size:13px;
}

.dashboard-it-list-row div small,
.dashboard-it-list-row>small{
    color:#708096;
    font-size:11px;
    line-height:1.35;
}

.dashboard-it-list-row>span{
    color:#17202b;
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
}

.dashboard-it-list-row>i{
    color:#8ca0b4;
    font-size:10px;
}

.dashboard-it-empty{
    display:flex;
    min-height:115px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    color:#708096;
    text-align:center;
}

.dashboard-it-empty strong{
    color:#17202b;
    font-size:14px;
}

.dashboard-it-empty span{
    font-size:12px;
}

@media(max-width:1250px){
    .dashboard-it-stat-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

@media(max-width:900px){
    .dashboard-it-stat-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .dashboard-it-insights{
        grid-template-columns:1fr;
    }
}

@media(max-width:620px){
    .dashboard-it-head{
        align-items:stretch;
        flex-direction:column;
        gap:12px;
    }

    .dashboard-it-head h1{
        font-size:26px;
    }

    .dashboard-it-primary-action{
        align-self:flex-start;
    }

    .dashboard-it-search form{
        grid-template-columns:1fr;
    }

    .dashboard-it-search button{
        width:100%;
    }

    .dashboard-it-stat-grid{
        grid-template-columns:1fr;
        gap:10px;
    }

    .dashboard-it-stat{
        min-height:112px;
        padding:17px;
    }

    .dashboard-it-stat strong{
        font-size:25px;
    }

    .dashboard-it-alerts,
    .dashboard-it-insight-card{
        padding:16px;
    }

    .dashboard-it-alert-row{
        grid-template-columns:32px minmax(0,1fr);
    }

    .dashboard-it-alert-row>a{
        grid-column:2;
        justify-self:start;
    }

    .dashboard-it-section-head{
        align-items:flex-start;
        flex-direction:column;
        gap:7px;
    }

    .dashboard-it-list-row{
        grid-template-columns:minmax(0,1fr) auto 10px;
        gap:8px;
    }

    .dashboard-it-list-row>small{
        display:none;
    }
}

.sidebar::-webkit-scrollbar{
    width:7px;
}

.sidebar::-webkit-scrollbar-track{
    background:#0f172a;
}

.sidebar::-webkit-scrollbar-thumb{
    background:#334155;
    border-radius:10px;
}

.logo-box{
    padding:22px 16px 18px;
    text-align:center;
    border-bottom:1px solid rgba(148,163,184,.14);
}

.sidebar-logo-img{
    width:72px;
    height:72px;
    object-fit:contain;
    background:#fff;
    border-radius:20px;
    padding:8px;
    margin-bottom:12px;
    box-shadow:0 14px 28px rgba(0,0,0,.22);
}

.sidebar-logo-icon{
    width:72px;
    height:72px;
    margin:0 auto 12px;
    border-radius:20px;
    background:linear-gradient(135deg,#e0f2fe,#ffffff);
    color:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    box-shadow:0 14px 28px rgba(0,0,0,.22);
}

.sidebar-logo-text{
    color:#fff;
    font-size:15px;
    font-weight:800;
    line-height:1.25;
    text-transform:uppercase;
    word-break:break-word;
    max-width:220px;
    margin:0 auto;
}

.menu{
    padding:14px 12px 22px;
    padding-bottom:24px;
}

.menu ul{
    list-style:none;
}

.menu ul li{
    margin-bottom:5px;
}

.menu ul li a{
    position:relative;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    padding:11px 12px;
    color:#e2e8f0;
    border:1px solid transparent;
    border-radius:14px;
    transition:background .22s ease,border-color .22s ease,color .22s ease,transform .22s ease;
    white-space:normal;
}

.menu ul li a:hover{
    background:rgba(255,255,255,.08);
    border-color:rgba(148,163,184,.16);
    transform:translateX(2px);
}

.menu ul li a.is-active,
.menu ul li a.menu-toggle.is-open{
    background:linear-gradient(135deg,rgba(14,165,233,.22),rgba(37,99,235,.16));
    border-color:rgba(125,211,252,.28);
    color:#ffffff;
}

.menu ul li a.is-active::before,
.menu ul li a.menu-toggle.is-open::before{
    content:"";
    position:absolute;
    left:-7px;
    top:11px;
    bottom:11px;
    width:3px;
    border-radius:999px;
    background:#38bdf8;
}

.menu ul li a .left{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}

.menu ul li a .left i{
    width:34px;
    height:34px;
    min-width:34px;
    border-radius:11px;
    background:rgba(148,163,184,.12);
    color:#e2e8f0;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    transition:background .22s ease,color .22s ease,transform .22s ease;
}

.menu ul li a:hover .left i,
.menu ul li a.is-active .left i,
.menu ul li a.menu-toggle.is-open .left i{
    background:rgba(14,165,233,.22);
    color:#7dd3fc;
    transform:scale(1.03);
}

.menu-section{
    display:flex;
    align-items:center;
    gap:8px;
    padding:14px 10px 7px;
    margin:0 8px;
    font-size:10px;
    color:#94a3b8;
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:800;
}

.menu-section::before{
    content:"";
    width:18px;
    height:1px;
    background:rgba(148,163,184,.35);
}

.menu-toggle > .fa-chevron-down{
    color:#94a3b8;
    font-size:12px;
    transition:transform .22s ease,color .22s ease;
}

.menu-toggle.is-open > .fa-chevron-down{
    color:#e0f2fe;
    transform:rotate(180deg);
}

.submenu{
    display:block;
    overflow:hidden;
    max-height:0;
    opacity:0;
    margin:0 0 0 18px;
    padding-left:12px;
    border-left:1px solid rgba(148,163,184,.18);
    transition:max-height .28s ease,opacity .22s ease,margin-top .22s ease;
}

.submenu.show{
    max-height:560px;
    opacity:1;
    margin-top:6px;
}

.submenu a{
    position:relative;
    display:flex;
    align-items:center;
    gap:10px;
    padding:9px 10px;
    margin:4px 0;
    border-radius:12px;
    font-size:13px;
    color:#cbd5e1;
    text-decoration:none;
    transition:background .2s ease,color .2s ease,transform .2s ease;
}

.submenu a i{
    width:18px;
    text-align:center;
    color:#60a5fa;
}

.submenu a:hover,
.submenu a.is-active{
    background:rgba(14,165,233,.12);
    color:#ffffff;
    transform:translateX(2px);
}

.submenu a.is-active::before{
    content:"";
    position:absolute;
    left:-16px;
    top:50%;
    width:8px;
    height:8px;
    border-radius:999px;
    background:#38bdf8;
    transform:translateY(-50%);
}

.show{
    display:block;
}

.logout-link{
    margin-top:12px;
    background:rgba(239,68,68,.13) !important;
    border-color:rgba(248,113,113,.22) !important;
    color:#fecaca !important;
}

.logout-link:hover{
    background:rgba(239,68,68,.22) !important;
    color:#ffffff !important;
}

@media (prefers-reduced-motion:reduce){
    .menu ul li a,
    .menu ul li a .left i,
    .submenu,
    .submenu a,
    .menu-toggle > .fa-chevron-down{
        transition:none;
    }
}

/* =====================================================
   HEADER GENERAL
===================================================== */

.app-header{
    position:fixed;
    top:0;
    left:var(--sidebar-width);
    right:0;
    height:var(--header-height);
    min-height:var(--header-height);
    max-height:var(--header-height);
    background:rgba(255,255,255,.92);
    border-bottom:1px solid rgba(203,213,225,.78);
    box-shadow:0 10px 28px rgba(15,23,42,.06);
    backdrop-filter:blur(14px);
    z-index:998;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    padding:0 18px;
    overflow:visible;
}

.app-header-left,
.app-header-right{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}

.app-header-left{
    flex:1 1 auto;
    overflow:hidden;
}

.app-header-right{
    flex:0 1 auto;
    justify-content:flex-end;
    overflow:visible;
}

.header-menu-btn{
    width:40px;
    height:40px;
    border:none;
    border-radius:14px;
    background:#eef6ff;
    color:#0f172a;
    display:none;
    align-items:center;
    justify-content:center;
    font-size:18px;
    transition:background .2s ease,transform .2s ease,color .2s ease;
}

.header-menu-btn:hover{
    background:#dbeafe;
    color:var(--primary);
    transform:translateY(-1px);
}

.header-brand{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:170px;
    flex:0 1 230px;
    overflow:hidden;
}

.header-brand img,
.header-brand-icon{
    width:40px !important;
    height:40px !important;
    min-width:40px !important;
    max-width:40px !important;
    min-height:40px !important;
    max-height:40px !important;
    border-radius:14px;
    object-fit:contain;
    background:linear-gradient(135deg,#f8fafc,#ffffff);
    border:1px solid rgba(203,213,225,.9);
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--primary);
    box-shadow:0 8px 18px rgba(15,23,42,.05);
}

.header-brand strong{
    display:block;
    font-size:14px;
    color:var(--text);
    line-height:1.1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.header-brand span{
    display:block;
    font-size:12px;
    color:var(--text-light);
    max-width:180px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.header-breadcrumb{
    display:flex;
    align-items:center;
    gap:7px;
    color:#94a3b8;
    font-size:13px;
    white-space:nowrap;
    min-width:0;
    flex:1 1 auto;
    overflow:hidden;
}

.header-breadcrumb a{
    color:var(--text-light);
    display:flex;
    align-items:center;
    gap:6px;
    flex:0 0 auto;
    padding:7px 9px;
    border-radius:999px;
    transition:background .2s ease,color .2s ease;
}

.header-breadcrumb a:hover{
    background:#f1f5f9;
    color:var(--primary);
}

.header-breadcrumb strong{
    display:block;
    color:var(--text);
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    padding:7px 9px;
    border-radius:999px;
    background:#f8fafc;
}

.header-breadcrumb span{
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
}

.header-search{
    position:relative;
    flex:0 0 auto;
}

.header-search i{
    position:absolute;
    left:12px;
    top:50%;
    transform:translateY(-50%);
    color:#94a3b8;
    font-size:13px;
}

.header-search input{
    width:240px;
    max-width:20vw;
    min-height:40px;
    padding:10px 12px 10px 36px;
    border:1px solid #cbd5e1;
    border-radius:14px;
    font-size:13px;
    background:#ffffff;
    transition:border-color .2s ease,box-shadow .2s ease,background .2s ease;
}

.header-search input:focus{
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(14,165,233,.15);
}

.header-date{
    height:40px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 12px;
    border-radius:14px;
    background:#f8fafc;
    color:#475569;
    font-size:13px;
    border:1px solid #e2e8f0;
    white-space:nowrap;
}

.header-date i{
    color:var(--success);
}

.header-status-strip{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
}

.header-status-item{
    height:40px;
    min-width:0;
    max-width:156px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 10px;
    border:1px solid #e2e8f0;
    border-radius:14px;
    background:#f8fafc;
    color:var(--text);
    transition:background .2s ease,border-color .2s ease,transform .2s ease,box-shadow .2s ease;
}

.header-status-item:hover{
    background:#ffffff;
    border-color:#cbd5e1;
    box-shadow:0 8px 18px rgba(15,23,42,.06);
    transform:translateY(-1px);
}

.header-status-item i{
    flex:0 0 auto;
    font-size:14px;
    width:24px;
    height:24px;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#ffffff;
}

.header-status-item span{
    min-width:0;
    display:block;
    line-height:1.1;
}

.header-status-item small,
.header-status-item strong{
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.header-status-item small{
    color:var(--text-light);
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.02em;
}

.header-status-item strong{
    font-size:12px;
}

.header-status-item.is-ok i{
    color:var(--success);
}

.header-status-item.is-warning i{
    color:var(--warning);
}

.header-status-item.is-danger i{
    color:var(--danger);
}

.header-status-item.is-neutral i{
    color:var(--secondary);
}

.header-quick-actions{
    position:relative;
}

.header-quick-actions-btn{
    height:40px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 12px;
    border:1px solid rgba(14,165,233,.25);
    border-radius:14px;
    background:linear-gradient(135deg,var(--primary),#2563eb);
    color:#fff;
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
    box-shadow:0 10px 18px rgba(14,165,233,.2);
    transition:transform .2s ease,box-shadow .2s ease,filter .2s ease;
}

.header-quick-actions-btn:hover,
.header-quick-actions-btn.is-open{
    filter:brightness(.98);
    transform:translateY(-1px);
    box-shadow:0 12px 22px rgba(14,165,233,.26);
}

.header-quick-actions-btn .fa-chevron-down,
.header-user-btn > .fa-chevron-down{
    transition:transform .2s ease;
}

.header-quick-actions-btn.is-open .fa-chevron-down,
.header-user-btn.is-open > .fa-chevron-down{
    transform:rotate(180deg);
}

.header-quick-actions-menu{
    position:absolute;
    top:54px;
    right:0;
    width:250px;
    max-width:calc(100vw - 28px);
    background:#fff;
    border:1px solid rgba(203,213,225,.9);
    border-radius:16px;
    box-shadow:0 18px 42px rgba(15,23,42,.16);
    padding:8px;
    display:block;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(8px) scale(.98);
    transform-origin:top right;
    transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
    z-index:1005;
}

.header-quick-actions-menu.show{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0) scale(1);
}

.header-quick-actions-title{
    padding:6px 8px 10px;
    margin-bottom:4px;
    border-bottom:1px solid var(--border);
    color:var(--text-light);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.02em;
}

.header-quick-actions-menu a{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px;
    border-radius:10px;
    color:var(--text);
    font-size:13px;
    font-weight:700;
    transition:background .2s ease,transform .2s ease;
}

.header-quick-actions-menu a:hover{
    background:#f8fafc;
    transform:translateX(2px);
}

.header-quick-actions-menu a i{
    width:30px;
    height:30px;
    border-radius:9px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#eff6ff;
    color:var(--primary);
}

.header-quick-actions-menu a.quick-action-info i{
    background:#e0f2fe;
    color:var(--info);
}

.header-quick-actions-menu a.quick-action-success i{
    background:#dcfce7;
    color:var(--success);
}

.header-quick-actions-menu a.quick-action-secondary i{
    background:#f1f5f9;
    color:var(--secondary);
}

.header-alerts{
    position:relative;
}

.header-alerts-btn{
    width:40px;
    height:40px;
    border:1px solid #e2e8f0;
    border-radius:14px;
    background:#f8fafc;
    color:#475569;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    transition:background .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;
}

.header-alerts-btn:hover,
.header-alerts-btn.is-open{
    background:#ffffff;
    color:var(--text);
    transform:translateY(-1px);
    box-shadow:0 8px 18px rgba(15,23,42,.06);
}

.header-alerts-btn span{
    position:absolute;
    top:-6px;
    right:-6px;
    min-width:20px;
    height:20px;
    padding:0 6px;
    border-radius:999px;
    background:var(--danger);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
    font-weight:800;
    border:2px solid #fff;
}

.header-alerts-menu{
    position:absolute;
    top:54px;
    right:0;
    width:360px;
    max-width:calc(100vw - 28px);
    background:#fff;
    border:1px solid rgba(203,213,225,.9);
    border-radius:16px;
    box-shadow:0 18px 42px rgba(15,23,42,.16);
    padding:10px;
    display:block;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(8px) scale(.98);
    transform-origin:top right;
    transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
    z-index:1005;
}

.header-alerts-menu.show{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0) scale(1);
}

.header-alerts-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:4px 4px 10px;
    border-bottom:1px solid var(--border);
    margin-bottom:8px;
}

.header-alerts-title strong{
    font-size:14px;
}

.header-alerts-title small{
    color:var(--text-light);
    font-size:12px;
}

.header-alert-section{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin:10px 2px 4px;
    padding:6px 8px;
    border-radius:9px;
    background:#f8fafc;
}

.header-alert-section span{
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    color:var(--text);
}

.header-alert-section small{
    min-width:22px;
    height:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:#e2e8f0;
    color:var(--text);
    font-size:11px;
    font-weight:900;
}

.header-alert-section.is-critica{
    background:#fee2e2;
}

.header-alert-section.is-critica small{
    background:var(--danger);
    color:#fff;
}

.header-alert-section.is-operativa{
    background:#fef3c7;
}

.header-alert-section.is-operativa small{
    background:var(--warning);
    color:#fff;
}

.header-alert-section.is-informativa{
    background:#e0f2fe;
}

.header-alert-section.is-informativa small{
    background:var(--info);
    color:#fff;
}

.header-alert-item{
    display:grid;
    grid-template-columns:34px 1fr;
    gap:10px;
    padding:10px;
    border-radius:12px;
    color:var(--text);
    transition:background .2s ease,transform .2s ease;
}

.header-alert-item:hover{
    background:#f8fafc;
    transform:translateX(2px);
}

.header-alert-item > i{
    width:34px;
    height:34px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#eff6ff;
    color:var(--info);
}

.header-alert-item.alert-warning > i{
    background:#fef3c7;
    color:var(--warning-dark);
}

.header-alert-item.alert-danger > i{
    background:#fee2e2;
    color:var(--danger);
}

.header-alert-item strong,
.header-alert-item span,
.header-alert-item small{
    display:block;
}

.header-alert-item strong{
    font-size:13px;
    margin-bottom:3px;
}

.header-alert-item span{
    color:var(--text-light);
    font-size:12px;
    line-height:1.35;
}

.header-alert-item small{
    color:var(--info);
    font-weight:700;
    margin-top:5px;
}

.header-alert-empty{
    color:var(--text-light);
    display:flex;
    align-items:center;
    gap:8px;
    justify-content:center;
    padding:18px 10px;
    font-size:13px;
}

.header-alert-empty i{
    color:var(--success);
}

.header-user{
    position:relative;
}

.header-user-btn{
    border:1px solid #e2e8f0;
    background:#f8fafc;
    border-radius:16px;
    padding:6px 10px 6px 6px;
    display:flex;
    align-items:center;
    gap:10px;
    min-height:42px;
    transition:background .2s ease,border-color .2s ease,transform .2s ease,box-shadow .2s ease;
}

.header-user-btn:hover,
.header-user-btn.is-open{
    background:#ffffff;
    border-color:#cbd5e1;
    box-shadow:0 8px 18px rgba(15,23,42,.06);
    transform:translateY(-1px);
}

.header-user-btn img{
    width:34px !important;
    height:34px !important;
    min-width:34px !important;
    max-width:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    border-radius:50%;
    object-fit:cover;
}

.header-user-btn strong{
    display:block;
    font-size:13px;
    color:var(--text);
    max-width:128px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.header-user-btn span{
    display:block;
    font-size:11px;
    color:var(--text-light);
    text-align:left;
}

.header-user-menu{
    position:absolute;
    top:54px;
    right:0;
    width:220px;
    background:#ffffff;
    border:1px solid rgba(203,213,225,.9);
    border-radius:16px;
    box-shadow:0 18px 42px rgba(15,23,42,.16);
    padding:8px;
    display:block;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(8px) scale(.98);
    transform-origin:top right;
    transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
    z-index:1005;
}

.header-user-menu.show{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0) scale(1);
}

.header-user-menu a{
    display:flex;
    align-items:center;
    gap:10px;
    padding:11px 12px;
    color:#334155;
    border-radius:10px;
    font-size:14px;
    transition:background .2s ease,transform .2s ease,color .2s ease;
}

.header-user-menu a:hover{
    background:#f1f5f9;
    color:var(--primary);
    transform:translateX(2px);
}

.header-user-menu hr{
    border:none;
    border-top:1px solid var(--border);
    margin:6px 0;
}

.header-logout{
    color:var(--danger-dark) !important;
}

/* =====================================================
   OVERLAY / LOADER
===================================================== */

.overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.5);
    opacity:0;
    visibility:hidden;
    transition:opacity .2s ease,visibility .2s ease;
    z-index:997;
}

.overlay.no-transition,
.sidebar.no-transition{
    transition:none !important;
}

.show-overlay{
    opacity:1;
    visibility:visible;
}

#pageLoader{
    position:fixed;
    top:var(--header-height);
    left:var(--sidebar-width);
    right:0;
    width:auto;
    height:3px;
    background:transparent;
    display:flex;
    justify-content:flex-start;
    align-items:flex-start;
    z-index:1002;
    pointer-events:none;
    overflow:hidden;
    transition:opacity .18s ease,visibility .18s ease;
}

#pageLoader.hide{
    opacity:0;
    visibility:hidden;
}

.loader{
    width:60px;
    height:60px;
    border:6px solid #e2e8f0;
    border-top:6px solid var(--primary);
    border-radius:50%;
    animation:spin 1s linear infinite;
}

#pageLoader .loader{
    width:100%;
    height:3px;
    border:0;
    border-radius:999px;
    background:linear-gradient(90deg,transparent,var(--primary),#2563eb,transparent);
    animation:loader-slide 1.05s ease-in-out infinite;
}

@keyframes loader-slide{
    0%{ transform:translateX(-100%); }
    100%{ transform:translateX(100%); }
}

@keyframes spin{
    from{ transform:rotate(0deg); }
    to{ transform:rotate(360deg); }
}

/* =====================================================
   TARJETAS
===================================================== */

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:18px;
    margin-bottom:20px;
}

.card{
    background:#fff;
    border-radius:var(--radius-lg);
    padding:18px;
    box-shadow:var(--shadow-sm);
    min-width:0;
    transition:.25s;
}

.card:hover{
    transform:translateY(-4px);
    box-shadow:0 12px 30px rgba(0,0,0,.10);
}

.card-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
}

.card-header h3{
    font-size:17px;
}

.card-header i{
    font-size:38px;
}

.card-number{
    font-size:38px;
    font-weight:800;
    line-height:1.1;
    margin-top:18px;
}

.card-text{
    color:var(--text-light);
    margin-top:4px;
}

/* =====================================================
   WIDGETS
===================================================== */

.widgets{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:20px;
    margin-top:20px;
    width:100%;
    align-items:start;
}

.widget{
    background:#fff;
    padding:18px;
    border-radius:14px;
    box-shadow:var(--shadow-sm);
    min-width:0;
    width:100%;
    overflow:hidden;
    animation:fadeWidget .25s ease;
}

.widget h3{
    margin-bottom:12px;
    font-size:20px;
}

@keyframes fadeWidget{
    from{
        opacity:0;
        transform:translateY(10px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* =====================================================
   COLORES UTILITARIOS
===================================================== */

.blue{ color:#0ea5e9; }
.green{ color:#10b981; }
.orange{ color:#f59e0b; }
.red{ color:#ef4444; }

/* =====================================================
   FORMULARIOS
===================================================== */

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px 18px;
    margin-top:12px;
}

.form-group{
    display:flex;
    flex-direction:column;
    margin-bottom:8px;
}

.form-group label{
    margin-bottom:4px;
    font-weight:700;
    color:#334155;
    font-size:13px;
}

.form-group input,
.form-group select,
.form-group textarea{
    width:100%;
    min-height:40px;
    padding:9px 12px;
    border:1px solid var(--border-dark);
    border-radius:9px;
    font-size:13px;
    color:var(--text);
    background:#fff;
    transition:.25s;
}

.form-group small{
    margin-top:3px;
    font-size:11px;
    color:#64748b;
}

.field-help{
    display:flex;
    align-items:flex-start;
    gap:7px;
    margin-top:7px;
    color:#64748b;
    font-size:12px;
    line-height:1.35;
}

.field-help i{
    margin-top:2px;
    color:var(--secondary);
    font-size:12px;
}

.context-help{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin-top:12px;
    padding:12px 14px;
    border:1px solid #dbeafe;
    border-radius:12px;
    background:#eff6ff;
    color:#334155;
    font-size:13px;
    line-height:1.45;
}

.context-help i{
    color:var(--secondary);
    margin-top:2px;
}

.context-help strong{
    color:var(--text);
}

.form-group .field-error{
    color:var(--danger-dark);
    font-weight:700;
}

.field-error-block{
    display:block;
    margin-top:8px;
    color:var(--danger-dark);
    font-weight:800;
}

.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid{
    border-color:var(--danger);
    background:#fff7f7;
}

.form-error-summary{
    margin-bottom:14px;
}

form.is-submitting{
    cursor:progress;
}

form.is-submitting button[type="submit"]{
    opacity:.78;
    cursor:not-allowed;
}

.system-confirm-modal{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.55);
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
    z-index:10000;
}

.system-confirm-modal.show{
    display:flex;
}

.system-confirm-dialog{
    width:min(100%,520px);
    display:grid;
    grid-template-columns:58px minmax(0,1fr);
    gap:14px;
    background:#fff;
    border-radius:16px;
    border:1px solid var(--border);
    box-shadow:var(--shadow-lg);
    padding:18px;
}

.system-confirm-icon{
    width:58px;
    height:58px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff7ed;
    color:var(--warning-dark);
    font-size:24px;
}

.system-confirm-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}

.system-confirm-header span{
    display:block;
    color:var(--text-light);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
}

.system-confirm-header h3{
    margin:3px 0 8px;
    font-size:22px;
}

.system-confirm-close{
    width:34px;
    height:34px;
    border:none;
    border-radius:10px;
    background:#f1f5f9;
    color:var(--text);
    font-size:22px;
}

.system-confirm-content p{
    color:var(--text-soft);
    line-height:1.45;
    margin:0 0 16px;
}

.system-confirm-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.system-reason-dialog{
    width:min(100%,560px);
}

.system-reason-field{
    margin-bottom:16px;
}

.system-reason-field textarea{
    min-height:110px;
}

.system-reason-error{
    min-height:15px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
input:focus,
select:focus,
textarea:focus{
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(14,165,233,.15);
}

textarea{
    resize:vertical;
    min-height:90px;
}

input[readonly],
textarea[readonly]{
    background:#f8fafc;
    color:var(--text-light);
}

.search-input{
    width:300px;
    padding:12px;
    border:1px solid var(--border-dark);
    border-radius:10px;
}

.search-input:focus{
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(14,165,233,.15);
}

.search-box{
    position:relative;
}

.search-box i{
    position:absolute;
    left:14px;
    top:50%;
    transform:translateY(-50%);
    color:#94a3b8;
}

.search-box input{
    width:330px;
    padding:12px 14px 12px 42px;
    border:1px solid var(--border);
    border-radius:12px;
    transition:.25s;
    background:#fff;
}

.search-box input:focus{
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(14,165,233,.12);
}

/* =====================================================
   BOTONES
===================================================== */

.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger,
.btn-secondary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:40px;
    padding:10px 14px;
    border-radius:9px;
    text-decoration:none;
    font-size:14px;
    font-weight:700;
    transition:.25s;
    border:none;
    cursor:pointer;
    line-height:1;
}

.btn-primary{
    background:var(--primary);
    color:white;
}

.btn-primary:hover{
    background:var(--primary-dark);
}

.btn-success{
    background:var(--success);
    color:white;
}

.btn-success:hover{
    background:var(--success-dark);
}

.btn-info{
    background:var(--info);
    color:white;
}

.btn-info:hover{
    background:#1d4ed8;
}

.btn-warning{
    background:var(--warning);
    color:white;
}

.btn-warning:hover{
    background:var(--warning-dark);
}

@media (max-width:1500px){

    .app-header{
        gap:12px;
        padding:0 16px;
    }

    .app-header-left,
    .app-header-right{
        gap:12px;
    }

    .header-brand{
        min-width:160px;
        flex-basis:200px;
    }

    .header-brand span{
        max-width:140px;
    }

    .header-search input{
        width:210px;
        max-width:18vw;
    }

    .header-status-item{
        max-width:140px;
        padding:0 9px;
    }

    .header-date{
        display:none;
    }

    .header-user-btn strong{
        max-width:120px;
    }

}

@media (max-width:1320px){

    .header-search{
        display:none;
    }

    .header-status-item:nth-child(3){
        display:none;
    }

    .header-quick-actions-btn span{
        display:none;
    }

}

.btn-danger{
    background:var(--danger);
    color:white;
}

.btn-danger:hover{
    background:var(--danger-dark);
}

.btn-secondary{
    background:var(--secondary);
    color:white;
}

.btn-secondary:hover{
    background:var(--secondary-dark);
}

.btn-group{
    margin-top:14px;
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.action-buttons{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.action-buttons a,
.action-buttons button{
    width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    text-decoration:none;
    border:none;
    cursor:pointer;
    transition:.25s;
}

.action-buttons a:hover,
.action-buttons button:hover{
    transform:translateY(-2px);
}

.inline-action-form{
    display:inline-flex;
    margin:0;
    vertical-align:middle;
}

.inline-action-form button{
    font-family:inherit;
}

.table-responsive td > .inline-action-form,
.table-responsive td > a + .inline-action-form,
.table-responsive td > .inline-action-form + a{
    margin-left:6px;
}

/* =====================================================
   TABLAS
===================================================== */

.table-responsive{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    border-radius:14px;
    border:1px solid var(--border);
    background:#fff;
}

.table-responsive table{
    width:100%;
    min-width:700px;
    border-collapse:collapse;
}

.table-responsive thead{
    background:#f8fafc;
}

.table-responsive th{
    padding:11px 13px;
    font-size:14px;
    font-weight:800;
    color:#334155;
    border-bottom:2px solid var(--border);
    white-space:nowrap;
    text-align:left;
}

.table-responsive td{
    padding:11px 13px;
    border-bottom:1px solid #edf2f7;
    vertical-align:middle;
    text-align:left;
}

.table-responsive tbody tr{
    transition:.20s;
}

.table-responsive tbody tr:hover{
    background:#f8fbff;
}

.bitacora-table-responsive{
    overflow-x:auto;
}

.bitacora-table{
    min-width:1280px;
    table-layout:fixed;
}

.bitacora-table th,
.bitacora-table td{
    overflow-wrap:normal;
    word-break:normal;
}

.bitacora-table th:nth-child(1),
.bitacora-table td:nth-child(1){
    width:82px;
    white-space:nowrap;
}

.bitacora-table th:nth-child(2),
.bitacora-table td:nth-child(2){
    width:82px;
    white-space:nowrap;
}

.bitacora-table th:nth-child(3),
.bitacora-table td:nth-child(3){
    width:140px;
}

.bitacora-table th:nth-child(4),
.bitacora-table td:nth-child(4){
    width:92px;
}

.bitacora-table th:nth-child(5),
.bitacora-table td:nth-child(5){
    width:116px;
}

.bitacora-table th:nth-child(6),
.bitacora-table td:nth-child(6){
    width:120px;
}

.bitacora-table th:nth-child(7),
.bitacora-table td:nth-child(7){
    width:58px;
    text-align:center;
}

.bitacora-table th:nth-child(8),
.bitacora-table td:nth-child(8){
    width:70px;
    text-align:center;
}

.bitacora-table th:nth-child(9),
.bitacora-table td:nth-child(9){
    width:90px;
}

.bitacora-table th:nth-child(10),
.bitacora-table td:nth-child(10){
    width:150px;
}

.bitacora-table th:nth-child(11),
.bitacora-table td:nth-child(11){
    width:310px;
}

.bitacora-table th:nth-child(12),
.bitacora-table td:nth-child(12){
    width:150px;
}

.bitacora-table td:nth-child(3),
.bitacora-table td:nth-child(4),
.bitacora-table td:nth-child(6),
.bitacora-table td:nth-child(10),
.bitacora-table td:nth-child(11),
.bitacora-table td:nth-child(12){
    overflow-wrap:anywhere;
}

.periodos-page .report-hero{
    margin-bottom:14px;
}

.periodos-mini-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
    margin-bottom:14px;
}

.periodos-filter-card,
.periodos-table-card,
.periodos-create-card,
.periodos-preview-card{
    margin-top:14px;
}

.periodos-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:12px;
}

.periodos-toolbar h3{
    margin-bottom:2px;
}

.periodos-toolbar p,
.periodos-help-grid p{
    margin:4px 0 0;
    color:var(--text-soft);
    font-size:13px;
    line-height:1.45;
}

.periodos-form-grid{
    grid-template-columns:repeat(4,minmax(150px,1fr));
    gap:12px;
}

.periodos-context-help{
    margin:12px 0;
}

.periodos-create-layout{
    display:grid;
    grid-template-columns:minmax(0,.9fr) minmax(360px,1.1fr);
    gap:14px;
    align-items:start;
}

.periodos-help-grid,
.periodos-month-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
    margin-top:14px;
}

.periodos-help-grid > div,
.periodos-month-grid > div{
    padding:12px;
    border:1px solid #e2e8f0;
    border-radius:12px;
    background:#f8fafc;
}

.periodos-guide-grid{
    margin-bottom:4px;
}

.periodos-month-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    margin-top:12px;
}

.periodos-month-grid > div{
    display:flex;
    justify-content:space-between;
    align-items:center;
    min-height:42px;
}

.periodos-month-grid strong{
    font-size:13px;
}

.periodos-month-grid span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:30px;
    height:26px;
    border-radius:999px;
    background:#e0f2fe;
    color:#0369a1;
    font-size:11px;
    font-weight:800;
}

.periodos-table,
.periodos-year-table{
    table-layout:fixed;
}

.periodos-table th,
.periodos-table td,
.periodos-year-table th,
.periodos-year-table td{
    font-size:13px;
    vertical-align:middle;
    overflow-wrap:break-word;
}

.periodos-table th:nth-child(1),
.periodos-table td:nth-child(1){
    width:20%;
}

.periodos-table th:nth-child(2),
.periodos-table td:nth-child(2){
    width:23%;
}

.periodos-table th:nth-child(3),
.periodos-table td:nth-child(3){
    width:15%;
}

.periodos-table th:nth-child(4),
.periodos-table td:nth-child(4){
    width:22%;
}

.periodos-table th:nth-child(5),
.periodos-table td:nth-child(5){
    width:20%;
}

.periodos-table td strong,
.periodos-year-table td strong{
    display:block;
    font-size:14px;
}

.periodos-table td small,
.periodos-counts small{
    display:block;
    color:var(--text-soft);
    font-size:12px;
    margin-top:3px;
}

.periodos-date-range{
    display:flex;
    gap:5px;
    flex-wrap:wrap;
    align-items:center;
}

.periodos-date-range span{
    color:var(--text-soft);
    font-size:12px;
}

/* ==========================================================
   CONFIGURACION
========================================================== */

.config-page .report-hero{
    margin-bottom:14px;
}

.config-mini-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
    margin-bottom:14px;
}

.config-layout{
    display:grid;
    grid-template-columns:minmax(240px,280px) minmax(0,1fr);
    gap:14px;
    align-items:start;
}

.config-logo-card,
.config-form-card{
    margin-top:0;
}

.config-logo-card h3,
.config-form-card h3{
    margin-bottom:10px;
}

.config-logo-preview{
    display:flex;
    justify-content:center;
    margin:12px 0 16px;
}

.config-logo-preview img,
.config-logo-empty{
    width:128px;
    height:128px;
    border-radius:16px;
    background:#fff;
    border:1px solid #e2e8f0;
}

.config-hub-page .page-title{
    margin-bottom:26px;
}

.config-hub-page .page-title h1{
    font-size:36px;
    line-height:1.12;
}

.config-hub-page .page-title p{
    margin-top:6px;
    color:#5b6f88;
}

.config-hub-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
    max-width:1000px;
}

.config-hub-card{
    position:relative;
    display:flex;
    align-items:flex-start;
    gap:17px;
    min-height:170px;
    padding:25px;
    color:var(--text);
    text-decoration:none;
    background:#fff;
    border:1px solid #d8e1ea;
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 10px 24px rgba(23,36,52,.06);
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.config-hub-card:hover{
    transform:translateY(-4px);
    border-color:#c9dfa7;
    box-shadow:0 14px 28px rgba(25,42,62,.1);
}

.config-hub-icon{
    width:58px;
    height:58px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:13px;
    background:#eaf4d8;
    color:#5e8f28;
    font-size:20px;
}

.config-hub-content{
    min-width:0;
    display:flex;
    flex-direction:column;
    flex:1;
}

.config-hub-kicker{
    color:#5e8f28;
    font-size:12px;
    font-weight:900;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.config-hub-content > strong{
    display:block;
    margin-top:4px;
    color:var(--text);
    font-size:21px;
    line-height:1.22;
}

.config-hub-content > span:not(.config-hub-kicker):not(.config-hub-links){
    max-width:430px;
    margin-top:8px;
    color:#5b6f88;
    font-size:13px;
    line-height:1.5;
}

.config-hub-content > em{
    margin-top:14px;
    padding-top:0;
    color:#467020;
    font-style:normal;
    font-size:13px;
    font-weight:900;
}

.config-hub-links{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px;
    margin-top:10px;
}

.config-hub-links span{
    display:inline-flex;
    align-items:center;
    min-height:24px;
    padding:0 8px;
    border-radius:999px;
    color:#365d17;
    background:#eef7dd;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
}

.config-hub-links span:hover{
    background:#dff0c1;
}

.config-hub-arrow{
    position:absolute;
    right:22px;
    bottom:20px;
    color:#5e8f28;
    font-size:20px;
    transition:transform .18s ease;
}

.config-hub-card:hover .config-hub-arrow{
    transform:translateX(5px);
}

@media(max-width:980px){
    .config-hub-grid{
        grid-template-columns:1fr;
        gap:14px;
    }

    .config-hub-card{
        min-height:auto;
        padding:22px;
    }
}

@media(max-width:620px){
    .config-hub-page .page-title h1{
        font-size:30px;
    }

    .config-hub-card{
        grid-template-columns:46px minmax(0,1fr);
        gap:14px;
        padding:18px;
    }

    .config-hub-icon{
        width:46px;
        height:46px;
        border-radius:12px;
        font-size:17px;
    }

    .config-hub-content > strong{
        font-size:20px;
    }

    .config-hub-content > span:not(.config-hub-kicker):not(.config-hub-links){
        font-size:13px;
    }

    .config-hub-arrow{
        display:none;
    }
}

/* =====================================================
   LOGIN - LINEA VISUAL INVENTARIO IT
===================================================== */

.auth-body{
    min-height:100vh;
    margin:0;
    background:#eef2f5;
    color:#18212b;
    font-family:Inter, "Segoe UI", Arial, sans-serif;
}

.auth-shell{
    display:grid;
    grid-template-columns:minmax(320px,42%) minmax(420px,58%);
    min-height:100vh;
}

.auth-brand-panel{
    position:relative;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:clamp(48px,8vw,110px);
    overflow:hidden;
    background:#484c50;
    color:#fff;
}

.auth-brand-panel::after{
    content:"";
    position:absolute;
    right:-140px;
    bottom:-180px;
    width:420px;
    height:420px;
    border:70px solid rgba(168,212,93,.09);
    border-radius:50%;
}

.auth-logo{
    display:grid;
    width:92px;
    height:92px;
    place-items:center;
    margin-bottom:36px;
    padding:12px;
    border-radius:18px;
    background:#fff;
    color:#2680c2;
    box-shadow:0 12px 30px rgba(0,0,0,.18);
}

.auth-logo img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

.auth-logo i{
    font-size:28px;
}

.auth-brand-panel > span,
.auth-kicker{
    color:#a8d45d;
    font-size:11px;
    font-weight:900;
    letter-spacing:.16em;
}

.auth-brand-panel h1{
    margin:10px 0 14px;
    font-size:clamp(40px,5vw,68px);
    line-height:1;
    letter-spacing:-.045em;
}

.auth-brand-panel > p{
    max-width:460px;
    margin:0;
    color:#d1d7dc;
    font-size:17px;
    line-height:1.6;
}

.auth-company{
    position:absolute;
    bottom:42px;
    left:clamp(48px,8vw,110px);
    right:40px;
    font-size:12px;
    font-weight:700;
    z-index:1;
}

.auth-company small{
    display:block;
    margin-top:5px;
    color:#aeb8bf;
    font-weight:500;
}

.auth-form-panel{
    display:grid;
    place-items:center;
    padding:40px;
    background:#fff;
}

.auth-form-wrap{
    width:min(430px,100%);
}

.auth-form-wrap h2{
    margin:10px 0;
    color:#18212b;
    font-size:34px;
    line-height:1.1;
}

.auth-form-wrap > p{
    margin:0 0 28px;
    color:#667587;
    line-height:1.55;
}

.auth-form{
    display:flex;
    flex-direction:column;
    gap:17px;
}

.auth-field{
    display:flex;
    flex-direction:column;
    gap:7px;
}

.auth-field label{
    color:#18212b;
    font-size:13px;
    font-weight:800;
}

.auth-field input{
    width:100%;
    min-height:44px;
    padding:10px 12px;
    border:1px solid #cbd4dc;
    border-radius:6px;
    background:#fff;
    color:#18212b;
    font:inherit;
    outline:none;
}

.auth-field input:focus{
    border-color:#7fa83f;
    box-shadow:0 0 0 3px rgba(168,212,93,.2);
}

.auth-password-box{
    position:relative;
}

.auth-password-box input{
    padding-right:44px;
}

.auth-toggle-password{
    position:absolute;
    right:8px;
    top:50%;
    display:grid;
    width:32px;
    height:32px;
    place-items:center;
    border:0;
    border-radius:7px;
    background:transparent;
    color:#667587;
    cursor:pointer;
    transform:translateY(-50%);
}

.auth-toggle-password:hover{
    background:#eef2f5;
    color:#18212b;
}

.auth-submit{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:48px;
    margin-top:5px;
    border:1px solid #a8d45d;
    border-radius:7px;
    background:#a8d45d;
    color:#1a2a08;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
    transition:background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.auth-submit:hover{
    background:#9ac74d;
    transform:translateY(-2px);
    box-shadow:0 7px 16px rgba(25,42,62,.09);
}

.auth-error{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin-bottom:20px;
    padding:13px 16px;
    border-radius:8px;
    background:#fdebed;
    color:#9c2530;
    font-size:14px;
    line-height:1.45;
}

.auth-note{
    display:block;
    margin-top:18px;
    color:#667587;
    line-height:1.5;
    text-align:center;
}

@media(max-width:800px){
    .auth-shell{
        grid-template-columns:1fr;
    }

    .auth-brand-panel{
        min-height:280px;
        padding:38px;
    }

    .auth-brand-panel h1{
        font-size:42px;
    }

    .auth-logo{
        width:68px;
        height:68px;
        margin-bottom:20px;
    }

    .auth-company{
        display:none;
    }

    .auth-form-panel{
        padding:36px 20px;
    }
}

@media(max-width:480px){
    .auth-brand-panel{
        min-height:230px;
    }

    .auth-brand-panel > p{
        font-size:14px;
    }

    .auth-form-wrap h2{
        font-size:30px;
    }
}

.config-logo-preview img{
    object-fit:contain;
    padding:10px;
}

.config-logo-empty{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#0ea5e9;
    background:#eff6ff;
    border-color:#bfdbfe;
    font-size:46px;
}

.config-logo-input{
    width:100%;
    font-size:12px;
}

.config-section-heading{
    display:flex;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
}

.config-section-heading p{
    color:var(--text-soft);
    font-size:13px;
    margin:4px 0 0;
}

.config-form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.config-context-help{
    margin:12px 0;
}

.config-table{
    table-layout:fixed;
}

.config-table th,
.config-table td{
    font-size:13px;
    vertical-align:middle;
    overflow-wrap:break-word;
}

.config-action-stack{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
}

.config-action-stack .inline-action-form{
    display:inline-flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}

.config-action-stack input[type="text"]{
    width:112px;
    min-height:34px;
    padding:7px 9px;
    font-size:12px;
}

.profile-photo-card{
    margin-top:0;
    text-align:center;
}

.profile-photo-img{
    width:128px;
    height:128px;
    border-radius:50%;
    object-fit:cover;
    border:4px solid #e2e8f0;
    background:#fff;
    display:block;
    margin:12px auto 16px;
}

.system-mini-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    margin-bottom:14px;
}

.system-mini-card{
    align-items:flex-start;
}

.system-mini-card small{
    line-height:1.35;
}

.system-mini-link{
    display:inline-flex;
    margin-top:8px;
    font-size:12px;
    font-weight:800;
    color:var(--primary);
}

.system-status-table th:nth-child(1),
.system-status-table td:nth-child(1){
    width:16%;
}

.system-status-table th:nth-child(2),
.system-status-table td:nth-child(2){
    width:14%;
}

.system-status-table th:nth-child(4),
.system-status-table td:nth-child(4){
    width:20%;
}

.diagnostic-table th:nth-child(1),
.diagnostic-table td:nth-child(1){
    width:16%;
}

.diagnostic-table th:nth-child(2),
.diagnostic-table td:nth-child(2){
    width:20%;
}

.diagnostic-table th:nth-child(3),
.diagnostic-table td:nth-child(3){
    width:14%;
}

.diagnostic-table th:nth-child(5),
.diagnostic-table td:nth-child(5){
    width:20%;
}

table{
    width:100%;
    border-collapse:collapse;
}

table th,
table td{
    text-align:left;
}

@media (min-width:901px){

    .table-responsive:not(.dashboard-table) table{
        min-width:100%;
    }

    .table-responsive:not(.dashboard-table) th,
    .table-responsive:not(.dashboard-table) td{
        white-space:normal;
        overflow-wrap:anywhere;
        line-height:1.35;
    }

    .table-responsive:not(.dashboard-table) .btn-info,
    .table-responsive:not(.dashboard-table) .btn-success,
    .table-responsive:not(.dashboard-table) .btn-warning,
    .table-responsive:not(.dashboard-table) .btn-danger,
    .table-responsive:not(.dashboard-table) .btn-secondary{
        white-space:nowrap;
    }

    .bitacora-table-responsive table{
        min-width:1280px;
    }

    .bitacora-table-responsive th,
    .bitacora-table-responsive td{
        white-space:normal;
        overflow-wrap:normal;
    }

}

.row-danger{
    background:#fef2f2;
}

/* =====================================================
   BADGES
===================================================== */

.badge,
.badge-success,
.badge-danger,
.badge-warning,
.badge-info,
.badge-secondary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:6px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:800;
    line-height:1;
    white-space:nowrap;
}

.badge-success{
    background:#dcfce7;
    color:#166534;
}

.badge-danger{
    background:#fee2e2;
    color:#991b1b;
}

.badge-warning{
    background:#fef3c7;
    color:#92400e;
}

.badge-info{
    background:#dbeafe;
    color:#1d4ed8;
}

.badge-secondary{
    background:#e2e8f0;
    color:#475569;
}

/* =====================================================
   ALERTAS
===================================================== */

.alert-success,
.alert-warning,
.alert-danger{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:14px 15px;
    border-radius:12px;
    margin-bottom:18px;
    font-weight:700;
    font-size:14px;
    line-height:1.45;
    border:1px solid transparent;
    box-shadow:var(--shadow-sm);
}

.alert-success::before,
.alert-warning::before,
.alert-danger::before{
    font-family:"Font Awesome 6 Free";
    font-weight:900;
    flex:0 0 auto;
    margin-top:1px;
}

.alert-success{
    background:#dcfce7;
    color:#166534;
    border-color:#bbf7d0;
}

.alert-success::before{
    content:"\f058";
}

.alert-warning{
    background:#fef3c7;
    color:#92400e;
    border-color:#fde68a;
}

.alert-warning::before{
    content:"\f071";
}

.alert-danger{
    background:#fee2e2;
    color:#991b1b;
    border-color:#fecaca;
}

.alert-danger::before{
    content:"\f06a";
}

/* =====================================================
   TOOLBAR / FILTROS
===================================================== */

.toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    flex-wrap:wrap;
    margin-bottom:14px;
}

.toolbar-left,
.toolbar-right{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.toolbar select{
    min-height:42px;
    padding:10px 14px;
    border-radius:12px;
    border:1px solid var(--border);
    background:#fff;
    cursor:pointer;
    transition:.25s;
}

.toolbar select:hover{
    border-color:var(--primary);
}

/* =====================================================
   PAGINACION
===================================================== */

.pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    margin-top:18px;
}

.pagination a{
    width:40px;
    height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    border-radius:10px;
    background:white;
    color:#475569;
    border:1px solid #dbe3eb;
    transition:.25s;
}

.pagination a:hover,
.pagination .active{
    background:var(--info);
    color:white;
}

.table-footer{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:20px;
    margin-top:24px;
}

.table-footer .info{
    color:var(--text-light);
    font-size:14px;
}

.export-buttons{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

/* =====================================================
   COMPONENTES FINANCIEROS
===================================================== */

.payment-summary{
    margin-top:20px;
    background:#ecfeff;
    border:2px solid #06b6d4;
    border-radius:14px;
    padding:18px;
    text-align:center;
}

.payment-summary h3{
    color:var(--text);
    margin-bottom:8px;
}

.payment-summary .amount{
    font-size:38px;
    font-weight:800;
    color:#0891b2;
}

.payment-steps{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:20px;
}

.payment-steps > div{
    display:flex;
    align-items:center;
    gap:10px;
    padding:14px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fff;
    color:var(--text-soft);
    box-shadow:0 8px 20px rgba(15,23,42,.05);
}

.payment-steps span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    flex:0 0 34px;
    border-radius:50%;
    background:#e2e8f0;
    color:#475569;
    font-weight:900;
}

.payment-steps strong,
.payment-steps small{
    display:block;
}

.payment-steps strong{
    color:var(--text);
    font-size:14px;
}

.payment-steps small{
    margin-top:2px;
    font-size:12px;
}

.payment-steps .active{
    border-color:#93c5fd;
    background:#eff6ff;
}

.payment-steps .active span{
    background:var(--primary);
    color:#fff;
}

.payment-steps .completed span{
    background:var(--success);
    color:#fff;
}

.payment-step-card{
    overflow:hidden;
}

.payment-step-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:16px;
}

.payment-step-header h3{
    margin:4px 0;
}

.payment-step-header p,
.selected-beneficiary-card p{
    margin:0;
    color:var(--text-soft);
    font-size:14px;
}

.payment-month-picker{
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px 10px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#f8fafc;
}

.payment-month-picker label{
    color:var(--text-soft);
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}

.payment-month-picker select{
    min-height:36px;
    padding:7px 30px 7px 10px;
    border:1px solid var(--border-dark);
    border-radius:9px;
    background:#fff;
    color:var(--text);
    font-weight:800;
}

.payment-step-kicker{
    display:inline-flex;
    padding:5px 10px;
    border-radius:999px;
    background:#e0f2fe;
    color:#0369a1;
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
}

.beneficiary-result-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.beneficiary-result-card,
.selected-beneficiary-card{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    padding:16px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fff;
}

.beneficiary-result-card strong,
.beneficiary-result-card span,
.beneficiary-result-card small{
    display:block;
}

.beneficiary-result-card span{
    margin-top:5px;
    color:#2563eb;
    font-weight:900;
}

.beneficiary-result-card small{
    margin-top:4px;
    color:var(--text-soft);
}

.beneficiary-result-actions{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:8px;
    flex:0 0 auto;
}

.selected-beneficiary-card{
    margin-top:20px;
    box-shadow:var(--shadow);
}

.selected-beneficiary-card h3{
    margin:6px 0 4px;
    font-size:26px;
}

.selected-beneficiary-card > div:last-child{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.payment-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 360px;
    gap:20px;
    margin-top:20px;
    align-items:start;
}

.payment-period-list{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
    gap:8px;
}

.payment-period-item{
    display:grid;
    grid-template-columns:22px minmax(0,1fr);
    gap:8px;
    align-items:center;
    min-height:86px;
    padding:10px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#fff;
    cursor:pointer;
    transition:.18s;
}

.payment-period-item:hover,
.payment-period-item.selected{
    border-color:#93c5fd;
    background:#eff6ff;
}

.payment-period-item input{
    width:18px;
    height:18px;
    align-self:start;
    margin-top:3px;
}

.payment-period-item strong,
.payment-period-main span,
.payment-period-main em,
.payment-period-amount span{
    display:inline-flex;
    align-items:center;
}

.payment-period-item strong{
    margin-right:0;
    font-size:14px;
}

.payment-period-main span,
.payment-period-amount small{
    color:var(--text-soft);
    font-size:10px;
}

.payment-period-main em{
    margin-top:5px;
    padding:3px 7px;
    border-radius:999px;
    background:#fff7ed;
    color:#c2410c;
    font-size:10px;
    font-style:normal;
    font-weight:800;
    text-transform:uppercase;
}

.payment-period-amount{
    grid-column:2;
    text-align:left;
}

.payment-period-amount span{
    color:var(--text);
    font-weight:900;
    font-size:14px;
    justify-content:flex-start;
    width:100%;
}

.payment-period-amount small{
    display:block;
    margin-top:2px;
    line-height:1.2;
}

.payment-confirm-panel{
    position:sticky;
    top:96px;
    padding:18px;
    border:1px solid var(--border);
    border-radius:16px;
    background:#fff;
    box-shadow:var(--shadow);
}

.payment-confirm-panel h3{
    margin:8px 0 14px;
}

.payment-confirm-row{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:10px 0;
    border-bottom:1px solid #edf2f7;
    color:var(--text-soft);
}

.payment-confirm-row strong{
    color:var(--text);
}

.payment-total-box{
    margin:16px 0;
    padding:16px;
    border-radius:14px;
    background:#f0fdf4;
    border:1px solid #bbf7d0;
}

.payment-total-box span,
.payment-total-box strong{
    display:block;
}

.payment-total-box span{
    color:#166534;
    font-size:13px;
    font-weight:800;
}

.payment-total-box strong{
    margin-top:4px;
    color:#022c22;
    font-size:30px;
    line-height:1.1;
}

.payment-confirm-panel .btn-primary,
.payment-confirm-panel .btn-secondary{
    width:100%;
    justify-content:center;
    margin-top:8px;
}

.payment-confirm-modal{
    position:fixed;
    inset:0;
    z-index:3000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(15,23,42,.52);
    opacity:0;
    visibility:hidden;
    transition:.18s ease;
}

.payment-confirm-modal.show{
    opacity:1;
    visibility:visible;
}

.payment-confirm-dialog{
    width:min(520px,100%);
    border-radius:16px;
    background:#fff;
    box-shadow:0 24px 60px rgba(15,23,42,.28);
    overflow:hidden;
    transform:translateY(10px);
    transition:.18s ease;
}

.payment-confirm-modal.show .payment-confirm-dialog{
    transform:translateY(0);
}

.payment-confirm-dialog-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    padding:18px 20px;
    border-bottom:1px solid var(--border);
    background:#f8fafc;
}

.payment-confirm-dialog-header h3{
    margin:6px 0 3px;
    font-size:24px;
}

.payment-confirm-dialog-header p{
    margin:0;
    color:var(--text-soft);
    font-size:14px;
}

.payment-confirm-close{
    width:36px;
    height:36px;
    border:none;
    border-radius:10px;
    background:#e2e8f0;
    color:#334155;
    font-size:24px;
    line-height:1;
    cursor:pointer;
}

.payment-confirm-dialog-body{
    padding:18px 20px;
}

.payment-confirm-beneficiary{
    padding:14px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#fff;
}

.payment-confirm-beneficiary span,
.payment-confirm-beneficiary small,
.payment-confirm-dialog-grid span,
.payment-confirm-dialog-total span{
    display:block;
    color:var(--text-soft);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
}

.payment-confirm-beneficiary strong{
    display:block;
    margin:4px 0 2px;
    color:var(--text);
    font-size:18px;
}

.payment-confirm-dialog-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-top:12px;
}

.payment-confirm-dialog-grid > div{
    padding:12px;
    border-radius:12px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
}

.payment-confirm-dialog-grid strong{
    display:block;
    margin-top:5px;
    color:var(--text);
}

.payment-confirm-dialog-total{
    margin-top:12px;
    padding:16px;
    border-radius:14px;
    background:#f0fdf4;
    border:1px solid #bbf7d0;
}

.payment-confirm-dialog-total span{
    color:#166534;
}

.payment-confirm-dialog-total strong{
    display:block;
    margin-top:4px;
    color:#022c22;
    font-size:34px;
    line-height:1;
}

.payment-confirm-note{
    margin:12px 0 0;
}

.payment-confirm-dialog-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:16px 20px;
    border-top:1px solid var(--border);
    background:#fff;
}

@media(max-width:900px){
    .payment-steps{
        grid-template-columns:1fr 1fr;
    }

    .payment-steps > div{
        align-items:flex-start;
    }

    .beneficiary-result-grid,
    .payment-layout{
        grid-template-columns:1fr;
    }

    .beneficiary-result-card,
    .selected-beneficiary-card{
        align-items:flex-start;
        flex-direction:column;
    }

    .beneficiary-result-actions,
    .selected-beneficiary-card > div:last-child{
        width:100%;
        align-items:stretch;
    }

    .beneficiary-result-actions .btn-primary,
    .selected-beneficiary-card .btn-secondary{
        width:100%;
        justify-content:center;
    }

    .payment-period-item{
        grid-template-columns:auto minmax(0,1fr);
        gap:8px;
    }

    .payment-period-amount{
        grid-column:1 / -1;
        text-align:left;
        padding-left:28px;
    }

    .payment-period-amount span{
        justify-content:flex-start;
    }

    .payment-period-main span,
    .payment-period-main em{
        margin-top:3px;
    }

    .payment-confirm-panel{
        position:static;
    }

    .payment-confirm-dialog-grid{
        grid-template-columns:1fr;
    }

    .payment-confirm-dialog-actions{
        flex-direction:column-reverse;
    }

    .payment-confirm-dialog-actions .btn-primary,
    .payment-confirm-dialog-actions .btn-secondary{
        width:100%;
        justify-content:center;
    }
}

.debt-total{
    margin-top:22px;
    padding:18px;
    background:#ecfeff;
    border:2px solid #06b6d4;
    border-radius:14px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    font-size:22px;
    font-weight:800;
}

.debt-total span{
    color:#0891b2;
}

.progress-bar{
    width:100%;
    height:12px;
    background:#e2e8f0;
    border-radius:20px;
    overflow:hidden;
    margin-top:15px;
}

.progress-fill{
    height:100%;
    background:var(--success);
}

/* =====================================================
   MODAL
===================================================== */

.modal{
    display:none;
    position:fixed;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.55);
    z-index:9999;
}

.modal-content{
    background:white;
    width:800px;
    max-width:95%;
    margin:60px auto;
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 20px 50px rgba(0,0,0,.20);
}

.modal-header{
    background:var(--sidebar);
    color:white;
    padding:18px 25px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.modal-header h3{
    margin:0;
}

.close{
    font-size:30px;
    cursor:pointer;
}

.modal-body{
    padding:25px;
}

/* =====================================================
   GRAFICAS
===================================================== */

canvas{
    display:block;
    max-width:100% !important;
}

/* =====================================================
   FOOTER
===================================================== */

.footer{
    margin-top:28px;
    padding:10px 0 18px;
    color:var(--text-light);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
    text-align:center;
}

.footer span{
    color:#64748b;
    font-size:12px;
    font-weight:800;
    letter-spacing:.02em;
}

.footer small{
    color:#64748b;
    font-size:12px;
}

/* =====================================================
   DETALLE RESIDENTE
===================================================== */

.residente-detalle-grid,
.detalle-residente-grid{
    display:grid;
    grid-template-columns:260px 1fr;
    gap:28px;
    align-items:start;
}

.residente-datos-grid,
.detalle-residente-info{
    display:grid;
    grid-template-columns:repeat(2, minmax(220px, 1fr));
    gap:18px;
}

.detalle-residente-info .form-group{
    margin-bottom:0;
}

.detalle-direccion{
    margin-top:20px;
}

.detalle-direccion textarea{
    min-height:90px;
}

.residente-foto{
    text-align:center;
}

.residente-foto img{
    width:140px !important;
    height:140px !important;
    border-radius:50%;
    object-fit:cover;
    border:4px solid var(--primary);
}

/* =====================================================
   IMPRESION
===================================================== */

@media print{

    .sidebar,
    .app-header,
    .topbar,
    .no-print,
    .btn-group,
    .overlay,
    #pageLoader{
        display:none !important;
    }

    .content{
        margin-left:0 !important;
        width:100% !important;
        max-width:100% !important;
        padding-top:0 !important;
    }

    .page-content{
        padding:0 !important;
    }

    body{
        background:#fff !important;
    }

}

/* =====================================================
   RESPONSIVE TABLET
===================================================== */

@media (max-width:1200px){

    .widgets{
        grid-template-columns:1fr;
    }

    .header-search,
    .header-date{
        display:none;
    }

    .header-status-item{
        max-width:120px;
    }

}

@media (max-width:1100px){

    .dashboard-workspace,
    .dashboard-workspace.compact-dashboard-workspace{
        grid-template-columns:1fr;
    }

}

/* =====================================================
   RESPONSIVE MOVIL
===================================================== */

@media (max-width:900px){

    .app-header{
        left:0;
        height:64px;
        min-height:64px;
        max-height:64px;
        padding:10px 14px;
    }

    .header-menu-btn{
        display:flex;
    }

    .header-brand{
        min-width:auto;
    }

    .header-brand span,
    .header-breadcrumb,
    .header-status-strip,
    .header-user-btn div{
        display:none;
    }

    .header-alerts-menu{
        position:fixed;
        top:70px;
        right:14px;
        left:14px;
        width:auto;
        max-width:none;
    }

    .header-quick-actions-menu{
        position:fixed;
        top:70px;
        right:14px;
        left:14px;
        width:auto;
        max-width:none;
    }

    .app-header-left,
    .app-header-right{
        gap:10px;
    }

    .sidebar{
        position:fixed;
        top:0;
        left:0;
        width:280px;
        height:100vh;
        min-height:100vh;
        transform:translateX(-100%);
        transition:transform .22s ease;
        z-index:9999;
        will-change:transform;
    }

    .sidebar.show-sidebar{
        transform:translateX(0);
    }

    #pageLoader{
        top:64px;
        left:0;
    }

    .content{
        margin-left:0;
        width:100%;
        max-width:100%;
        padding-top:64px;
    }

    .page-content{
        padding:16px;
    }

    .page-title{
        margin-bottom:18px;
    }

    .page-title h1{
        font-size:32px;
    }

    .cards{
        grid-template-columns:repeat(2,1fr);
    }

    .widgets{
        grid-template-columns:1fr;
    }

    .form-grid{
        grid-template-columns:1fr;
    }

    .toolbar{
        flex-direction:column;
        align-items:flex-start;
    }

    .toolbar-left,
    .toolbar-right,
    .search-box,
    .search-box input{
        width:100%;
    }

    .table-footer{
        flex-direction:column;
        align-items:flex-start;
    }

    .residente-detalle-grid,
    .detalle-residente-grid{
        grid-template-columns:1fr;
    }

    .residente-datos-grid,
    .detalle-residente-info{
        grid-template-columns:1fr;
    }

    .residente-foto{
        text-align:left;
        display:flex;
        align-items:center;
        gap:18px;
        flex-wrap:wrap;
    }

}

/* =====================================================
   RESPONSIVE TELEFONO
===================================================== */

@media (max-width:600px){

    .page-content{
        padding:14px;
    }

    .widget{
        padding:18px;
        border-radius:14px;
    }

    .cards{
        grid-template-columns:1fr;
    }

    .card{
        padding:18px;
    }

    .card-number{
        font-size:32px;
    }

    .card-header i{
        font-size:32px;
    }

    .header-brand strong{
        max-width:120px;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .header-user-menu{
        right:-4px;
        width:210px;
    }

    .payment-summary .amount{
        font-size:32px;
    }

    .debt-total{
        flex-direction:column;
        align-items:flex-start;
        font-size:18px;
    }

    .table-responsive{
        overflow:visible;
        border:none;
        background:transparent;
    }

    .table-responsive table{
        min-width:0;
        border-collapse:separate;
        border-spacing:0 12px;
    }

    .table-responsive thead{
        display:none;
    }

    .table-responsive tbody,
    .table-responsive tr,
    .table-responsive td{
        display:block;
        width:100%;
        max-width:100%;
        min-width:0;
        box-sizing:border-box;
    }

    .table-responsive tbody tr{
        overflow:hidden;
        border:1px solid var(--border);
        border-radius:14px;
        background:#fff;
        box-shadow:0 10px 24px rgba(15,23,42,.08);
    }

    .table-responsive tbody tr:hover{
        background:#fff;
    }

    .table-responsive td{
        display:grid;
        grid-template-columns:minmax(92px,34%) minmax(0,1fr);
        gap:12px;
        align-items:start;
        min-height:44px;
        padding:12px 14px;
        border-bottom:1px solid #edf2f7;
        text-align:left;
        word-break:normal;
        overflow-wrap:break-word;
        color:var(--text);
        font-size:14px;
    }

    .table-responsive td > *,
    .table-responsive td strong,
    .table-responsive td b,
    .table-responsive td span,
    .table-responsive td a{
        min-width:0;
        max-width:100%;
        overflow-wrap:anywhere;
        word-break:normal;
    }

    .table-responsive th,
    .table-responsive td,
    .dashboard-payments-widget .dashboard-table th,
    .dashboard-payments-widget .dashboard-table td,
    .dashboard-debt-widget .dashboard-table th,
    .dashboard-debt-widget .dashboard-table td{
        width:auto !important;
    }

    .dashboard-table th,
    .dashboard-table td{
        padding:12px 14px;
    }

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

    .table-responsive td::before{
        content:attr(data-label);
        display:inline-flex;
        align-items:center;
        width:max-content;
        max-width:100%;
        min-height:24px;
        padding:4px 8px;
        border-radius:999px;
        background:#eef6ff;
        color:#2563eb;
        font-size:11px;
        font-weight:800;
        text-align:left;
        text-transform:uppercase;
        letter-spacing:.02em;
        overflow-wrap:normal;
        word-break:normal;
    }

    .table-responsive td:not([data-label])::before,
    .table-responsive td[data-label=""]::before{
        display:none;
    }

    .table-responsive td:first-child{
        background:#f8fafc;
        font-size:15px;
    }

    .table-responsive td:first-child::before{
        background:#e2e8f0;
        color:var(--text-soft);
    }

    .table-responsive td[colspan],
    .table-responsive td.empty-table{
        display:block;
        text-align:center;
        border-bottom:none;
        background:#fff;
    }

    .table-responsive td[colspan]::before,
    .table-responsive td.empty-table::before{
        content:"\f05a";
        text-transform:none;
        letter-spacing:0;
    }

    .table-responsive td > .inline-action-form,
    .table-responsive td > a + .inline-action-form,
    .table-responsive td > .inline-action-form + a{
        margin-left:0;
        margin-top:6px;
    }

    .table-responsive td .btn-info,
    .table-responsive td .btn-success,
    .table-responsive td .btn-warning,
    .table-responsive td .btn-danger,
    .table-responsive td .btn-secondary,
    .table-responsive td > .inline-action-form,
    .table-responsive td > .inline-action-form button{
        width:100%;
        justify-content:center;
    }

    .table-responsive td[data-label*="Acci"]{
        display:block;
        background:#fbfdff;
        text-align:left;
    }

    .table-responsive td[data-label*="Acci"]::before{
        display:flex;
        width:100%;
        margin-bottom:10px;
        justify-content:center;
        background:#f1f5f9;
        color:var(--text-soft);
    }

    .table-responsive td .btn-info + .btn-info,
    .table-responsive td .btn-info + .btn-success,
    .table-responsive td .btn-info + .btn-warning,
    .table-responsive td .btn-info + .btn-danger,
    .table-responsive td .btn-success + .btn-info,
    .table-responsive td .btn-success + .btn-warning,
    .table-responsive td .btn-warning + .btn-info,
    .table-responsive td .btn-danger + .btn-info{
        margin-top:6px;
    }

    .bitacora-table{
        min-width:0;
        table-layout:auto;
    }

    .periodos-mini-grid,
    .periodos-create-layout,
    .periodos-form-grid,
    .config-mini-grid,
    .system-mini-grid,
    .config-layout,
    .config-form-grid,
    .periodos-help-grid,
    .periodos-month-grid{
        grid-template-columns:1fr;
    }

    .periodos-toolbar{
        align-items:stretch;
    }

    .periodos-toolbar > a,
    .periodos-toolbar .btn-primary,
    .periodos-toolbar .btn-secondary{
        width:100%;
        justify-content:center;
    }

}

/* ==========================================================
   RECIBO OFICIAL
========================================================== */

.recibo-oficial{
    max-width:900px;
    margin:0 auto;
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:18px;
    padding:35px;
    box-shadow:0 8px 25px rgba(15,23,42,.08);
}

.recibo-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:30px;
    flex-wrap:wrap;
}

.recibo-empresa{
    display:flex;
    align-items:center;
    gap:20px;
    flex:1;
}

.recibo-empresa img{
    width:90px;
    height:90px;
    object-fit:contain;
}

.recibo-logo-default{
    width:90px;
    height:90px;
    border-radius:18px;
    background:#eff6ff;
    color:#0284c7;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:38px;
}

.recibo-empresa h1{
    margin:0;
    font-size:26px;
    color:#0f172a;
}

.recibo-empresa p{
    margin:4px 0;
    color:#64748b;
    font-size:14px;
}

.recibo-numero-box{
    min-width:220px;
    text-align:right;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:15px;
    padding:18px;
}

.recibo-numero-box span{
    display:block;
    color:#64748b;
    font-size:13px;
}

.recibo-numero-box strong{
    display:block;
    font-size:24px;
    color:#0f172a;
    margin-top:6px;
}

.recibo-numero-box small{
    color:#64748b;
}

.recibo-separador{
    height:1px;
    background:#e2e8f0;
    margin:30px 0;
}

.recibo-info-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:18px;
}

.recibo-info-grid div{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:12px;
    padding:16px;
}

.recibo-info-grid span{
    display:block;
    font-size:12px;
    color:#64748b;
    margin-bottom:5px;
}

.recibo-info-grid strong{
    color:#0f172a;
    font-size:15px;
}

.recibo-subtitulo{
    margin:30px 0 18px;
    color:#0f172a;
}

.recibo-tabla table{
    margin-bottom:0;
}

.recibo-tabla th{
    background:#0f172a;
    color:white;
}

.recibo-totales-oficial{
    margin-top:25px;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:12px;
}

.recibo-totales-oficial div{
    width:320px;
    display:flex;
    justify-content:space-between;
    padding:12px 18px;
    border:1px solid #e2e8f0;
    border-radius:10px;
    background:#f8fafc;
}

.recibo-total-final{
    background:#0ea5e9 !important;
    color:#fff;
    border:none !important;
}

.recibo-total-final strong,
.recibo-total-final span{
    color:#fff;
}

.recibo-observacion-oficial{
    margin-top:25px;
    padding:18px;
    border-left:5px solid #0ea5e9;
    background:#f8fafc;
    border-radius:10px;
}

.recibo-footer-text{
    margin-top:35px;
    text-align:center;
    color:#64748b;
    font-size:14px;
}

.recibo-firmas-oficial{
    display:flex;
    justify-content:space-between;
    gap:40px;
    margin-top:55px;
}

.recibo-firmas-oficial div{
    flex:1;
    text-align:center;
    font-size:14px;
    color:#475569;
}

.recibo-firmas-oficial span{
    display:block;
    border-top:1px solid #94a3b8;
    margin-bottom:8px;
    height:30px;
}

@media(max-width:900px){

    .recibo-top{
        flex-direction:column;
    }

    .recibo-numero-box{
        width:100%;
        text-align:left;
    }

    .recibo-totales-oficial{
        align-items:stretch;
    }

    .recibo-totales-oficial div{
        width:100%;
    }

    .recibo-firmas-oficial{
        flex-direction:column;
    }

}

/* ==========================================================
   IMPRESION
========================================================== */

@media print{

    body{
        background:white !important;
    }

    .sidebar,
    .topbar,
    .page-title,
    .no-print{
        display:none !important;
    }

    .content{
        margin:0 !important;
        padding:0 !important;
        width:100% !important;
    }

    .page-content{
        padding:0 !important;
    }

    .recibo-oficial{
        box-shadow:none;
        border:none;
        width:100%;
        max-width:100%;
        padding:0;
    }

}

/* =====================================================
   PLANTILLA IMPRESION REPORTES
===================================================== */

.print-report{
    display:none;
}

@media print{

    @page{
        size: letter;
        margin: 1.2cm;
    }

    body{
        background:#fff !important;
    }

    .sidebar,
    .app-header,
    .content{
        display:none !important;
    }

    .print-report{
        display:block !important;
        color:#000;
        font-size:11px;
        font-family:Arial, sans-serif;
    }

    .print-report-header{
        text-align:center;
        border-bottom:2px solid #000;
        padding-bottom:10px;
        margin-bottom:14px;
    }

    .print-report-header h1{
        font-size:18px;
        margin:0;
        text-transform:uppercase;
    }

    .print-report-header h2{
        font-size:14px;
        margin:4px 0;
    }

    .print-report-info{
        display:grid;
        grid-template-columns:repeat(2,1fr);
        gap:6px 20px;
        margin-bottom:12px;
    }

    .print-report-box{
        border:1px solid #999;
        padding:8px;
        margin-bottom:12px;
    }

    .print-report-box h3{
        margin:0 0 8px;
        font-size:13px;
        border-bottom:1px solid #ccc;
        padding-bottom:4px;
    }

    .print-summary{
        display:grid;
        grid-template-columns:repeat(4,1fr);
        gap:8px;
    }

    .print-summary div{
        border:1px solid #bbb;
        padding:7px;
    }

    .print-summary span{
        display:block;
        font-size:10px;
        color:#333;
    }

    .print-summary strong{
        display:block;
        margin-top:4px;
        font-size:14px;
    }

    .print-table{
        width:100%;
        border-collapse:collapse;
        font-size:10px;
    }

    .print-table th,
    .print-table td{
        border:1px solid #999;
        padding:5px;
        text-align:left;
    }

    .print-table th{
        background:#e5e7eb !important;
        font-weight:bold;
    }

    .print-footer{
        margin-top:22px;
        border-top:1px solid #000;
        padding-top:8px;
        text-align:center;
        font-size:10px;
    }

    .no-print-web{
        display:none !important;
    }
}

.residente-buttons{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    gap:10px;
    margin-top:18px;
    flex-wrap:wrap;
}

.residente-buttons .btn-success,
.residente-buttons .btn-secondary,
.residente-buttons .btn-warning{

    min-width:170px;
    height:42px;

    display:flex;
    align-items:center;
    justify-content:center;

    text-decoration:none;

    padding:0 18px;

    border-radius:10px;
}

@media(max-width:700px){

    .residente-buttons{

        flex-direction:column;

    }

    .residente-buttons a,
    .residente-buttons button{

        width:100%;

    }

}

.section-title{

    display:flex;
    align-items:center;
    gap:10px;

    font-size:18px;

    font-weight:700;

    margin:25px 0 18px;

    padding-bottom:10px;

    border-bottom:1px solid #e2e8f0;

}

.form-grid-4{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:18px;

}

/* =====================================================
   FORMULARIOS TIPO PERFIL / RESIDENTE
===================================================== */

.profile-layout{
    display:grid;
    grid-template-columns:280px 1fr;
    gap:18px;
    align-items:start;
    width:100%;
}

.profile-card,
.profile-form-card{
    background:#fff;
    border-radius:16px;
    box-shadow:var(--shadow-sm);
    border:1px solid var(--border);
}

.profile-card{
    padding:22px;
    text-align:center;
}

.profile-avatar{
    width:76px;
    height:76px;
    margin:0 auto 14px;
    border-radius:18px;
    background:#e0f2fe;
    color:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:34px;
}

.profile-card h3{
    font-size:20px;
    font-weight:800;
    color:var(--text);
    margin-bottom:6px;
    word-break:break-word;
}

.profile-card p{
    font-size:13px;
    color:var(--text-light);
    line-height:1.4;
    margin-bottom:18px;
}

.profile-info{
    display:flex;
    flex-direction:column;
    gap:10px;
    text-align:left;
}

.profile-info div{
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:12px;
    padding:12px;
}

.profile-info span{
    display:block;
    font-size:11px;
    color:var(--text-light);
    font-weight:700;
    text-transform:uppercase;
    margin-bottom:4px;
}

.profile-info strong{
    display:block;
    font-size:13px;
    color:var(--text);
    line-height:1.35;
}

.profile-form-card{
    padding:22px;
}

.profile-form-card .section-title{
    display:block;
    margin:0 0 18px;
    padding-bottom:14px;
    border-bottom:1px solid var(--border);
}

.profile-form-card .section-title h2{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:24px;
    font-weight:800;
    margin:0 0 4px;
    color:var(--text);
}

.profile-form-card .section-title p{
    margin:0;
    color:var(--text-light);
    font-size:14px;
}

.form-section{
    margin-bottom:18px;
}

.form-section h3{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:18px;
    font-weight:800;
    margin-bottom:10px;
    color:var(--text);
}

.form-actions{
    margin-top:18px;
    padding-top:16px;
    border-top:1px solid var(--border);
    justify-content:flex-end;
}

.form-actions .btn-success,
.form-actions .btn-info,
.form-actions .btn-warning,
.form-actions .btn-secondary{
    min-width:160px;
}

/* =====================================================
   RESPONSIVE PERFIL / RESIDENTE
===================================================== */

@media(max-width:1000px){

    .profile-layout{
        grid-template-columns:1fr;
    }

    .profile-card{
        text-align:left;
        display:flex;
        align-items:flex-start;
        gap:16px;
        flex-wrap:wrap;
    }

    .profile-avatar{
        margin:0;
        flex-shrink:0;
    }

    .profile-card h3,
    .profile-card p{
        width:calc(100% - 100px);
    }

    .profile-info{
        width:100%;
        display:grid;
        grid-template-columns:repeat(3,1fr);
    }

}

@media(max-width:700px){

    .profile-form-card,
    .profile-card{
        padding:18px;
    }

    .profile-card{
        display:block;
        text-align:center;
    }

    .profile-avatar{
        margin:0 auto 14px;
    }

    .profile-card h3,
    .profile-card p{
        width:100%;
    }

    .profile-info{
        grid-template-columns:1fr;
    }

    .profile-form-card .section-title h2{
        font-size:21px;
    }

    .form-actions{
        justify-content:stretch;
    }

    .form-actions .btn-success,
    .form-actions .btn-info,
    .form-actions .btn-warning,
    .form-actions .btn-secondary{
        width:100%;
    }

}

/* =====================================================
   INPUT PASSWORD CON BOTON OJO
===================================================== */

.password-field{
    position:relative;
    width:100%;
}

.password-field input{
    padding-right:44px !important;
}

.password-toggle{
    position:absolute;
    top:50%;
    right:10px;
    transform:translateY(-50%);
    width:30px;
    height:30px;
    border:none;
    background:#f1f5f9;
    color:#475569;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.password-toggle:hover{
    background:#e2e8f0;
    color:#0f172a;
}

/* =====================================================
   DASHBOARD NUEVO
===================================================== */

.dashboard-cards{
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin-bottom:16px;
}

.dashboard-alerts{
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow-sm);
    margin-bottom:18px;
    padding:16px;
}

.dashboard-alerts-compact{
    padding:12px 16px;
    margin-bottom:14px;
}

.dashboard-alerts-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
}

.dashboard-alerts-compact .dashboard-alerts-header{
    align-items:center;
    margin-bottom:10px;
}

.dashboard-alerts-header h3{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:20px;
    color:var(--text);
    margin-bottom:3px;
}

.dashboard-alerts-compact .dashboard-alerts-header h3{
    font-size:18px;
    margin-bottom:1px;
}

.dashboard-alerts-header h3 i{
    color:var(--warning);
}

.dashboard-alerts-header p{
    color:var(--text-light);
    font-size:13px;
}

.dashboard-alerts-compact .dashboard-alerts-header p{
    font-size:12px;
}

.dashboard-alerts-header span{
    background:#fef3c7;
    color:#92400e;
    border-radius:999px;
    padding:6px 10px;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}

.dashboard-alerts-grid{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.dashboard-alerts-compact .dashboard-alerts-grid{
    gap:8px;
}

.dashboard-alert-group{
    border:1px solid var(--border);
    border-radius:14px;
    overflow:hidden;
    background:#fff;
}

.dashboard-alerts-compact .dashboard-alert-group{
    border-radius:12px;
}

.dashboard-alert-group-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    background:#f8fafc;
    border-bottom:1px solid var(--border);
}

.dashboard-alerts-compact .dashboard-alert-group-title{
    padding:7px 12px;
}

.dashboard-alert-group-title strong{
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.02em;
}

.dashboard-alert-group-title span{
    min-width:26px;
    height:24px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:#e2e8f0;
    color:var(--text);
    font-size:12px;
    font-weight:900;
}

.dashboard-alert-group.is-critica .dashboard-alert-group-title{
    background:#fee2e2;
}

.dashboard-alert-group.is-critica .dashboard-alert-group-title span{
    background:var(--danger);
    color:#fff;
}

.dashboard-alert-group.is-operativa .dashboard-alert-group-title{
    background:#fef3c7;
}

.dashboard-alert-group.is-operativa .dashboard-alert-group-title span{
    background:var(--warning);
    color:#fff;
}

.dashboard-alert-group.is-informativa .dashboard-alert-group-title{
    background:#e0f2fe;
}

.dashboard-alert-group.is-informativa .dashboard-alert-group-title span{
    background:var(--info);
    color:#fff;
}

.dashboard-alert-item{
    display:flex;
    align-items:center;
    gap:12px;
    border:1px solid var(--border);
    border-radius:12px;
    padding:12px 14px;
    background:#f8fafc;
    min-height:74px;
}

.dashboard-alerts-compact .dashboard-alert-item{
    gap:10px;
    min-height:52px;
    padding:8px 12px;
}

.dashboard-alert-group .dashboard-alert-item{
    border:none;
    border-bottom:1px solid var(--border);
    border-radius:0;
    background:#fff;
}

.dashboard-alert-group .dashboard-alert-item:last-child{
    border-bottom:none;
}

.dashboard-alert-item > i{
    width:42px;
    height:42px;
    min-width:42px;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#eff6ff;
    color:var(--info);
    font-size:17px;
}

.dashboard-alerts-compact .dashboard-alert-item > i{
    width:34px;
    height:34px;
    min-width:34px;
    border-radius:10px;
    font-size:14px;
}

.dashboard-alert-item.alert-warning > i{
    background:#fef3c7;
    color:var(--warning-dark);
}

.dashboard-alert-item.alert-danger > i{
    background:#fee2e2;
    color:var(--danger);
}

.dashboard-alert-item > div{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    column-gap:16px;
    row-gap:4px;
    flex:1;
    min-width:0;
}

.dashboard-alerts-compact .dashboard-alert-item > div{
    row-gap:2px;
}

.dashboard-alert-item strong{
    display:block;
    grid-column:1;
    color:var(--text);
    font-size:14px;
    margin-bottom:4px;
    min-width:0;
    white-space:normal;
    overflow-wrap:normal;
    word-break:normal;
}

.dashboard-alerts-compact .dashboard-alert-item strong{
    font-size:13px;
    margin-bottom:1px;
}

.dashboard-alert-item p{
    grid-column:1;
    color:var(--text-light);
    font-size:13px;
    line-height:1.35;
    margin:0;
    min-width:0;
    white-space:normal;
    overflow-wrap:normal;
    word-break:normal;
}

.dashboard-alerts-compact .dashboard-alert-item p{
    font-size:12px;
    line-height:1.25;
}

.dashboard-alert-item a{
    grid-column:2;
    grid-row:1 / span 2;
    color:var(--info);
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
}

.dashboard-alerts-compact .dashboard-alert-item a{
    font-size:12px;
}

.dashboard-card{
    padding:18px;
    border:1px solid var(--border);
}

.dashboard-card .card-header i{
    font-size:34px;
}

.dashboard-card .card-number{
    font-size:32px;
    margin-top:16px;
}

.dashboard-card .money-number{
    font-size:32px;
}

/* =====================================================
   RESUMEN FINANCIERO
===================================================== */

.finance-summary-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:16px;
}

.finance-summary-cards{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}

.finance-summary-cards .card-number{
    font-size:28px;
}

.finance-summary-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) 340px;
    gap:18px;
    margin-top:18px;
    align-items:start;
}

.finance-summary-side{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.finance-summary-list{
    border:1px solid var(--border);
    border-radius:12px;
    overflow:hidden;
}

.finance-summary-list div{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:12px;
    border-bottom:1px solid var(--border);
}

.finance-summary-list div:last-child{
    border-bottom:none;
}

.finance-summary-list span{
    color:var(--text-light);
}

.finance-summary-list strong{
    text-align:right;
}

/* =====================================================
   REPORTES
===================================================== */

.report-page .page-content{
    max-width:1540px;
}

.report-hero{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:16px;
}

.report-hero h1{
    margin:6px 0 4px;
    font-size:clamp(32px, 3vw, 44px);
    line-height:1;
}

.report-hero p{
    color:var(--text-light);
    margin:0;
}

.report-kicker{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#0369a1;
    background:#e0f2fe;
    border-radius:999px;
    padding:7px 11px;
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
}

.report-hero-actions,
.report-filter-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.report-filter-card{
    padding:14px;
    margin-bottom:16px;
}

.report-filter-row{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:14px;
}

.report-filter-row .form-group{
    min-width:220px;
    margin-bottom:0;
}

.report-mini-grid{
    margin-bottom:14px;
}

.report-method-grid{
    grid-template-columns:repeat(4, minmax(0, 1fr));
}

.report-layout-grid{
    display:grid;
    grid-template-columns:minmax(0, 1.4fr) minmax(300px, .6fr);
    gap:16px;
    align-items:stretch;
    margin-bottom:16px;
}

.report-chart-card,
.report-side-card,
.report-table-card{
    margin:0;
}

.report-section-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
}

.report-section-heading h3{
    display:flex;
    align-items:center;
    gap:8px;
    margin:0;
    font-size:22px;
}

.report-section-heading p{
    margin:4px 0 0;
    color:var(--text-light);
    font-size:13px;
}

.report-chart-box{
    height:280px;
}

.report-stat-list{
    border:1px solid var(--border);
    border-radius:14px;
    overflow:hidden;
}

.report-stat-list div{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px 14px;
    border-bottom:1px solid var(--border);
}

.report-stat-list div:last-child{
    border-bottom:none;
}

.report-stat-list span{
    color:var(--text-light);
}

.report-stat-list strong{
    text-align:right;
}

.report-table-card{
    margin-bottom:16px;
}

.report-table-responsive{
    overflow-x:auto;
}

.report-table{
    table-layout:fixed;
    min-width:0;
    width:100%;
    font-size:13px;
}

.report-table th,
.report-table td{
    padding:11px 12px;
    line-height:1.35;
    vertical-align:middle;
    overflow-wrap:anywhere;
}

.report-daily-table th:nth-child(1),
.report-daily-table td:nth-child(1){
    width:70px;
}

.report-daily-table th:nth-child(2),
.report-daily-table td:nth-child(2){
    width:130px;
}

.report-daily-table th:nth-child(3),
.report-daily-table td:nth-child(3){
    width:110px;
}

.report-daily-table th:nth-child(5),
.report-daily-table td:nth-child(5){
    width:110px;
}

.report-daily-table th:nth-child(7),
.report-daily-table td:nth-child(7){
    width:110px;
}

.report-daily-table th:nth-child(8),
.report-daily-table td:nth-child(8){
    width:120px;
}

.report-cash-table th:nth-child(2),
.report-cash-table td:nth-child(2){
    width:80px;
}

.report-monthly-table th:nth-child(1),
.report-monthly-table td:nth-child(1){
    width:130px;
}

.report-monthly-table th:nth-child(2),
.report-monthly-table td:nth-child(2){
    width:130px;
}

.report-monthly-table th:nth-child(3),
.report-monthly-table td:nth-child(3){
    width:110px;
}

.report-monthly-table th:nth-child(5),
.report-monthly-table td:nth-child(5){
    width:110px;
}

.report-monthly-table th:nth-child(7),
.report-monthly-table td:nth-child(7){
    width:105px;
}

.report-monthly-table th:nth-child(8),
.report-monthly-table td:nth-child(8){
    width:120px;
}

.report-small-table th:nth-child(1),
.report-small-table td:nth-child(1){
    width:140px;
}

.report-morosos-table th:nth-child(1),
.report-morosos-table td:nth-child(1){
    width:105px;
}

.report-morosos-table th:nth-child(3),
.report-morosos-table td:nth-child(3){
    width:110px;
}

.report-morosos-table th:nth-child(4),
.report-morosos-table td:nth-child(4){
    width:75px;
    text-align:center;
}

.report-morosos-table th:nth-child(5),
.report-morosos-table td:nth-child(5){
    width:170px;
}

.report-morosos-table th:nth-child(6),
.report-morosos-table td:nth-child(6),
.report-morosos-table th:nth-child(7),
.report-morosos-table td:nth-child(7),
.report-morosos-table th:nth-child(8),
.report-morosos-table td:nth-child(8){
    width:95px;
}

.report-morosos-table th:nth-child(9),
.report-morosos-table td:nth-child(9){
    width:100px;
}

.report-morosos-table th:nth-child(10),
.report-morosos-table td:nth-child(10){
    width:150px;
}

.report-annual-table th:nth-child(1),
.report-annual-table td:nth-child(1){
    width:180px;
}

.report-annual-table th:nth-child(2),
.report-annual-table td:nth-child(2),
.report-annual-table th:nth-child(4),
.report-annual-table td:nth-child(4){
    width:150px;
}

.report-annual-table th:nth-child(3),
.report-annual-table td:nth-child(3){
    width:100px;
}

.report-category-table th:nth-child(2),
.report-category-table td:nth-child(2){
    width:80px;
}

.report-category-table th:nth-child(3),
.report-category-table td:nth-child(3){
    width:120px;
}

.report-financial-table th:nth-child(1),
.report-financial-table td:nth-child(1){
    width:100px;
}

.report-financial-table th:nth-child(2),
.report-financial-table td:nth-child(2){
    width:95px;
}

.report-financial-table th:nth-child(3),
.report-financial-table td:nth-child(3){
    width:140px;
}

.report-financial-table th:nth-child(6),
.report-financial-table td:nth-child(6),
.report-financial-table th:nth-child(7),
.report-financial-table td:nth-child(7){
    width:110px;
}

/* =====================================================
   BITACORA
===================================================== */

.audit-page .page-content{
    max-width:1540px;
}

.audit-mini-grid{
    margin-bottom:16px;
}

.audit-filter-card{
    margin-bottom:16px;
}

.audit-filter-grid{
    display:grid;
    grid-template-columns:repeat(6, minmax(130px, 1fr));
    gap:12px;
}

.audit-filter-grid .form-group{
    min-width:0;
    margin-bottom:0;
}

.audit-search-field{
    grid-column:span 2;
}

.audit-filter-actions{
    margin-top:14px;
}

.audit-table-card{
    margin:0;
}

.audit-table-responsive{
    overflow-x:auto;
}

.audit-table{
    width:100%;
    table-layout:fixed;
    min-width:0;
    font-size:13px;
}

.audit-table th,
.audit-table td{
    padding:11px 12px;
    line-height:1.35;
    vertical-align:top;
    overflow-wrap:anywhere;
}

.audit-table td strong,
.audit-table td small{
    display:block;
}

.audit-table td small,
.audit-empty,
.text-soft{
    color:#64748b;
}

.audit-table th:nth-child(1),
.audit-table td:nth-child(1){
    width:105px;
}

.audit-table th:nth-child(2),
.audit-table td:nth-child(2){
    width:150px;
}

.audit-table th:nth-child(3),
.audit-table td:nth-child(3){
    width:125px;
}

.audit-table th:nth-child(4),
.audit-table td:nth-child(4){
    width:115px;
}

.audit-table th:nth-child(5),
.audit-table td:nth-child(5){
    width:150px;
}

.audit-table th:nth-child(7),
.audit-table td:nth-child(7){
    width:150px;
}

.audit-details summary{
    color:#2563eb;
    cursor:pointer;
    font-weight:800;
    white-space:nowrap;
}

.audit-changes{
    display:grid;
    gap:8px;
    margin-top:8px;
    min-width:240px;
}

.audit-change-row{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:10px;
    display:grid;
    gap:4px;
    padding:8px 10px;
}

.audit-change-row strong{
    color:#0f172a;
}

.audit-change-row span{
    color:#475569;
    font-size:12px;
    line-height:1.35;
}

/* =====================================================
   OPERADORES DEL SISTEMA
===================================================== */

.operators-page .page-content{
    max-width:1540px;
}

.operators-mini-grid,
.operator-account-grid{
    margin-bottom:16px;
}

.operators-filter-card,
.operators-table-card,
.operator-roles-card,
.operator-account-card{
    margin-bottom:16px;
}

.operators-filter-grid{
    display:grid;
    grid-template-columns:minmax(260px, 1fr) 180px 180px;
    gap:12px;
}

.operators-filter-grid .form-group,
.operator-form-grid .form-group{
    min-width:0;
    margin-bottom:0;
}

.operators-filter-actions{
    margin-top:14px;
}

.operators-table-responsive{
    overflow-x:auto;
}

.operators-table{
    width:100%;
    min-width:0;
    table-layout:fixed;
    font-size:13px;
}

.operators-table th,
.operators-table td{
    padding:11px 12px;
    line-height:1.35;
    vertical-align:middle;
    overflow-wrap:anywhere;
}

.operators-table td small{
    display:block;
    color:#64748b;
    margin-top:2px;
}

.operators-table th:nth-child(1),
.operators-table td:nth-child(1){
    width:105px;
}

.operators-table th:nth-child(4),
.operators-table td:nth-child(4),
.operators-table th:nth-child(5),
.operators-table td:nth-child(5){
    width:120px;
}

.operators-table th:nth-child(6),
.operators-table td:nth-child(6){
    width:145px;
}

.operators-table th:nth-child(7),
.operators-table td:nth-child(7){
    width:170px;
}

.operators-actions{
    display:flex;
    align-items:center;
    gap:7px;
    flex-wrap:wrap;
}

.operator-form-layout{
    display:grid;
    grid-template-columns:minmax(240px, 300px) minmax(0, 1fr);
    gap:16px;
    align-items:start;
}

.operator-side-card,
.operator-form-card,
.operator-roles-card,
.operator-account-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow-sm);
}

.operator-side-card{
    padding:18px;
    text-align:center;
}

.operator-side-card h3{
    margin:12px 0 4px;
}

.operator-side-card p{
    margin:0 0 12px;
    color:#64748b;
}

.operator-photo-preview{
    width:132px;
    height:132px;
    margin:0 auto 14px;
    border-radius:50%;
    border:5px solid #e2e8f0;
    background:#f8fafc;
    overflow:hidden;
}

.operator-photo-preview img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.operator-photo-label{
    display:block;
    font-size:13px;
    font-weight:800;
    margin-bottom:8px;
}

.operator-photo-input{
    width:100%;
    font-size:12px;
}

.operator-side-card small{
    display:block;
    margin-top:8px;
    color:#64748b;
    line-height:1.35;
}

.operator-help-box{
    margin-top:16px;
    padding:13px;
    border-radius:12px;
    background:#f8fafc;
    border:1px solid var(--border);
    text-align:left;
}

.operator-help-box.is-current-user{
    background:#fff7ed;
    border-color:#fed7aa;
}

.operator-help-box strong{
    display:block;
    margin-bottom:5px;
}

.operator-help-box p{
    margin:0;
    color:#64748b;
    font-size:13px;
    line-height:1.4;
}

.operator-form-card{
    padding:18px;
}

.operator-form-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}

.password-field{
    position:relative;
}

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

.password-toggle{
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:none;
    color:#64748b;
    cursor:pointer;
    font-size:15px;
}

.password-toggle:hover{
    color:#0ea5e9;
}

.operator-form-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:18px;
}

.operator-role-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
}

.operator-role-card{
    border:1px solid var(--border);
    border-radius:14px;
    background:#f8fafc;
    padding:14px;
}

.operator-role-card strong{
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:8px;
}

.operator-role-card i{
    color:#0ea5e9;
}

.operator-role-card span{
    color:#64748b;
    font-size:13px;
    line-height:1.4;
}

.operator-summary-list{
    border:1px solid var(--border);
    border-radius:14px;
    overflow:hidden;
    margin-top:12px;
    text-align:left;
}

.operator-summary-list div{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    border-bottom:1px solid var(--border);
}

.operator-summary-list div:last-child{
    border-bottom:none;
}

.operator-summary-list span{
    color:#64748b;
    font-size:12px;
}

.operator-summary-list strong{
    text-align:right;
    font-size:12px;
}

.operator-security-box{
    margin-top:20px;
    padding-top:18px;
    border-top:1px solid var(--border);
}

.operator-account-grid{
    margin:0;
}

@media(max-width:1100px){
    .operators-filter-grid{
        grid-template-columns:1fr 180px 180px;
    }

    .operator-form-layout{
        grid-template-columns:1fr;
    }
}

@media(max-width:760px){
    .operators-filter-grid,
    .operator-form-grid,
    .operator-role-grid{
        grid-template-columns:1fr;
    }

    .operators-table{
        font-size:12px;
    }

    .operators-table th,
    .operators-table td{
        padding:9px 8px;
    }
}

@media(max-width:1180px){
    .audit-filter-grid{
        grid-template-columns:repeat(3, minmax(0, 1fr));
    }
}

@media(max-width:760px){
    .audit-filter-grid{
        grid-template-columns:1fr;
    }

    .audit-search-field{
        grid-column:auto;
    }

    .audit-table{
        font-size:12px;
    }

    .audit-table th,
    .audit-table td{
        padding:9px 8px;
    }
}

.report-period-grid{
    display:grid;
    grid-template-columns:150px 220px;
    gap:12px;
    margin-top:0;
    width:min(100%, 390px);
}

.report-period-grid .form-group{
    min-width:0 !important;
    margin-bottom:0;
}

.report-year-grid{
    display:grid;
    grid-template-columns:170px;
    gap:12px;
    margin-top:0;
}

.report-year-grid .form-group{
    min-width:0 !important;
    margin-bottom:0;
}

.report-morosos-filter-grid{
    display:grid;
    grid-template-columns:minmax(260px, 1fr) 190px;
    gap:12px;
    margin-top:0;
    width:min(100%, 640px);
}

.report-morosos-filter-grid .form-group{
    min-width:0 !important;
    margin-bottom:0;
}

.report-help-box{
    border:1px solid var(--border);
    border-radius:14px;
    background:#f8fafc;
    padding:16px;
    color:var(--text-soft);
    line-height:1.45;
}

.report-help-box strong{
    display:block;
    color:var(--text);
    margin-bottom:6px;
}

.report-help-box p{
    margin:0;
}

.report-action-stack{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

.btn-compact-action{
    min-height:34px;
    padding:8px 10px;
    font-size:12px;
    white-space:nowrap;
}

@media(max-width:1100px){
    .report-layout-grid{
        grid-template-columns:1fr;
    }

    .report-hero{
        flex-direction:column;
    }

    .report-hero-actions{
        justify-content:flex-start;
    }
}

@media(max-width:760px){
    .report-filter-row{
        flex-direction:column;
        align-items:stretch;
    }

    .report-filter-row .form-group{
        min-width:0;
    }

    .report-period-grid{
        grid-template-columns:1fr;
    }

    .report-morosos-filter-grid{
        grid-template-columns:1fr;
        width:100%;
    }

    .report-filter-actions,
    .report-hero-actions{
        justify-content:stretch;
    }

    .report-filter-actions .btn-primary,
    .report-filter-actions .btn-secondary,
    .report-hero-actions .btn-success,
    .report-hero-actions .btn-info{
        width:100%;
        justify-content:center;
    }

    .report-table{
        font-size:12px;
    }

    .report-table th,
    .report-table td{
        padding:9px 8px;
    }
}

.dashboard-mini-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:0;
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow-sm);
    margin-bottom:16px;
    overflow:hidden;
}

.dashboard-mini-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:16px 20px;
    border-right:1px solid var(--border);
}

.dashboard-mini-card:last-child{
    border-right:none;
}

.dashboard-mini-card span{
    display:block;
    font-size:12px;
    color:var(--text-light);
    margin-bottom:4px;
}

.dashboard-mini-card strong{
    display:block;
    font-size:15px;
    color:var(--text);
}

.dashboard-mini-card small{
    display:block;
    font-size:12px;
    color:var(--text-light);
    margin-top:3px;
}

.dashboard-mini-card i{
    width:42px;
    height:42px;
    min-width:42px;
    border-radius:12px;
    background:#f1f5f9;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
}

.dashboard-home-grid{
    margin-bottom:14px;
}

.dashboard-main-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.dashboard-home-grid .dashboard-mini-card{
    min-height:88px;
}

.dashboard-home-grid .dashboard-mini-card .btn-info,
.dashboard-home-grid .dashboard-mini-card .btn-success{
    min-height:34px;
    padding:8px 11px;
    font-size:12px;
    white-space:nowrap;
}

.dashboard-workspace{
    display:grid;
    grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);
    gap:16px;
    align-items:start;
    margin-bottom:16px;
}

.dashboard-workspace.compact-dashboard-workspace{
    grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);
}

.dashboard-hero{
    margin-bottom:14px;
}

.dashboard-action-strip{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:16px;
}

.dashboard-action-card{
    display:flex;
    align-items:center;
    gap:12px;
    padding:13px 14px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fff;
    box-shadow:var(--shadow-sm);
    color:var(--text);
    text-decoration:none;
    min-width:0;
}

.dashboard-action-card:hover{
    transform:translateY(-1px);
    box-shadow:var(--shadow);
}

.dashboard-action-card i{
    width:38px;
    height:38px;
    min-width:38px;
    border-radius:12px;
    background:#f1f5f9;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
}

.dashboard-action-card strong,
.dashboard-action-card span{
    display:block;
}

.dashboard-action-card strong{
    font-size:14px;
}

.dashboard-action-card span{
    color:var(--text-light);
    font-size:12px;
    margin-top:2px;
}

/* =====================================================
   NUEVO BENEFICIARIO
===================================================== */

.beneficiary-create-layout{
    display:grid;
    grid-template-columns:minmax(230px,280px) minmax(0,1fr);
    gap:14px;
    align-items:start;
}

.beneficiary-create-summary,
.beneficiary-create-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow-sm);
}

.beneficiary-create-summary{
    padding:14px;
}

.beneficiary-create-summary .summary-icon{
    width:44px;
    height:44px;
    border-radius:12px;
    background:#e0f2fe;
    color:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    margin-bottom:10px;
}

.beneficiary-create-summary h3{
    margin:8px 0 5px;
    font-size:17px;
}

.beneficiary-create-summary > strong{
    display:block;
    font-size:25px;
    line-height:1;
    letter-spacing:.02em;
    color:var(--text);
    margin-bottom:8px;
    overflow-wrap:anywhere;
}

.beneficiary-create-summary p{
    margin:0 0 10px;
    color:var(--text-light);
    font-size:13px;
    line-height:1.45;
}

.summary-list{
    display:flex;
    flex-direction:column;
    gap:0;
    overflow:hidden;
    border:1px solid var(--border);
    border-radius:10px;
}

.summary-list div{
    padding:9px 10px;
    border:0;
    border-bottom:1px solid var(--border);
    border-radius:0;
    background:#fff;
}

.summary-list div:last-child{
    border-bottom:0;
}

.summary-list span{
    display:block;
    color:var(--text-light);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    margin-bottom:4px;
}

.summary-list strong{
    display:block;
    color:var(--text);
    font-size:13px;
    line-height:1.35;
}

.beneficiary-create-card{
    padding:15px;
}

.form-card-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    padding-bottom:12px;
    margin-bottom:12px;
    border-bottom:1px solid var(--border);
}

.form-card-header span{
    display:inline-flex;
    color:#0369a1;
    background:#e0f2fe;
    border-radius:999px;
    padding:5px 9px;
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    margin-bottom:7px;
}

.form-card-header h2{
    margin:0;
    font-size:21px;
}

.form-card-header p{
    margin:3px 0 0;
    color:var(--text-light);
    font-size:13px;
}

.compact-section{
    margin-bottom:12px;
}

.compact-section h3{
    font-size:15px;
    margin-bottom:9px;
}

.beneficiary-house-grid{
    grid-template-columns:repeat(4,1fr);
}

.beneficiary-billing-grid{
    grid-template-columns:minmax(240px,.85fr) minmax(280px,1.15fr);
}

.code-preview-strip{
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:10px;
    padding:9px 12px;
    border:1px solid #bfdbfe;
    border-radius:12px;
    background:#eff6ff;
}

.code-preview-strip i{
    width:34px;
    height:34px;
    border-radius:10px;
    background:#dbeafe;
    color:#1d4ed8;
    display:flex;
    align-items:center;
    justify-content:center;
}

.code-preview-strip span{
    display:block;
    color:var(--text-light);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
}

.code-preview-strip strong{
    display:block;
    color:var(--text);
    font-size:16px;
    overflow-wrap:anywhere;
}

.beneficiary-form-actions{
    justify-content:flex-end;
}

.beneficiary-form-actions button:disabled{
    opacity:.55;
    cursor:not-allowed;
}

.tenant-reset-box{
    border:1px solid #bbf7d0;
    background:#f0fdf4;
    border-radius:14px;
    padding:11px;
}

.tenant-reset-check{
    display:flex;
    align-items:flex-start;
    gap:10px;
    cursor:pointer;
    margin-bottom:12px;
}

.tenant-reset-check input{
    width:18px;
    height:18px;
    margin-top:2px;
    accent-color:var(--success);
}

.tenant-reset-check strong,
.tenant-reset-check small{
    display:block;
}

.tenant-reset-check strong{
    font-size:14px;
    color:var(--text);
}

.tenant-reset-check small{
    margin-top:3px;
    color:var(--text-light);
    font-size:12px;
    line-height:1.35;
}

.tenant-reset-help{
    margin-top:0;
    align-self:stretch;
}

.beneficiary-new-page .beneficiary-create-layout{
    grid-template-columns:minmax(0,1fr);
    max-width:1120px;
    margin:0 auto;
}

.beneficiary-new-page .beneficiary-create-card{
    padding:16px 18px;
}

.beneficiary-new-page .form-card-header{
    align-items:center;
    padding-bottom:10px;
    margin-bottom:10px;
}

.beneficiary-new-page .form-card-header span{
    margin-bottom:4px;
}

.beneficiary-new-page .form-card-header h2{
    font-size:20px;
}

.beneficiary-new-page .form-card-header p{
    font-size:12px;
}

.beneficiary-quick-guide{
    display:grid;
    grid-template-columns:minmax(230px,1.1fr) minmax(160px,.7fr) minmax(210px,.9fr);
    gap:0;
    overflow:hidden;
    margin-bottom:12px;
    border:1px solid #d8e1ea;
    border-radius:11px;
    background:#fff;
}

.beneficiary-quick-guide > div{
    min-width:0;
    padding:10px 13px;
    border-right:1px solid #e3e9ef;
}

.beneficiary-quick-guide > div:last-child{
    border-right:0;
}

.beneficiary-guide-main{
    display:flex;
    align-items:center;
    gap:10px;
}

.beneficiary-guide-main i{
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    border-radius:10px;
    background:#eef3f7;
    color:#6a9f2f;
}

.beneficiary-quick-guide span{
    display:block;
    color:#4f6074;
    font-size:11px;
    font-weight:900;
    line-height:1.2;
    margin-bottom:4px;
    text-transform:uppercase;
}

.beneficiary-quick-guide strong{
    display:block;
    color:var(--text);
    font-size:14px;
    line-height:1.25;
    overflow-wrap:anywhere;
}

.beneficiary-new-page .compact-section{
    padding:0;
    margin-bottom:13px;
    border:0;
    background:transparent;
    box-shadow:none;
}

.beneficiary-new-page .compact-section h3{
    margin-bottom:8px;
    font-size:15px;
}

.beneficiary-new-page .form-grid{
    gap:10px 12px;
}

.beneficiary-new-page .form-group label{
    margin-bottom:5px;
    font-size:12px;
}

.beneficiary-new-page .form-group input,
.beneficiary-new-page .form-group select,
.beneficiary-new-page .form-group textarea{
    min-height:38px;
    border-radius:9px;
    font-size:13px;
}

.beneficiary-new-page .form-group textarea{
    min-height:74px;
}

.beneficiary-new-page .code-preview-strip{
    margin-top:9px;
    padding:8px 10px;
    background:#f8fafc;
    border-color:#d8e1ea;
}

.beneficiary-new-page .code-preview-strip i{
    width:30px;
    height:30px;
    border-radius:8px;
}

.beneficiary-new-page .code-preview-strip strong{
    font-size:14px;
}

.beneficiary-new-page .field-help{
    margin-top:6px;
    font-size:12px;
    line-height:1.35;
}

.beneficiary-new-page .beneficiary-form-actions{
    margin-top:8px;
    padding-top:12px;
}

@media(max-width:900px){
    .beneficiary-quick-guide{
        grid-template-columns:1fr;
    }

    .beneficiary-quick-guide > div{
        border-right:0;
        border-bottom:1px solid #e3e9ef;
    }

    .beneficiary-quick-guide > div:last-child{
        border-bottom:0;
    }
}

/* =====================================================
   REDISEÑO FINANZAS - COMPACTO OPERATIVO
===================================================== */

@media screen{
    .finance-overview-hero{
        padding:0;
        margin-bottom:14px;
        background:transparent;
        border:0;
        box-shadow:none;
    }

    .finance-overview-hero h1,
    .finance-movements-page .page-title h1,
    .expenses-page .page-title h1,
    .financial-close-page .page-title h1{
        font-size:34px;
        line-height:1.08;
    }

    .finance-overview-hero p,
    .finance-movements-page .page-title p,
    .expenses-page .page-title p,
    .financial-close-page .page-title p{
        margin-top:4px;
        color:#4f6074;
        font-size:14px;
    }

    .finance-overview-actions{
        display:flex;
        align-items:center;
        justify-content:flex-end;
        gap:8px;
        flex-wrap:wrap;
    }

    .finance-overview-actions a,
    .finance-movements-header a,
    .expenses-list-header a,
    .financial-close-actions a,
    .financial-close-actions button{
        min-height:34px;
        padding:0 12px;
        border-radius:8px;
        font-size:12px;
        white-space:nowrap;
    }

    .finance-overview-summary,
    .finance-movement-summary,
    .expenses-summary-grid,
    .report-mini-grid,
    .finance-close-summary{
        margin-bottom:14px;
    }

    .finance-overview-grid{
        grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr);
        gap:12px;
    }

    .finance-overview-movements,
    .finance-overview-side,
    .expenses-list-card,
    .finance-movements-card,
    .expense-form-card,
    .finance-close-card{
        padding:14px 16px;
        border-radius:11px;
        border:1px solid #d8e1ea;
        box-shadow:0 7px 18px rgba(23,36,52,.055);
        background:#fff;
    }

    .finance-overview-movements .widget-title-row,
    .finance-movements-header,
    .expenses-list-header,
    .finance-close-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
        gap:12px;
        padding-bottom:10px;
        margin-bottom:10px;
        border-bottom:1px solid #e3e9ef;
    }

    .finance-overview-movements h3,
    .finance-overview-side h3,
    .finance-movements-header h3,
    .expenses-list-header h3,
    .finance-close-header h3{
        display:flex;
        align-items:center;
        gap:8px;
        margin:0;
        font-size:18px;
        line-height:1.2;
    }

    .finance-movements-header p,
    .expenses-list-header p{
        margin:2px 0 0;
        color:#4f6074;
        font-size:12px;
    }

    .expenses-filter-panel,
    .finance-movement-filters,
    .finance-close-filter{
        display:grid;
        align-items:end;
        gap:8px;
        padding:8px;
        margin:0 0 10px;
        border:1px solid #e3e9ef;
        border-radius:10px;
        background:#f8fafc;
    }

    .expenses-filter-panel{
        grid-template-columns:130px 130px 145px 120px minmax(220px,1fr) 100px auto;
    }

    .finance-movement-filters{
        grid-template-columns:150px 150px 140px 100px auto;
    }

    .finance-close-filter{
        grid-template-columns:180px 130px auto auto;
        max-width:760px;
    }

    .report-filter-card{
        padding:8px 10px;
        border-radius:11px;
    }

    .report-filter-row{
        display:flex;
        align-items:end;
        justify-content:space-between;
        gap:8px;
        margin:0;
    }

    .report-period-grid{
        display:grid;
        grid-template-columns:120px 180px;
        gap:8px;
        margin:0;
    }

    .report-filter-row .form-group{
        margin:0;
    }

    .report-filter-row label{
        margin-bottom:4px;
        font-size:11px;
        font-weight:900;
        color:#4f6074;
        text-transform:uppercase;
    }

    .report-filter-row input,
    .report-filter-row select{
        min-height:34px;
        border-radius:8px;
        font-size:12px;
    }

    .expenses-filter-panel .form-group,
    .finance-movement-filters .form-group,
    .finance-close-filter .form-group{
        margin:0;
    }

    .expenses-filter-panel label,
    .finance-movement-filters label,
    .finance-close-filter label{
        margin-bottom:4px;
        font-size:11px;
        font-weight:900;
        color:#4f6074;
        text-transform:uppercase;
    }

    .expenses-filter-panel input,
    .expenses-filter-panel select,
    .finance-movement-filters input,
    .finance-movement-filters select,
    .finance-close-filter input,
    .finance-close-filter select{
        min-height:34px;
        border-radius:8px;
        font-size:12px;
    }

    .expenses-filter-actions,
    .finance-filter-actions,
    .finance-close-actions{
        display:flex;
        align-items:center;
        gap:7px;
        margin:0;
    }

    .expenses-filter-actions button,
    .expenses-filter-actions a,
    .finance-filter-actions button,
    .finance-filter-actions a{
        min-height:34px;
        padding:0 12px;
        border-radius:8px;
        font-size:12px;
        white-space:nowrap;
    }

    .expenses-table-header,
    .finance-table-header{
        padding:7px 0;
    }

    .expenses-table table,
    .finance-movements-table table,
    .finance-overview-table table{
        width:100%;
        min-width:0;
        table-layout:fixed;
    }

    .expenses-table th,
    .expenses-table td,
    .finance-movements-table th,
    .finance-movements-table td,
    .finance-overview-table th,
    .finance-overview-table td{
        padding:8px 10px;
        font-size:12px;
        line-height:1.28;
        white-space:normal;
        overflow-wrap:anywhere;
        vertical-align:middle;
    }

    .expenses-table td small,
    .finance-movements-table td small,
    .finance-overview-table td small{
        display:block;
        margin-top:3px;
        color:#4f6074;
        font-size:11px;
    }

    .expenses-table .btn-danger{
        min-height:28px;
        padding:5px 8px;
        border-radius:8px;
        font-size:11px;
        white-space:nowrap;
    }

    .expense-create-layout{
        grid-template-columns:minmax(230px,280px) minmax(0,1fr);
        gap:14px;
    }

    .expense-summary-card{
        padding:14px;
    }

    .expense-summary-card .summary-icon{
        width:44px;
        height:44px;
        border-radius:12px;
        font-size:20px;
        margin-bottom:10px;
    }

    .expense-summary-card > strong{
        font-size:25px;
    }

    .expense-form-card{
        padding:15px;
    }

    .expense-form-card .form-card-header{
        padding-bottom:12px;
        margin-bottom:12px;
    }

    .expense-form-card .compact-section{
        margin-bottom:12px;
    }

    .expense-form-card .form-group input,
    .expense-form-card .form-group select,
    .expense-form-card .form-group textarea{
        min-height:38px;
        border-radius:9px;
        font-size:13px;
    }

    .expense-impact-strip{
        padding:9px 12px;
        border-radius:10px;
        font-size:12px;
    }

    @media(max-width:1180px){
        .expenses-filter-panel{
            grid-template-columns:repeat(2,minmax(150px,1fr));
        }

        .expenses-filter-panel .expense-search-field,
        .expenses-filter-actions{
            grid-column:auto;
        }

        .finance-overview-grid{
            grid-template-columns:1fr;
        }
    }

    @media(max-width:900px){
        .finance-overview-hero,
        .finance-overview-movements .widget-title-row,
        .finance-movements-header,
        .expenses-list-header,
        .finance-close-header{
            align-items:stretch;
            flex-direction:column;
        }

        .finance-overview-actions,
        .finance-overview-actions a,
        .finance-movements-header a,
        .expenses-list-header a{
            width:100%;
        }

        .finance-movement-filters,
        .finance-close-filter{
            grid-template-columns:1fr;
        }

        .expenses-table,
        .finance-movements-table,
        .finance-overview-table,
        .report-table-responsive,
        .finance-close-card .table-responsive{
            overflow:visible;
        }

        .expenses-table table,
        .expenses-table thead,
        .expenses-table tbody,
        .expenses-table tr,
        .expenses-table td,
        .finance-movements-table table,
        .finance-movements-table thead,
        .finance-movements-table tbody,
        .finance-movements-table tr,
        .finance-movements-table td,
        .finance-overview-table table,
        .finance-overview-table thead,
        .finance-overview-table tbody,
        .finance-overview-table tr,
        .finance-overview-table td,
        .report-table-responsive table,
        .report-table-responsive thead,
        .report-table-responsive tbody,
        .report-table-responsive tr,
        .report-table-responsive td,
        .finance-close-card .table-responsive table,
        .finance-close-card .table-responsive thead,
        .finance-close-card .table-responsive tbody,
        .finance-close-card .table-responsive tr,
        .finance-close-card .table-responsive td{
            display:block;
            width:100%;
            min-width:0;
        }

        .expenses-table thead,
        .finance-movements-table thead,
        .finance-overview-table thead,
        .report-table-responsive thead,
        .finance-close-card .table-responsive thead{
            display:none;
        }

        .expenses-table table,
        .finance-movements-table table,
        .finance-overview-table table,
        .report-table-responsive table,
        .finance-close-card .table-responsive table{
            border:0;
            border-collapse:separate;
            border-spacing:0 9px;
        }

        .expenses-table tbody tr,
        .finance-movements-table tbody tr,
        .finance-overview-table tbody tr,
        .report-table-responsive tbody tr,
        .finance-close-card .table-responsive tbody tr{
            border:1px solid #d8e1ea;
            border-radius:11px;
            background:#fff;
            overflow:hidden;
            box-shadow:0 5px 14px rgba(23,36,52,.04);
        }

        .expenses-table tbody td,
        .finance-movements-table tbody td,
        .finance-overview-table tbody td,
        .report-table-responsive tbody td,
        .finance-close-card .table-responsive tbody td{
            display:grid;
            grid-template-columns:108px minmax(0,1fr);
            gap:10px;
            align-items:center;
            padding:9px 12px;
            border-bottom:1px solid #edf1f5;
            text-align:left;
            word-break:normal;
            overflow-wrap:anywhere;
        }

        .expenses-table tbody td:last-child,
        .finance-movements-table tbody td:last-child,
        .finance-overview-table tbody td:last-child,
        .report-table-responsive tbody td:last-child,
        .finance-close-card .table-responsive tbody td:last-child{
            border-bottom:0;
        }

        .expenses-table tbody td::before,
        .finance-movements-table tbody td::before,
        .finance-overview-table tbody td::before,
        .report-table-responsive tbody td::before,
        .finance-close-card .table-responsive tbody td::before{
            content:attr(data-label);
            color:#4f6074;
            font-size:11px;
            font-weight:900;
            text-transform:uppercase;
        }

        .expense-create-layout{
            grid-template-columns:1fr;
        }

        .report-filter-row,
        .report-period-grid{
            display:grid;
            grid-template-columns:1fr;
            width:100%;
        }
    }

    @media(max-width:640px){
        .expenses-filter-panel{
            grid-template-columns:1fr;
        }

        .expenses-filter-actions,
        .finance-filter-actions,
        .finance-close-actions,
        .expenses-filter-actions button,
        .expenses-filter-actions a,
        .finance-filter-actions button,
        .finance-filter-actions a,
        .finance-close-actions button,
        .finance-close-actions a{
            width:100%;
        }
    }
}

/* =====================================================
   COMPRAS / GASTOS
===================================================== */

.expense-create-layout{
    display:grid;
    grid-template-columns:minmax(250px,320px) minmax(0,1fr);
    gap:16px;
    align-items:start;
}

.expense-summary-card,
.expense-form-card,
.expenses-list-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow-sm);
}

.expense-summary-card{
    padding:18px;
    position:sticky;
    top:92px;
}

.expense-summary-card .summary-icon{
    width:68px;
    height:68px;
    border-radius:18px;
    background:#dcfce7;
    color:var(--success);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
    margin-bottom:14px;
}

.expense-summary-card > strong{
    display:block;
    font-size:31px;
    line-height:1.1;
    margin:12px 0 8px;
    color:var(--text);
}

.expense-summary-card p{
    margin:0 0 14px;
    color:var(--text-light);
    font-size:13px;
    line-height:1.45;
}

.expense-form-card,
.expenses-list-card{
    padding:20px;
}

.expense-main-grid{
    grid-template-columns:repeat(4,1fr);
}

.expense-impact-strip{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:12px 14px;
    border:1px solid #fde68a;
    border-radius:12px;
    background:#fffbeb;
    color:#92400e;
    font-size:13px;
    font-weight:700;
}

.expense-impact-strip i{
    margin-top:2px;
}

.expenses-summary-grid{
    margin-bottom:16px;
}

.expenses-list-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    padding-bottom:14px;
    margin-bottom:14px;
    border-bottom:1px solid var(--border);
}

.expenses-list-header h3{
    display:flex;
    align-items:center;
    gap:9px;
    margin:0 0 4px;
    font-size:22px;
}

.expenses-list-header p{
    margin:0;
    color:var(--text-light);
    font-size:13px;
}

.expenses-filter-panel{
    display:grid;
    grid-template-columns:repeat(4,minmax(130px,1fr));
    gap:10px 12px;
    align-items:end;
    margin-bottom:12px;
}

.expenses-filter-panel .expense-search-field{
    grid-column:span 2;
}

.expenses-filter-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.expenses-table-header{
    padding:9px 0 11px;
}

.expenses-table-header strong,
.expenses-table-header span{
    display:block;
}

.expenses-table-header strong{
    font-size:14px;
}

.expenses-table-header span{
    color:var(--text-light);
    font-size:12px;
    margin-top:2px;
}

.expenses-table{
    overflow-x:hidden;
}

.expenses-table table{
    width:100%;
    min-width:0;
    table-layout:fixed;
    box-sizing:border-box;
}

.expenses-table th,
.expenses-table td{
    box-sizing:border-box;
    padding:10px 10px;
    font-size:13px;
    line-height:1.35;
    white-space:normal;
    overflow-wrap:anywhere;
    vertical-align:middle;
}

.expenses-table th:nth-child(1),
.expenses-table td:nth-child(1){
    width:9%;
}

.expenses-table th:nth-child(2),
.expenses-table td:nth-child(2){
    width:11%;
}

.expenses-table th:nth-child(3),
.expenses-table td:nth-child(3){
    width:26%;
}

.expenses-table th:nth-child(4),
.expenses-table td:nth-child(4){
    width:11%;
}

.expenses-table th:nth-child(5),
.expenses-table td:nth-child(5){
    width:10%;
}

.expenses-table th:nth-child(6),
.expenses-table td:nth-child(6){
    width:11%;
}

.expenses-table th:nth-child(7),
.expenses-table td:nth-child(7){
    width:12%;
}

.expenses-table th:nth-child(8),
.expenses-table td:nth-child(8){
    width:10%;
}

.expenses-table .badge-success,
.expenses-table .badge-danger,
.expenses-table .badge-warning,
.expenses-table .badge-secondary{
    max-width:100%;
    white-space:normal;
    text-align:center;
}

.expenses-table td small{
    display:block;
    color:var(--text-light);
    font-size:11px;
    margin-top:3px;
}

.expenses-table .btn-danger{
    min-height:31px;
    padding:7px 9px;
    font-size:12px;
}

/* =====================================================
   MOVIMIENTOS FINANCIEROS
===================================================== */

.finance-movement-summary{
    margin-bottom:16px;
}

.finance-movements-card{
    padding:20px;
}

.finance-movements-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    padding-bottom:14px;
    margin-bottom:14px;
    border-bottom:1px solid var(--border);
}

.finance-movements-header h3{
    display:flex;
    align-items:center;
    gap:9px;
    margin:0 0 4px;
    font-size:22px;
}

.finance-movements-header p{
    margin:0;
    color:var(--text-light);
    font-size:13px;
}

.finance-movement-filters{
    display:grid;
    grid-template-columns:repeat(4,minmax(130px,1fr)) auto;
    gap:10px 12px;
    align-items:end;
    margin-bottom:12px;
}

.finance-filter-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.finance-table-header{
    padding:9px 0 11px;
}

.finance-table-header strong,
.finance-table-header span{
    display:block;
}

.finance-table-header strong{
    font-size:14px;
}

.finance-table-header span{
    color:var(--text-light);
    font-size:12px;
    margin-top:2px;
}

.finance-movements-table{
    overflow-x:hidden;
}

.finance-movements-table table{
    width:100%;
    min-width:0;
    table-layout:fixed;
}

.finance-movements-table th,
.finance-movements-table td{
    padding:10px 11px;
    font-size:13px;
    line-height:1.35;
    white-space:normal;
    overflow-wrap:anywhere;
    vertical-align:middle;
}

.finance-movements-table th:nth-child(1),
.finance-movements-table td:nth-child(1){
    width:10%;
}

.finance-movements-table th:nth-child(2),
.finance-movements-table td:nth-child(2){
    width:10%;
}

.finance-movements-table th:nth-child(3),
.finance-movements-table td:nth-child(3){
    width:27%;
}

.finance-movements-table th:nth-child(4),
.finance-movements-table td:nth-child(4){
    width:18%;
}

.finance-movements-table th:nth-child(5),
.finance-movements-table td:nth-child(5){
    width:12%;
}

.finance-movements-table th:nth-child(6),
.finance-movements-table td:nth-child(6),
.finance-movements-table th:nth-child(7),
.finance-movements-table td:nth-child(7){
    width:11.5%;
}

.finance-movements-table td small{
    display:block;
    color:var(--text-light);
    font-size:11px;
    margin-top:3px;
}

.money-in{
    color:#047857;
}

.money-out{
    color:#b91c1c;
}

.muted-dash{
    color:var(--text-light);
}

/* =====================================================
   RESUMEN FINANCIERO
===================================================== */

.finance-overview-hero{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:16px;
}

.finance-overview-hero h1{
    margin:8px 0 4px;
    font-size:42px;
    line-height:1.05;
}

.finance-overview-hero p{
    margin:0;
    color:var(--text-light);
    font-size:14px;
}

.finance-overview-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:9px;
    flex-wrap:wrap;
}

.finance-overview-summary{
    margin-bottom:16px;
}

.finance-overview-grid{
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);
    gap:16px;
    align-items:start;
}

.finance-overview-movements,
.finance-overview-side{
    padding:20px;
}

.finance-overview-table{
    overflow-x:hidden;
}

.finance-overview-table table{
    width:100%;
    table-layout:fixed;
    min-width:0;
}

.finance-overview-table th,
.finance-overview-table td{
    padding:10px 11px;
    font-size:13px;
    line-height:1.35;
    white-space:normal;
    overflow-wrap:anywhere;
    vertical-align:middle;
}

.finance-overview-table th:nth-child(1),
.finance-overview-table td:nth-child(1){
    width:13%;
}

.finance-overview-table th:nth-child(2),
.finance-overview-table td:nth-child(2){
    width:13%;
}

.finance-overview-table th:nth-child(3),
.finance-overview-table td:nth-child(3){
    width:49%;
}

.finance-overview-table th:nth-child(4),
.finance-overview-table td:nth-child(4){
    width:25%;
}

.finance-overview-table td small{
    display:block;
    color:var(--text-light);
    font-size:11px;
    margin-top:3px;
}

.finance-overview-side h3{
    display:flex;
    align-items:center;
    gap:9px;
    margin:0 0 14px;
    font-size:22px;
}

.finance-overview-side .btn-info{
    width:100%;
    margin-top:14px;
}

@media(max-width:1000px){

    .finance-overview-hero,
    .finance-overview-grid{
        grid-template-columns:1fr;
        flex-direction:column;
    }

    .finance-overview-actions{
        justify-content:flex-start;
    }

}

@media(max-width:700px){

    .finance-overview-hero h1{
        font-size:34px;
    }

    .finance-overview-actions,
    .finance-overview-actions a{
        width:100%;
    }

    .finance-overview-table{
        overflow-x:auto;
    }

    .finance-overview-table table{
        min-width:620px;
    }

}

@media(max-width:1200px){

    .finance-movement-filters{
        grid-template-columns:repeat(2,1fr);
    }

}

@media(max-width:900px){

    .finance-movements-table{
        overflow-x:auto;
    }

    .finance-movements-table table{
        min-width:780px;
    }

}

@media(max-width:700px){

    .finance-movements-header,
    .finance-filter-actions{
        flex-direction:column;
        align-items:stretch;
    }

    .finance-movements-header .btn-warning,
    .finance-movement-filters,
    .finance-filter-actions button,
    .finance-filter-actions a{
        width:100%;
    }

    .finance-movement-filters{
        grid-template-columns:1fr;
    }

}

@media(max-width:1200px){

    .expense-main-grid,
    .expenses-filter-panel{
        grid-template-columns:repeat(2,1fr);
    }

    .expenses-filter-panel .expense-search-field{
        grid-column:span 1;
    }

}

@media(max-width:900px){

    .expense-create-layout{
        grid-template-columns:1fr;
    }

    .expense-summary-card{
        position:static;
    }

    .expenses-table{
        overflow-x:auto;
    }

    .expenses-table table{
        min-width:840px;
    }

}

@media(max-width:700px){

    .expense-main-grid,
    .expenses-filter-panel{
        grid-template-columns:1fr;
    }

    .expenses-list-header{
        flex-direction:column;
    }

    .expenses-list-header .btn-success,
    .expenses-filter-actions,
    .expenses-filter-actions button,
    .expenses-filter-actions a{
        width:100%;
    }

}

@media(max-width:1100px){

    .beneficiary-create-layout{
        grid-template-columns:1fr;
    }

    .beneficiary-create-summary{
        position:static;
        display:grid;
        grid-template-columns:auto 1fr;
        gap:14px;
        align-items:start;
    }

    .beneficiary-create-summary .summary-icon{
        margin:0;
    }

    .beneficiary-create-summary .badge-info,
    .beneficiary-create-summary h3,
    .beneficiary-create-summary > strong,
    .beneficiary-create-summary p,
    .beneficiary-create-summary .summary-list{
        grid-column:2;
    }

    .summary-list{
        display:grid;
        grid-template-columns:repeat(3,1fr);
    }

    .beneficiary-house-grid{
        grid-template-columns:repeat(2,1fr);
    }

}

@media(max-width:760px){

    .form-card-header,
    .beneficiary-create-summary{
        display:flex;
        flex-direction:column;
    }

    .form-card-header .btn-secondary{
        width:100%;
    }

    .summary-list,
    .beneficiary-house-grid,
    .beneficiary-billing-grid{
        grid-template-columns:1fr;
    }

    .beneficiary-form-actions{
        flex-direction:column;
    }

    .beneficiary-form-actions button{
        width:100%;
    }

}

/* =====================================================
   LISTA DE BENEFICIARIOS
===================================================== */

.beneficiary-list-summary{
    margin-bottom:16px;
}

.beneficiary-list-card{
    padding:20px;
}

.beneficiary-list-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    padding-bottom:14px;
    margin-bottom:14px;
    border-bottom:1px solid var(--border);
}

.beneficiary-list-header h3{
    display:flex;
    align-items:center;
    gap:9px;
    margin:0 0 4px;
    font-size:22px;
}

.beneficiary-list-header p{
    margin:0;
    color:var(--text-light);
    font-size:13px;
}

.beneficiary-filter-panel{
    display:grid;
    grid-template-columns:minmax(260px,1fr) 165px 155px auto auto;
    gap:10px;
    align-items:center;
    margin-bottom:14px;
}

.beneficiary-search-box{
    position:relative;
}

.beneficiary-search-box i{
    position:absolute;
    left:13px;
    top:50%;
    transform:translateY(-50%);
    color:#94a3b8;
}

.beneficiary-search-box input{
    width:100%;
    min-height:40px;
    padding:9px 12px 9px 38px;
    border:1px solid var(--border-dark);
    border-radius:10px;
    font-size:13px;
}

.beneficiary-filter-panel select,
.beneficiary-limit-form select{
    min-height:40px;
    padding:8px 10px;
    border:1px solid var(--border-dark);
    border-radius:10px;
    background:#fff;
    font-size:13px;
}

.beneficiary-table-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:10px 0;
}

.beneficiary-table-header strong,
.beneficiary-table-header span{
    display:block;
}

.beneficiary-table-header strong{
    color:var(--text);
    font-size:14px;
}

.beneficiary-table-header span{
    color:var(--text-light);
    font-size:12px;
    margin-top:2px;
}

.beneficiary-limit-form{
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--text-light);
    font-size:13px;
}

.beneficiary-table{
    overflow-x:hidden;
}

.beneficiary-table table{
    width:100%;
    min-width:0;
    table-layout:fixed;
}

.beneficiary-table th,
.beneficiary-table td{
    padding:8px 10px;
    font-size:12px;
    line-height:1.28;
    white-space:normal;
    overflow-wrap:anywhere;
    vertical-align:middle;
}

.beneficiary-table th:nth-child(1),
.beneficiary-table td:nth-child(1){
    width:9%;
}

.beneficiary-table th:nth-child(2),
.beneficiary-table td:nth-child(2){
    width:10%;
}

.beneficiary-table th:nth-child(3),
.beneficiary-table td:nth-child(3){
    width:18%;
}

.beneficiary-table th:nth-child(4),
.beneficiary-table td:nth-child(4){
    width:17%;
}

.beneficiary-table th:nth-child(5),
.beneficiary-table td:nth-child(5){
    width:15%;
}

.beneficiary-table th:nth-child(6),
.beneficiary-table td:nth-child(6){
    width:9%;
}

.beneficiary-table th:nth-child(7),
.beneficiary-table td:nth-child(7){
    width:22%;
}

.beneficiary-table td small{
    display:block;
    color:var(--text-light);
    font-size:11px;
    margin-top:3px;
}

.beneficiary-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:center;
    gap:6px;
    max-width:280px;
}

.beneficiary-actions .btn-info,
.beneficiary-actions .btn-warning,
.beneficiary-actions .btn-danger,
.beneficiary-actions .btn-success{
    min-height:28px;
    padding:5px 8px;
    font-size:11px;
    gap:5px;
    text-decoration:none;
}

.beneficiary-footer{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid var(--border);
    flex-wrap:wrap;
}

.beneficiary-export,
.beneficiary-pagination{
    display:flex;
    align-items:center;
    gap:7px;
    flex-wrap:wrap;
}

.beneficiary-pagination a{
    min-width:36px;
}

@media(max-width:1200px){

    .beneficiary-filter-panel{
        grid-template-columns:1fr 1fr 1fr;
    }

    .beneficiary-search-box{
        grid-column:1 / -1;
    }

}

@media(max-width:900px){

    .beneficiary-table{
        overflow-x:auto;
    }

    .beneficiary-table table{
        min-width:860px;
    }

}

@media(max-width:700px){

    .beneficiary-list-header,
    .beneficiary-table-header,
    .beneficiary-footer{
        flex-direction:column;
        align-items:stretch;
    }

    .beneficiary-list-header .btn-primary,
    .beneficiary-filter-panel,
    .beneficiary-filter-panel button,
    .beneficiary-filter-panel a,
    .beneficiary-filter-panel select,
    .beneficiary-export button{
        width:100%;
    }

    .beneficiary-filter-panel{
        display:flex;
        flex-direction:column;
    }

    .beneficiary-pagination{
        justify-content:center;
    }

}

.dashboard-left-stack,
.dashboard-right-stack{
    display:flex;
    flex-direction:column;
    gap:16px;
}

.widget-title-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
}

.widget-title-row h3{
    margin:0;
}

.dashboard-table table{
    min-width:0;
    width:100%;
    table-layout:fixed;
    box-sizing:border-box;
}

.dashboard-table{
    overflow-x:hidden;
}

.dashboard-table th,
.dashboard-table td{
    box-sizing:border-box;
    padding:9px 10px;
    font-size:13px;
    white-space:normal;
    overflow-wrap:anywhere;
    line-height:1.35;
}

.dashboard-table th{
    vertical-align:middle;
}

.dashboard-table td{
    vertical-align:middle;
}

.dashboard-table th:last-child,
.dashboard-table td:last-child{
    width:92px;
    text-align:center;
}

.dashboard-payments-widget .dashboard-table th:nth-child(1),
.dashboard-payments-widget .dashboard-table td:nth-child(1){
    width:20%;
}

.dashboard-payments-widget .dashboard-table th:nth-child(2),
.dashboard-payments-widget .dashboard-table td:nth-child(2){
    width:16%;
}

.dashboard-payments-widget .dashboard-table th:nth-child(3),
.dashboard-payments-widget .dashboard-table td:nth-child(3){
    width:18%;
}

.dashboard-payments-widget .dashboard-table th:nth-child(4),
.dashboard-payments-widget .dashboard-table td:nth-child(4){
    width:17%;
}

.dashboard-payments-widget .dashboard-table th:nth-child(5),
.dashboard-payments-widget .dashboard-table td:nth-child(5){
    width:14%;
}

.dashboard-payments-widget .dashboard-table th:nth-child(6),
.dashboard-payments-widget .dashboard-table td:nth-child(6){
    width:16%;
}

.dashboard-debt-widget .dashboard-table th:nth-child(1),
.dashboard-debt-widget .dashboard-table td:nth-child(1){
    width:24%;
}

.dashboard-debt-widget .dashboard-table th:nth-child(2),
.dashboard-debt-widget .dashboard-table td:nth-child(2){
    width:20%;
}

.dashboard-debt-widget .dashboard-table th:nth-child(3),
.dashboard-debt-widget .dashboard-table td:nth-child(3){
    width:18%;
}

.dashboard-debt-widget .dashboard-table th:nth-child(4),
.dashboard-debt-widget .dashboard-table td:nth-child(4){
    width:16%;
}

.dashboard-debt-widget .dashboard-table th:nth-child(5),
.dashboard-debt-widget .dashboard-table td:nth-child(5){
    width:22%;
}

.dashboard-debt-widget .dashboard-table th,
.dashboard-debt-widget .dashboard-table td{
    padding-left:8px;
    padding-right:8px;
}

.dashboard-debt-widget .dashboard-table .btn-success{
    min-width:58px;
    padding-left:8px;
    padding-right:8px;
}

.dashboard-table .btn-info,
.dashboard-table .btn-success,
.dashboard-table .btn-warning,
.dashboard-table .btn-danger,
.table-responsive .btn-info,
.table-responsive .btn-success,
.table-responsive .btn-warning,
.table-responsive .btn-danger,
.table-responsive .btn-secondary{
    min-height:32px;
    padding:7px 9px;
    font-size:12px;
    white-space:nowrap;
    gap:6px;
}

.dashboard-table .btn-info,
.dashboard-table .btn-success,
.dashboard-table .btn-warning,
.dashboard-table .btn-danger{
    width:auto;
    min-width:64px;
}

.dashboard-table .btn-compact-action{
    min-width:0;
    max-width:100%;
    padding-left:7px;
    padding-right:7px;
    white-space:normal;
    line-height:1.12;
}

.dashboard-summary-widget{
    min-height:auto;
}

.dashboard-summary-widget canvas{
    width:220px !important;
    max-width:100% !important;
    height:220px !important;
    max-height:220px !important;
    aspect-ratio:1 / 1;
    margin:0 auto;
}

.dashboard-summary-list{
    margin-top:10px;
    border:1px solid var(--border);
    border-radius:12px;
    overflow:hidden;
}

.dashboard-summary-list div{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:9px 12px;
    border-bottom:1px solid var(--border);
    font-size:13px;
}

.dashboard-summary-list div:last-child{
    border-bottom:none;
}

.dashboard-summary-list span{
    color:var(--text-soft);
}

.dashboard-summary-list strong{
    color:var(--text);
}

.dashboard-goal-widget{
    min-height:auto;
}

.goal-percent{
    font-size:34px;
    font-weight:900;
    color:var(--success);
    margin:10px 0;
}

.goal-values{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
    margin-bottom:12px;
}

.goal-values div{
    background:#f8fafc;
    border:1px solid var(--border);
    border-radius:10px;
    padding:10px;
}

.goal-values span{
    display:block;
    font-size:12px;
    color:var(--text-light);
}

.goal-values strong{
    font-size:14px;
}

.goal-period{
    margin-top:10px;
    color:var(--text-light);
    font-size:13px;
}

.chart-box{
    height:300px;
    min-height:300px;
}

.chart-box canvas{
    width:100% !important;
    height:300px !important;
}

.dashboard-income-widget #incomeChart{
    height:300px !important;
    max-height:300px !important;
}

.empty-table{
    text-align:center;
    padding:28px !important;
    color:var(--text-light);
    font-weight:700;
}

.empty-table::before{
    content:"\f05a";
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    margin-right:8px;
    border-radius:50%;
    background:#f1f5f9;
    color:var(--secondary);
    font-family:"Font Awesome 6 Free";
    font-weight:900;
}

.empty-table.has-empty-state{
    padding:16px !important;
}

.empty-table.has-empty-state::before{
    display:none;
}

.empty-table > i{
    display:none;
}

.empty-table br{
    display:none;
}

.empty-state{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:120px;
    padding:28px;
    text-align:center;
    color:var(--text-light);
    border:1px dashed var(--border-dark);
    border-radius:14px;
    background:#f8fafc;
}

.empty-state i{
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    color:var(--secondary);
    background:#e2e8f0;
    font-size:18px;
}

.empty-state strong{
    color:var(--text-soft);
    font-size:15px;
}

.empty-state span{
    font-size:13px;
}

.empty-state-table{
    min-height:112px;
}

.empty-state-action{
    margin-top:4px;
    text-decoration:none;
}

.account-insights{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:1px;
    margin-top:16px;
    overflow:hidden;
    border:1px solid var(--border);
    border-radius:14px;
    background:var(--border);
}

.account-insights > div{
    padding:14px 16px;
    background:#fff;
}

.account-insights span{
    display:block;
    margin-bottom:6px;
    color:var(--text-soft);
    font-size:12px;
}

.account-insights strong{
    color:var(--text);
    font-size:15px;
}

.account-table-tools{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    margin-left:auto;
}

.account-table-tools select{
    height:40px;
    border-radius:10px;
}

.selected-beneficiary-card .btn-success,
.selected-beneficiary-card .btn-secondary{
    min-height:40px;
}

.pending-list-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.pending-mini-grid{
    margin-bottom:16px;
}

.account-mini-grid{
    margin-top:20px;
    margin-bottom:16px;
}

.caja-mini-grid{
    margin-top:20px;
    margin-bottom:16px;
}

.caja-arqueo-grid{
    grid-template-columns:repeat(3,1fr);
}

.historial-summary-cards{
    grid-template-columns:repeat(4,1fr);
    gap:0;
    overflow:hidden;
    margin-bottom:16px;
    border:1px solid var(--border);
    border-radius:16px;
    background:#fff;
    box-shadow:var(--shadow-sm);
}

.historial-summary-cards .card{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    min-height:92px;
    padding:14px 18px;
    border-radius:0;
    border-right:1px solid var(--border);
    box-shadow:none;
}

.historial-summary-cards .card:last-child{
    border-right:none;
}

.historial-summary-cards .card-header{
    display:contents;
}

.historial-summary-cards .card-header h3{
    grid-column:1;
    grid-row:1;
    color:var(--text-light);
    font-size:12px;
    font-weight:600;
}

.historial-summary-cards .card-header i{
    grid-column:2;
    grid-row:1 / span 3;
    width:42px;
    height:42px;
    min-width:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    background:#f1f5f9;
    font-size:22px;
}

.historial-summary-cards .card-number{
    grid-column:1;
    margin:0;
    font-size:15px !important;
    font-weight:800;
}

.historial-summary-cards .card-text{
    grid-column:1;
    margin:0;
    font-size:12px;
}

@media (min-width:901px){

    .historial-table-responsive table{
        width:100%;
        min-width:0;
        table-layout:fixed;
    }

    .historial-table-responsive th,
    .historial-table-responsive td{
        padding:7px 6px;
        font-size:12px;
        line-height:1.25;
        white-space:normal !important;
        overflow-wrap:normal !important;
        word-break:normal !important;
    }

    .historial-table-responsive td strong{
        font-size:12px;
    }

    .historial-table-responsive th:nth-child(1),
    .historial-table-responsive td:nth-child(1){
        width:11%;
    }

    .historial-table-responsive th:nth-child(2),
    .historial-table-responsive td:nth-child(2){
        width:9%;
    }

    .historial-table-responsive th:nth-child(3),
    .historial-table-responsive td:nth-child(3){
        width:8%;
    }

    .historial-table-responsive th:nth-child(4),
    .historial-table-responsive td:nth-child(4){
        width:11%;
    }

    .historial-table-responsive th:nth-child(5),
    .historial-table-responsive td:nth-child(5){
        width:8%;
    }

    .historial-table-responsive th:nth-child(6),
    .historial-table-responsive td:nth-child(6){
        width:7%;
    }

    .historial-table-responsive th:nth-child(7),
    .historial-table-responsive td:nth-child(7){
        width:7%;
    }

    .historial-table-responsive th:nth-child(8),
    .historial-table-responsive td:nth-child(8){
        width:7%;
    }

    .historial-table-responsive th:nth-child(9),
    .historial-table-responsive td:nth-child(9){
        width:8%;
    }

    .historial-table-responsive th:nth-child(10),
    .historial-table-responsive td:nth-child(10){
        width:11%;
    }

    .historial-table-responsive th:nth-child(11),
    .historial-table-responsive td:nth-child(11){
        width:13%;
    }

    .historial-table-responsive .btn-info,
    .historial-table-responsive .btn-secondary{
        min-height:28px;
        padding:5px 7px;
        font-size:11px;
        gap:4px;
    }

}

.pending-mini-grid .dashboard-mini-card,
.account-mini-grid .dashboard-mini-card,
.caja-mini-grid .dashboard-mini-card{
    padding:14px 18px;
    min-height:92px;
}

@media(max-width:900px){
    .caja-arqueo-grid{
        grid-template-columns:1fr;
    }

    .historial-summary-cards{
        grid-template-columns:repeat(2,1fr);
    }

    .historial-summary-cards .card{
        border-right:none;
        border-bottom:1px solid var(--border);
    }

    .historial-summary-cards .card:nth-child(odd){
        border-right:1px solid var(--border);
    }

    .historial-summary-cards .card:nth-child(3),
    .historial-summary-cards .card:nth-child(4){
        border-bottom:none;
    }

    .account-insights{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media(max-width:560px){
    .historial-summary-cards{
        grid-template-columns:1fr;
    }

    .historial-summary-cards .card,
    .historial-summary-cards .card:nth-child(odd){
        border-right:none;
        border-bottom:1px solid var(--border);
    }

    .historial-summary-cards .card:last-child{
        border-bottom:none;
    }

    .account-insights{
        grid-template-columns:1fr;
    }
}

/* =====================================================
   RESPONSIVE DASHBOARD NUEVO
===================================================== */

@media(max-width:1200px){

    .dashboard-cards,
    .finance-summary-cards,
    .dashboard-mini-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .dashboard-action-strip{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .dashboard-mini-card{
        border-right:none;
        border-bottom:1px solid var(--border);
    }

    .dashboard-mini-card:nth-child(odd){
        border-right:1px solid var(--border);
    }

    .dashboard-mini-card:nth-child(3),
    .dashboard-mini-card:nth-child(4){
        border-bottom:none;
    }

    .dashboard-workspace{
        grid-template-columns:1fr;
    }

    .finance-summary-grid{
        grid-template-columns:1fr;
    }

}

@media(max-width:700px){

    .dashboard-cards,
    .finance-summary-cards,
    .dashboard-mini-grid{
        grid-template-columns:1fr;
    }

    .dashboard-action-strip{
        grid-template-columns:1fr;
    }

    .dashboard-alerts-header{
        flex-direction:column;
    }

    .dashboard-alert-item{
        align-items:flex-start;
    }

    .dashboard-alert-item > div{
        grid-template-columns:1fr;
    }

    .dashboard-alert-item a{
        grid-column:1;
        grid-row:auto;
        margin-top:4px;
    }

    .dashboard-mini-card,
    .dashboard-mini-card:nth-child(odd){
        border-right:none;
        border-bottom:1px solid var(--border);
    }

    .dashboard-mini-card:last-child{
        border-bottom:none;
    }

    .widget-title-row{
        flex-direction:column;
        align-items:flex-start;
    }

    .widget-title-row a{
        width:100%;
    }

    .goal-values{
        grid-template-columns:1fr;
    }

    .dashboard-table{
        overflow:visible;
    }

    .dashboard-table table{
        table-layout:auto;
    }

    .chart-box,
    .chart-box canvas{
        height:260px !important;
        min-height:260px;
    }

}

/* =====================================================
   RECIBO CARTA
===================================================== */

.recibo-page{
    background:#e5e7eb;
    min-height:calc(100vh - var(--header-height));
    padding:22px;
}

.recibo-actions{
    max-width:900px;
    margin:0 auto 18px;
    justify-content:flex-end;
}

.recibo-carta{
    width:900px;
    max-width:100%;
    min-height:1050px;
    margin:0 auto;
    background:#fff;
    padding:34px 38px;
    border-radius:10px;
    box-shadow:0 10px 35px rgba(15,23,42,.16);
    color:#111827;
}

.recibo-carta-header{
    grid-template-columns:1fr 230px;
    gap:18px;
    align-items:center;
    border-bottom:3px solid #0f172a;
    padding-bottom:18px;
}

.recibo-carta-logo img,
.recibo-carta-logo-default{
    width:82px;
    height:82px;
    object-fit:contain;
}

.recibo-carta-logo-default{
    border-radius:16px;
    background:#e0f2fe;
    color:#0284c7;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:36px;
}

.recibo-carta-empresa h1{
    font-size:23px;
    margin:0 0 4px;
    color:#0f172a;
    text-transform:uppercase;
}

.recibo-carta-empresa h2{
    font-size:15px;
    margin:0 0 7px;
    color:#334155;
}

.recibo-carta-empresa p{
    margin:2px 0;
    font-size:12px;
    color:#475569;
}

.recibo-carta-numero{
    border:1px solid #cbd5e1;
    border-radius:10px;
    padding:14px;
    text-align:right;
    background:#f8fafc;
}

.recibo-carta-numero span{
    display:block;
    font-size:12px;
    color:#64748b;
    font-weight:800;
}

.recibo-carta-numero strong{
    display:block;
    font-size:22px;
    color:#0f172a;
    margin:5px 0;
}

.recibo-carta-numero small{
    color:#475569;
    font-size:12px;
}

.recibo-carta-banda{
    margin-top:16px;
    display:grid;
    grid-template-columns:1fr 150px;
    gap:12px;
}

.recibo-carta-banda div{
    background:#0f172a;
    color:#fff;
    padding:12px 14px;
    border-radius:8px;
}

.recibo-carta-banda span{
    display:block;
    font-size:11px;
    color:#cbd5e1;
    margin-bottom:3px;
}

.recibo-carta-banda strong{
    font-size:13px;
    word-break:break-word;
}

.recibo-carta-section{
    margin-top:22px;
}

.recibo-carta-section h3{
    font-size:16px;
    color:#0f172a;
    margin-bottom:12px;
    display:flex;
    align-items:center;
    gap:8px;
    border-bottom:1px solid #e5e7eb;
    padding-bottom:8px;
}

.recibo-carta-info-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
}

.recibo-carta-info-grid div{
    border:1px solid #e2e8f0;
    background:#f8fafc;
    border-radius:8px;
    padding:12px;
}

.recibo-carta-info-grid span{
    display:block;
    font-size:11px;
    color:#64748b;
    margin-bottom:4px;
    font-weight:700;
    text-transform:uppercase;
}

.recibo-carta-info-grid strong{
    font-size:14px;
    color:#111827;
}

.recibo-carta-table table{
    width:100%;
    border-collapse:collapse;
    border:1px solid #cbd5e1;
}

.recibo-carta-table th{
    background:#0f172a;
    color:#fff;
    padding:10px;
    font-size:13px;
    text-align:left;
}

.recibo-carta-table td{
    padding:10px;
    border-bottom:1px solid #e5e7eb;
    font-size:13px;
}

.recibo-carta-table tr:last-child td{
    border-bottom:none;
}

.recibo-carta-totales-area{
    margin-top:22px;
    display:grid;
    grid-template-columns:1fr 290px;
    gap:24px;
    align-items:start;
}

.recibo-carta-nota{
    border-left:5px solid #0ea5e9;
    background:#f8fafc;
    border-radius:8px;
    padding:14px 16px;
}

.recibo-carta-nota h4{
    margin-bottom:6px;
    color:#0f172a;
}

.recibo-carta-nota p{
    font-size:13px;
    color:#475569;
    line-height:1.45;
}

.recibo-carta-totales{
    border:1px solid #cbd5e1;
    border-radius:10px;
    overflow:hidden;
}

.recibo-carta-totales div{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 14px;
    border-bottom:1px solid #e5e7eb;
    background:#fff;
}

.recibo-carta-totales div:last-child{
    border-bottom:none;
}

.recibo-carta-totales span{
    color:#475569;
    font-size:13px;
}

.recibo-carta-totales strong{
    color:#111827;
    font-size:14px;
}

.recibo-carta-totales .total-final{
    background:#0ea5e9;
    color:#fff;
}

.recibo-carta-totales .total-final span,
.recibo-carta-totales .total-final strong{
    color:#fff;
    font-size:16px;
}

.recibo-carta-footer{
    margin-top:28px;
    text-align:center;
    font-size:13px;
    color:#475569;
}

.recibo-carta-footer strong{
    display:block;
    margin-top:6px;
    color:#0f172a;
}

.recibo-carta-firmas{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:70px;
    margin-top:58px;
}

.recibo-carta-firmas div{
    text-align:center;
    font-size:13px;
    color:#334155;
}

.recibo-carta-firmas span{
    display:block;
    border-top:1px solid #64748b;
    height:26px;
    margin-bottom:6px;
}

/* =====================================================
   IMPRESION RECIBO CARTA
===================================================== */

@media print{

    @page{
        size: letter portrait;
        margin:1.2cm;
    }

    body{
        background:#fff !important;
    }

    .sidebar,
    .app-header,
    .topbar,
    .no-print,
    .recibo-actions,
    .footer,
    #pageLoader,
    .overlay{
        display:none !important;
    }

    .content{
        margin:0 !important;
        width:100% !important;
        max-width:100% !important;
        padding:0 !important;
    }

    .page-content,
    .recibo-page{
        padding:0 !important;
        background:#fff !important;
    }

    .recibo-carta{
        width:100% !important;
        max-width:100% !important;
        min-height:auto !important;
        margin:0 !important;
        padding:0 !important;
        box-shadow:none !important;
        border-radius:0 !important;
    }

    .recibo-carta-header{
        grid-template-columns:1fr 210px;
    }

    .recibo-carta-section{
        break-inside:avoid;
    }

    .print-document-signatures,
    .recibo-carta-firmas{
        margin-top:50px;
    }

}

/* =====================================================
   CORRECCION FINAL IMPRESION RECIBO
===================================================== */

@media print{

    .content{
        display:block !important;
        margin:0 !important;
        width:100% !important;
        max-width:100% !important;
        padding:0 !important;
    }

    .recibo-page{
        display:block !important;
        padding:0 !important;
        margin:0 !important;
        background:#fff !important;
    }

    .recibo-carta{
        display:block !important;
        width:100% !important;
        max-width:100% !important;
        margin:0 !important;
        padding:0 !important;
        background:#fff !important;
        box-shadow:none !important;
        border-radius:0 !important;
        color:#000 !important;
    }

    .recibo-carta *{
        visibility:visible !important;
    }

}

/* =====================================================
   RECIBO CARTA EN UNA SOLA PAGINA
===================================================== */

@media print{

    @page{
        size: letter portrait;
        margin:0.7cm;
    }

    html,
    body{
        width:100%;
        height:auto;
        margin:0 !important;
        padding:0 !important;
        background:#fff !important;
        -webkit-print-color-adjust:exact !important;
        print-color-adjust:exact !important;
    }

    .recibo-carta{
        transform:scale(.92);
        transform-origin:top center;
        width:100% !important;
        padding:0 !important;
        font-size:11px !important;
    }

    .recibo-carta-header{
        grid-template-columns:1fr 190px !important;
        padding-bottom:10px !important;
    }

    .print-document-logo,
    .print-document-logo-default,
    .recibo-carta-logo img,
    .recibo-carta-logo-default{
        width:55px !important;
        height:55px !important;
        flex-basis:55px !important;
    }

    .print-document-company h1,
    .recibo-carta-empresa h1{
        font-size:17px !important;
    }

    .print-document-company h2,
    .recibo-carta-empresa h2{
        font-size:12px !important;
    }

    .print-document-company p,
    .print-document-title-box small,
    .recibo-carta-empresa p,
    .recibo-carta-numero small{
        font-size:10px !important;
    }

    .print-document-title-box,
    .recibo-carta-numero{
        padding:9px !important;
    }

    .print-document-title-box strong,
    .recibo-carta-numero strong{
        font-size:17px !important;
    }

    .recibo-carta-banda{
        margin-top:10px !important;
    }

    .recibo-carta-banda div{
        padding:8px 10px !important;
    }

    .recibo-carta-section{
        margin-top:12px !important;
    }

    .recibo-carta-section h3{
        font-size:13px !important;
        margin-bottom:7px !important;
        padding-bottom:5px !important;
    }

    .recibo-carta-info-grid{
        gap:8px !important;
    }

    .recibo-carta-info-grid div{
        padding:8px !important;
    }

    .recibo-carta-info-grid span{
        font-size:9px !important;
    }

    .recibo-carta-info-grid strong{
        font-size:11px !important;
    }

    .recibo-carta-table th,
    .recibo-carta-table td{
        padding:7px 8px !important;
        font-size:11px !important;
    }

    .recibo-carta-totales-area{
        margin-top:12px !important;
        gap:16px !important;
        grid-template-columns:1fr 250px !important;
    }

    .recibo-carta-nota{
        padding:10px 12px !important;
    }

    .recibo-carta-nota h4{
        font-size:12px !important;
        margin-bottom:4px !important;
    }

    .recibo-carta-nota p{
        font-size:10px !important;
        line-height:1.35 !important;
    }

    .recibo-carta-totales div{
        padding:8px 10px !important;
    }

    .recibo-carta-totales span,
    .recibo-carta-totales strong{
        font-size:11px !important;
    }

    .recibo-carta-totales .total-final span,
    .recibo-carta-totales .total-final strong{
        font-size:13px !important;
    }

    .print-document-footer,
    .recibo-carta-footer{
        margin-top:14px !important;
        font-size:10px !important;
    }

    .print-document-signatures,
    .recibo-carta-firmas{
        margin-top:34px !important;
        gap:50px !important;
    }

    .print-document-signatures div,
    .recibo-carta-firmas div{
        font-size:10px !important;
    }

    .print-document-signatures span,
    .recibo-carta-firmas span{
        height:18px !important;
    }

}

/* =====================================================
   RECIBO ANULADO
===================================================== */

.recibo-alert{
    max-width:900px;
    margin:0 auto 16px;
}

.recibo-anulado-box{
    margin-top:14px;
    border:2px solid #ef4444;
    background:#fef2f2;
    color:#991b1b;
    border-radius:10px;
    padding:14px 16px;
}

.recibo-anulado-box strong{
    display:block;
    font-size:15px;
    margin-bottom:6px;
}

.recibo-anulado-box p{
    margin:4px 0;
    font-size:13px;
}

@media print{

    .recibo-anulado-box{
        border:2px solid #000 !important;
        background:#fff !important;
        color:#000 !important;
        padding:10px !important;
        margin-top:10px !important;
    }

}

/*====================================
RECIBOS ANULADOS
====================================*/

.row-anulado{
    background:#fef2f2 !important;
}

.row-anulado td{
    color:#991b1b;
}

.row-anulado:hover{
    background:#fee2e2 !important;
}

/* =====================================================
   IMPRESION DE DOCUMENTOS PROFESIONALES
===================================================== */

@media print{

    @page{
        size:letter portrait;
        margin:.9cm;
    }

    body.print-report-mode{
        background:#fff !important;
        margin:0 !important;
        padding:0 !important;
    }

    body.print-report-mode > :not(.print-report){
        display:none !important;
    }

    body.print-report-mode .sidebar,
    body.print-report-mode .app-header,
    body.print-report-mode .content,
    body.print-report-mode .topbar,
    body.print-report-mode .footer,
    body.print-report-mode .no-print,
    body.print-report-mode .overlay,
    body.print-report-mode #pageLoader{
        display:none !important;
    }

    body.print-report-mode .print-report{
        display:block !important;
        position:static !important;
        width:100% !important;
        max-width:100% !important;
        margin:0 !important;
        padding:0 !important;
        color:#000 !important;
        font-family:Arial, sans-serif !important;
        font-size:10.5px !important;
        page-break-before:auto !important;
        page-break-after:auto !important;
        break-before:auto !important;
        break-after:auto !important;
    }

    body.print-report-mode .print-report *{
        visibility:visible !important;
    }

    body.print-report-mode .print-report-box,
    body.print-report-mode .print-report-header,
    body.print-report-mode .print-report-info{
        break-inside:avoid;
        page-break-inside:avoid;
    }

    body.print-report-mode .print-footer{
        page-break-after:auto !important;
        break-after:auto !important;
    }

}

/* =====================================================
   TICKET DE CAJA
===================================================== */

.caja-ticket-page{
    display:flex;
    flex-direction:column;
    align-items:center;
}

.caja-ticket{
    width:min(760px, 100%);
    max-width:100%;
    background:#fff;
    border:1px solid var(--border);
    border-radius:12px;
    box-shadow:var(--shadow-md);
    padding:34px 42px;
    color:#0f172a;
    font-family:Arial, sans-serif;
}

.caja-ticket-header{
    text-align:center;
}

.caja-ticket-header img,
.caja-ticket-logo,
.caja-ticket-header h1{
    font-size:16px;
    line-height:1.2;
    text-transform:uppercase;
    margin:0;
}

.caja-ticket-header p{
    color:#64748b;
    font-size:12px;
    margin:4px 0;
}

.caja-ticket-header h2{
    font-size:15px;
    margin:10px 0 4px;
}

.caja-ticket-header strong{
    font-size:13px;
}

.caja-ticket-line{
    border-top:1px dashed #94a3b8;
    margin:14px 0;
}

.caja-ticket-info,
.caja-ticket-totales{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
}

.caja-ticket-info div,
.caja-ticket-totales div{
    display:flex;
    justify-content:space-between;
    gap:14px;
    font-size:13px;
}

.caja-ticket-info span,
.caja-ticket-totales span,
.caja-ticket-observacion span{
    color:#64748b;
}

.caja-ticket-info strong,
.caja-ticket-totales strong{
    text-align:right;
}

.caja-ticket-totales .total{
    grid-column:1 / -1;
    border-top:1px solid #cbd5e1;
    padding-top:8px;
    margin-top:4px;
    font-size:15px;
}

.caja-ticket-observacion p{
    margin-top:6px;
    font-size:12px;
    line-height:1.4;
}

.caja-ticket-firma{
    height:58px;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    border-bottom:1px solid #0f172a;
    margin:22px 32px 8px;
}

.caja-ticket-firma span{
    transform:translateY(20px);
    background:#fff;
    padding:0 10px;
    color:#64748b;
    font-size:12px;
}

.caja-ticket-footer{
    text-align:center;
    color:#64748b;
    font-size:11px;
    line-height:1.4;
    margin-top:20px;
}

@media print{
    @page{
        size:letter portrait;
        margin:14mm;
    }

    body.ticket-caja-print-mode .sidebar,
    body.ticket-caja-print-mode .app-header,
    body.ticket-caja-print-mode .topbar,
    body.ticket-caja-print-mode .footer,
    body.ticket-caja-print-mode .no-print,
    body.ticket-caja-print-mode .overlay,
    body.ticket-caja-print-mode #pageLoader{
        display:none !important;
    }

    body.ticket-caja-print-mode *{
        visibility:hidden !important;
    }

    body.ticket-caja-print-mode .content{
        margin:0 !important;
        width:auto !important;
        max-width:100% !important;
        padding:0 !important;
    }

    body.ticket-caja-print-mode .page-content{
        padding:0 !important;
        display:block !important;
    }

    body.ticket-caja-print-mode .caja-ticket{
        visibility:visible !important;
        display:block !important;
        box-shadow:none !important;
        border:1px solid #111827 !important;
        border-radius:0 !important;
        width:100% !important;
        min-height:245mm !important;
        margin:0 auto !important;
        padding:12mm !important;
        box-sizing:border-box !important;
        color:#000 !important;
        page-break-after:avoid !important;
        break-after:avoid !important;
    }

    body.ticket-caja-print-mode .caja-ticket *{
        visibility:visible !important;
    }

    body.ticket-caja-print-mode .caja-ticket-info,
    body.ticket-caja-print-mode .caja-ticket-totales{
        grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
        gap:8px 18px !important;
    }

    body.ticket-caja-print-mode .caja-ticket-header h1{
        font-size:18px !important;
    }

    body.ticket-caja-print-mode .caja-ticket-header h2{
        font-size:16px !important;
    }

    body.ticket-caja-print-mode .caja-ticket-info div,
    body.ticket-caja-print-mode .caja-ticket-totales div{
        font-size:12px !important;
    }

    body.ticket-caja-print-mode .caja-ticket-firma{
        margin:34mm 42mm 8px !important;
        height:20mm !important;
    }

    body.ticket-caja-print-mode .caja-ticket-footer{
        font-size:10px !important;
        margin-top:18px !important;
    }
}

/* =====================================================
   ESTADO DEL SISTEMA
===================================================== */

.estado-sistema-page .page-title{
    margin-bottom:16px;
}

.estado-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
    gap:18px;
    align-items:stretch;
}

.estado-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm);
    padding:18px;
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:12px;
    overflow:hidden;
}

.estado-card .card-header{
    margin-bottom:0;
}

.estado-card .card-header h3{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.estado-card .card-header i{
    flex:0 0 auto;
    font-size:30px;
}

.estado-value{
    font-size:clamp(24px, 2.2vw, 32px);
    line-height:1.15;
    font-weight:800;
    color:#020617;
    overflow-wrap:anywhere;
    word-break:normal;
}

.estado-detail{
    color:var(--text-light);
    line-height:1.45;
    min-height:42px;
}

.estado-card-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
    margin-top:auto;
}

.estado-card-footer .btn-secondary{
    min-height:40px;
    display:inline-flex;
    align-items:center;
}

.estado-warning{
    border-color:#fde68a;
}

.estado-danger{
    border-color:#fecaca;
}

@media(max-width:900px){
    .estado-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media(max-width:640px){
    .estado-grid{
        grid-template-columns:1fr;
    }

    .estado-value{
        font-size:28px;
    }
}

@media(max-width:700px){
    .beneficiary-table,
    .expenses-table,
    .finance-movements-table,
    .report-table-responsive,
    .audit-table-responsive,
    .historial-table-responsive{
        overflow:visible !important;
    }

    .beneficiary-table table,
    .expenses-table table,
    .finance-movements-table table,
    .report-table-responsive table,
    .audit-table-responsive table,
    .historial-table-responsive table{
        min-width:0 !important;
        width:100% !important;
        table-layout:auto !important;
    }
}

@media(max-width:820px){
    .table-responsive{
        overflow:visible !important;
        border:none;
        background:transparent;
    }

    .table-responsive table{
        min-width:0 !important;
        width:100% !important;
        table-layout:auto !important;
        border-collapse:separate;
        border-spacing:0 12px;
    }

    .table-responsive thead{
        display:none;
    }

    .table-responsive tbody,
    .table-responsive tr,
    .table-responsive td{
        display:block;
        width:100% !important;
        max-width:100%;
        min-width:0;
        box-sizing:border-box;
    }

    .table-responsive tbody tr{
        overflow:hidden;
        border:1px solid var(--border);
        border-radius:14px;
        background:#fff;
        box-shadow:0 10px 24px rgba(15,23,42,.08);
    }

    .table-responsive td{
        display:grid;
        grid-template-columns:minmax(118px,30%) minmax(0,1fr);
        gap:10px 12px;
        align-items:start;
        min-height:42px;
        padding:11px 13px;
        border-bottom:1px solid #edf2f7;
        text-align:left;
        font-size:14px;
        line-height:1.35;
        color:var(--text);
        overflow-wrap:break-word;
        word-break:normal;
        white-space:normal;
    }

    .table-responsive td::before{
        content:attr(data-label);
        display:inline-flex;
        align-items:center;
        width:max-content;
        max-width:100%;
        min-height:24px;
        padding:4px 9px;
        border-radius:999px;
        background:#eef6ff;
        color:#2563eb;
        font-size:11px;
        font-weight:800;
        text-transform:uppercase;
        letter-spacing:.02em;
        overflow-wrap:normal;
        word-break:normal;
    }

    .table-responsive td:not([data-label])::before,
    .table-responsive td[data-label=""]::before{
        display:none;
    }

    .table-responsive td:first-child{
        background:#f8fafc;
        font-size:15px;
    }

    .table-responsive td:first-child::before{
        background:#e2e8f0;
        color:var(--text-soft);
    }

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

    .table-responsive td > *,
    .table-responsive td strong,
    .table-responsive td b,
    .table-responsive td span,
    .table-responsive td a{
        min-width:0;
        max-width:100%;
        overflow-wrap:anywhere;
        word-break:normal;
    }

    .table-responsive td[data-label*="Acci"]{
        display:block;
        background:#fbfdff;
    }

    .table-responsive td[data-label*="Acci"]::before{
        display:flex;
        width:100%;
        margin-bottom:10px;
        justify-content:center;
        background:#f1f5f9;
        color:var(--text-soft);
    }

    .table-responsive td .btn-info,
    .table-responsive td .btn-success,
    .table-responsive td .btn-warning,
    .table-responsive td .btn-danger,
    .table-responsive td .btn-secondary,
    .table-responsive td > .inline-action-form,
    .table-responsive td > .inline-action-form button{
        width:100%;
        justify-content:center;
        white-space:normal;
    }
}

@media(max-width:680px){

    .table-responsive td{
        grid-template-columns:1fr;
        gap:7px;
    }

    .table-responsive td::before{
        width:max-content;
    }

    .dashboard-table .btn-compact-action,
    .table-responsive td .btn-info,
    .table-responsive td .btn-success,
    .table-responsive td .btn-warning,
    .table-responsive td .btn-danger,
    .table-responsive td .btn-secondary{
        min-height:38px;
    }

}

@media(max-width:1100px){
    .dashboard-workspace,
    .dashboard-workspace.compact-dashboard-workspace{
        grid-template-columns:1fr !important;
    }
}

/* Header operativo compacto */
.header-search,
.header-date{
    display:none !important;
}

@media(max-width:1500px){
    .app-header{
        gap:10px;
        padding-left:14px;
        padding-right:14px;
    }

    .app-header-left,
    .app-header-right,
    .header-status-strip{
        gap:8px;
    }

    .header-brand{
        flex-basis:160px;
        min-width:140px;
    }

    .header-status-item{
        max-width:138px;
        padding-left:8px;
        padding-right:8px;
    }

    .header-user-btn{
        padding-right:8px;
    }

    .header-user-btn strong{
        max-width:104px;
    }
}

@media(max-width:1320px){
    .header-brand span{
        display:none;
    }

    .header-brand{
        flex-basis:auto;
        min-width:auto;
    }

    .header-status-item small{
        display:none;
    }

    .header-status-item{
        max-width:118px;
    }

    .header-user-btn div{
        display:none;
    }
}

/* =====================================================
   REDISENO GLOBAL FASE 1 - LINEA VISUAL INVENTARIO
   Capa visual: no modifica estructura ni logica del sistema.
===================================================== */

@media screen{

    :root{
        --sidebar:#4b4e52;
        --sidebar-dark:#424549;
        --sidebar-hover:rgba(255,255,255,.10);
        --primary:#a8d45d;
        --primary-dark:#739f2d;
        --success:#18a861;
        --success-dark:#0f8149;
        --warning:#d78b19;
        --warning-dark:#a86106;
        --danger:#c53c45;
        --danger-dark:#9f2932;
        --info:#2680c2;
        --secondary:#667587;
        --secondary-dark:#4f5d6b;
        --bg:#f6f8fa;
        --card:#ffffff;
        --text:#18212b;
        --text-soft:#344456;
        --text-light:#667587;
        --border:#e2e7ec;
        --border-dark:#cbd4dc;
        --radius-sm:7px;
        --radius-md:9px;
        --radius-lg:15px;
        --radius-xl:16px;
        --shadow-sm:0 4px 14px rgba(25,42,62,.06);
        --shadow-md:0 10px 24px rgba(25,42,62,.08);
        --shadow-lg:0 18px 40px rgba(25,42,62,.13);
        --motion-out:cubic-bezier(.22,1,.36,1);
        --motion-spring:cubic-bezier(.2,.85,.35,1.18);
        --sidebar-width:252px;
    }

    body{
        background:var(--bg);
        color:var(--text);
        font-family:Inter, "Segoe UI", Arial, sans-serif;
    }

    .content{
        background:var(--bg);
        transition:margin-left .28s var(--motion-out), width .28s var(--motion-out);
    }

    .page-content{
        max-width:1440px;
        margin:0 auto;
        padding:28px 40px;
    }

    .page-title,
    .report-hero,
    .finance-overview-hero{
        margin-bottom:22px;
    }

    .page-title h1,
    .report-hero h1,
    .finance-overview-hero h1{
        font-size:30px;
        line-height:1.15;
        letter-spacing:0;
        font-weight:800;
    }

    .page-title p,
    .report-hero p,
    .finance-overview-hero p{
        color:var(--text-light);
        font-size:15px;
    }

    .sidebar{
        background:var(--sidebar);
        border-right:none;
        padding:24px 9px;
        box-shadow:8px 0 24px rgba(19,27,34,.08);
        transition:transform .38s var(--motion-out), box-shadow .3s ease;
    }

    .sidebar::-webkit-scrollbar-track{
        background:#424549;
    }

    .sidebar::-webkit-scrollbar-thumb{
        background:#6b7075;
    }

    .logo-box{
        height:72px;
        display:flex;
        align-items:center;
        gap:13px;
        padding:0 18px;
        text-align:left;
        border-bottom:0;
    }

    .sidebar-logo-img,
    .sidebar-logo-icon{
        width:43px;
        height:43px;
        flex:0 0 43px;
        border-radius:50% 50% 50% 12px;
        margin:0;
        box-shadow:none;
        transition:transform .45s var(--motion-spring), background-color .25s ease, color .25s ease;
    }

    .sidebar-logo-icon{
        background:transparent;
        border:3px solid #fff;
        color:#fff;
        font-size:15px;
    }

    .logo-box:hover .sidebar-logo-icon,
    .logo-box:hover .sidebar-logo-img{
        transform:rotate(-8deg) scale(1.05);
    }

    .sidebar-logo-text{
        max-width:160px;
        margin:0;
        font-size:18px;
        line-height:1.15;
        letter-spacing:0;
        text-align:left;
    }

    .menu{
        padding:12px 0 22px;
    }

    .menu-section{
        display:block;
        color:#acb3bb;
        font-size:11px;
        letter-spacing:.08em;
        padding:20px 19px 8px;
        margin:0;
    }

    .menu-section::before{
        display:none;
    }

    .menu ul li{
        margin-bottom:3px;
    }

    .menu ul li a{
        border-radius:9px;
        padding:13px 15px;
        border:0;
        color:#ffffff;
        font-size:16px;
        overflow:hidden;
        transform:translateZ(0);
        transition:color .22s ease, background-color .22s ease, transform .22s var(--motion-out), box-shadow .22s ease;
    }

    .menu ul li a::after{
        content:"";
        position:absolute;
        inset:0;
        background:linear-gradient(100deg,rgba(255,255,255,.12),transparent 68%);
        transform:translateX(-105%);
        transition:transform .45s var(--motion-out);
        pointer-events:none;
    }

    .menu ul li a:hover{
        background:rgba(255,255,255,.09);
        transform:translateX(5px);
    }

    .menu ul li a:hover::after{
        transform:translateX(0);
    }

    .menu ul li a.is-active,
    .menu ul li a.menu-toggle.is-open{
        background:var(--primary);
        color:#142205;
        box-shadow:0 7px 18px rgba(22,33,9,.16);
    }

    .menu ul li a.is-active::before,
    .menu ul li a.menu-toggle.is-open::before{
        display:none;
    }

    .menu ul li a i:first-child,
    .menu .left i{
        width:22px;
        min-width:22px;
        height:auto;
        border-radius:0;
        background:transparent;
        color:currentColor;
        font-size:15px;
        transition:transform .28s var(--motion-spring);
    }

    .menu ul li a:hover i:first-child,
    .menu ul li a:hover .left i{
        transform:scale(1.14) rotate(-4deg);
    }

    .menu ul li a.is-active .left i,
    .menu ul li a.menu-toggle.is-open .left i{
        background:transparent;
        color:currentColor;
        transform:none;
    }

    .submenu{
        background:transparent;
        border-left:1px solid rgba(255,255,255,.18);
        margin:7px 0 8px 18px;
        padding-left:8px;
    }

    .submenu a{
        font-size:13px !important;
        padding:10px 12px !important;
        opacity:.92;
    }

    .app-header{
        background:#fff;
        border-bottom:1px solid var(--border);
        box-shadow:0 1px 0 rgba(30,44,58,.03);
    }

    .header-menu-btn,
    .header-status-item,
    .header-alerts-btn,
    .header-user-btn,
    .header-quick-actions-btn{
        border-radius:8px;
    }

    .header-brand-logo,
    .header-status-item,
    .header-alerts-btn,
    .header-user-btn{
        background:#fff;
        border-color:var(--border);
    }

    .header-status-item:hover,
    .header-alerts-btn:hover,
    .header-user-btn:hover,
    .header-user-btn.is-open,
    .header-alerts-btn.is-open{
        transform:translateY(-2px);
        box-shadow:0 7px 17px rgba(30,43,56,.10);
    }

    .header-status-item i{
        background:#eef4e4;
    }

    .header-status-item.is-ok i,
    .header-date i{
        color:var(--success);
    }

    .header-quick-actions-btn,
    .btn-primary,
    .btn-success,
    .report-hero-actions .btn-success{
        background:var(--primary);
        border-color:var(--primary);
        color:#1a2a08;
        box-shadow:none;
    }

    .header-quick-actions-btn:hover,
    .btn-primary:hover,
    .btn-success:hover{
        background:#9ac74d;
        border-color:#9ac74d;
        color:#172407;
    }

    .btn-info{
        background:#e7f3fb;
        border-color:#cfe7f6;
        color:#176598;
    }

    .btn-info:hover{
        background:#d9edf8;
        border-color:#b8dff2;
        color:#12577f;
    }

    .btn-warning{
        background:#fff2d9;
        border-color:#f8d99a;
        color:#8a5408;
    }

    .btn-warning:hover{
        background:#fce8bd;
        border-color:#f4c66f;
        color:#6d4106;
    }

    .btn-danger{
        background:#fff0f1;
        border-color:#efb9bd;
        color:#a1262e;
    }

    .btn-danger:hover{
        background:#fdebed;
        border-color:#e59aa1;
        color:#7f1e25;
    }

    .btn-secondary{
        background:#fff;
        border-color:#aeb8c2;
        color:#283645;
    }

    .btn-secondary:hover{
        background:#f8fafb;
        border-color:#8d9aaa;
        color:#18212b;
    }

    .btn-primary,
    .btn-success,
    .btn-info,
    .btn-warning,
    .btn-danger,
    .btn-secondary,
    .header-quick-actions-btn{
        min-height:41px;
        border-radius:7px;
        font-weight:700;
        transition:transform .18s var(--motion-out), box-shadow .22s ease, background-color .22s ease, border-color .22s ease, color .22s ease;
    }

    .btn-primary:hover,
    .btn-success:hover,
    .btn-info:hover,
    .btn-warning:hover,
    .btn-danger:hover,
    .btn-secondary:hover{
        transform:translateY(-2px);
        box-shadow:0 7px 17px rgba(30,43,56,.12);
    }

    .btn-primary:active,
    .btn-success:active,
    .btn-info:active,
    .btn-warning:active,
    .btn-danger:active,
    .btn-secondary:active{
        transform:translateY(0) scale(.975);
        box-shadow:0 2px 6px rgba(30,43,56,.09);
    }

    .card,
    .widget,
    .dashboard-mini-card,
    .estado-card,
    .report-table-card,
    .periodos-table-card,
    .operators-table-card,
    .finance-overview-hero,
    .finance-overview-movements,
    .finance-overview-side,
    .expenses-list-card,
    .finance-movements-card,
    .selected-beneficiary-card,
    .payment-step,
    .form-card{
        background:#fff;
        border:1px solid var(--border);
        border-radius:15px;
        box-shadow:var(--shadow-sm);
    }

    .card,
    .dashboard-mini-card,
    .widget,
    .form-card{
        transition:transform .25s var(--motion-out), box-shadow .25s ease, border-color .25s ease;
    }

    .card:hover,
    .dashboard-mini-card:hover,
    .widget:hover{
        box-shadow:0 12px 26px rgba(25,42,62,.08);
    }

    .dashboard-mini-card{
        min-height:92px;
        padding:20px 22px;
    }

    .dashboard-mini-card span,
    .card-text,
    .widget p,
    td small{
        color:var(--text-light);
    }

    .dashboard-mini-card strong,
    .card-number{
        color:var(--text);
    }

    .dashboard-mini-card i{
        background:#eef4e4;
        color:var(--primary-dark);
        border-radius:11px;
    }

    .cards{
        gap:18px;
    }

    .card{
        border-top:4px solid #7d8995;
    }

    .card .card-header i{
        color:var(--primary-dark);
    }

    .form-group label{
        color:var(--text);
        font-size:13px;
        font-weight:800;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    input[type="text"],
    input[type="date"],
    input[type="number"],
    input[type="password"],
    input[type="email"],
    select,
    textarea{
        border:1px solid #cbd4dc;
        border-radius:6px;
        background:#fff;
        color:var(--text);
        transition:border-color .2s ease, box-shadow .22s ease, transform .2s var(--motion-out), background-color .2s ease;
    }

    .form-group input:hover,
    .form-group select:hover,
    .form-group textarea:hover,
    input:hover,
    select:hover,
    textarea:hover{
        border-color:#aeb9c3;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus,
    input:focus,
    select:focus,
    textarea:focus{
        border-color:var(--primary-dark);
        box-shadow:0 0 0 3px rgba(168,212,93,.22);
        transform:translateY(-1px);
    }

    .table-responsive{
        border:1px solid var(--border);
        border-radius:15px;
        box-shadow:none;
        background:#fff;
    }

    .table-responsive table{
        font-size:14px;
    }

    .table-responsive th,
    table th{
        color:#607080;
        background:#f8fafb;
        font-size:12px;
        text-transform:uppercase;
        letter-spacing:.03em;
        padding:13px 16px;
        border-bottom:1px solid var(--border);
    }

    .table-responsive td,
    table td{
        padding:15px 16px;
        border-bottom:1px solid #edf0f2;
        color:var(--text);
    }

    .table-responsive tbody tr{
        transition:background-color .2s ease, box-shadow .2s ease;
    }

    .table-responsive tbody tr:hover{
        background:#fbfdf8;
        box-shadow:inset 4px 0 var(--primary);
    }

    .badge,
    .badge-success,
    .badge-danger,
    .badge-warning,
    .badge-info,
    .badge-secondary{
        border-radius:15px;
        padding:6px 9px;
        font-size:11px;
        transition:transform .2s var(--motion-spring), filter .2s ease;
    }

    .badge:hover,
    .badge-success:hover,
    .badge-danger:hover,
    .badge-warning:hover,
    .badge-info:hover,
    .badge-secondary:hover{
        transform:scale(1.04);
        filter:saturate(1.08);
    }

    .badge-success{
        background:#e5f6ec;
        color:#14753f;
    }

    .badge-info{
        background:#e7f3fb;
        color:#176598;
    }

    .badge-warning{
        background:#fff2d9;
        color:#9a5e08;
    }

    .badge-danger{
        background:#fdebed;
        color:#a42630;
    }

    .badge-secondary{
        background:#edf1f5;
        color:#536170;
    }

    .alert-success,
    .alert-warning,
    .alert-danger{
        border-radius:8px;
        box-shadow:none;
        animation:alert-in .4s var(--motion-out) both;
    }

    .alert-success{
        background:#e7f6ed;
        color:#156c3c;
        border-color:#c7ead4;
    }

    .alert-warning{
        background:#fff2d9;
        color:#8a5408;
        border-color:#f8d99a;
    }

    .alert-danger{
        background:#fdebed;
        color:#9c2530;
        border-color:#efb9bd;
    }

    #pageLoader{
        background:rgba(246,248,250,.72);
        backdrop-filter:blur(2px);
    }

    .loader{
        border-color:#dfe6ec;
        border-top-color:var(--primary-dark);
    }

    @keyframes alert-in{
        from{opacity:0;transform:translateY(-8px);}
        to{opacity:1;transform:translateY(0);}
    }

    @media (prefers-reduced-motion:reduce){
        html{scroll-behavior:auto;}
        *,
        *::before,
        *::after{
            animation-duration:.01ms !important;
            animation-iteration-count:1 !important;
            transition-duration:.01ms !important;
            transition-delay:0ms !important;
        }
    }

    @media(max-width:950px){
        .page-content{
            padding:24px 20px;
        }
    }

    @media(max-width:600px){
        .page-content{
            padding:20px 12px;
        }

        .page-title h1,
        .report-hero h1,
        .finance-overview-hero h1{
            font-size:28px;
        }
    }

}

/* =====================================================
   REDISENO GLOBAL FASE 2 - LAYOUT SIMPLIFICADO
===================================================== */

@media screen{

    .header-breadcrumb{
        display:none !important;
    }

    .header-page-context{
        min-width:0;
        display:flex;
        flex-direction:column;
        gap:2px;
        padding-left:2px;
    }

    .header-page-context strong{
        color:var(--text);
        font-size:15px;
        line-height:1.1;
        font-weight:800;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .header-page-context span{
        color:var(--text-light);
        font-size:12px;
        line-height:1.1;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .app-header-left{
        gap:18px;
        min-width:0;
    }

    .app-header-right{
        gap:12px;
    }

    .header-brand{
        flex:0 0 auto;
        min-width:auto;
        max-width:230px;
    }

    .header-brand strong,
    .header-brand span{
        max-width:160px;
    }

    .header-status-compact{
        flex:0 1 auto;
    }

    .header-status-merged{
        max-width:260px;
        min-width:210px;
    }

    .header-status-merged i{
        color:var(--success);
    }

    .header-status-merged strong{
        max-width:190px;
    }

    .header-quick-actions{
        display:none !important;
    }

    .sidebar-primary-action{
        display:flex;
        align-items:center;
        gap:12px;
        margin:20px 5px 24px;
        padding:13px 15px;
        min-height:72px;
        border:1px solid rgba(168,212,93,.92);
        border-radius:9px;
        background:rgba(168,212,93,.16);
        color:#fff;
        transition:background-color .22s ease, transform .22s var(--motion-out), box-shadow .22s ease, border-color .22s ease;
    }

    .sidebar-primary-action:hover,
    .sidebar-primary-action.is-active{
        background:var(--primary);
        border-color:var(--primary);
        color:#142205;
        transform:translateX(4px);
        box-shadow:0 8px 20px rgba(22,33,9,.15);
    }

    .sidebar-primary-action > span:first-child{
        width:22px;
        height:22px;
        display:grid;
        place-items:center;
        flex:0 0 22px;
        color:currentColor;
        font-size:13px;
        line-height:1;
        transform:none;
    }

    .sidebar-primary-action > span:first-child i{
        display:block;
        line-height:1;
        transform:none !important;
    }

    .sidebar-primary-action strong,
    .sidebar-primary-action small{
        display:block;
    }

    .sidebar-primary-action strong{
        font-size:16px;
        line-height:1.1;
        font-weight:800;
    }

    .sidebar-primary-action small{
        margin-top:4px;
        color:rgba(255,255,255,.78);
        font-size:12px;
        font-weight:700;
    }

    .sidebar-primary-action:hover small,
    .sidebar-primary-action.is-active small{
        color:#31440f;
    }

    .menu{
        padding-top:0;
    }

    .menu ul li a.menu-toggle{
        margin-top:2px;
    }

    .submenu{
        background:rgba(19,26,32,.10);
        border-left:1px solid rgba(255,255,255,.18);
        border-radius:0 0 9px 9px;
    }

    .submenu a{
        color:rgba(255,255,255,.90) !important;
    }

    .submenu a:hover,
    .submenu a.is-active{
        color:#142205 !important;
        background:var(--primary) !important;
    }

    @media(max-width:1500px){
        .header-page-context span{
            display:none;
        }

        .header-status-merged{
            min-width:180px;
            max-width:210px;
        }
    }

    @media(max-width:1320px){
        .header-page-context{
            display:none;
        }

        .header-status-merged{
            min-width:auto;
            max-width:44px;
            justify-content:center;
        }

        .header-status-merged span{
            display:none;
        }
    }

    @media(max-width:900px){
        .sidebar-primary-action{
            margin-top:4px;
        }
    }

}

/* =====================================================
   REDISENO GLOBAL FASE 3 - PANEL PRINCIPAL COMPACTO
===================================================== */

@media screen{

    .dashboard-page{
        display:flex;
        flex-direction:column;
        gap:18px;
    }

    .dashboard-page .dashboard-hero{
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:20px;
        margin-bottom:0;
        padding:18px 0 4px;
        background:transparent;
        box-shadow:none;
        border:0;
    }

    .dashboard-page .dashboard-hero h1{
        margin:8px 0 4px;
        font-size:34px;
        line-height:1;
        letter-spacing:0;
    }

    .dashboard-page .dashboard-hero p{
        margin:0;
        max-width:560px;
        color:var(--text-light);
        font-size:15px;
    }

    .dashboard-page .report-kicker{
        min-height:30px;
        padding:8px 12px;
        border-radius:999px;
        background:#e8f6db;
        color:#385b13;
        font-size:12px;
        font-weight:900;
        text-transform:none;
        letter-spacing:.01em;
    }

    .dashboard-page .report-kicker i{
        color:#5f9f22;
    }

    .dashboard-hero-actions{
        align-items:center;
        gap:10px;
        padding-top:10px;
    }

    .dashboard-hero-actions .btn-success,
    .dashboard-hero-actions .btn-info{
        min-height:42px;
        padding:0 18px;
        border-radius:7px;
        font-size:14px;
        box-shadow:none;
    }

    .dashboard-home-grid.dashboard-main-grid{
        display:grid;
        grid-template-columns:repeat(6,minmax(0,1fr));
        gap:12px;
        margin:0;
    }

    .dashboard-home-grid .dashboard-mini-card{
        min-height:116px;
        padding:18px 18px 16px;
        border:1px solid #d8e1ea;
        border-top:4px solid #8c969f;
        border-radius:10px;
        background:#fff;
        box-shadow:0 8px 18px rgba(23,36,52,.05);
        transform:none;
    }

    .dashboard-home-grid .dashboard-mini-card:nth-child(1){
        border-top-color:#6e7d8c;
    }

    .dashboard-home-grid .dashboard-mini-card:nth-child(2),
    .dashboard-home-grid .dashboard-mini-card:nth-child(6){
        border-top-color:#a8d45d;
    }

    .dashboard-home-grid .dashboard-mini-card:nth-child(3){
        border-top-color:#f0a11a;
    }

    .dashboard-home-grid .dashboard-mini-card:nth-child(4){
        border-top-color:#c53c45;
    }

    .dashboard-home-grid .dashboard-mini-card:nth-child(5){
        border-top-color:#2d88c9;
    }

    .dashboard-home-grid .dashboard-mini-card:hover{
        box-shadow:0 12px 24px rgba(23,36,52,.09);
        transform:translateY(-2px);
    }

    .dashboard-home-grid .dashboard-mini-card span{
        color:#657386;
        font-size:13px;
        font-weight:500;
        text-transform:none;
        letter-spacing:0;
    }

    .dashboard-home-grid .dashboard-mini-card strong{
        margin-top:12px;
        font-size:26px;
        line-height:1;
        color:var(--text);
        word-break:normal;
    }

    .dashboard-home-grid .dashboard-mini-card small{
        margin-top:10px;
        color:#64758c;
        font-size:12px;
        line-height:1.35;
    }

    .dashboard-home-grid .dashboard-mini-card i{
        width:42px;
        height:42px;
        border-radius:12px;
        background:#eef3f7;
        font-size:19px;
    }

    .dashboard-alerts.dashboard-alerts-compact{
        order:3;
        margin:0;
        padding:16px;
        border:1px solid #d8e1ea;
        border-radius:10px;
        box-shadow:0 8px 18px rgba(23,36,52,.05);
    }

    .dashboard-alerts-compact .dashboard-alerts-header{
        margin-bottom:12px;
        padding:0;
    }

    .dashboard-alerts-compact .dashboard-alerts-header h3{
        font-size:18px;
        line-height:1.1;
    }

    .dashboard-alerts-compact .dashboard-alerts-header p{
        margin-top:4px;
        font-size:13px;
    }

    .dashboard-alerts-compact .dashboard-alerts-header > span{
        min-height:30px;
        padding:7px 11px;
        border-radius:999px;
        font-size:12px;
        box-shadow:none;
    }

    .dashboard-alerts-compact .dashboard-alerts-grid{
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
        gap:10px;
    }

    .dashboard-alerts-compact .dashboard-alert-group{
        border-radius:9px;
        overflow:hidden;
        background:#fff;
        border:1px solid #d8e1ea;
    }

    .dashboard-alerts-compact .dashboard-alert-group-title{
        min-height:34px;
        padding:9px 12px;
    }

    .dashboard-alerts-compact .dashboard-alert-item{
        min-height:72px;
        padding:12px;
        gap:11px;
        grid-template-columns:34px minmax(0,1fr) auto;
    }

    .dashboard-alerts-compact .dashboard-alert-item > i{
        width:34px;
        height:34px;
        border-radius:9px;
        font-size:14px;
    }

    .dashboard-alerts-compact .dashboard-alert-item strong{
        font-size:14px;
    }

    .dashboard-alerts-compact .dashboard-alert-item p{
        margin-top:3px;
        font-size:12px;
        line-height:1.35;
    }

    .dashboard-alerts-compact .dashboard-alert-item a{
        margin-top:0;
        align-self:center;
        white-space:nowrap;
        font-size:12px;
    }

    .dashboard-action-strip{
        display:grid;
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:12px;
        margin:0;
    }

    .dashboard-action-card{
        min-height:64px;
        padding:14px 16px;
        border:1px solid #d8e1ea;
        border-radius:10px;
        background:#fff;
        box-shadow:0 8px 18px rgba(23,36,52,.05);
    }

    .dashboard-action-card:hover{
        transform:translateY(-2px);
        border-color:#c7d3df;
        box-shadow:0 12px 24px rgba(23,36,52,.09);
    }

    .dashboard-action-card i{
        width:36px;
        height:36px;
        border-radius:10px;
    }

    .dashboard-action-card strong{
        font-size:14px;
    }

    .dashboard-action-card span{
        font-size:12px;
    }

    .dashboard-workspace.compact-dashboard-workspace{
        display:grid;
        grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);
        gap:16px;
        margin-top:0;
    }

    .dashboard-workspace .widget{
        border:1px solid #d8e1ea;
        border-radius:10px;
        box-shadow:0 8px 18px rgba(23,36,52,.05);
    }

    .dashboard-workspace .widget-title-row{
        gap:12px;
        margin-bottom:14px;
    }

    .dashboard-workspace .widget-title-row h3{
        font-size:18px;
        line-height:1.15;
    }

    .dashboard-workspace .widget-title-row p{
        margin-top:4px;
        font-size:13px;
    }

    .dashboard-workspace .widget-title-row .btn-secondary,
    .dashboard-workspace .widget-title-row .btn-warning{
        min-height:36px;
        padding:0 13px;
        border-radius:7px;
        font-size:13px;
    }

    .dashboard-table{
        border:1px solid #d8e1ea;
        border-radius:9px;
        overflow:hidden;
    }

    .dashboard-table table{
        table-layout:fixed;
        min-width:0;
    }

    .dashboard-table th,
    .dashboard-table td{
        padding:11px 12px;
        font-size:13px;
        line-height:1.35;
        overflow-wrap:anywhere;
    }

    .dashboard-table th{
        background:#f6f8fa;
        color:#23364c;
        font-size:12px;
        font-weight:800;
    }

    .dashboard-table .btn-compact-action{
        min-width:0;
        min-height:32px;
        padding:0 10px;
        border-radius:7px;
        font-size:12px;
        white-space:normal;
    }

    @media(max-width:1500px){
        .dashboard-home-grid.dashboard-main-grid{
            grid-template-columns:repeat(3,minmax(0,1fr));
        }
    }

    @media(max-width:1180px){
        .dashboard-workspace.compact-dashboard-workspace{
            grid-template-columns:1fr;
        }

        .dashboard-action-strip{
            grid-template-columns:repeat(2,minmax(0,1fr));
        }
    }

    @media(max-width:760px){
        .dashboard-page{
            gap:14px;
        }

        .dashboard-page .dashboard-hero{
            flex-direction:column;
            padding-top:8px;
        }

        .dashboard-page .dashboard-hero h1{
            font-size:30px;
        }

        .dashboard-hero-actions{
            width:100%;
            display:grid;
            grid-template-columns:1fr 1fr;
            padding-top:0;
        }

        .dashboard-hero-actions .btn-success,
        .dashboard-hero-actions .btn-info{
            width:100%;
            justify-content:center;
        }

        .dashboard-home-grid.dashboard-main-grid,
        .dashboard-action-strip{
            grid-template-columns:1fr;
        }

        .dashboard-home-grid .dashboard-mini-card{
            min-height:88px;
            padding:14px;
        }

        .dashboard-home-grid .dashboard-mini-card strong{
            font-size:22px;
            margin-top:8px;
        }

        .dashboard-alerts-compact .dashboard-alert-item{
            grid-template-columns:30px minmax(0,1fr);
        }

        .dashboard-alerts-compact .dashboard-alert-item a{
            grid-column:2;
            justify-self:flex-start;
        }
    }

}

/* =====================================================
   REDISENO GLOBAL FASE 4 - MODULOS INTERNOS COMPACTOS
===================================================== */

@media screen{

    .content .page-content:not(.dashboard-page){
        display:flex;
        flex-direction:column;
        gap:16px;
        padding-top:24px;
    }

    .content .page-title,
    .content .report-hero,
    .content .finance-overview-hero{
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:18px;
        margin-bottom:0;
        padding:0;
        background:transparent;
        border:0;
        box-shadow:none;
    }

    .content .page-title h1,
    .content .report-hero h1,
    .content .finance-overview-hero h1{
        margin:0 0 5px;
        font-size:32px;
        line-height:1.05;
        letter-spacing:0;
        color:var(--text);
    }

    .content .page-title p,
    .content .report-hero p,
    .content .finance-overview-hero p{
        max-width:720px;
        margin:0;
        color:var(--text-light);
        font-size:14px;
        line-height:1.45;
    }

    .content .report-kicker,
    .payment-step-kicker{
        width:max-content;
        min-height:28px;
        display:inline-flex;
        align-items:center;
        gap:7px;
        padding:7px 11px;
        border-radius:999px;
        background:#e8f6db;
        color:#385b13;
        font-size:11px;
        font-weight:900;
        text-transform:none;
        letter-spacing:.01em;
    }

    .content .report-hero-actions,
    .content .page-title-actions,
    .report-filter-actions,
    .btn-group,
    .finance-filter-actions,
    .expenses-filter-actions,
    .operators-filter-actions,
    .audit-filter-actions{
        display:flex;
        align-items:center;
        justify-content:flex-end;
        gap:9px;
        flex-wrap:wrap;
    }

    .content .report-hero-actions .btn-primary,
    .content .report-hero-actions .btn-success,
    .content .report-hero-actions .btn-info,
    .content .report-hero-actions .btn-warning,
    .content .report-hero-actions .btn-secondary,
    .content .page-title-actions .btn-primary,
    .content .page-title-actions .btn-success,
    .content .page-title-actions .btn-info,
    .content .page-title-actions .btn-warning,
    .content .page-title-actions .btn-secondary,
    .report-filter-actions .btn-primary,
    .report-filter-actions .btn-secondary,
    .btn-group .btn-primary,
    .btn-group .btn-success,
    .btn-group .btn-info,
    .btn-group .btn-warning,
    .btn-group .btn-secondary{
        min-height:40px;
        padding:0 15px;
        border-radius:7px;
        font-size:13px;
    }

    .dashboard-mini-grid,
    .beneficiary-list-summary,
    .expenses-summary-grid,
    .finance-movement-summary,
    .finance-overview-summary,
    .pending-mini-grid,
    .account-mini-grid,
    .caja-mini-grid,
    .historial-summary-cards,
    .cards{
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
        gap:12px;
        margin:0;
    }

    .dashboard-mini-grid .dashboard-mini-card,
    .historial-summary-cards .card,
    .cards .card{
        min-height:98px;
        padding:16px 18px;
        border:1px solid #d8e1ea;
        border-top:3px solid #8c969f;
        border-radius:10px;
        background:#fff;
        box-shadow:0 7px 16px rgba(23,36,52,.05);
    }

    .dashboard-mini-grid .dashboard-mini-card strong,
    .historial-summary-cards .card-number,
    .cards .card-number{
        margin-top:8px;
        font-size:24px;
        line-height:1.05;
        overflow-wrap:anywhere;
    }

    .dashboard-mini-grid .dashboard-mini-card span,
    .historial-summary-cards .card-header h3,
    .cards .card-header h3{
        color:#657386;
        font-size:12px;
        font-weight:700;
        text-transform:none;
        letter-spacing:0;
    }

    .dashboard-mini-grid .dashboard-mini-card small,
    .historial-summary-cards .card-text,
    .cards .card-text{
        margin-top:7px;
        color:#64758c;
        font-size:12px;
        line-height:1.35;
    }

    .dashboard-mini-grid .dashboard-mini-card i,
    .historial-summary-cards .card-header i,
    .cards .card-header i{
        width:38px;
        height:38px;
        border-radius:10px;
        background:#eef3f7;
        font-size:17px;
    }

    .widget,
    .config-form-card,
    .report-filter-card,
    .report-table-card,
    .beneficiary-list-card,
    .expenses-list-card,
    .finance-movements-card,
    .operators-filter-card,
    .operators-table-card,
    .audit-filter-card,
    .audit-table-card,
    .periodos-filter-card,
    .periodos-table-card,
    .periodos-create-card,
    .periodos-preview-card,
    .payment-step-card,
    .selected-beneficiary-card,
    .beneficiary-create-card,
    .expense-form-card,
    .operator-form-card{
        margin-top:0 !important;
        padding:18px;
        border:1px solid #d8e1ea;
        border-radius:10px;
        background:#fff;
        box-shadow:0 7px 16px rgba(23,36,52,.05);
    }

    .widget-title-row,
    .form-card-header,
    .beneficiary-list-header,
    .payment-step-header{
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:14px;
        margin-bottom:14px;
    }

    .widget-title-row h3,
    .form-card-header h3,
    .beneficiary-list-header h3,
    .payment-step-header h3,
    .widget h3{
        margin:0;
        font-size:18px;
        line-height:1.2;
        color:var(--text);
    }

    .widget-title-row p,
    .form-card-header p,
    .beneficiary-list-header p,
    .payment-step-header p,
    .widget > p{
        margin-top:4px;
        color:var(--text-light);
        font-size:13px;
        line-height:1.4;
    }

    .form-grid,
    .config-form-grid,
    .periodos-form-grid,
    .operators-filter-grid,
    .audit-filter-grid,
    .expense-main-grid,
    .beneficiary-house-grid,
    .beneficiary-billing-grid,
    .report-morosos-filter-grid{
        gap:12px;
    }

    .form-group{
        gap:6px;
    }

    .form-group label{
        font-size:12px;
        line-height:1.2;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    input[type="text"],
    input[type="date"],
    input[type="number"],
    input[type="password"],
    input[type="email"],
    select,
    textarea{
        min-height:40px;
        padding:9px 11px;
        border-radius:7px;
        font-size:13px;
    }

    textarea{
        min-height:96px;
    }

    .field-help,
    .context-help{
        font-size:12px;
        line-height:1.35;
    }

    .table-responsive,
    .no-scroll-table,
    .report-table-responsive,
    .finance-movements-table,
    .finance-overview-table,
    .expenses-table,
    .beneficiary-table,
    .audit-table-responsive,
    .periodos-table-wrap{
        border:1px solid #d8e1ea;
        border-radius:9px;
        box-shadow:none;
        background:#fff;
    }

    .table-responsive table{
        min-width:0;
    }

    .table-responsive th,
    table th{
        padding:10px 12px;
        background:#f6f8fa;
        color:#23364c;
        font-size:12px;
        font-weight:800;
        line-height:1.25;
        text-transform:none;
        letter-spacing:0;
        overflow-wrap:anywhere;
    }

    .table-responsive td,
    table td{
        padding:11px 12px;
        color:var(--text);
        font-size:13px;
        line-height:1.35;
        overflow-wrap:anywhere;
        vertical-align:middle;
    }

    .table-responsive td .btn-info,
    .table-responsive td .btn-success,
    .table-responsive td .btn-warning,
    .table-responsive td .btn-danger,
    .table-responsive td .btn-secondary,
    .btn-compact-action{
        min-height:32px;
        padding:0 10px;
        border-radius:7px;
        font-size:12px;
        line-height:1.15;
        white-space:normal;
    }

    .badge,
    .badge-success,
    .badge-danger,
    .badge-warning,
    .badge-info,
    .badge-secondary{
        padding:5px 8px;
        border-radius:999px;
        font-size:11px;
        line-height:1;
        white-space:nowrap;
    }

    .alert-success,
    .alert-warning,
    .alert-danger{
        min-height:auto;
        padding:12px 14px;
        border-radius:9px;
        font-size:13px;
        line-height:1.45;
    }

    .empty-state{
        padding:28px 18px;
        border-radius:10px;
    }

    .empty-state i{
        width:44px;
        height:44px;
        border-radius:12px;
    }

    .empty-state strong{
        font-size:16px;
    }

    .pagination,
    .table-pagination,
    .report-pagination{
        gap:7px;
        margin-top:14px;
    }

    .pagination .btn-primary,
    .pagination .btn-secondary,
    .table-pagination .btn-primary,
    .table-pagination .btn-secondary,
    .report-pagination .btn-primary,
    .report-pagination .btn-secondary{
        min-width:34px;
        min-height:34px;
        padding:0 10px;
        border-radius:7px;
        font-size:12px;
    }

    @media(max-width:1180px){
        .content .page-title,
        .content .report-hero,
        .content .finance-overview-hero,
        .widget-title-row,
        .form-card-header,
        .beneficiary-list-header,
        .payment-step-header{
            flex-direction:column;
        }

        .content .report-hero-actions,
        .content .page-title-actions,
        .report-filter-actions,
        .btn-group{
            justify-content:flex-start;
        }
    }

    @media(max-width:760px){
        .content .page-content:not(.dashboard-page){
            gap:13px;
            padding:18px 12px;
        }

        .content .page-title h1,
        .content .report-hero h1,
        .content .finance-overview-hero h1{
            font-size:28px;
        }

        .dashboard-mini-grid,
        .beneficiary-list-summary,
        .expenses-summary-grid,
        .finance-movement-summary,
        .finance-overview-summary,
        .pending-mini-grid,
        .account-mini-grid,
        .caja-mini-grid,
        .historial-summary-cards,
        .cards{
            grid-template-columns:1fr;
        }

        .widget,
        .config-form-card,
        .report-filter-card,
        .report-table-card,
        .beneficiary-list-card,
        .expenses-list-card,
        .finance-movements-card,
        .operators-filter-card,
        .operators-table-card,
        .audit-filter-card,
        .audit-table-card,
        .periodos-filter-card,
        .periodos-table-card,
        .periodos-create-card,
        .periodos-preview-card,
        .payment-step-card,
        .selected-beneficiary-card,
        .beneficiary-create-card,
        .expense-form-card,
        .operator-form-card{
            padding:14px;
        }

        .content .report-hero-actions,
        .content .page-title-actions,
        .report-filter-actions,
        .btn-group{
            display:grid;
            grid-template-columns:1fr;
            width:100%;
        }

        .content .report-hero-actions a,
        .content .report-hero-actions button,
        .content .page-title-actions a,
        .content .page-title-actions button,
        .report-filter-actions a,
        .report-filter-actions button,
        .btn-group a,
        .btn-group button{
            width:100%;
            justify-content:center;
        }
    }

}


/* =====================================================
   REDISENO GLOBAL FASE 5 - RESPONSIVE Y TABLAS FLUIDAS
===================================================== */

@media screen{

    .content,
    .page-content,
    .widget,
    .card,
    .dashboard-mini-card,
    .table-responsive,
    .app-header,
    .sidebar{
        min-width:0;
    }

    .table-responsive table{
        width:100%;
    }

    .table-responsive th,
    .table-responsive td{
        max-width:100%;
    }

    .table-responsive td > .btn-info,
    .table-responsive td > .btn-success,
    .table-responsive td > .btn-warning,
    .table-responsive td > .btn-danger,
    .table-responsive td > .btn-secondary,
    .table-responsive td > form,
    .table-responsive td > details{
        margin-top:4px;
        margin-right:5px;
    }

    .table-responsive td > .btn-info:first-child,
    .table-responsive td > .btn-success:first-child,
    .table-responsive td > .btn-warning:first-child,
    .table-responsive td > .btn-danger:first-child,
    .table-responsive td > .btn-secondary:first-child,
    .table-responsive td > form:first-child,
    .table-responsive td > details:first-child{
        margin-top:0;
    }

    @media(max-width:1366px){
        :root{
            --sidebar-width:252px;
        }

        .page-content{
            max-width:1280px;
            padding-left:24px;
            padding-right:24px;
        }

        .sidebar-logo-img,
        .sidebar-logo-icon{
            width:43px;
            height:43px;
        }

        .sidebar-logo-text{
            max-width:160px;
            font-size:18px;
        }

        .menu ul li a{
            padding:13px 15px;
            font-size:16px;
        }

        .menu ul li a .left i{
            width:22px;
            height:auto;
            min-width:22px;
            border-radius:0;
        }

        .submenu a{
            padding:8px 10px !important;
            font-size:12px !important;
        }

        .content .page-title h1,
        .content .report-hero h1,
        .content .finance-overview-hero h1,
        .dashboard-page .dashboard-hero h1{
            font-size:30px;
        }

        .dashboard-mini-grid,
        .beneficiary-list-summary,
        .expenses-summary-grid,
        .finance-movement-summary,
        .finance-overview-summary,
        .pending-mini-grid,
        .account-mini-grid,
        .caja-mini-grid,
        .historial-summary-cards,
        .cards{
            grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
        }

        .dashboard-mini-grid .dashboard-mini-card,
        .historial-summary-cards .card,
        .cards .card{
            min-height:88px;
            padding:14px 15px;
        }

        .dashboard-mini-grid .dashboard-mini-card strong,
        .historial-summary-cards .card-number,
        .cards .card-number{
            font-size:22px;
        }

        .widget,
        .config-form-card,
        .report-filter-card,
        .report-table-card,
        .beneficiary-list-card,
        .expenses-list-card,
        .finance-movements-card,
        .operators-filter-card,
        .operators-table-card,
        .audit-filter-card,
        .audit-table-card,
        .periodos-filter-card,
        .periodos-table-card,
        .periodos-create-card,
        .periodos-preview-card,
        .payment-step-card,
        .selected-beneficiary-card,
        .beneficiary-create-card,
        .expense-form-card,
        .operator-form-card{
            padding:16px;
        }

        .table-responsive th,
        table th{
            padding:9px 10px;
            font-size:11px;
        }

        .table-responsive td,
        table td{
            padding:10px;
            font-size:12px;
        }
    }

    @media(min-width:821px) and (max-width:1180px){
        .content .page-content:not(.dashboard-page),
        .dashboard-page{
            gap:14px;
        }

        .table-responsive:not(.audit-table-responsive):not(.historial-table-responsive) table{
            table-layout:fixed;
        }

        .table-responsive:not(.audit-table-responsive):not(.historial-table-responsive) th,
        .table-responsive:not(.audit-table-responsive):not(.historial-table-responsive) td{
            white-space:normal;
            overflow-wrap:anywhere;
        }

        .table-responsive:not(.audit-table-responsive):not(.historial-table-responsive) .btn-info,
        .table-responsive:not(.audit-table-responsive):not(.historial-table-responsive) .btn-success,
        .table-responsive:not(.audit-table-responsive):not(.historial-table-responsive) .btn-warning,
        .table-responsive:not(.audit-table-responsive):not(.historial-table-responsive) .btn-danger,
        .table-responsive:not(.audit-table-responsive):not(.historial-table-responsive) .btn-secondary{
            min-height:30px;
            padding:0 8px;
            font-size:11px;
        }
    }

    @media(max-width:900px){
        .content{
            width:100%;
            max-width:100vw;
            margin-left:0;
        }

        .app-header{
            min-height:64px;
            padding:10px 12px;
        }

        .header-brand{
            max-width:170px;
        }

        .header-brand strong{
            max-width:120px;
        }

        .header-status-strip,
        .header-page-context{
            display:none !important;
        }

        .header-user-btn{
            min-width:44px;
            padding:0 10px;
        }
    }

    @media(max-width:820px){
        .table-responsive{
            overflow:visible !important;
            border:0 !important;
            background:transparent !important;
        }

        .table-responsive table{
            border-spacing:0 10px !important;
        }

        .table-responsive tbody tr{
            border:1px solid #d8e1ea;
            border-radius:10px;
            box-shadow:0 7px 16px rgba(23,36,52,.05);
        }

        .table-responsive td{
            grid-template-columns:minmax(104px,32%) minmax(0,1fr);
            min-height:38px;
            padding:10px 12px;
            font-size:13px;
        }

        .table-responsive td::before{
            min-height:22px;
            padding:4px 8px;
            background:#eef3f7;
            color:#344456;
            font-size:10px;
            letter-spacing:0;
        }

        .table-responsive td:first-child{
            background:#f8fafb;
            font-size:14px;
            font-weight:800;
        }

        .table-responsive td[data-label*="Acci"],
        .table-responsive td[data-label*="accion"],
        .table-responsive td[data-label*="Accion"]{
            padding-top:12px;
        }

        .table-responsive td[data-label*="Acci"]::before,
        .table-responsive td[data-label*="accion"]::before,
        .table-responsive td[data-label*="Accion"]::before{
            margin-bottom:8px;
        }
    }

    @media(max-width:560px){
        .page-content,
        .content .page-content:not(.dashboard-page){
            padding-left:10px;
            padding-right:10px;
        }

        .app-header{
            gap:8px;
        }

        .header-brand span,
        .header-alerts,
        .header-user-btn div{
            display:none !important;
        }

        .header-brand{
            max-width:94px;
        }

        .header-brand strong{
            max-width:48px;
            font-size:13px;
        }

        .content .page-title h1,
        .content .report-hero h1,
        .content .finance-overview-hero h1,
        .dashboard-page .dashboard-hero h1{
            font-size:26px;
        }

        .table-responsive td{
            grid-template-columns:1fr;
            gap:6px;
            padding:10px;
        }

        .table-responsive td::before{
            width:max-content;
        }

        .table-responsive td .btn-info,
        .table-responsive td .btn-success,
        .table-responsive td .btn-warning,
        .table-responsive td .btn-danger,
        .table-responsive td .btn-secondary,
        .table-responsive td > .inline-action-form,
        .table-responsive td > .inline-action-form button{
            min-height:36px;
            width:100%;
        }

        .pagination,
        .table-pagination,
        .report-pagination{
            justify-content:center;
        }
    }

}

/* =====================================================
   REDISENO GLOBAL FASE 6 - FORMULARIOS Y ACCIONES
===================================================== */

@media screen{

    .form-grid,
    .config-form-grid,
    .periodos-form-grid,
    .operator-form-grid,
    .operators-filter-grid,
    .audit-filter-grid,
    .expense-main-grid,
    .beneficiary-house-grid,
    .beneficiary-billing-grid,
    .report-period-grid,
    .report-year-grid,
    .report-morosos-filter-grid{
        align-items:start;
    }

    .form-group{
        position:relative;
        margin-bottom:0;
    }

    .form-group:focus-within label{
        color:var(--primary-dark);
    }

    .form-group label{
        display:flex;
        align-items:center;
        gap:6px;
        margin-bottom:6px;
        color:#344456;
        font-size:12px;
        font-weight:850;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    input[type="text"],
    input[type="date"],
    input[type="number"],
    input[type="password"],
    input[type="email"],
    select,
    textarea{
        border-color:#ccd6df;
        border-radius:8px;
        background:#fff;
        color:var(--text);
        box-shadow:inset 0 1px 0 rgba(23,36,52,.02);
    }

    .form-group input::placeholder,
    .form-group textarea::placeholder,
    input::placeholder,
    textarea::placeholder{
        color:#9aa7b5;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus,
    input:focus,
    select:focus,
    textarea:focus{
        border-color:var(--primary-dark);
        background:#fff;
        box-shadow:0 0 0 3px rgba(168,212,93,.24);
        transform:none;
    }

    .form-group input.is-invalid,
    .form-group select.is-invalid,
    .form-group textarea.is-invalid{
        border-color:var(--danger);
        background:#fff7f8;
        box-shadow:0 0 0 3px rgba(197,60,69,.12);
    }

    .form-group .field-error,
    .field-error-block{
        margin-top:6px;
        color:#9f2932;
        font-size:12px;
        font-weight:800;
        line-height:1.35;
    }

    .field-help{
        margin-top:7px;
        padding:0;
        color:#667587;
        font-size:12px;
        line-height:1.35;
    }

    .field-help i{
        color:#7d8c9b;
    }

    .context-help,
    .periodos-context-help,
    .tenant-reset-help,
    .config-context-help{
        margin-top:12px;
        padding:11px 12px;
        border:1px solid #d6e5f0;
        border-left:4px solid #9bbf45;
        border-radius:8px;
        background:#f7fbf0;
        color:#344456;
        font-size:12px;
        line-height:1.45;
    }

    .context-help i,
    .periodos-context-help i,
    .tenant-reset-help i,
    .config-context-help i{
        color:#739f2d;
    }

    .form-card-header,
    .payment-step-header,
    .beneficiary-list-header,
    .widget-title-row{
        padding-bottom:12px;
        border-bottom:1px solid #edf1f4;
    }

    .btn-group,
    .report-filter-actions,
    .finance-filter-actions,
    .expenses-filter-actions,
    .operators-filter-actions,
    .audit-filter-actions{
        margin-top:12px !important;
    }

    .btn-primary,
    .btn-success,
    .btn-info,
    .btn-warning,
    .btn-danger,
    .btn-secondary{
        gap:8px;
        border-radius:8px;
    }

    .btn-primary i,
    .btn-success i,
    .btn-info i,
    .btn-warning i,
    .btn-danger i,
    .btn-secondary i{
        font-size:13px;
    }

    .btn-primary:disabled,
    .btn-success:disabled,
    .btn-info:disabled,
    .btn-warning:disabled,
    .btn-danger:disabled,
    .btn-secondary:disabled,
    button:disabled{
        opacity:.55;
        cursor:not-allowed;
        transform:none !important;
        box-shadow:none !important;
        filter:grayscale(.1);
    }

    .alert-success,
    .alert-warning,
    .alert-danger,
    .form-error-summary{
        align-items:flex-start;
        gap:10px;
        margin-bottom:0;
        border-width:1px;
        box-shadow:none;
    }

    .form-error-summary{
        margin-bottom:12px;
    }

    .system-confirm-modal{
        background:rgba(24,33,43,.46);
        backdrop-filter:blur(3px);
    }

    .system-confirm-modal.show .system-confirm-dialog{
        animation:dialog-pop .22s var(--motion-out) both;
    }

    .system-confirm-dialog{
        width:min(100%,500px);
        grid-template-columns:46px minmax(0,1fr);
        gap:13px;
        padding:16px;
        border-radius:12px;
        border:1px solid #d8e1ea;
        box-shadow:0 22px 54px rgba(23,36,52,.22);
    }

    .system-confirm-icon{
        width:46px;
        height:46px;
        border-radius:11px;
        background:#fff5db;
        color:#a86106;
        font-size:20px;
    }

    .system-confirm-header{
        gap:10px;
    }

    .system-confirm-header span{
        color:#657386;
        font-size:11px;
        text-transform:none;
        letter-spacing:0;
    }

    .system-confirm-header h3{
        margin:2px 0 6px;
        font-size:20px;
        line-height:1.15;
    }

    .system-confirm-close{
        width:30px;
        height:30px;
        border-radius:8px;
        color:#667587;
        font-size:20px;
    }

    .system-confirm-close:hover{
        background:#e9eef3;
        color:var(--text);
    }

    .system-confirm-content p{
        margin-bottom:14px;
        color:#4d5d70;
        font-size:13px;
        line-height:1.45;
    }

    .system-confirm-actions{
        gap:8px;
    }

    .system-confirm-actions .btn-primary,
    .system-confirm-actions .btn-secondary,
    .system-confirm-actions .btn-danger,
    .system-confirm-actions .btn-warning{
        min-height:38px;
        padding:0 13px;
        font-size:13px;
    }

    .system-reason-dialog{
        width:min(100%,540px);
    }

    .system-reason-field{
        margin-bottom:14px;
    }

    .system-reason-field textarea{
        min-height:104px;
    }

    .payment-confirm-modal{
        backdrop-filter:blur(3px);
    }

    .payment-confirm-dialog{
        border-radius:12px;
        border:1px solid #d8e1ea;
        box-shadow:0 22px 54px rgba(23,36,52,.22);
    }

    @keyframes dialog-pop{
        from{
            opacity:0;
            transform:translateY(10px) scale(.98);
        }
        to{
            opacity:1;
            transform:translateY(0) scale(1);
        }
    }

    @media(max-width:760px){
        .system-confirm-dialog{
            grid-template-columns:1fr;
        }

        .system-confirm-icon{
            width:42px;
            height:42px;
        }

        .system-confirm-actions{
            display:grid;
            grid-template-columns:1fr;
        }

        .system-confirm-actions button{
            width:100%;
            justify-content:center;
        }
    }

}


/* =====================================================
   REDISENO MODULO COBROS - FLUJO OPERATIVO
===================================================== */

@media screen{

    .cobros-module-page{
        gap:15px;
    }

    .cobros-module-page .page-title{
        padding-bottom:4px;
    }

    .cobros-module-page .page-title h1{
        font-size:31px;
    }

    .cobros-module-page > .widget,
    .cobros-module-page .selected-beneficiary-card,
    .cobros-module-page .payment-confirm-panel,
    .cobros-module-page .payment-summary,
    .cobros-module-page .account-insights{
        border-radius:11px;
        border:1px solid #d8e1ea;
        box-shadow:0 7px 18px rgba(23,36,52,.055);
    }

    .cobros-module-page .widget h3{
        display:flex;
        align-items:center;
        gap:8px;
    }

    .payment-steps{
        display:grid;
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:10px;
        margin:0;
    }

    .payment-steps > div{
        min-height:66px;
        padding:12px 14px;
        border:1px solid #d8e1ea;
        border-radius:10px;
        background:#fff;
        box-shadow:0 5px 14px rgba(23,36,52,.045);
    }

    .payment-steps > div span{
        width:28px;
        height:28px;
        border-radius:9px;
    }

    .payment-steps > div strong{
        font-size:13px;
    }

    .payment-steps > div small{
        font-size:11px;
        line-height:1.25;
    }

    .payment-layout{
        display:grid;
        grid-template-columns:minmax(0,1fr) minmax(290px,360px);
        gap:14px;
        align-items:start;
    }

    .payment-confirm-panel{
        position:sticky;
        top:calc(var(--header-height) + 14px);
        padding:18px;
        background:#fff;
    }

    .payment-confirm-panel h3{
        margin:9px 0 12px;
        font-size:19px;
    }

    .payment-confirm-row{
        min-height:38px;
        padding:8px 0;
    }

    .payment-total-box{
        margin:10px 0 14px;
        padding:14px;
        border-radius:10px;
    }

    .payment-total-box strong{
        font-size:26px;
    }

    .payment-period-list{
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
        gap:10px;
        margin-top:14px;
    }

    .payment-period-item{
        min-height:104px;
        display:grid;
        grid-template-columns:24px minmax(0,1fr);
        align-items:start;
        gap:10px;
        padding:13px;
        border-radius:10px;
        border:1px solid #d8e1ea;
        background:#fff;
        transition:border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
    }

    .payment-period-item:hover,
    .payment-period-item.selected{
        border-color:#a8d45d;
        background:#fbfef6;
        box-shadow:0 8px 18px rgba(115,159,45,.10);
    }

    .payment-period-item input{
        margin-top:2px;
    }

    .payment-period-main strong,
    .payment-period-amount span{
        font-size:14px;
    }

    .payment-period-main span,
    .payment-period-amount small,
    .payment-period-main em{
        font-size:11px;
        line-height:1.35;
    }

    .payment-month-picker{
        min-width:180px;
        padding:10px;
        border:1px solid #d8e1ea;
        border-radius:9px;
        background:#f8fafb;
    }

    .payment-month-picker label{
        display:block;
        margin-bottom:5px;
        color:#657386;
        font-size:11px;
        font-weight:800;
    }

    .beneficiary-result-grid{
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
        gap:10px;
    }

    .beneficiary-result-card{
        border-radius:10px;
        border:1px solid #d8e1ea;
        background:#fff;
        box-shadow:0 5px 14px rgba(23,36,52,.045);
    }

    .selected-beneficiary-card{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:14px;
        padding:16px 18px;
        background:#fff;
    }

    .selected-beneficiary-card h3{
        margin:8px 0 4px;
        font-size:22px;
    }

    .selected-beneficiary-card p{
        margin:0;
        color:#4f6074;
        font-size:13px;
    }

    .selected-beneficiary-card > div:last-child{
        display:flex;
        align-items:center;
        justify-content:flex-end;
        gap:8px;
        flex-wrap:wrap;
    }

    .account-insights{
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
        gap:0;
        overflow:hidden;
        background:#fff;
    }

    .account-insights > div{
        padding:14px 16px;
        border-right:1px solid #e3e9ef;
    }

    .account-insights > div:last-child{
        border-right:0;
    }

    .account-insights span{
        display:block;
        color:#657386;
        font-size:12px;
    }

    .account-insights strong{
        display:block;
        margin-top:5px;
        color:var(--text);
        font-size:14px;
    }

    .pending-list-actions,
    .account-table-tools{
        display:flex;
        align-items:center;
        justify-content:flex-end;
        gap:9px;
        flex-wrap:wrap;
    }

    .account-table-tools label,
    .pending-list-actions label{
        margin:0;
        color:#657386;
        font-size:12px;
        font-weight:700;
    }

    .account-table-tools select,
    .pending-list-actions select{
        min-height:34px;
        padding:6px 28px 6px 9px;
        font-size:12px;
    }

    .cobros-module-page .table-responsive{
        border-radius:10px;
        overflow:hidden;
    }

    .cobros-module-page .table-responsive table{
        table-layout:fixed;
    }

    .cobros-module-page .table-responsive th,
    .cobros-module-page .table-responsive td{
        padding:10px 11px;
        font-size:12px;
        line-height:1.35;
    }

    .cobros-module-page .table-responsive td strong{
        font-size:13px;
    }

    .cobros-module-page .table-responsive td small{
        font-size:11px;
    }

    .cobros-module-page .table-responsive td .btn-info,
    .cobros-module-page .table-responsive td .btn-success,
    .cobros-module-page .table-responsive td .btn-warning,
    .cobros-module-page .table-responsive td .btn-danger,
    .cobros-module-page .table-responsive td .btn-secondary{
        min-height:31px;
        padding:0 9px;
        font-size:11px;
    }

    .payment-summary{
        margin-top:0 !important;
        padding:16px 18px;
        background:#fff;
        text-align:left;
    }

    .payment-summary h3{
        margin:0;
        color:#657386;
        font-size:13px;
    }

    .payment-summary .amount{
        margin-top:8px;
        color:var(--text);
        font-size:28px;
        line-height:1;
    }

    .cashbox-page .caja-arqueo-grid{
        margin-top:0;
    }

    @media(max-width:1180px){
        .payment-layout{
            grid-template-columns:1fr;
        }

        .payment-confirm-panel{
            position:static;
        }

        .selected-beneficiary-card{
            align-items:flex-start;
            flex-direction:column;
        }

        .selected-beneficiary-card > div:last-child{
            justify-content:flex-start;
        }
    }

    @media(max-width:820px){
        .payment-steps{
            grid-template-columns:repeat(2,minmax(0,1fr));
        }

        .payment-period-list{
            grid-template-columns:1fr;
        }

        .payment-month-picker{
            width:100%;
        }

        .cobros-module-page .table-responsive table{
            table-layout:auto;
        }

        .account-insights{
            grid-template-columns:1fr;
        }

        .account-insights > div{
            border-right:0;
            border-bottom:1px solid #e3e9ef;
        }

        .account-insights > div:last-child{
            border-bottom:0;
        }
    }

    @media(max-width:560px){
        .payment-steps{
            grid-template-columns:1fr;
        }

        .payment-steps > div{
            min-height:58px;
        }

        .payment-confirm-panel .btn-primary,
        .payment-confirm-panel .btn-secondary,
        .pending-list-actions,
        .account-table-tools{
            width:100%;
        }

        .pending-list-actions a,
        .pending-list-actions button,
        .pending-list-actions form,
        .account-table-tools select{
            width:100%;
        }
    }

}

/* =====================================================
   REDISENO MODULO COBROS - FLUJO SIMPLE
===================================================== */

@media screen{

    .cobros-module-page .page-title{
        margin-bottom:6px;
    }

    .cobros-module-page .page-title h1{
        letter-spacing:0;
    }

    .cobros-module-page .page-title p{
        max-width:760px;
    }

    .payment-search-panel{
        padding:13px 15px;
    }

    .operation-search-row{
        display:grid;
        grid-template-columns:minmax(260px,1fr) auto;
        gap:10px;
        align-items:end;
    }

    .operation-search-row .form-group{
        margin:0;
    }

    .operation-search-row .btn-group{
        margin:0;
        flex-wrap:nowrap;
    }

    .operation-search-row .btn-primary,
    .operation-search-row .btn-secondary{
        min-height:42px;
        white-space:nowrap;
    }

    .payment-search-panel .payment-step-header{
        margin-bottom:9px;
    }

    .payment-search-panel .payment-step-header h3{
        font-size:18px;
    }

    .payment-search-panel .payment-step-header p{
        margin-top:4px;
        color:#5c6b7d;
        font-size:13px;
    }

    .selected-beneficiary-card{
        border-top:3px solid #a8d45d;
        padding:13px 16px;
    }

    .payment-step-card{
        padding:14px 15px;
    }

    .payment-step-header{
        align-items:flex-start;
        gap:12px;
    }

    .payment-step-header h3{
        font-size:18px;
        line-height:1.15;
    }

    .payment-step-header p{
        max-width:620px;
        font-size:13px;
    }

    .payment-period-list{
        grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
    }

    .payment-period-item{
        min-height:82px;
        padding:11px;
    }

    .payment-period-main strong{
        font-size:13px;
    }

    .payment-period-amount{
        grid-column:2;
        display:flex;
        align-items:baseline;
        justify-content:space-between;
        gap:8px;
    }

    .payment-period-amount span{
        font-size:13px;
    }

    .payment-period-amount small{
        max-width:90px;
        text-align:right;
    }

    .payment-confirm-panel{
        padding:16px;
        border-top:3px solid #2f8df2;
    }

    .payment-confirm-panel .form-group{
        margin-bottom:10px;
    }

    .payment-confirm-panel textarea{
        min-height:74px;
    }

    .payment-total-box{
        background:#eef8ee;
    }

    .compact-filter-widget{
        padding:12px 14px;
    }

    .compact-filter-widget h3{
        margin-bottom:9px;
        font-size:17px;
    }

    .compact-filter-widget .form-grid{
        grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
        gap:8px;
    }

    .compact-filter-widget .form-group{
        margin-bottom:0;
    }

    .compact-filter-widget .btn-group{
        margin-top:9px;
    }

    .cashbox-top-grid{
        display:grid;
        grid-template-columns:minmax(330px,.9fr) minmax(360px,1.1fr);
        gap:12px;
        align-items:stretch;
    }

    .cashbox-date-card{
        padding:12px 14px;
    }

    .cashbox-date-card h3{
        margin:0 0 10px;
        font-size:17px;
    }

    .cashbox-date-card form{
        display:grid;
        grid-template-columns:minmax(150px,1fr) auto;
        gap:8px;
        align-items:end;
    }

    .cashbox-date-card .form-grid{
        display:block;
    }

    .cashbox-date-card .form-group{
        margin:0;
    }

    .cashbox-date-card .btn-group{
        margin:0;
        flex-wrap:nowrap;
    }

    .cashbox-date-card .btn-primary,
    .cashbox-date-card .btn-secondary{
        min-height:36px;
        white-space:nowrap;
    }

    .cashbox-status-card{
        display:flex;
        flex-direction:column;
        justify-content:space-between;
        min-height:0;
        padding:12px 14px;
    }

    .cashbox-status-card h3{
        font-size:17px;
    }

    .cashbox-status-card p{
        line-height:1.25;
    }

    .cashbox-status-card .btn-group{
        margin-top:8px !important;
        justify-content:flex-end;
    }

    .cashbox-status-card .btn-info,
    .cashbox-status-card .btn-secondary,
    .cashbox-status-card .btn-success{
        min-height:36px;
    }

    .operation-list-widget{
        padding:14px 15px;
    }

    .operation-list-widget h3{
        margin:0;
        font-size:18px;
    }

    .operation-list-widget > div:first-child p{
        margin-bottom:0;
    }

    .module-section-header{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        flex-wrap:wrap;
        margin-bottom:10px;
    }

    .module-section-header h3{
        display:flex;
        align-items:center;
        gap:8px;
        margin:0;
        font-size:18px;
    }

    .module-section-header p{
        margin:4px 0 0;
        color:#4f6074;
        font-size:13px;
        line-height:1.3;
    }

    .account-ledger-widget,
    .account-receipts-widget{
        padding:14px 15px;
    }

    .account-month-timeline{
        display:grid;
        gap:8px;
    }

    .account-month-card{
        display:grid;
        grid-template-columns:36px minmax(180px,1fr) minmax(120px,.55fr) minmax(100px,.45fr) auto;
        gap:10px;
        align-items:center;
        padding:10px 12px;
        border:1px solid #e3e9ef;
        border-left:4px solid #d8e1ea;
        border-radius:10px;
        background:#fff;
    }

    .account-month-card.paid{
        border-left-color:#16b87a;
        background:#fbfffc;
    }

    .account-month-card.overdue{
        border-left-color:#ef4444;
        background:#fff8f8;
    }

    .account-month-card.pending{
        border-left-color:#f59e0b;
        background:#fffdf6;
    }

    .account-month-card.future{
        border-left-color:#2f8df2;
        background:#f8fbff;
    }

    .account-month-state{
        width:32px;
        height:32px;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:10px;
        background:#eef3f7;
        color:#4f6074;
    }

    .account-month-card.paid .account-month-state{
        background:#dff8ec;
        color:#087a4d;
    }

    .account-month-card.overdue .account-month-state{
        background:#ffe2e2;
        color:#b91c1c;
    }

    .account-month-card.pending .account-month-state{
        background:#fff0c2;
        color:#9a5b00;
    }

    .account-month-card.future .account-month-state{
        background:#e3f1ff;
        color:#0b66c3;
    }

    .account-month-main strong,
    .account-month-money strong,
    .account-month-paid strong{
        display:block;
        color:var(--text);
        font-size:13px;
        line-height:1.25;
    }

    .account-month-main span,
    .account-month-money span,
    .account-month-paid span,
    .account-month-money small{
        display:block;
        color:#4f6074;
        font-size:11px;
        line-height:1.3;
    }

    .account-month-badge{
        display:flex;
        justify-content:flex-end;
    }

    .inline-table-filters{
        display:grid;
        grid-template-columns:minmax(180px,1.5fr) minmax(145px,.6fr) auto;
        gap:8px;
        align-items:end;
        margin:7px 0 10px;
        padding:8px;
        border:1px solid #e3e9ef;
        border-radius:10px;
        background:#f8fafb;
    }

    .history-inline-filters{
        grid-template-columns:140px 140px minmax(190px,1fr) minmax(135px,.55fr) minmax(125px,.5fr) auto;
    }

    .inline-table-filters .form-group{
        margin:0;
    }

    .inline-table-filters label{
        margin-bottom:5px;
        color:#4f6074;
        font-size:11px;
        font-weight:800;
    }

    .inline-table-filters input,
    .inline-table-filters select{
        min-height:34px;
        padding:7px 10px;
        font-size:12px;
    }

    .inline-table-filters .btn-group{
        margin:0;
        flex-wrap:nowrap;
    }

    .inline-table-filters .btn-primary,
    .inline-table-filters .btn-secondary{
        min-height:34px;
        padding:0 13px;
        white-space:nowrap;
    }

    .compact-metric-strip,
    .pending-mini-grid,
    .account-mini-grid,
    .caja-mini-grid,
    .beneficiary-list-summary,
    .residente-cards,
    .finance-overview-summary,
    .finance-movement-summary,
    .expenses-summary-grid,
    .report-mini-grid,
    .finance-close-summary{
        grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
        gap:0;
        overflow:hidden;
        border:1px solid #d8e1ea;
        border-radius:11px;
        background:#fff;
        box-shadow:0 7px 18px rgba(23,36,52,.055);
    }

    .compact-metric-strip .card,
    .pending-mini-grid .dashboard-mini-card,
    .account-mini-grid .dashboard-mini-card,
    .caja-mini-grid .dashboard-mini-card,
    .beneficiary-list-summary .dashboard-mini-card,
    .residente-cards .card,
    .finance-overview-summary .dashboard-mini-card,
    .finance-movement-summary .dashboard-mini-card,
    .expenses-summary-grid .dashboard-mini-card,
    .report-mini-grid .dashboard-mini-card,
    .finance-close-summary .card{
        position:relative;
        display:grid;
        grid-template-columns:minmax(0,1fr) 38px;
        grid-template-rows:auto auto auto;
        column-gap:12px;
        align-items:center;
        align-content:center;
        min-height:76px;
        padding:12px 16px;
        text-align:left;
        border:0;
        border-right:1px solid #e3e9ef;
        border-radius:0;
        box-shadow:none;
        background:#fff;
    }

    .compact-metric-strip .card::before,
    .compact-metric-strip .card::after{
        display:none;
    }

    .pending-mini-grid .dashboard-mini-card > div,
    .account-mini-grid .dashboard-mini-card > div,
    .caja-mini-grid .dashboard-mini-card > div,
    .beneficiary-list-summary .dashboard-mini-card > div,
    .finance-overview-summary .dashboard-mini-card > div,
    .finance-movement-summary .dashboard-mini-card > div,
    .expenses-summary-grid .dashboard-mini-card > div,
    .report-mini-grid .dashboard-mini-card > div{
        grid-column:1;
        grid-row:1 / span 3;
        min-width:0;
        display:flex;
        flex-direction:column;
        justify-content:center;
        align-self:stretch;
    }

    .compact-metric-strip .card-header,
    .residente-cards .card-header,
    .finance-close-summary .card-header{
        margin:0;
        padding:0;
        border:0;
        background:transparent;
        min-width:0;
    }

    .compact-metric-strip .card:last-child,
    .pending-mini-grid .dashboard-mini-card:last-child,
    .account-mini-grid .dashboard-mini-card:last-child,
    .caja-mini-grid .dashboard-mini-card:last-child,
    .beneficiary-list-summary .dashboard-mini-card:last-child,
    .residente-cards .card:last-child,
    .finance-overview-summary .dashboard-mini-card:last-child,
    .finance-movement-summary .dashboard-mini-card:last-child,
    .expenses-summary-grid .dashboard-mini-card:last-child,
    .report-mini-grid .dashboard-mini-card:last-child,
    .finance-close-summary .card:last-child{
        border-right:0;
    }

    .compact-metric-strip .card-header h3,
    .residente-cards .card-header h3,
    .finance-close-summary .card-header h3,
    .pending-mini-grid .dashboard-mini-card span,
    .account-mini-grid .dashboard-mini-card span,
    .caja-mini-grid .dashboard-mini-card span,
    .beneficiary-list-summary .dashboard-mini-card span,
    .finance-overview-summary .dashboard-mini-card span,
    .finance-movement-summary .dashboard-mini-card span,
    .expenses-summary-grid .dashboard-mini-card span,
    .report-mini-grid .dashboard-mini-card span{
        margin:0;
        color:#4f6074;
        font-size:12px;
        font-weight:800;
        line-height:1.25;
        text-align:left;
    }

    .compact-metric-strip .card-header,
    .residente-cards .card-header,
    .finance-close-summary .card-header{
        display:contents;
    }

    .compact-metric-strip .card-header h3,
    .residente-cards .card-header h3,
    .finance-close-summary .card-header h3{
        grid-column:1;
        grid-row:1;
        min-width:0;
    }

    .compact-metric-strip .card-number,
    .residente-cards .card-number,
    .finance-close-summary .card-number,
    .pending-mini-grid .dashboard-mini-card strong,
    .account-mini-grid .dashboard-mini-card strong,
    .caja-mini-grid .dashboard-mini-card strong,
    .beneficiary-list-summary .dashboard-mini-card strong,
    .finance-overview-summary .dashboard-mini-card strong,
    .finance-movement-summary .dashboard-mini-card strong,
    .expenses-summary-grid .dashboard-mini-card strong,
    .report-mini-grid .dashboard-mini-card strong{
        grid-column:1;
        grid-row:2;
        margin:7px 0 0;
        color:var(--text);
        font-size:18px;
        line-height:1.05;
        word-break:break-word;
        text-align:left;
    }

    .compact-metric-strip .card-text,
    .residente-cards .card-text,
    .finance-close-summary .card-text,
    .pending-mini-grid .dashboard-mini-card small,
    .account-mini-grid .dashboard-mini-card small,
    .caja-mini-grid .dashboard-mini-card small,
    .beneficiary-list-summary .dashboard-mini-card small,
    .finance-overview-summary .dashboard-mini-card small,
    .finance-movement-summary .dashboard-mini-card small,
    .expenses-summary-grid .dashboard-mini-card small,
    .report-mini-grid .dashboard-mini-card small{
        grid-column:1;
        grid-row:3;
        margin-top:7px;
        color:#4f6074;
        font-size:12px;
        line-height:1.25;
        text-align:left;
    }

    .compact-metric-strip .card-header i,
    .residente-cards .card-header i,
    .finance-close-summary .card-header i,
    .pending-mini-grid .dashboard-mini-card i,
    .account-mini-grid .dashboard-mini-card i,
    .caja-mini-grid .dashboard-mini-card i,
    .beneficiary-list-summary .dashboard-mini-card i,
    .finance-overview-summary .dashboard-mini-card i,
    .finance-movement-summary .dashboard-mini-card i,
    .expenses-summary-grid .dashboard-mini-card i,
    .report-mini-grid .dashboard-mini-card i{
        grid-column:2;
        grid-row:1 / span 3;
        width:36px;
        height:36px;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:10px;
        background:#eef3f7;
        font-size:16px;
    }

    .report-hub-page .page-title{
        margin-bottom:20px;
    }

    .report-hub-summary{
        margin-bottom:22px;
    }

    .report-hub-grid{
        margin-top:0;
    }

    .report-page .report-hero{
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:18px;
        margin-bottom:16px;
        padding:0;
    }

    .report-page .report-hero h1{
        margin:6px 0 4px;
        font-size:34px;
        line-height:1.08;
    }

    .report-page .report-back-link{
        display:inline-flex;
        align-items:center;
        gap:7px;
        margin-bottom:8px;
        color:#64748b;
        font-size:13px;
        font-weight:700;
        text-decoration:none;
        transition:color .18s ease, transform .18s ease;
    }

    .report-page .report-back-link:hover{
        color:#4f6f20;
        transform:translateX(-2px);
    }

    .report-page .report-hero p{
        max-width:760px;
        margin:0;
        color:#5f7188;
        font-size:15px;
        line-height:1.45;
    }

    .report-page .report-hero-actions{
        flex:0 0 auto;
        align-items:center;
        gap:10px;
        margin-top:2px;
    }

    .report-page:not(.report-hub-page) .page-content{
        display:flex;
        flex-direction:column;
    }

    .report-page:not(.report-hub-page) .report-hero{
        order:1;
    }

    .report-page .report-filter-card{
        order:3;
        margin-bottom:16px;
        padding:16px;
        border-radius:11px;
        box-shadow:0 7px 18px rgba(23,36,52,.055);
    }

    .report-page .report-main-table-card{
        order:3;
        margin-top:0;
        border-radius:11px;
    }

    .report-page .report-main-table-card .report-section-heading{
        padding-top:2px;
    }

    .report-page .report-mini-grid{
        order:2;
        margin:0 0 16px;
    }

    .report-page .report-method-grid{
        order:8;
        margin-top:0;
    }

    .report-page .report-layout-grid{
        order:6;
    }

    .report-page .report-aging-card{
        order:5;
    }

    .report-page .report-table-card:not(.report-main-table-card):not(.report-aging-card){
        order:8;
    }

    .report-page .report-filter-row{
        display:grid;
        grid-template-columns:minmax(0,1fr) auto;
        align-items:end;
        gap:12px;
    }

    .report-page .report-inline-filter{
        margin:12px 0 14px;
        padding:12px;
        border:1px solid #dbe4ee;
        border-radius:10px;
        background:#f8fafc;
    }

    .report-page .report-filter-row > .form-group{
        margin:0;
    }

    .report-page .report-period-grid,
    .report-page .report-year-grid,
    .report-page .report-morosos-filter-grid{
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
        gap:10px;
    }

    .report-page .report-filter-actions{
        display:flex;
        align-items:center;
        justify-content:flex-end;
        gap:8px;
        margin:0;
    }

    .report-page .report-filter-actions .btn-primary,
    .report-page .report-filter-actions .btn-secondary,
    .report-page .report-hero-actions .btn-success,
    .report-page .report-hero-actions .btn-info{
        min-height:40px;
        padding:0 14px;
        border-radius:7px;
        white-space:nowrap;
    }

    .report-page .report-layout-grid{
        grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr);
        gap:16px;
        margin:0 0 16px;
    }

    .report-daily-page .report-layout-grid{
        grid-template-columns:minmax(0,1fr);
    }

    .report-page .report-chart-card,
    .report-page .report-side-card,
    .report-page .report-table-card{
        border-radius:11px;
        box-shadow:0 7px 18px rgba(23,36,52,.055);
    }

    .report-page .report-chart-card,
    .report-page .report-side-card{
        padding:18px;
    }

    .report-page .report-table-card{
        margin-bottom:16px;
        padding:18px;
    }

    .report-page .report-section-heading{
        align-items:flex-start;
        gap:14px;
        margin-bottom:14px;
    }

    .report-page .report-section-heading h3{
        font-size:18px;
        line-height:1.2;
    }

    .report-page .report-section-heading p{
        margin-top:3px;
        font-size:13px;
        line-height:1.35;
    }

    .report-page .report-chart-box{
        min-height:250px;
        height:250px;
    }

    .report-page .report-stat-list div{
        min-width:0;
        padding:11px 12px;
    }

    .report-page .report-stat-list span{
        min-width:0;
        font-size:12px;
    }

    .report-page .report-stat-list strong{
        min-width:0;
        font-size:15px;
        line-height:1.25;
    }

    .report-page .report-stat-list{
        width:100%;
        margin:0;
        box-sizing:border-box;
    }

    .report-financial-overview{
        align-items:start;
    }

    .report-financial-reading-card{
        width:100%;
        align-self:start;
        box-sizing:border-box;
    }

    .report-page .report-table{
        font-size:13px;
    }

    .report-page .report-table th,
    .report-page .report-table td{
        padding:10px 12px;
        line-height:1.3;
        vertical-align:middle;
    }

    .report-page .report-table th{
        font-size:12px;
        white-space:normal;
    }

    .report-page .report-action-stack{
        gap:6px;
    }

    .report-morosos-page .report-aging-card{
        margin-bottom:16px;
    }

    .report-morosos-page .report-aging-table{
        max-width:520px;
    }

    .report-morosos-page .report-aging-table th:last-child,
    .report-morosos-page .report-aging-table td:last-child{
        width:150px;
        text-align:right;
    }

    .report-page .btn-compact-action{
        min-height:34px;
        padding:0 10px;
        border-radius:7px;
        font-size:12px;
    }

    .report-page .report-pagination{
        margin-top:12px;
    }

    .beneficiary-list-card,
    .beneficiary-create-card,
    .residente-view .widget{
        padding:14px 16px;
        border-radius:11px;
        border:1px solid #d8e1ea;
        box-shadow:0 7px 18px rgba(23,36,52,.055);
        background:#fff;
    }

    .beneficiary-list-summary,
    .residente-cards{
        margin-bottom:14px;
    }

    .residente-cards{
        display:grid;
        margin-top:14px;
    }

    .beneficiary-list-header,
    .residente-header,
    .historial-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
        gap:12px;
        padding-bottom:10px;
        margin-bottom:10px;
        border-bottom:1px solid #e3e9ef;
    }

    .beneficiary-list-header h3,
    .residente-header h2,
    .historial-header h2{
        display:flex;
        align-items:center;
        gap:8px;
        margin:0;
        font-size:18px;
        line-height:1.2;
    }

    .beneficiary-list-header p{
        margin:2px 0 0;
        color:#4f6074;
        font-size:12px;
    }

    .beneficiary-filter-panel{
        grid-template-columns:minmax(260px,1fr) 150px 150px auto auto;
        gap:8px;
        align-items:center;
        padding:8px;
        margin:0 0 10px;
        border:1px solid #e3e9ef;
        border-radius:10px;
        background:#f8fafc;
    }

    .beneficiary-search-box input,
    .beneficiary-filter-panel select,
    .beneficiary-limit-form select{
        min-height:34px;
        border-radius:8px;
        font-size:12px;
    }

    .beneficiary-filter-panel .btn-primary,
    .beneficiary-filter-panel .btn-secondary,
    .beneficiary-list-header .btn-primary,
    .beneficiary-actions a,
    .beneficiary-actions button{
        min-height:32px;
        padding:0 11px;
        border-radius:8px;
        font-size:12px;
        white-space:nowrap;
    }

    .beneficiary-table-header{
        padding:7px 0;
    }

    .beneficiary-actions{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        align-items:center;
        gap:6px;
        max-width:280px;
    }

    .beneficiary-actions .inline-action-form{
        display:contents;
    }

    .beneficiary-actions a,
    .beneficiary-actions button{
        width:100%;
        justify-content:center;
        min-height:28px;
        padding:5px 8px;
        font-size:11px;
        gap:5px;
    }

    .beneficiary-table table th,
    .beneficiary-table table td,
    .historial-table table th,
    .historial-table table td{
        padding:8px 10px;
        vertical-align:middle;
    }

    .beneficiary-table table th,
    .historial-table table th{
        font-size:12px;
    }

    .beneficiary-table small,
    .historial-table small{
        display:block;
        margin-top:3px;
        color:#4f6074;
        font-size:11px;
    }

    .beneficiary-footer,
    .paginacion-historial{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:10px;
        flex-wrap:wrap;
        margin-top:12px;
    }

    .residente-layout{
        display:grid;
        grid-template-columns:minmax(210px,260px) minmax(0,1fr);
        gap:14px;
        align-items:start;
    }

    .residente-profile{
        display:flex;
        gap:12px;
        align-items:center;
        padding:12px;
        border:1px solid #e3e9ef;
        border-radius:10px;
        background:#f8fafc;
    }

    .residente-profile img{
        width:54px;
        height:54px;
        border-radius:14px;
        object-fit:cover;
        background:#fff;
        border:1px solid #d8e1ea;
    }

    .residente-profile h3{
        margin:0 0 4px;
        font-size:18px;
        line-height:1.15;
    }

    .residente-profile p{
        margin:0 0 7px;
        color:#4f6074;
        font-size:12px;
        line-height:1.3;
    }

    .residente-info-grid{
        display:grid;
        grid-template-columns:repeat(3,minmax(160px,1fr));
        gap:10px;
    }

    .residente-info-grid .form-group{
        margin-bottom:0;
    }

    .residente-info-grid label{
        font-size:11px;
        font-weight:800;
        text-transform:uppercase;
        color:#4f6074;
    }

    .residente-info-grid input,
    .residente-info-grid textarea{
        width:100%;
        min-height:36px;
        padding:8px 10px;
        border-radius:8px;
        font-size:12px;
    }

    .residente-info-grid textarea{
        min-height:62px;
        resize:none;
    }

    .residente-full{
        grid-column:1 / -1;
    }

    .residente-actions{
        display:flex;
        align-items:center;
        gap:8px;
        flex-wrap:wrap;
    }

    .residente-actions a,
    .historial-header .badge-info{
        min-height:32px;
        padding:0 11px;
        border-radius:8px;
        font-size:12px;
    }

    .historial-widget{
        margin-top:14px;
    }

    @media(max-width:1100px){
        .residente-layout{
            grid-template-columns:1fr;
        }

        .residente-info-grid{
            grid-template-columns:repeat(2,minmax(160px,1fr));
        }
    }

    @media(max-width:900px){
        .beneficiary-table,
        .historial-table{
            overflow:visible;
        }

        .beneficiary-table table,
        .beneficiary-table thead,
        .beneficiary-table tbody,
        .beneficiary-table tr,
        .beneficiary-table td,
        .historial-table table,
        .historial-table thead,
        .historial-table tbody,
        .historial-table tr,
        .historial-table td{
            display:block;
            width:100%;
            min-width:0;
        }

        .beneficiary-table thead,
        .historial-table thead{
            display:none;
        }

        .beneficiary-table table,
        .historial-table table{
            border:0;
            border-collapse:separate;
            border-spacing:0 9px;
        }

        .beneficiary-table tbody tr,
        .historial-table tbody tr{
            border:1px solid #d8e1ea;
            border-radius:11px;
            background:#fff;
            overflow:hidden;
            box-shadow:0 5px 14px rgba(23,36,52,.04);
        }

        .beneficiary-table tbody td,
        .historial-table tbody td{
            display:grid;
            grid-template-columns:116px minmax(0,1fr);
            gap:10px;
            align-items:center;
            padding:9px 12px;
            border-bottom:1px solid #edf1f5;
            text-align:left;
            word-break:normal;
            overflow-wrap:anywhere;
        }

        .beneficiary-table tbody td:last-child,
        .historial-table tbody td:last-child{
            border-bottom:0;
        }

        .beneficiary-table tbody td::before,
        .historial-table tbody td::before{
            content:attr(data-label);
            color:#4f6074;
            font-size:11px;
            font-weight:900;
            text-transform:uppercase;
        }

        .beneficiary-table .empty-table,
        .historial-table .empty-table{
            display:block;
        }
    }

    @media(max-width:700px){
        .beneficiary-create-layout{
            grid-template-columns:1fr;
        }

        .beneficiary-create-summary{
            position:static;
        }

        .form-card-header,
        .residente-header,
        .historial-header{
            align-items:stretch;
            flex-direction:column;
        }

        .residente-actions,
        .residente-actions a,
        .form-card-header a{
            width:100%;
        }

        .residente-info-grid,
        .beneficiary-house-grid,
        .beneficiary-billing-grid{
            grid-template-columns:1fr;
        }

        .beneficiary-table tbody td,
        .historial-table tbody td{
            grid-template-columns:96px minmax(0,1fr);
        }
    }

    .cashbox-page .payment-summary{
        margin-top:10px !important;
        padding:11px 15px;
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
    }

    .cashbox-page .payment-summary .amount{
        margin:0;
        font-size:24px;
    }

    .cashbox-close-widget{
        padding:13px 15px;
        border-top:3px solid #a8d45d;
    }

    .cashbox-close-widget h3{
        margin-bottom:10px;
    }

    .cashbox-close-row{
        display:grid;
        grid-template-columns:180px 180px minmax(180px,1fr) auto;
        gap:9px;
        align-items:end;
    }

    .cashbox-close-row .form-group{
        margin:0;
    }

    .cashbox-close-row input{
        min-height:38px;
        font-size:12px;
    }

    .cashbox-close-row .btn-success{
        min-height:38px;
        white-space:nowrap;
    }

    .compact-history-widget{
        opacity:.95;
    }

    .cobros-module-page .table-responsive th{
        color:#243143;
        background:#f8fafb;
        font-size:11px;
        text-transform:none;
    }

    .cobros-module-page .table-responsive td{
        vertical-align:middle;
    }

    .cobros-module-page .table-responsive td .btn-info,
    .cobros-module-page .table-responsive td .btn-success,
    .cobros-module-page .table-responsive td .btn-warning,
    .cobros-module-page .table-responsive td .btn-danger,
    .cobros-module-page .table-responsive td .btn-secondary{
        border-radius:8px;
        font-weight:800;
    }

    .cobros-module-page .pagination-summary{
        font-size:12px;
    }

    @media(max-width:1180px){
        .operation-search-row{
            grid-template-columns:1fr;
        }

        .operation-search-row .btn-group{
            justify-content:flex-start;
        }

        .cashbox-date-card form{
            grid-template-columns:1fr;
        }

        .cashbox-top-grid{
            grid-template-columns:1fr;
        }

        .inline-table-filters,
        .history-inline-filters,
        .cashbox-close-row{
            grid-template-columns:1fr 1fr;
        }

        .account-month-card{
            grid-template-columns:32px minmax(0,1fr) auto;
        }

        .account-month-money,
        .account-month-paid{
            grid-column:2;
        }

        .account-month-badge{
            grid-column:3;
            grid-row:1 / span 3;
        }

        .pending-mini-grid .dashboard-mini-card,
        .account-mini-grid .dashboard-mini-card,
        .caja-mini-grid .dashboard-mini-card{
            border-right:0;
            border-bottom:1px solid #e3e9ef;
        }
    }

    @media(max-width:760px){
        .payment-steps{
            display:none;
        }

        .compact-metric-strip{
            grid-template-columns:1fr 1fr;
        }

        .payment-period-amount{
            align-items:flex-start;
            flex-direction:column;
        }

        .payment-period-amount small{
            max-width:none;
            text-align:left;
        }

        .cashbox-page .payment-summary{
            align-items:flex-start;
            flex-direction:column;
        }

        .inline-table-filters,
        .history-inline-filters,
        .cashbox-close-row{
            grid-template-columns:1fr;
        }

        .account-month-card{
            grid-template-columns:32px minmax(0,1fr);
        }

        .account-month-badge{
            grid-column:1 / -1;
            grid-row:auto;
            justify-content:flex-start;
        }
    }

    @media(max-width:520px){
        .compact-metric-strip{
            grid-template-columns:1fr;
        }

        .operation-search-row .btn-group,
        .operation-search-row .btn-primary,
        .operation-search-row .btn-secondary{
            width:100%;
        }
    }

}

/* Panel general: resumen operativo compacto */
.dashboard-page .dashboard-hero{
    align-items:flex-start;
    margin-bottom:13px;
}

.dashboard-page .dashboard-hero h1{
    margin-top:4px;
    font-size:34px;
    line-height:1.05;
}

.dashboard-page .dashboard-hero p{
    margin-top:5px;
    font-size:13px;
}

.dashboard-page .dashboard-hero-actions{
    gap:8px;
}

.dashboard-page .dashboard-hero-actions a{
    min-height:38px;
    padding:0 13px;
    border-radius:8px;
    font-size:12px;
}

.dashboard-home-grid.dashboard-main-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:0;
    overflow:hidden;
    margin:0 0 13px;
    border:1px solid #d8e1ea;
    border-radius:11px;
    background:#fff;
    box-shadow:0 7px 18px rgba(23,36,52,.055);
}

.dashboard-home-grid.dashboard-main-grid .dashboard-mini-card{
    min-height:78px;
    margin:0;
    padding:12px 15px;
    border:0;
    border-right:1px solid #dfe6ed;
    border-radius:0;
    box-shadow:none;
    transform:none;
}

.dashboard-home-grid.dashboard-main-grid .dashboard-mini-card:last-child{
    border-right:0;
}

.dashboard-home-grid.dashboard-main-grid .dashboard-mini-card span{
    font-size:11px;
    font-weight:700;
}

.dashboard-home-grid.dashboard-main-grid .dashboard-mini-card strong{
    margin:2px 0;
    font-size:19px;
    line-height:1.15;
}

.dashboard-home-grid.dashboard-main-grid .dashboard-mini-card small{
    margin:0;
    font-size:11px;
    line-height:1.3;
}

.dashboard-home-grid.dashboard-main-grid .dashboard-mini-card > i{
    width:38px;
    height:38px;
    border-radius:9px;
    font-size:17px;
}

.dashboard-alerts.dashboard-alerts-compact{
    margin:0 0 13px;
    padding:12px 14px;
    border:1px solid #d8e1ea;
    border-radius:11px;
    background:#fff;
    box-shadow:0 7px 18px rgba(23,36,52,.05);
}

.dashboard-alerts-compact .dashboard-alerts-header{
    margin-bottom:8px;
}

.dashboard-alerts-compact .dashboard-alerts-header h3{
    font-size:17px;
}

.dashboard-alerts-compact .dashboard-alerts-header p{
    display:none;
}

.dashboard-alerts-compact .dashboard-alerts-header > span{
    min-height:24px;
    padding:4px 8px;
    font-size:10px;
}

.dashboard-alerts-compact .dashboard-alerts-grid{
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:8px;
}

.dashboard-alerts-compact .dashboard-alert-group{
    border-radius:8px;
}

.dashboard-alerts-compact .dashboard-alert-group-title{
    min-height:28px;
    padding:6px 9px;
    font-size:10px;
}

.dashboard-alerts-compact .dashboard-alert-item{
    min-height:52px;
    grid-template-columns:28px minmax(0,1fr) auto;
    gap:8px;
    padding:8px 9px;
}

.dashboard-alerts-compact .dashboard-alert-item > i{
    width:28px;
    height:28px;
    border-radius:7px;
    font-size:12px;
}

.dashboard-alerts-compact .dashboard-alert-item strong{
    font-size:12px;
}

.dashboard-alerts-compact .dashboard-alert-item p{
    margin-top:1px;
    font-size:10px;
    line-height:1.3;
}

.dashboard-alerts-compact .dashboard-alert-item a{
    font-size:10px;
}

.dashboard-workspace.compact-dashboard-workspace{
    display:grid;
    grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);
    gap:13px;
    margin:0;
}

.dashboard-workspace.compact-dashboard-workspace .widget{
    min-width:0;
    padding:14px;
    border:1px solid #d8e1ea;
    border-radius:11px;
    box-shadow:0 7px 18px rgba(23,36,52,.055);
}

.dashboard-workspace .widget-title-row{
    align-items:center;
    margin-bottom:9px;
    padding-bottom:9px;
    border-bottom:1px solid #e5ebf1;
}

.dashboard-workspace .widget-title-row h3{
    font-size:17px;
}

.dashboard-workspace .widget-title-row p{
    margin-top:2px;
    font-size:11px;
}

.dashboard-workspace .widget-title-row a{
    min-height:32px;
    padding:0 10px;
    font-size:11px;
}

.dashboard-workspace .dashboard-table table{
    table-layout:fixed;
    font-size:11px;
}

.dashboard-workspace .dashboard-table th,
.dashboard-workspace .dashboard-table td{
    padding:8px 9px;
    line-height:1.3;
    vertical-align:middle;
}

.dashboard-workspace .btn-compact-action{
    min-height:30px;
    padding:0 9px;
    font-size:10px;
}

@media(max-width:1500px){
    .dashboard-workspace.compact-dashboard-workspace{
        grid-template-columns:1fr;
    }
}

@media(max-width:760px){
    .dashboard-page .dashboard-hero h1{
        font-size:28px;
    }

    .dashboard-home-grid.dashboard-main-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .dashboard-home-grid.dashboard-main-grid .dashboard-mini-card{
        min-height:72px;
        padding:10px 11px;
        border-right:1px solid #dfe6ed;
        border-bottom:1px solid #dfe6ed;
    }

    .dashboard-home-grid.dashboard-main-grid .dashboard-mini-card:nth-child(2n){
        border-right:0;
    }

    .dashboard-alerts-compact .dashboard-alerts-grid{
        grid-template-columns:1fr;
    }

    .dashboard-alerts-compact .dashboard-alert-item{
        grid-template-columns:28px minmax(0,1fr);
    }

    .dashboard-alerts-compact .dashboard-alert-item a{
        grid-column:2;
        justify-self:start;
    }
}


/* Prioridad final del rediseño administrativo */
.config-mini-grid,
.operators-mini-grid,
.periodos-mini-grid,
.audit-mini-grid,
.system-mini-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:0;
    overflow:hidden;
    margin:0 0 14px;
    border:1px solid #d8e1ea;
    border-radius:11px;
    background:#fff;
    box-shadow:0 7px 18px rgba(23,36,52,.055);
}

.config-mini-grid .dashboard-mini-card,
.operators-mini-grid .dashboard-mini-card,
.periodos-mini-grid .dashboard-mini-card,
.audit-mini-grid .dashboard-mini-card,
.system-mini-grid .dashboard-mini-card{
    min-height:78px;
    margin:0;
    padding:12px 15px;
    border:0;
    border-right:1px solid #dfe6ed;
    border-radius:0;
    box-shadow:none;
}

.config-mini-grid .dashboard-mini-card:last-child,
.operators-mini-grid .dashboard-mini-card:last-child,
.periodos-mini-grid .dashboard-mini-card:last-child,
.audit-mini-grid .dashboard-mini-card:last-child,
.system-mini-grid .dashboard-mini-card:last-child{
    border-right:0;
}

.admin-data-card,
.config-form-card,
.operator-form-card,
.operator-side-card,
.operator-account-card,
.periodos-create-card,
.periodos-preview-card,
.periodos-table-card,
.audit-table-card{
    padding:15px 16px;
    border:1px solid #d8e1ea;
    border-radius:11px;
    background:#fff;
    box-shadow:0 7px 18px rgba(23,36,52,.055);
}

.admin-inline-filter{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:9px;
    align-items:end;
    margin:0 0 11px;
    padding:9px;
    border:1px solid #e1e8ef;
    border-radius:9px;
    background:#f8fafc;
}

.admin-inline-filter .operators-filter-grid{
    grid-template-columns:minmax(240px,1fr) 150px 170px;
}

.admin-inline-filter .periodos-form-grid{
    grid-template-columns:repeat(4,minmax(130px,1fr));
}

.admin-inline-filter .audit-filter-grid{
    grid-template-columns:130px 130px minmax(155px,.8fr) minmax(135px,.7fr) minmax(125px,.65fr) 105px minmax(210px,1fr);
}

.admin-inline-filter .operators-filter-grid,
.admin-inline-filter .periodos-form-grid,
.admin-inline-filter .audit-filter-grid{
    gap:7px;
    margin:0;
}

.admin-inline-filter .form-group{
    min-width:0;
    margin:0;
}

.admin-inline-filter label{
    margin-bottom:4px;
    font-size:10px;
}

.admin-inline-filter input,
.admin-inline-filter select{
    min-height:34px;
    padding:7px 9px;
    font-size:11px;
}

.admin-inline-filter .report-filter-actions{
    align-self:end;
    flex-wrap:nowrap;
    margin:0;
}

.admin-inline-filter .report-filter-actions a,
.admin-inline-filter .report-filter-actions button{
    min-height:34px;
    padding:0 11px;
    font-size:11px;
    white-space:nowrap;
}

@media(max-width:1250px){
    .admin-inline-filter{
        grid-template-columns:1fr;
    }

    .admin-inline-filter .audit-filter-grid{
        grid-template-columns:repeat(4,minmax(130px,1fr));
    }
}

@media(max-width:900px){
    .config-mini-grid,
    .operators-mini-grid,
    .periodos-mini-grid,
    .audit-mini-grid,
    .system-mini-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .config-mini-grid .dashboard-mini-card:nth-child(2n),
    .operators-mini-grid .dashboard-mini-card:nth-child(2n),
    .periodos-mini-grid .dashboard-mini-card:nth-child(2n),
    .audit-mini-grid .dashboard-mini-card:nth-child(2n),
    .system-mini-grid .dashboard-mini-card:nth-child(2n){
        border-right:0;
    }

    .admin-inline-filter .audit-filter-grid,
    .admin-inline-filter .operators-filter-grid,
    .admin-inline-filter .periodos-form-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:620px){
    .config-mini-grid,
    .operators-mini-grid,
    .periodos-mini-grid,
    .audit-mini-grid,
    .system-mini-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .config-mini-grid .dashboard-mini-card,
    .operators-mini-grid .dashboard-mini-card,
    .periodos-mini-grid .dashboard-mini-card,
    .audit-mini-grid .dashboard-mini-card,
    .system-mini-grid .dashboard-mini-card{
        min-height:72px;
        padding:10px 11px;
        border-right:1px solid #dfe6ed;
        border-bottom:1px solid #dfe6ed;
    }

    .config-mini-grid .dashboard-mini-card:nth-child(2n),
    .operators-mini-grid .dashboard-mini-card:nth-child(2n),
    .periodos-mini-grid .dashboard-mini-card:nth-child(2n),
    .audit-mini-grid .dashboard-mini-card:nth-child(2n),
    .system-mini-grid .dashboard-mini-card:nth-child(2n){
        border-right:0;
    }

    .admin-inline-filter .audit-filter-grid,
    .admin-inline-filter .operators-filter-grid,
    .admin-inline-filter .periodos-form-grid{
        grid-template-columns:1fr;
    }

    .admin-inline-filter .report-filter-actions,
    .admin-inline-filter .report-filter-actions a,
    .admin-inline-filter .report-filter-actions button{
        width:100%;
    }
}
