:root{
    --apidata-orange:#f28c00;
    --apidata-blue:#1f5fd1;
    --dark:#17212b;
    --dark-2:#22303b;
    --text:#101827;
    --muted:#64748b;
    --border:#e6eaf0;
    --bg:#f7f9fc;
    --white:#ffffff;
}

*{box-sizing:border-box}
body{
    margin:0;
    font-family:"Segoe UI", Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
}

.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#ffffff 0%,#f4f7fb 100%);
}

.login-card{
    width:430px;
    background:rgba(255,255,255,.96);
    border:1px solid var(--border);
    border-radius:18px;
    padding:42px 46px;
    box-shadow:0 18px 55px rgba(15,23,42,.08);
}

.login-logo{text-align:center;margin-bottom:28px}
.login-logo img{max-width:230px;height:auto}
.login-card h1{
    font-size:23px;
    text-align:center;
    margin:0 0 8px;
}
.login-card p{
    text-align:center;
    color:var(--muted);
    margin:0 0 28px;
    font-size:14px;
}

.login-form label{
    display:block;
    font-size:13px;
    color:#334155;
    margin:14px 0 6px;
    font-weight:600;
}

.login-form input,
.login-form select{
    width:100%;
    height:45px;
    border:1px solid #dce3ec;
    border-radius:9px;
    padding:0 14px;
    font-size:14px;
    outline:none;
    background:#fff;
}

.login-form input:focus,
.login-form select:focus{
    border-color:#2f6bea;
    box-shadow:0 0 0 4px rgba(47,107,234,.09);
}

.remember{
    display:flex!important;
    align-items:center;
    gap:8px;
    margin:16px 0!important;
    font-weight:400!important;
}
.remember input{width:16px;height:16px}

.login-form button{
    width:100%;
    height:48px;
    border:0;
    border-radius:9px;
    background:linear-gradient(135deg,#2f6bea,#1f5fd1);
    color:#fff;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    margin-top:8px;
}
.login-form button:hover{filter:brightness(.97)}

.login-footer{
    margin-top:32px;
    padding-top:22px;
    border-top:1px solid var(--border);
    text-align:center;
    color:var(--muted);
    font-size:12px;
    display:flex;
    flex-direction:column;
    gap:5px;
}

.validation-summary{
    color:#b42318;
    background:#fff2f1;
    border:1px solid #ffd6d2;
    padding:10px 12px;
    border-radius:8px;
    margin-bottom:14px;
    font-size:13px;
}

.field-error{
    color:#b42318;
    font-size:12px;
    margin-top:4px;
    display:block;
}

.app-shell{
    min-height:100vh;
    display:flex;
}

.sidebar{
    width:238px;
    min-width:238px;
    background:linear-gradient(180deg,#18232e,#21303b);
    color:white;
    box-shadow:6px 0 25px rgba(15,23,42,.08);
    position:fixed;
    left:0;
    top:0;
    bottom:0;
}

.app-shell.sidebar-collapsed .sidebar{
    width:72px;
    min-width:72px;
}

.app-shell.sidebar-collapsed .sidebar-brand img{
    max-width:46px;
}

.app-shell.sidebar-collapsed .nav-section,
.app-shell.sidebar-collapsed .side-link,
.app-shell.sidebar-collapsed .side-group-title{
    font-size:0;
    justify-content:center;
    padding-left:0;
    padding-right:0;
}

.app-shell.sidebar-collapsed .side-link span,
.app-shell.sidebar-collapsed .side-group-title span{
    font-size:14px;
    width:auto;
}

.app-shell.sidebar-collapsed .side-group .side-sub-link{
    display:none!important;
}

.app-shell.sidebar-collapsed .side-group-title::after{
    display:none;
}

.sidebar-brand{
    height:76px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    border-right:1px solid var(--border);
}
.sidebar-brand img{max-width:155px}

.side-nav{
    padding:18px 10px;
}
.side-link{
    display:flex;
    align-items:center;
    gap:11px;
    height:43px;
    color:#dbe5ef;
    text-decoration:none;
    border-radius:9px;
    padding:0 14px;
    font-size:14px;
    font-weight:600;
    margin-bottom:5px;
}
.side-link span{width:18px;text-align:center}
.side-link:hover{
    background:rgba(255,255,255,.08);
    color:#fff;
}
.side-link.active{
    background:linear-gradient(135deg,#2f6bea,#1f5fd1);
    color:#fff;
}

.main{
    margin-left:238px;
    width:calc(100% - 238px);
    min-height:100vh;
}

.app-shell.sidebar-collapsed .main{
    margin-left:72px;
    width:calc(100% - 72px);
}

.topbar{
    height:76px;
    background:#fff;
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    padding:0 28px;
    gap:22px;
    position:sticky;
    top:0;
    z-index:10;
}

.menu-button{
    border:0;
    background:transparent;
    font-size:24px;
    color:#334155;
    cursor:pointer;
}

.topbar-logo img{height:38px}

.session-info{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:30px;
}

.session-item{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:150px;
}
.session-icon{
    font-size:21px;
    opacity:.8;
}
.session-item small{
    display:block;
    font-size:11px;
    color:var(--muted);
    line-height:1.1;
}
.session-item strong{
    display:block;
    font-size:13px;
    color:#0f172a;
    max-width:210px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.logout-button{
    border:1px solid #dce3ec;
    background:#fff;
    color:#334155;
    border-radius:8px;
    padding:9px 14px;
    cursor:pointer;
    font-weight:600;
}
.logout-button:hover{background:#f8fafc}

.content{
    padding:30px 36px;
}

.page-title h1{
    margin:0 0 4px;
    font-size:24px;
}
.page-title p{
    margin:0 0 24px;
    color:var(--muted);
}

.kpi-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(170px,1fr));
    gap:18px;
    margin-bottom:22px;
}

.kpi-card{
    min-height:126px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    padding:22px;
    display:flex;
    align-items:center;
    gap:18px;
    box-shadow:0 8px 24px rgba(15,23,42,.04);
}

.kpi-icon{
    width:58px;
    height:58px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    font-weight:800;
}
.kpi-icon.blue{background:#eaf1ff;color:#1f5fd1}
.kpi-icon.green{background:#e9f9f0;color:#17985b}
.kpi-icon.orange{background:#fff2dc;color:#f28c00}
.kpi-icon.purple{background:#f2eaff;color:#8750d7}

.kpi-card span{
    color:#607086;
    font-size:14px;
    display:block;
}
.kpi-card strong{
    font-size:31px;
    color:#1f5fd1;
    display:block;
    margin:4px 0;
}
.kpi-card small{font-size:13px;color:#0f172a}
.green-text{color:#17985b!important}
.orange-text{color:#f28c00!important}
.purple-text{color:#8750d7!important}

.panel-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    padding:22px;
    box-shadow:0 8px 24px rgba(15,23,42,.04);
}

.panel-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:14px;
}
.panel-header h2{
    font-size:18px;
    margin:0;
}
.panel-header button{
    border:1px solid #dbe5ef;
    background:#fff;
    color:#1f5fd1;
    border-radius:8px;
    padding:8px 12px;
    font-weight:700;
    cursor:pointer;
}

.activity-table{
    width:100%;
    border-collapse:collapse;
    font-size:14px;
}
.activity-table th{
    text-align:left;
    color:#334155;
    font-size:13px;
    padding:11px 8px;
    border-bottom:1px solid var(--border);
}
.activity-table td{
    padding:12px 8px;
    border-bottom:1px solid #edf1f5;
    color:#1f2937;
}
.activity-table tr:last-child td{border-bottom:0}

@media(max-width:1100px){
    .kpi-grid{grid-template-columns:repeat(2,1fr)}
    .session-info{gap:14px}
    .session-item{min-width:auto}
}

@media(max-width:850px){
    .sidebar{display:none}
    .main{margin-left:0;width:100%}
    .session-info{display:none}
    .login-card{width:92%;padding:34px 26px}
    .kpi-grid{grid-template-columns:1fr}
}


.nav-section{
    color:#8da0b3;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.08em;
    padding:16px 14px 6px;
    font-weight:800;
}

.module-alert{
    background:#fff8e8;
    border:1px solid #ffe1a8;
    color:#6f4b00;
    padding:13px 16px;
    border-radius:12px;
    margin-bottom:20px;
    font-size:14px;
}

.module-alert span{
    color:#855f07;
}

.attach-kpis{
    margin-bottom:20px;
}

.filter-panel{
    margin-bottom:22px;
}

.filter-grid{
    display:grid;
    grid-template-columns:repeat(5, minmax(150px, 1fr)) 130px;
    gap:14px;
    align-items:end;
}

.filter-grid label{
    display:block;
    font-size:12px;
    font-weight:700;
    color:#475569;
    margin-bottom:6px;
}

.filter-grid input,
.filter-grid select{
    width:100%;
    height:42px;
    border:1px solid #dce3ec;
    border-radius:9px;
    padding:0 12px;
    background:#fff;
    color:#0f172a;
    outline:none;
}

.filter-grid input:focus,
.filter-grid select:focus{
    border-color:#2f6bea;
    box-shadow:0 0 0 4px rgba(47,107,234,.08);
}

.filter-actions button{
    width:100%;
    height:42px;
    border:0;
    border-radius:9px;
    background:linear-gradient(135deg,#2f6bea,#1f5fd1);
    color:#fff;
    font-weight:800;
    cursor:pointer;
}

.table-responsive{
    width:100%;
    overflow-x:auto;
}

.attach-table{
    min-width:1180px;
}

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

.attach-count{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:32px;
    height:28px;
    border-radius:8px;
    background:#eef4ff;
    color:#1f5fd1;
    font-weight:800;
}

.status-badge{
    display:inline-flex;
    align-items:center;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}

.badge-ok{
    color:#137a47;
    background:#e9f9f0;
}

.badge-warn{
    color:#a15c00;
    background:#fff2dc;
}

.small-button{
    border:1px solid #dce3ec;
    background:#f8fafc;
    color:#94a3b8;
    border-radius:8px;
    padding:8px 10px;
    font-weight:700;
    cursor:not-allowed;
}

@media(max-width:1200px){
    .filter-grid{
        grid-template-columns:repeat(2, 1fr);
    }

    .filter-search{
        grid-column:span 2;
    }
}

/* Tema ApiData - opcion 1 oscura corporativa */
.sidebar{
    background:#1f2a33!important;
    color:#f5f7fa!important;
}
.sidebar-brand{
    background:#fff!important;
    border-right:1px solid #d8e0ea!important;
}
.nav-section{
    color:#9aa8b6!important;
    font-weight:800!important;
    text-transform:uppercase!important;
    letter-spacing:.08em!important;
}
.side-link,
.side-link-button,
.side-group-title{
    color:#f5f7fa!important;
}
.side-link span,
.side-group-title span{
    color:#f5f7fa!important;
}
.side-link:hover,
.side-link-button:hover,
.side-group-title:hover{
    background:#34424d!important;
    color:#fff!important;
}
.side-link.active{
    background:#2d3a44!important;
    color:#fff!important;
    box-shadow:inset 4px 0 0 #f28c00!important;
}
.side-group.active,
.side-group.open{
    background:#2d3a44!important;
}
.side-group.active .side-group-title,
.side-group.open .side-group-title{
    color:#fff!important;
}
.side-sub-link{
    color:#d8dee6!important;
}
.side-sub-link:hover{
    background:#34424d!important;
    color:#fff!important;
}
.side-sub-link.active{
    background:#3a4650!important;
    color:#fff!important;
    box-shadow:inset 4px 0 0 #f28c00!important;
}
.side-group-title::after{
    color:#aeb8c2!important;
}

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

    .filter-search{
        grid-column:auto;
    }
}


/* MÃ³dulo Adjuntar - estructura tipo formulario original, visual actual */
.side-group{
    margin:4px 10px;
    border-radius:12px;
    padding:6px 0;
    color:#dbe7f3;
}
.side-group.active{background:rgba(255,255,255,.08)}
.side-group-title{padding:9px 12px;font-size:14px;font-weight:800}
.side-group-title span{display:inline-block;width:22px}
.side-sub-link{
    display:block;
    color:#eaf2fb;
    text-decoration:none;
    padding:8px 14px 8px 42px;
    font-size:13px;
    border-radius:8px;
    margin:1px 6px;
}
.side-sub-link:hover{background:rgba(255,255,255,.10)}
.side-sub-link.disabled{opacity:.55;pointer-events:none}

.ce-window{
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:0 12px 36px rgba(15,23,42,.07);
    min-height:720px;
    overflow:hidden;
}
.ce-titlebar{
    height:54px;
    background:#fff;
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    gap:10px;
    padding:0 18px;
    color:#0f172a;
    font-size:18px;
}
.ce-icon{
    background:linear-gradient(135deg,#f28c00,#d97706);
    color:white;
    font-size:12px;
    font-weight:800;
    padding:4px 6px;
    border-radius:6px;
}
.attach-form-original{padding:0;background:#f8fafc}
.attach-toolbar{
    height:42px;
    background:#f8fafc;
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    gap:12px;
    padding:0 18px;
    color:#1f5fd1;
    font-weight:700;
}
.attach-toolbar input{
    width:70px;
    border:1px solid #dce3ec;
    background:#fff;
    height:28px;
    color:#0f172a;
    border-radius:7px;
    padding:0 8px;
}
.attach-body-original{
    display:grid;
    grid-template-columns:minmax(520px,49%) 1fr;
    gap:28px;
    padding:24px;
}
.attach-left-original,
.attach-right-original{min-width:0}
.attach-filters-original{
    display:flex;
    gap:70px;
    margin-bottom:14px;
    font-size:15px;
    color:#0f172a;
    font-weight:600;
}
.attach-filters-original input{
    width:18px;
    height:18px;
    vertical-align:middle;
    accent-color:#1f5fd1;
}
.attach-search-row-original{
    display:grid;
    grid-template-columns:minmax(150px,1fr) 140px 140px 155px 42px;
    gap:8px;
    align-items:center;
    margin-bottom:12px;
}
.attach-search-row-original input,
.attach-search-row-original select{
    height:36px;
    border:1px solid #dce3ec;
    background:white;
    font-size:14px;
    border-radius:8px;
    padding:0 10px;
    outline:none;
}
.attach-search-row-original input:focus,
.attach-search-row-original select:focus{
    border-color:#2f6bea;
    box-shadow:0 0 0 4px rgba(47,107,234,.08);
}
.btn-search-original{
    height:36px;
    border:0;
    background:linear-gradient(135deg,#2f6bea,#1f5fd1);
    color:white;
    border-radius:8px;
    cursor:pointer;
    font-weight:800;
}
.attach-list-original{
    height:560px;
    background:white;
    border:1px solid var(--border);
    border-radius:12px;
    overflow:auto;
    box-shadow:0 8px 22px rgba(15,23,42,.04);
}
.attach-list-original table{width:100%;border-collapse:collapse;font-size:13px}
.attach-list-original th{
    position:sticky;
    top:0;
    z-index:1;
    background:#f8fafc;
    color:#334155;
    font-weight:800;
    border-bottom:1px solid var(--border);
    text-align:left;
    padding:10px 9px;
    white-space:nowrap;
}
.attach-list-original td{
    border-bottom:1px solid #edf1f5;
    text-align:left;
    padding:9px;
    white-space:nowrap;
    color:#1f2937;
}
.attach-list-original tr:hover{background:#f1f5f9}
.attach-right-original fieldset{
    border:1px solid var(--border);
    background:white;
    border-radius:14px;
    min-height:545px;
    padding:24px 18px 16px;
    box-shadow:0 8px 22px rgba(15,23,42,.04);
}
.attach-right-original legend{
    font-size:16px;
    padding:0 10px;
    font-weight:800;
    color:#0f172a;
}
.form-grid-original{
    display:grid;
    grid-template-columns:100px minmax(170px,1fr) 135px 170px;
    gap:10px 12px;
    align-items:center;
    font-size:14px;
}
.form-grid-original label,
.form-grid-bottom-original label{font-weight:600;color:#0f172a}
.form-grid-original input,
.form-grid-bottom-original input,
.form-grid-bottom-original select{
    height:34px;
    border:1px solid #dce3ec;
    background:#f8fafc;
    font-size:14px;
    padding:2px 10px;
    border-radius:8px;
    color:#0f172a;
}
.form-grid-original input.wide{width:100%}
.attach-detail-box-original{
    height:230px;
    border:1px solid var(--border);
    background:#f8fafc;
    border-radius:12px;
    margin:26px 0 10px;
}
.form-grid-bottom-original{
    display:grid;
    grid-template-columns:145px minmax(170px,1fr) 120px 150px;
    gap:10px 12px;
    align-items:center;
    font-size:14px;
}
.attach-actions-original{margin-top:20px;padding-left:55px}
.attach-actions-original button{
    height:38px;
    min-width:120px;
    border:1px solid #dce3ec;
    background:#eef2f7;
    color:#94a3b8;
    border-radius:9px;
    font-size:14px;
    font-weight:700;
}
.attach-error{
    border:1px solid #fecaca;
    background:#fef2f2;
    color:#991b1b;
    padding:11px 12px;
    margin-bottom:12px;
    border-radius:10px;
    font-size:13px;
    line-height:1.35;
}
@media(max-width:1200px){
    .attach-body-original{grid-template-columns:1fr}
}
@media(max-width:850px){
    .attach-search-row-original{grid-template-columns:1fr 1fr}
    .form-grid-original,.form-grid-bottom-original{grid-template-columns:140px 1fr}
}

/* Adjuntar v3: sin barra de navegaciÃ³n, con detalle al seleccionar documento */
.attach-modern-window{background:#fff;border-radius:18px;box-shadow:0 18px 50px rgba(15,23,42,.08);border:1px solid #e7edf5;overflow:hidden}.attach-modern-title{display:flex;align-items:center;gap:14px;padding:22px 24px;border-bottom:1px solid #edf2f7}.attach-modern-title h1{font-size:24px;margin:0;color:#0f172a}.attach-modern-title p{margin:2px 0 0;color:#64748b;font-size:13px}.attach-modern-form{padding:0}.attach-modern-body{display:grid;grid-template-columns:minmax(620px,1.1fr) minmax(540px,.9fr);gap:26px;padding:26px;background:#f8fafc}.attach-modern-filters{display:flex;gap:42px;margin-bottom:18px}.check-line{display:flex;align-items:center;gap:8px;font-weight:700;color:#0f172a}.check-line input{width:22px;height:22px;accent-color:#2563eb}.attach-modern-search{display:grid;grid-template-columns:1.05fr 185px 185px 190px 52px;gap:10px;margin-bottom:14px}.attach-modern-search input,.attach-modern-search select,.form-grid-modern input,.form-grid-bottom-modern input,.form-grid-bottom-modern select{height:46px;border:1px solid #d8e1ec;border-radius:10px;background:#fff;padding:0 14px;font-size:15px;color:#0f172a}.attach-btn-search{height:46px;border:0;border-radius:10px;background:#111827;color:#fff;font-size:18px;cursor:pointer}.attach-count{font-size:13px;color:#64748b;margin:0 0 8px}.attach-modern-list{background:#fff;border:1px solid #e2e8f0;border-radius:14px;overflow:auto;height:470px}.attach-modern-list table{width:100%;border-collapse:collapse}.attach-modern-list th{position:sticky;top:0;background:#f1f5f9;text-align:left;color:#0f172a;font-size:14px;padding:14px 12px;border-bottom:1px solid #e2e8f0}.attach-modern-list td{padding:13px 12px;border-bottom:1px solid #eef2f7;color:#10233f;font-size:14px;white-space:nowrap}.attach-modern-list td:nth-child(3){white-space:normal;min-width:260px}.attach-row{cursor:pointer}.attach-row:hover,.attach-row.active{background:#eaf2ff}.attach-modern-right fieldset{border:1px solid #dbe5f0;border-radius:16px;background:#fff;padding:28px 24px 18px}.attach-modern-right legend{padding:0 12px;font-size:21px;font-weight:800;color:#0f172a}.form-grid-modern{display:grid;grid-template-columns:120px 1fr 135px 1fr;gap:14px 14px;align-items:center}.form-grid-modern label,.form-grid-bottom-modern label{font-weight:600;color:#0f172a}.form-grid-modern input,.form-grid-bottom-modern input{background:#f8fafc}.attach-detail-box-modern{margin:24px 0 18px}.attach-detail-box-modern textarea{width:100%;height:210px;border:1px solid #dbe5f0;border-radius:14px;background:#f8fafc;padding:14px;resize:none;color:#0f172a;font-size:14px;line-height:1.5}.form-grid-bottom-modern{display:grid;grid-template-columns:130px 1fr 110px 1fr;gap:10px 12px;align-items:center}.attach-actions-modern{margin-top:18px}.attach-actions-modern button{height:40px;border:1px solid #cbd5e1;border-radius:8px;background:#f1f5f9;color:#94a3b8;padding:0 20px}.attach-error{background:#fff1f2;border:1px solid #fecdd3;color:#9f1239;border-radius:10px;padding:10px 12px;margin-bottom:12px;font-size:13px}@media(max-width:1300px){.attach-modern-body{grid-template-columns:1fr}.attach-modern-search{grid-template-columns:1fr 1fr}.attach-btn-search{grid-column:span 2}.form-grid-modern,.form-grid-bottom-modern{grid-template-columns:130px 1fr}}

/* Ajustes v8 - Adjuntar */
.attach-modern-window.no-doc-nav .attach-modern-title.compact{padding:18px 24px}
.attach-modern-window.no-doc-nav .attach-modern-title.compact h1{font-size:22px}
.attach-modern-window.no-doc-nav .attach-modern-title.compact p{font-size:13px}
.attach-modern-search.no-type-combo{grid-template-columns:1.25fr 185px 185px 52px}
.attach-modern-body{align-items:start}
.attach-modern-right{min-width:0;overflow:visible}
.attach-modern-right fieldset{min-width:0}
.attach-detail-box-modern.lines-box{height:230px;overflow:auto;border:1px solid #dbe5f0;border-radius:14px;background:#f8fafc;margin:24px 0 18px}
.detail-lines-table{width:100%;border-collapse:collapse;font-size:13px}
.detail-lines-table th{position:sticky;top:0;background:#eef4fb;color:#0f172a;text-align:left;padding:10px 8px;border-bottom:1px solid #dbe5f0;white-space:nowrap}
.detail-lines-table td{padding:9px 8px;border-bottom:1px solid #e5edf5;color:#10233f;vertical-align:top}
.detail-lines-table td:nth-child(3){min-width:220px}
.empty-detail{text-align:center;color:#64748b;padding:30px 8px!important}
.side-sub-link.active{color:#fff!important;font-weight:800;background:rgba(255,255,255,.08);border-radius:10px}
@media(max-width:1300px){.attach-modern-search.no-type-combo{grid-template-columns:1fr 1fr}.attach-modern-search.no-type-combo .attach-btn-search{grid-column:span 2}}

/* v10 - Modo compacto para pantallas grandes: reduce fuentes, espacios y evita scroll horizontal */
@media (min-width: 1100px){
    .sidebar{width:220px;min-width:220px}
    .main{margin-left:220px;width:calc(100% - 220px)}
    .sidebar-brand{height:64px}
    .sidebar-brand img{max-width:142px}
    .side-nav{padding:12px 8px}
    .side-link{height:34px;font-size:12px;padding:0 10px;margin-bottom:3px}
    .side-group{margin:4px 7px;border-radius:10px;padding:5px 0}
    .side-group-title{padding:7px 10px;font-size:12px;line-height:1.25}
    .side-sub-link{font-size:12px;padding:6px 10px 6px 34px;margin:1px 5px}

    .topbar{height:58px;padding:0 20px;gap:16px}
    .topbar-logo img{height:30px}
    .menu-button{font-size:20px}
    .session-info{gap:20px}
    .session-item{min-width:125px;gap:7px}
    .session-icon{font-size:18px}
    .session-item small{font-size:10px}
    .session-item strong{font-size:12px;max-width:185px}
    .logout-button{padding:7px 12px;font-size:12px}
    .content{padding:14px 18px}

    .attach-modern-window{border-radius:12px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
    .attach-modern-window.no-doc-nav .attach-modern-title.compact{padding:10px 16px}
    .attach-modern-window.no-doc-nav .attach-modern-title.compact h1{font-size:18px}
    .attach-modern-window.no-doc-nav .attach-modern-title.compact p{display:none}
    .ce-icon{font-size:11px;padding:3px 5px;border-radius:5px}

    .attach-modern-body{
        grid-template-columns:minmax(600px, 48%) minmax(620px, 52%);
        gap:14px;
        padding:14px;
        min-height:calc(100vh - 105px);
    }

    .attach-modern-filters{gap:34px;margin-bottom:10px}
    .check-line{font-size:13px;gap:6px}
    .check-line input{width:17px;height:17px}
    .attach-modern-search.no-type-combo{grid-template-columns:1fr 150px 150px 42px;gap:7px;margin-bottom:8px}
    .attach-modern-search input,
    .attach-modern-search select,
    .form-grid-modern input,
    .form-grid-bottom-modern input,
    .form-grid-bottom-modern select{
        height:32px;
        border-radius:7px;
        padding:0 9px;
        font-size:12px;
    }
    .attach-btn-search{height:32px;border-radius:7px;font-size:14px}
    .attach-count{font-size:11px;margin:0 0 5px}

    .attach-modern-list{height:calc(100vh - 255px);min-height:430px;border-radius:9px}
    .attach-modern-list table{font-size:12px}
    .attach-modern-list th{font-size:12px;padding:8px 8px}
    .attach-modern-list td{font-size:12px;padding:7px 8px}
    .attach-modern-list td:nth-child(3){min-width:230px;max-width:330px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

    .attach-modern-right fieldset{border-radius:12px;padding:12px 14px 12px;min-height:calc(100vh - 133px)}
    .attach-modern-right legend{font-size:16px;padding:0 8px}
    .form-grid-modern{grid-template-columns:88px 1fr 112px 1fr;gap:8px 9px;font-size:12px}
    .form-grid-modern label,
    .form-grid-bottom-modern label{font-size:12px;font-weight:700}

    .attach-detail-box-modern.lines-box{height:calc(100vh - 500px);min-height:160px;margin:12px 0 10px;border-radius:9px}
    .detail-lines-table{font-size:11px}
    .detail-lines-table th{padding:7px 6px;font-size:11px}
    .detail-lines-table td{padding:6px 6px;font-size:11px}
    .detail-lines-table td:nth-child(3){min-width:180px;max-width:260px}

    .form-grid-bottom-modern{grid-template-columns:112px 1fr 88px 1fr;gap:7px 9px;font-size:12px}
    .attach-actions-modern{margin-top:9px}
    .attach-actions-modern button{height:32px;padding:0 16px;font-size:12px}
}

/* v10 - En resoluciones medianas se apila, pero sin reventar horizontalmente */
@media (max-width: 1390px){
    .attach-modern-body{grid-template-columns:1fr}
    .attach-modern-list{height:360px}
    .attach-modern-right fieldset{min-height:auto}
}

/* v11 - Ajuste fino: evita desbordes horizontales y recupera tÃ­tulos/counters visibles */
@media (min-width: 1100px){
    html, body{overflow-x:hidden}
    .content{padding:10px 14px}
    .attach-modern-window.no-doc-nav{overflow:visible;max-width:100%}
    .attach-modern-window.no-doc-nav .attach-modern-title.compact{
        min-height:42px;
        padding:8px 14px;
        overflow:visible;
        display:flex;
        align-items:center;
    }
    .attach-modern-window.no-doc-nav .attach-modern-title.compact h1{font-size:17px;line-height:1.1;white-space:nowrap}
    .attach-modern-window.no-doc-nav .attach-modern-title.compact p{display:block;font-size:10px;line-height:1.1;white-space:nowrap;max-width:520px;overflow:hidden;text-overflow:ellipsis}
    .attach-modern-body{
        grid-template-columns:minmax(0,46%) minmax(0,54%);
        gap:10px;
        padding:10px;
        overflow:hidden;
    }
    .attach-modern-left,.attach-modern-right{min-width:0;max-width:100%;overflow:hidden}
    .attach-count{
        display:block;
        width:100%;
        color:#475569;
        font-size:11px;
        line-height:1.2;
        margin:0 0 4px;
        white-space:normal;
        overflow:visible;
        padding-left:0;
    }
    .attach-modern-list{width:100%;overflow:auto;height:calc(100vh - 236px);min-height:405px}
    .attach-modern-list td:nth-child(3){min-width:180px;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .attach-modern-right fieldset{padding:10px 12px;min-height:calc(100vh - 118px);overflow:hidden}
    .attach-modern-right legend{font-size:15px;line-height:1;padding:0 8px}
    .form-grid-modern{grid-template-columns:82px minmax(0,1fr) 108px minmax(0,1fr);gap:6px 8px}
    .form-grid-bottom-modern{grid-template-columns:105px minmax(0,1fr) 80px minmax(0,1fr);gap:6px 8px}
    .attach-detail-box-modern.lines-box{height:calc(100vh - 470px);min-height:180px;margin:10px 0 8px}
}


/* v13 - MenÃº tipo acordeÃ³n: solo se expande la categorÃ­a activa */
.side-group .side-sub-link{display:none;}
.side-group.active .side-sub-link{display:block;}
.side-group:not(.active){background:transparent;padding-bottom:4px;}
.side-group:not(.active) .side-group-title{opacity:.92;cursor:pointer;}
.side-group.active .side-group-title{color:#fff;}
.side-group-title::after{content:">";float:right;opacity:.65;font-size:11px;margin-top:2px;}
.side-group.active .side-group-title::after{content:"v";}
@media (min-width: 1100px){
    .side-group-title{font-size:12px;}
    .side-sub-link{font-size:12px;}
}

/* v14 real - MenÃº acordeÃ³n funcional */
.side-group-title{
    width:100%;
    border:0;
    background:transparent;
    color:#dbe7f3;
    text-align:left;
    display:block;
    cursor:pointer;
    font-family:inherit;
}
.side-group-title:hover{background:rgba(255,255,255,.07);border-radius:9px;color:#fff}
.side-group .side-sub-link{display:none!important;}
.side-group.open .side-sub-link,
.side-group.active .side-sub-link{display:block!important;}
.side-group:not(.open):not(.active){background:transparent;padding-bottom:4px;}
.side-group.open{background:rgba(255,255,255,.08)}
.side-group-title::after{content:">";float:right;opacity:.65;font-size:11px;margin-top:2px;}
.side-group.open .side-group-title::after,
.side-group.active .side-group-title::after{content:"v";}
.side-group.open .side-group-title,
.side-group.active .side-group-title{color:#fff;}

/* v15 carga XML/PDF */
.attach-success,
.attach-warning {
    margin: 6px 0;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 11px;
}
.attach-success {
    background: #e8f7ef;
    color: #145c32;
    border: 1px solid #a7e0bd;
}
.attach-warning {
    background: #fff8e5;
    color: #805200;
    border: 1px solid #f3d58b;
}
.attach-upload-panel {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #f8fafc;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.upload-row {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 6px;
    align-items: center;
    font-size: 11px;
}
.upload-row input[type=file] {
    font-size: 11px;
    max-width: 100%;
}
.upload-row select {
    width: 100%;
    min-width: 0;
    height: 30px;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #fff;
    padding: 0 8px;
    color: #334155;
    font-family: inherit;
    font-size: 11px;
    font-weight: 400;
    line-height: normal;
}
.upload-row select option {
    font-family: inherit;
    font-size: 11px;
    font-weight: 400;
}
.attach-btn-primary {
    background: #f28c00 !important;
    color: #fff !important;
    border: 1px solid #d87900 !important;
    border-radius: 8px !important;
    box-shadow: inset 0 -1px 0 rgba(15,23,42,.12);
}
.attach-btn-primary:hover{background:#df7f00!important}

/* v16 - moneda MXP->MXN, carga de archivos compacta y altura de detalle alineada */
.upload-row input[type=file] {
    height: 30px;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #fff;
    padding: 3px 6px;
    color: #334155;
}
.upload-row input[type=file]::file-selector-button {
    height: 22px;
    margin-right: 8px;
    border: 0;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 0 10px;
    cursor: pointer;
}
.upload-row input[type=file]::file-selector-button:hover {
    background: #1f2937;
}
.attach-upload-panel {
    align-items: center;
}
@media (min-width: 1100px){
    .attach-modern-window.no-doc-nav .attach-modern-body{
        align-items: stretch;
    }
    .attach-modern-window.no-doc-nav .attach-modern-right fieldset{
        height: calc(100vh - 236px);
        min-height: 405px;
        overflow: auto;
        display: flex;
        flex-direction: column;
    }
    .attach-modern-window.no-doc-nav .attach-detail-box-modern.lines-box{
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        margin: 8px 0;
    }
    .attach-modern-window.no-doc-nav .form-grid-modern,
    .attach-modern-window.no-doc-nav .form-grid-bottom-modern,
    .attach-modern-window.no-doc-nav .attach-upload-panel,
    .attach-modern-window.no-doc-nav .attach-actions-modern{
        flex: 0 0 auto;
    }
}

/* v17 - Consola inferior fija y campos de detalle mÃ¡s compactos */
.notification-seeds{display:none!important}
.ce-notification-console{
    position:fixed;
    left:220px;
    right:0;
    bottom:0;
    height:118px;
    background:#0f172a;
    color:#e5edf7;
    border-top:1px solid rgba(255,255,255,.18);
    box-shadow:0 -10px 28px rgba(15,23,42,.22);
    z-index:30;
    display:flex;
    flex-direction:column;
    font-size:11px;
}
.ce-notification-console.collapsed{height:30px}
.ce-notification-console.collapsed .ce-notification-list{display:none}
.ce-notification-header{
    height:30px;
    min-height:30px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 12px;
    background:#111c2b;
    font-weight:800;
    letter-spacing:.02em;
}
.ce-notification-actions{display:flex;gap:6px}
.ce-notification-actions button{
    height:22px;
    border:1px solid rgba(255,255,255,.20);
    border-radius:6px;
    background:#1e293b;
    color:#e5edf7;
    font-size:10px;
    padding:0 8px;
    cursor:pointer;
}
.ce-notification-actions button:hover{background:#334155}
.ce-notification-list{
    overflow:auto;
    padding:5px 8px 7px;
    display:flex;
    flex-direction:column;
    gap:4px;
}
.ce-notification-item{
    display:grid;
    grid-template-columns:64px 82px minmax(0,1fr);
    gap:7px;
    align-items:start;
    padding:4px 7px;
    border-radius:6px;
    background:rgba(255,255,255,.05);
    line-height:1.25;
}
.ce-notification-item.ok{border-left:3px solid #22c55e}
.ce-notification-item.warn{border-left:3px solid #f59e0b}
.ce-notification-item.error{border-left:3px solid #ef4444}
.ce-notification-time{color:#94a3b8;font-variant-numeric:tabular-nums}
.ce-notification-type{font-weight:800}
.ce-notification-item.ok .ce-notification-type{color:#86efac}
.ce-notification-item.warn .ce-notification-type{color:#fcd34d}
.ce-notification-item.error .ce-notification-type{color:#fca5a5}
.ce-notification-text{white-space:normal;overflow-wrap:anywhere}
.ce-notification-empty{color:#94a3b8;padding:8px 7px}

@media (min-width: 1100px){
    body{padding-bottom:118px}
    .content{padding-bottom:126px}
    .attach-modern-window.no-doc-nav .attach-modern-body{
        min-height:calc(100vh - 224px);
    }
    .attach-modern-window.no-doc-nav .attach-modern-list{
        height:calc(100vh - 350px);
        min-height:350px;
    }
    .attach-modern-window.no-doc-nav .attach-modern-right fieldset{
        height:calc(100vh - 350px);
        min-height:350px;
        padding:8px 10px;
    }
    .attach-modern-window.no-doc-nav .form-grid-modern{
        grid-template-columns:74px minmax(0,1fr) 94px minmax(0,1fr);
        gap:5px 7px;
        font-size:11px;
    }
    .attach-modern-window.no-doc-nav .form-grid-bottom-modern{
        grid-template-columns:96px minmax(0,1fr) 72px minmax(0,1fr);
        gap:5px 7px;
        font-size:11px;
    }
    .attach-modern-window.no-doc-nav .form-grid-modern input,
    .attach-modern-window.no-doc-nav .form-grid-bottom-modern input{
        height:28px;
        padding:0 8px;
        font-size:11px;
        border-radius:7px;
    }
    .attach-modern-window.no-doc-nav .form-grid-modern label,
    .attach-modern-window.no-doc-nav .form-grid-bottom-modern label{
        font-size:11px;
        line-height:1.1;
    }
    .attach-modern-window.no-doc-nav .attach-detail-box-modern.lines-box{
        margin:6px 0;
        min-height:115px;
    }
    .attach-upload-panel{
        padding:6px;
        gap:6px;
        border-radius:8px;
    }
    .upload-row{grid-template-columns:62px 1fr;font-size:10px}
    .upload-row input[type=file]{height:28px;font-size:10px}
    .attach-actions-modern{margin-top:7px}
    .attach-actions-modern button{height:30px;font-size:11px}
}
@media (max-width:1099px){
    .ce-notification-console{left:0;height:120px}
    body{padding-bottom:120px}
}

/* v18 - Barra de notificaciones mÃ­nima y campos ultra compactos */
@media (min-width: 1100px){
    body{padding-bottom:38px!important;}
    .content{padding-bottom:44px!important;}
    .ce-notification-console{
        left:220px!important;
        height:38px!important;
        min-height:38px!important;
        display:grid!important;
        grid-template-columns:170px minmax(0,1fr)!important;
        grid-template-rows:38px!important;
        align-items:center!important;
        font-size:10px!important;
        overflow:hidden!important;
    }
    .ce-notification-console.expanded{
        height:118px!important;
        grid-template-columns:1fr!important;
        grid-template-rows:30px 1fr!important;
        align-items:stretch!important;
    }
    .ce-notification-header{
        height:38px!important;
        min-height:38px!important;
        padding:0 8px!important;
        gap:8px!important;
        justify-content:flex-start!important;
        white-space:nowrap!important;
    }
    .ce-notification-console.expanded .ce-notification-header{
        height:30px!important;
        min-height:30px!important;
        justify-content:space-between!important;
    }
    .ce-notification-actions{margin-left:auto!important;gap:4px!important;}
    .ce-notification-actions button{
        height:20px!important;
        border-radius:5px!important;
        font-size:9px!important;
        padding:0 6px!important;
    }
    .ce-notification-list{
        padding:0 8px!important;
        overflow:hidden!important;
        display:block!important;
        min-width:0!important;
    }
    .ce-notification-console.expanded .ce-notification-list{
        padding:5px 8px 7px!important;
        overflow:auto!important;
        display:flex!important;
        flex-direction:column!important;
        gap:4px!important;
    }
    .ce-notification-item{
        grid-template-columns:54px 70px minmax(0,1fr)!important;
        gap:6px!important;
        padding:3px 6px!important;
        min-height:26px!important;
        line-height:1.1!important;
        align-items:center!important;
        white-space:nowrap!important;
        overflow:hidden!important;
    }
    .ce-notification-list .ce-notification-item:not(:first-child){display:none!important;}
    .ce-notification-console.expanded .ce-notification-list .ce-notification-item{display:grid!important;white-space:normal!important;}
    .ce-notification-text{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
    .ce-notification-console.expanded .ce-notification-text{white-space:normal!important;overflow-wrap:anywhere!important;}
    .ce-notification-empty{padding:6px 7px!important;}

    .attach-modern-window.no-doc-nav .attach-modern-body{min-height:calc(100vh - 144px)!important;}
    .attach-modern-window.no-doc-nav .attach-modern-list{height:calc(100vh - 270px)!important;min-height:390px!important;}
    .attach-modern-window.no-doc-nav .attach-modern-right fieldset{
        height:calc(100vh - 270px)!important;
        min-height:390px!important;
        padding:6px 8px!important;
    }
    .attach-modern-window.no-doc-nav .form-grid-modern{
        grid-template-columns:68px minmax(0,1fr) 88px minmax(0,1fr)!important;
        gap:4px 6px!important;
        font-size:10px!important;
    }
    .attach-modern-window.no-doc-nav .form-grid-bottom-modern{
        grid-template-columns:88px minmax(0,1fr) 66px minmax(0,1fr)!important;
        gap:4px 6px!important;
        font-size:10px!important;
    }
    .attach-modern-window.no-doc-nav .form-grid-modern input,
    .attach-modern-window.no-doc-nav .form-grid-bottom-modern input{
        height:23px!important;
        min-height:23px!important;
        padding:0 6px!important;
        font-size:10px!important;
        border-radius:6px!important;
        line-height:23px!important;
    }
    .attach-modern-window.no-doc-nav .form-grid-modern label,
    .attach-modern-window.no-doc-nav .form-grid-bottom-modern label{
        font-size:10px!important;
        line-height:1!important;
    }
    .attach-modern-window.no-doc-nav .attach-detail-box-modern.lines-box{margin:5px 0!important;}
    .attach-upload-panel{padding:5px!important;gap:5px!important;}
    .upload-row{grid-template-columns:55px 1fr!important;font-size:9px!important;}
    .upload-row input[type=file]{height:24px!important;font-size:9px!important;padding:2px 5px!important;}
    .upload-row input[type=file]::file-selector-button{height:18px!important;font-size:9px!important;padding:0 7px!important;}
    .attach-actions-modern{margin-top:5px!important;}
    .attach-actions-modern button{height:26px!important;font-size:10px!important;padding:0 10px!important;}
}
@media (max-width:1099px){
    body{padding-bottom:42px!important;}
    .ce-notification-console{left:0!important;height:40px!important;overflow:hidden!important;}
    .ce-notification-console.expanded{height:120px!important;}
}

/* v19 - AlineaciÃ³n de paneles, grid compacto y notificaciÃ³n inferior con encabezado + un renglÃ³n */
@media (min-width: 1100px){
    body{padding-bottom:56px!important;overflow-x:hidden!important;}
    .content{padding-bottom:64px!important;}

    .attach-modern-window.no-doc-nav{overflow:hidden!important;}
    .attach-modern-window.no-doc-nav .attach-modern-body{
        display:grid!important;
        grid-template-columns:minmax(0,46%) minmax(0,54%)!important;
        align-items:stretch!important;
        gap:10px!important;
        padding:10px!important;
        min-height:calc(100vh - 166px)!important;
        overflow:hidden!important;
    }
    .attach-modern-left,
    .attach-modern-right{
        min-width:0!important;
        max-width:100%!important;
        overflow:hidden!important;
        display:flex!important;
        flex-direction:column!important;
    }

    /* Filtros mÃ¡s compactos para ganar altura Ãºtil */
    .attach-modern-filters{gap:28px!important;margin-bottom:7px!important;min-height:18px!important;}
    .check-line{font-size:12px!important;line-height:18px!important;}
    .check-line input{width:16px!important;height:16px!important;}
    .attach-modern-search.no-type-combo{
        grid-template-columns:minmax(0,1fr) 145px 145px 38px!important;
        gap:6px!important;
        margin-bottom:6px!important;
    }
    .attach-modern-search input,
    .attach-modern-search select{
        height:28px!important;
        min-height:28px!important;
        border-radius:7px!important;
        padding:0 8px!important;
        font-size:11px!important;
    }
    .attach-btn-search{height:28px!important;border-radius:7px!important;font-size:13px!important;}
    .attach-count{
        height:26px!important;
        min-height:26px!important;
        display:flex!important;
        align-items:center!important;
        padding:0 8px!important;
        margin:0 0 5px!important;
        border-radius:8px!important;
        background:#eef4ff!important;
        font-size:11px!important;
        font-weight:700!important;
        color:#294161!important;
    }

    /* Listado con el mismo criterio compacto del detalle */
    .attach-modern-list{
        flex:1 1 auto!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        border-radius:8px!important;
        overflow:auto!important;
    }
    .attach-modern-list table{font-size:11px!important;table-layout:fixed!important;}
    .attach-modern-list th{
        font-size:11px!important;
        padding:6px 7px!important;
        height:27px!important;
        line-height:1.1!important;
        white-space:nowrap!important;
    }
    .attach-modern-list td{
        font-size:11px!important;
        padding:5px 7px!important;
        height:25px!important;
        line-height:1.15!important;
        white-space:nowrap!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
    }
    .attach-modern-list th:nth-child(1), .attach-modern-list td:nth-child(1){width:60px!important;}
    .attach-modern-list th:nth-child(2), .attach-modern-list td:nth-child(2){width:70px!important;}
    .attach-modern-list th:nth-child(3), .attach-modern-list td:nth-child(3){width:auto!important;min-width:0!important;max-width:none!important;white-space:nowrap!important;}
    .attach-modern-list th:nth-child(4), .attach-modern-list td:nth-child(4){width:82px!important;}
    .attach-modern-list th:nth-child(5), .attach-modern-list td:nth-child(5){width:82px!important;text-align:right!important;}
    .attach-modern-list th:nth-child(6), .attach-modern-list td:nth-child(6){width:92px!important;}

    /* Panel derecho alineado en alto con el listado */
    .attach-modern-right fieldset{
        flex:1 1 auto!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        overflow:hidden!important;
        display:flex!important;
        flex-direction:column!important;
        border-radius:12px!important;
        padding:8px 10px 8px!important;
    }
    .attach-modern-right legend{font-size:15px!important;line-height:1!important;padding:0 8px!important;}
    .form-grid-modern{
        grid-template-columns:68px minmax(0,1fr) 88px minmax(0,1fr)!important;
        gap:4px 6px!important;
        font-size:10px!important;
        flex:0 0 auto!important;
    }
    .form-grid-bottom-modern{
        grid-template-columns:86px minmax(0,1fr) 64px minmax(0,1fr)!important;
        gap:4px 6px!important;
        font-size:10px!important;
        flex:0 0 auto!important;
    }
    .form-grid-modern label,
    .form-grid-bottom-modern label{font-size:10px!important;line-height:1!important;font-weight:700!important;}
    .form-grid-modern input,
    .form-grid-bottom-modern input{
        height:22px!important;
        min-height:22px!important;
        padding:0 6px!important;
        font-size:10px!important;
        border-radius:6px!important;
        line-height:22px!important;
        min-width:0!important;
        width:100%!important;
    }

    .attach-detail-box-modern.lines-box{
        flex:1 1 auto!important;
        height:auto!important;
        min-height:115px!important;
        margin:6px 0!important;
        overflow:auto!important;
        border-radius:8px!important;
    }
    .detail-lines-table{font-size:10px!important;table-layout:auto!important;}
    .detail-lines-table th{font-size:10px!important;padding:5px 6px!important;height:24px!important;}
    .detail-lines-table td{font-size:10px!important;padding:5px 6px!important;height:24px!important;}
    .detail-lines-table td:nth-child(3){min-width:170px!important;max-width:260px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}

    .attach-upload-panel{
        flex:0 0 auto!important;
        display:grid!important;
        grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
        padding:5px!important;
        gap:5px!important;
        border-radius:8px!important;
        overflow:hidden!important;
    }
    .upload-row{grid-template-columns:54px minmax(0,1fr)!important;font-size:9px!important;min-width:0!important;}
    .upload-row input[type=file]{width:100%!important;min-width:0!important;height:24px!important;font-size:9px!important;padding:2px 5px!important;}
    .upload-row select{width:100%!important;min-width:0!important;height:24px!important;padding:0 5px!important;font-family:inherit!important;font-size:9px!important;font-weight:400!important;border-radius:7px!important;}
    .upload-row select option{font-family:inherit!important;font-size:9px!important;font-weight:400!important;}
    .upload-row input[type=file]::file-selector-button{height:18px!important;font-size:9px!important;padding:0 7px!important;margin-right:6px!important;}
    .attach-actions-modern{
        flex:0 0 auto!important;
        margin-top:5px!important;
        display:flex!important;
        gap:6px!important;
        overflow:hidden!important;
    }
    .attach-actions-modern button{height:26px!important;font-size:10px!important;padding:0 10px!important;white-space:nowrap!important;}

    /* Notificaciones: encabezado visible y sÃ³lo Ãºltimo resultado en la barra */
    .ce-notification-console{
        left:220px!important;
        right:0!important;
        height:54px!important;
        min-height:54px!important;
        display:grid!important;
        grid-template-columns:1fr!important;
        grid-template-rows:24px 30px!important;
        overflow:hidden!important;
        z-index:40!important;
        font-size:10px!important;
    }
    .ce-notification-console.expanded{
        height:138px!important;
        grid-template-rows:26px 1fr!important;
    }
    .ce-notification-header{
        height:24px!important;
        min-height:24px!important;
        padding:0 10px!important;
        display:flex!important;
        align-items:center!important;
        justify-content:space-between!important;
        background:#0d1724!important;
        border-bottom:1px solid rgba(255,255,255,.08)!important;
        white-space:nowrap!important;
    }
    .ce-notification-console.expanded .ce-notification-header{height:26px!important;min-height:26px!important;}
    .ce-notification-actions{margin-left:auto!important;gap:5px!important;display:flex!important;}
    .ce-notification-actions button{height:19px!important;font-size:9px!important;padding:0 7px!important;border-radius:5px!important;}
    .ce-notification-list{
        height:30px!important;
        min-height:30px!important;
        padding:3px 8px!important;
        display:block!important;
        overflow:hidden!important;
    }
    .ce-notification-console.expanded .ce-notification-list{
        height:auto!important;
        overflow:auto!important;
        display:flex!important;
        flex-direction:column!important;
        gap:4px!important;
        padding:5px 8px 7px!important;
    }
    .ce-notification-item{
        display:grid!important;
        grid-template-columns:52px 76px minmax(0,1fr)!important;
        gap:6px!important;
        align-items:center!important;
        height:24px!important;
        min-height:24px!important;
        padding:2px 7px!important;
        line-height:1!important;
        white-space:nowrap!important;
        overflow:hidden!important;
        border-radius:6px!important;
    }
    .ce-notification-list .ce-notification-item:not(:first-child){display:none!important;}
    .ce-notification-console.expanded .ce-notification-list .ce-notification-item{display:grid!important;height:auto!important;min-height:24px!important;white-space:normal!important;}
    .ce-notification-text{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
    .ce-notification-console.expanded .ce-notification-text{white-space:normal!important;overflow-wrap:anywhere!important;}
    .ce-notification-empty{height:24px!important;padding:6px 7px!important;}
}

@media (max-width:1099px){
    body{padding-bottom:56px!important;}
    .ce-notification-console{left:0!important;height:54px!important;grid-template-rows:24px 30px!important;overflow:hidden!important;}
    .ce-notification-console.expanded{height:138px!important;}
}

.ce-module-window{background:#f8fafc;min-height:calc(100vh - 110px);padding:22px}
.ce-module-header{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:20px 22px;margin-bottom:18px}
.ce-module-header h1{margin:0;font-size:24px;color:#0f172a}
.ce-module-header p{margin:6px 0 0;color:#475569;font-size:14px}
.ce-module-body{display:grid;grid-template-columns:minmax(320px,420px) 1fr;gap:18px}
.ce-module-panel{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:18px}
.ce-module-panel h2{margin:0 0 14px;font-size:17px;color:#0f172a}
.ce-module-form{display:grid;grid-template-columns:130px 1fr;gap:12px;align-items:center}
.ce-module-form label{font-weight:700;color:#334155;font-size:13px}
.ce-module-form input,.ce-module-form select{height:38px;border:1px solid #cbd5e1;border-radius:6px;padding:0 10px;color:#0f172a}
.ce-module-actions{grid-column:1 / -1;display:flex;gap:10px;justify-content:flex-end;margin-top:8px}
.ce-module-actions button{height:38px;border:0;border-radius:6px;background:#111827;color:#fff;padding:0 16px;cursor:pointer}
.ce-module-checklist{display:grid;gap:10px}
.ce-module-check{display:flex;gap:10px;align-items:center;border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#f8fafc}
.ce-module-check span{width:12px;height:12px;border-radius:50%;background:#2563eb;flex:0 0 auto}
.ce-module-check p{margin:0;color:#334155;font-size:14px}
@media(max-width:900px){.ce-module-body{grid-template-columns:1fr}}

.ce-message-overlay{
    position:fixed;
    inset:0;
    z-index:3000;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(15,23,42,.35);
    padding:24px;
}

.ce-message-overlay[hidden]{
    display:none!important;
}

.ce-message-box{
    width:min(470px, 100%);
    background:#fff;
    border:1px solid #dbe4ef;
    border-radius:8px;
    box-shadow:0 20px 60px rgba(15,23,42,.25);
    padding:20px 22px 18px;
}

.ce-message-title{
    font-size:16px;
    font-weight:800;
    color:#0f172a;
    margin-bottom:10px;
}

.ce-message-overlay.ok .ce-message-title{color:#047857}
.ce-message-overlay.warn .ce-message-title{color:#b45309}
.ce-message-overlay.error .ce-message-title{color:#b91c1c}

.ce-message-text{
    color:#1f2937;
    font-size:14px;
    line-height:1.45;
    min-height:48px;
    overflow-wrap:anywhere;
}

.ce-message-actions{
    display:flex;
    justify-content:flex-end;
    margin-top:18px;
}

.ce-message-actions button{
    height:32px;
    min-width:78px;
    border:0;
    border-radius:8px;
    background:#f28c00;
    color:#fff;
    font-weight:800;
    font-size:13px;
    cursor:pointer;
}
.ce-account-overlay[hidden]{display:none}
.ce-account-overlay{position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:86;display:flex;align-items:center;justify-content:center;padding:24px}
.ce-account-picker{width:min(720px,94vw);height:min(560px,88vh);background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 18px 42px rgba(15,23,42,.20);padding:14px;display:flex;flex-direction:column;gap:10px}
.ce-account-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ce-account-header h2{margin:0;font-size:18px;color:#111827}
.ce-account-header button{height:30px;border:1px solid #cbd5e1;border-radius:7px;background:#f1f5f9;color:#111827;padding:0 14px}
.ce-account-picker input{height:34px;border:1px solid #d8e1ec;border-radius:8px;padding:0 10px;font-size:13px;color:#111827}
.ce-account-grid{flex:1;overflow:auto;border:1px solid #dbe5f0;border-radius:8px}
.ce-account-grid table{width:100%;border-collapse:collapse;font-size:12px}
.ce-account-grid th{position:sticky;top:0;background:#f1f5f9;text-align:left;color:#0f172a;padding:8px;border-bottom:1px solid #dbe5f0}
.ce-account-grid td{padding:7px 8px;border-bottom:1px solid #eef2f7;color:#10233f}
.ce-account-row{cursor:pointer}
.ce-account-row:hover{background:#fff2dc}

.ce-desktop-window{min-height:calc(100vh - 78px);color:#0f172a}
.ce-desktop-toolbar{height:42px;background:#f8fafc;border-bottom:1px solid #cbd5e1;display:flex;align-items:center;gap:9px;padding:0 14px;font-size:14px}
.ce-desktop-toolbar button{height:30px;min-width:30px;border:1px solid #cbd5e1;background:#e5e7eb;color:#2563eb;border-radius:3px;font-weight:800}
.ce-desktop-layout{grid-template-columns:260px minmax(0,1fr)!important;gap:10px!important;padding:10px!important;min-height:calc(100vh - 105px)}
.ce-params-panel{background:#fff;border:1px solid #dbe5f0;border-radius:12px;padding:12px 10px;min-height:calc(100vh - 128px);display:flex;flex-direction:column}
.ce-params-panel fieldset{border:0;padding:0;margin:0;display:grid;grid-template-columns:72px 1fr;gap:9px 8px;align-items:center}
.ce-params-panel legend{grid-column:1 / -1;font-size:13px;font-weight:700;color:#111827;margin-bottom:10px}
.ce-params-panel label{font-size:12px;font-weight:700;color:#111827}
.ce-params-panel input,.ce-params-panel select{height:28px;border:1px solid #d8e1ec;border-radius:7px;background:#fff;padding:0 8px;font-size:12px;color:#111827}
.ce-params-panel input[readonly]{background:#f3f4f6;color:#64748b}
.ce-account-list{height:70px;border:1px solid #d8e1ec;border-radius:7px;background:#fff;overflow:auto}
.ce-small-button{grid-column:2;height:28px;border:1px solid #cbd5e1;border-radius:7px;background:#f1f5f9;color:#111827;font-size:12px}
.ce-actions-row{display:flex;justify-content:flex-end;margin-top:auto;padding-top:10px}
.ce-actions-row + .ce-actions-row{justify-content:flex-start;margin-top:10px;padding-top:0}
.ce-actions-row button{height:30px;min-width:118px;font-size:12px}
.ce-actions-grid{display:grid;grid-template-columns:1fr;gap:8px;margin-top:10px}
.ce-actions-grid button{height:30px;font-size:12px}
.ce-grid-panel{background:#fff;border:1px solid #dbe5f0;border-radius:12px;padding:10px;min-width:0;min-height:calc(100vh - 128px);position:relative}
.ce-tabs{display:flex;align-items:flex-end;height:34px}
.ce-tabs button{height:30px;border:1px solid #cbd5e1;border-bottom:0;background:#f8fafc;color:#111827;padding:0 10px;font-size:12px;border-radius:7px 7px 0 0}
.ce-tabs button.active{background:#fff;font-weight:700}
.ce-tab-page{display:none;border:1px solid #e2e8f0;border-radius:0 9px 9px 9px;min-height:0;background:#fff;overflow:hidden}
.ce-tab-page.active{display:block}
.ce-grid-scroll{overflow:auto;height:calc(100vh - 256px);min-height:390px}
.ce-desktop-grid{width:max-content;min-width:100%;border-collapse:collapse;font-size:12px}
.ce-desktop-grid th{position:sticky;top:0;background:#f1f5f9;border-bottom:1px solid #e2e8f0;color:#0f172a;text-align:left;padding:8px 8px;white-space:nowrap;font-weight:700;font-size:12px}
.ce-desktop-grid td{border-bottom:1px solid #eef2f7;padding:7px 8px;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;color:#10233f;font-size:12px}
.ce-desktop-grid th:nth-child(1),.ce-desktop-grid td:nth-child(1){width:34px;text-align:center;color:#64748b}
.ce-desktop-grid th:nth-child(2),.ce-desktop-grid td:nth-child(2){min-width:135px}
.ce-desktop-grid th:nth-child(3),.ce-desktop-grid td:nth-child(3){min-width:145px}
.ce-desktop-grid th:nth-child(4),.ce-desktop-grid td:nth-child(4){min-width:58px}
.ce-desktop-grid th:nth-child(5),.ce-desktop-grid td:nth-child(5){min-width:54px}
.ce-desktop-grid th:nth-child(6),.ce-desktop-grid td:nth-child(6){min-width:120px}
.ce-desktop-grid tbody tr:hover td,.ce-desktop-grid tr.active td{background:#eaf2ff;color:#0f172a}
.ce-tab-page textarea{width:100%;height:calc(100vh - 256px);min-height:390px;border:0;resize:none;padding:10px;font-family:Consolas,monospace;font-size:11px;line-height:1.45;color:#111827;white-space:pre;overflow:auto}
.ce-tab-actions{display:flex;justify-content:flex-end;align-items:center;padding:8px 10px;border-top:1px solid #e2e8f0;background:#fff}
.ce-tab-actions button{height:30px;min-width:92px;font-size:11px;padding:0 14px}
.ce-grid-footer{display:grid;grid-template-columns:60px 60px 1fr auto auto;align-items:center;gap:8px;padding:12px 0 0;color:#1f2937;font-size:12px}
.ce-grid-footer button{height:34px;min-width:170px;font-size:12px}
.attach-btn-secondary{height:40px;border:1px solid #cbd5e1;border-radius:8px;background:#f1f5f9;color:#334155;padding:0 20px;cursor:pointer}
.attach-btn-secondary:hover{background:#e8eef6}
.ce-success-message{background:#ecfdf5;border:1px solid #bbf7d0;color:#166534;border-radius:10px;padding:9px 12px;margin:10px;font-size:12px;font-weight:700}
.ce-print-preview[hidden]{display:none}
.ce-print-preview{position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:80;display:flex;align-items:center;justify-content:center;padding:26px}
.ce-print-panel{width:min(1120px,96vw);height:min(780px,92vh);background:#fff;border:1px solid #cbd5e1;box-shadow:10px 10px 0 rgba(0,0,0,.35);padding:28px 34px;display:flex;flex-direction:column;gap:16px}
.ce-print-header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.ce-print-header h2{margin:0;font-size:24px;text-align:center;flex:1;color:#111827}
.ce-print-header button{height:32px;border:1px solid #cbd5e1;background:#f1f5f9;border-radius:4px;color:#111827;padding:0 14px}
.ce-print-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px 24px;font-size:14px;color:#111827}
.ce-report-body{overflow:auto;flex:1;border-top:20px solid #c7c7c7}
.ce-report-empty{padding:24px 0;color:#64748b}
.ce-report-table{width:100%;border-collapse:collapse;font-family:Consolas,monospace;font-size:14px;color:#111827}
.ce-report-table th{background:#fff;text-align:left;padding:8px 10px;border-bottom:1px solid #d1d5db;text-decoration:underline}
.ce-report-table td{padding:6px 10px;vertical-align:top}
.ce-report-table tbody tr:nth-child(odd){background:#c7c7c7}
.ce-report-polizas tbody tr:nth-child(odd){background:transparent}
.ce-report-polizas tbody tr.ce-report-band{background:#c7c7c7;font-weight:700}
.ce-report-folios tbody tr:nth-child(odd),
.ce-report-auxcuentas tbody tr:nth-child(odd){background:transparent}
.ce-report-folios tbody tr.ce-report-band{background:#c7c7c7;font-weight:700}
.ce-print-panel pre{margin:0;background:#fff;overflow:auto;flex:1;font-family:Consolas,monospace;font-size:12px;line-height:1.45;color:#111827;white-space:pre-wrap}
@media(max-width:1100px){.ce-desktop-layout{grid-template-columns:1fr}.ce-params-panel{min-height:auto}.ce-grid-panel{min-height:auto}}

/* CE compacto: evita que las reglas generales de Adjuntar vuelvan el panel 50/50 */
@media (min-width:1100px){
    .attach-modern-window.no-doc-nav .attach-modern-body.ce-desktop-layout{
        grid-template-columns:minmax(220px,25%) minmax(0,1fr)!important;
        gap:10px!important;
        padding:10px!important;
        min-height:calc(100vh - 198px)!important;
        max-height:calc(100vh - 198px)!important;
    }
    .attach-modern-window.no-doc-nav .attach-modern-body.ce-desktop-layout > .ce-params-panel{
        width:100%!important;
        max-width:none!important;
        min-height:calc(100vh - 220px)!important;
        max-height:calc(100vh - 220px)!important;
        padding:10px!important;
    }
    .attach-modern-window.no-doc-nav .attach-modern-body.ce-desktop-layout > .ce-grid-panel{
        width:100%!important;
        max-width:none!important;
        min-height:calc(100vh - 220px)!important;
        max-height:calc(100vh - 220px)!important;
        padding:10px!important;
    }
    .ce-params-panel fieldset{grid-template-columns:62px minmax(0,1fr)!important;gap:7px 7px!important}
    .ce-params-panel legend{font-size:12px!important;margin-bottom:7px!important}
    .ce-params-panel label{font-size:11px!important}
    .ce-params-panel input,
    .ce-params-panel select{height:26px!important;font-size:11px!important;border-radius:6px!important;padding:0 7px!important}
    .ce-actions-row{padding-top:8px!important;margin-top:auto!important}
    .ce-actions-row + .ce-actions-row{margin-top:8px!important}
    .ce-actions-row{justify-content:flex-end!important}
    .ce-actions-row + .ce-actions-row{justify-content:flex-start!important}
    .ce-actions-row button{height:28px!important;min-width:112px!important;width:auto!important;font-size:11px!important;border-radius:7px!important;padding:0 14px!important}
    .ce-actions-grid{display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:7px!important;margin-top:8px!important;flex-wrap:wrap!important}
    .ce-actions-grid button{height:28px!important;min-width:74px!important;width:auto!important;font-size:11px!important;border-radius:7px!important;padding:0 13px!important}
    .ce-tabs{height:32px!important}
    .ce-tabs button{height:28px!important;font-size:11px!important;padding:0 9px!important}
    .ce-grid-scroll{height:calc(100vh - 300px)!important;min-height:330px!important}
    .ce-desktop-grid{font-size:11px!important}
    .ce-desktop-grid th{font-size:11px!important;padding:7px 7px!important}
    .ce-desktop-grid td{font-size:11px!important;padding:6px 7px!important}
    .ce-tab-page textarea{height:calc(100vh - 344px)!important;min-height:286px!important;font-size:10px!important;padding:8px!important}
    .ce-grid-footer{grid-template-columns:42px 42px 1fr auto auto!important;gap:7px!important;padding-top:10px!important;justify-items:start!important}
    .ce-grid-footer button{height:30px!important;min-width:0!important;width:auto!important;font-size:11px!important;padding:0 15px!important}
    .ce-grid-footer #cePrintButton{justify-self:end!important;border-radius:8px!important;min-width:132px!important}
    .ce-grid-footer #cePdfButton{justify-self:end!important}
    .ce-tab-actions{padding:6px 8px!important}
    .ce-tab-actions button{height:28px!important;font-size:11px!important}
}

.ce-actions-grid .attach-btn-primary,
.ce-grid-footer .attach-btn-primary{
    background:#f28c00!important;
    border-color:#d87900!important;
    border-radius:8px!important;
}
.ce-actions-grid .attach-btn-primary:hover,
.ce-grid-footer .attach-btn-primary:hover{
    background:#df7f00!important;
}

.sat-modal-overlay{
    position:fixed;
    inset:0;
    z-index:1200;
    background:rgba(15,23,42,.38);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}
.sat-modal-overlay[hidden]{display:none!important}
.sat-modal{
    width:min(1120px,96vw);
    max-height:82vh;
    background:#fff;
    border:1px solid #dbe5f0;
    border-radius:12px;
    box-shadow:0 22px 60px rgba(15,23,42,.22);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    position:relative;
}
.sat-modal-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    padding:14px 16px;
    border-bottom:1px solid #e5edf7;
    background:#f8fafc;
}
.sat-modal-header h2{
    margin:0;
    font-size:18px;
    color:#0f172a;
}
.sat-modal-header p{
    margin:2px 0 0;
    color:#475569;
    font-size:12px;
}
.sat-results{
    padding:8px;
    max-height:360px;
    overflow:auto;
}
.sat-login-panel,
.sat-query-panel{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 12px;
    border-bottom:1px solid #e5edf7;
    background:#fff;
    flex-wrap:wrap;
}
.sat-login-panel input,
.sat-query-panel input,
.sat-query-panel select{
    height:30px;
    border:1px solid #cfdbe8;
    border-radius:7px;
    padding:0 9px;
    font-size:12px;
    color:#0f172a;
}
.sat-field{
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-height:30px;
    font-size:12px;
    font-weight:700;
    color:#0f172a;
    white-space:nowrap;
}
.sat-field span{
    line-height:1;
}
.sat-field input,
.sat-field select{
    font-weight:500;
}
.sat-login-panel input{width:170px}
.sat-query-panel input{width:86px}
.sat-query-panel select{width:120px}
.sat-request-info{
    padding:6px 12px;
    border-bottom:1px solid #e5edf7;
    background:#f8fbff;
    color:#334155;
    font-size:12px;
    font-weight:700;
}
.sat-captcha-box{
    min-width:150px;
    min-height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #cbd5e1;
    border-radius:7px;
    background:#fff;
    color:#64748b;
    font-size:12px;
}
#satCaptchaImg{
    width:132px;
    height:42px;
    object-fit:contain;
}
#satCaptchaFrame{
    width:190px;
    height:74px;
    border:1px solid #cbd5e1;
    border-radius:7px;
    background:#fff;
}
.sat-tabs{
    display:flex;
    gap:2px;
    padding:8px 12px 0;
    background:#fff;
    border-bottom:1px solid #dbe5f0;
}
.sat-tabs button{
    height:30px;
    border:1px solid #cbd5e1;
    border-bottom:none;
    border-radius:7px 7px 0 0;
    background:#f8fafc;
    color:#0f172a;
    font-size:12px;
    font-weight:700;
    padding:0 12px;
    cursor:pointer;
}
.sat-tabs button.active{
    background:#fff;
    color:#0b2a4a;
}

/* La consulta local sólo muestra filtros y resultados de fe_comprobantes. */
.sat-modal-overlay.sat-local-mode .sat-login-panel,
.sat-modal-overlay.sat-local-mode .sat-request-info,
.sat-modal-overlay.sat-local-mode .sat-tabs,
.sat-modal-overlay.sat-local-mode #satTipoField,
.sat-modal-overlay.sat-local-mode #satTabPanel,
.sat-modal-overlay.sat-local-mode #satTabProcess{
    display:none !important;
}
.sat-modal-overlay.sat-local-mode #satTabResults{
    display:block !important;
}
.sat-file-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:66px;
    height:27px;
    padding:0 9px;
    text-decoration:none;
    white-space:nowrap;
}
.sat-no-file{
    color:#94a3b8;
    font-size:11px;
    white-space:nowrap;
}
.sat-tab-page{
    display:none;
    min-height:240px;
}
.sat-tab-page.active{
    display:block;
}
.sat-panel-frame{
    width:100%;
    height:430px;
    border:0;
    background:#fff;
}
.sat-process-log{
    margin:12px;
    height:220px;
    overflow:auto;
    border:1px solid #dbe5f0;
    border-radius:8px;
    background:#0f172a;
    color:#dbeafe;
    padding:10px;
    font-size:12px;
    white-space:pre-wrap;
}
.sat-busy-overlay{
    position:absolute;
    inset:0;
    z-index:5;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(248,250,252,.78);
    backdrop-filter:blur(1px);
}
.sat-busy-overlay[hidden]{display:none!important}
.sat-busy-box{
    min-width:320px;
    border:1px solid #dbe5f0;
    border-radius:10px;
    background:#fff;
    box-shadow:0 18px 40px rgba(15,23,42,.18);
    padding:18px 22px;
    display:flex;
    align-items:center;
    gap:12px;
    color:#0f172a;
    font-size:13px;
    font-weight:700;
}
.sat-busy-spinner{
    width:22px;
    height:22px;
    border:3px solid #fed7aa;
    border-top-color:#ea8500;
    border-radius:50%;
    animation:sat-spin .8s linear infinite;
}
@keyframes sat-spin{to{transform:rotate(360deg)}}
.sat-empty{
    border:1px dashed #cbd5e1;
    border-radius:8px;
    padding:18px;
    color:#64748b;
    text-align:center;
    font-size:13px;
}
.sat-table{
    min-width:1180px;
    width:100%;
    border-collapse:collapse;
}
.sat-table th{
    position:sticky;
    top:0;
    background:#eef4fb;
    color:#0f172a;
    font-size:11px;
    padding:5px 8px;
    border-bottom:1px solid #dbe5f0;
    text-align:left;
    white-space:nowrap;
}
.sat-table td{
    border-bottom:1px solid #edf2f7;
    padding:5px 8px;
    font-size:11px;
    color:#10233f;
    white-space:nowrap;
    line-height:1.2;
}
.sat-table td:first-child{
    max-width:250px;
    overflow:hidden;
    text-overflow:ellipsis;
}
.sat-table td:nth-child(3){
    max-width:260px;
    overflow:hidden;
    text-overflow:ellipsis;
}
.sat-table tr:hover{background:#fff7ed}
.sat-select{
    height:24px!important;
    border-radius:7px!important;
    padding:0 10px!important;
    font-size:11px!important;
}
.sat-file-mark{
    color:#0b2a4a;
    font-weight:700;
}

.config-window{
    background:#fff;
    border:1px solid #e7edf5;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 14px 36px rgba(15,23,42,.06);
}
.config-panel{
    margin:8px 10px;
    border:1px solid #dbe5f0;
    border-radius:8px;
    background:#fff;
    padding:9px 10px;
}
.config-alert{
    margin:10px 12px 0;
    padding:9px 12px;
    border-radius:8px;
    font-size:12px;
    font-weight:700;
}
.config-alert.ok{background:#ecfdf3;border:1px solid #bbf7d0;color:#166534}
.config-alert.error{background:#fef2f2;border:1px solid #fecaca;color:#991b1b}
.config-grid{
    display:grid;
    grid-template-columns:165px minmax(220px,1fr) 165px minmax(220px,1fr);
    gap:5px 9px;
    align-items:center;
}
.config-grid label,
.config-toolbar label{
    color:#0f172a;
    font-size:11px;
    font-weight:800;
}
.config-grid input,
.config-toolbar select,
.config-table select{
    height:24px;
    border:1px solid #cfdbe8;
    border-radius:6px;
    background:#fff;
    color:#0f172a;
    padding:0 7px;
    font-size:11px;
}
.config-actions{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    margin-top:12px;
}
.config-table-wrap{
    overflow:auto;
    max-height:calc(100vh - 202px);
    border:1px solid #e2e8f0;
    border-radius:8px;
}
.config-table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;
}
.config-table th{
    position:sticky;
    top:0;
    z-index:1;
    background:#eef4fb;
    color:#0f172a;
    font-size:11px;
    text-align:left;
    padding:5px 8px;
    border-bottom:1px solid #dbe5f0;
    white-space:nowrap;
}
.config-table td{
    padding:4px 8px;
    border-bottom:1px solid #edf2f7;
    color:#10233f;
    font-size:11px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.config-table tr.active{background:#fff7ed}
.config-row-actions{
    display:flex;
    gap:6px;
}
.config-row-actions form{margin:0}
.config-toolbar{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:7px;
}
.config-toolbar select{min-width:280px}
.config-table-wrap.permissions{max-height:calc(100vh - 245px)}
.config-table-wrap.catalogs{max-height:calc(100vh - 230px)}
.config-table .attach-btn-secondary{
    height:23px!important;
    padding:0 8px!important;
    font-size:10px!important;
}
@media(max-width:1200px){
    .config-grid{grid-template-columns:180px minmax(0,1fr)}
}

.config-window .attach-modern-title.compact{
    padding:10px 14px!important;
}
.config-window .attach-modern-title h1{
    font-size:18px!important;
}
.config-window .attach-modern-title p{
    font-size:11px!important;
}
.config-window .ce-icon{
    width:22px!important;
    height:22px!important;
    font-size:10px!important;
}
.config-form .config-actions{
    margin-top:7px;
}
.config-table-wrap .config-table th:nth-child(1),
.config-table-wrap .config-table td:nth-child(1){width:46px}
.config-table-wrap .config-table th:nth-child(2),
.config-table-wrap .config-table td:nth-child(2){width:150px}
.config-table-wrap .config-table th:nth-child(3),
.config-table-wrap .config-table td:nth-child(3){width:58px}
.config-table-wrap .config-table th:nth-child(4),
.config-table-wrap .config-table td:nth-child(4){width:420px}
.config-table-wrap .config-table th:nth-child(5),
.config-table-wrap .config-table td:nth-child(5),
.config-table-wrap .config-table th:nth-child(6),
.config-table-wrap .config-table td:nth-child(6){width:105px}
.config-table-wrap .config-table th:nth-child(8),
.config-table-wrap .config-table td:nth-child(8){width:150px}
.config-table-wrap.permissions .config-table th,
.config-table-wrap.permissions .config-table td,
.config-table-wrap.catalogs .config-table th,
.config-table-wrap.catalogs .config-table td{
    padding-top:3px;
    padding-bottom:3px;
}
.config-table-wrap.permissions .config-table th:nth-child(1),
.config-table-wrap.permissions .config-table td:nth-child(1){width:260px}
.config-table-wrap.permissions .config-table th:nth-child(2),
.config-table-wrap.permissions .config-table td:nth-child(2){width:260px}
.config-table-wrap.permissions .config-table th:nth-child(3),
.config-table-wrap.permissions .config-table td:nth-child(3){width:340px}
.config-table-wrap.permissions .config-table th:nth-child(4),
.config-table-wrap.permissions .config-table td:nth-child(4){width:150px}
.config-table-wrap.catalogs .config-table th:nth-child(1),
.config-table-wrap.catalogs .config-table td:nth-child(1){width:36px}
.config-table-wrap.catalogs .config-table th:nth-child(2),
.config-table-wrap.catalogs .config-table td:nth-child(2){width:190px}
.config-table-wrap.catalogs .config-table th:nth-child(3),
.config-table-wrap.catalogs .config-table td:nth-child(3){width:80px}
.config-table-wrap.catalogs .config-table th:nth-child(4),
.config-table-wrap.catalogs .config-table td:nth-child(4){width:360px}
.config-table-wrap.catalogs .config-table th:nth-child(5),
.config-table-wrap.catalogs .config-table td:nth-child(5){width:120px}
.config-table-wrap.catalogs .config-table th:nth-child(6),
.config-table-wrap.catalogs .config-table td:nth-child(6){width:520px}

.side-link-button{
    width:100%;
    border:0;
    background:transparent;
    font:inherit;
    cursor:pointer;
}

.attach-btn-search{position:relative}
.attach-btn-search::before{content:"";position:absolute;left:50%;top:50%;width:12px;height:12px;border:2px solid currentColor;border-radius:50%;transform:translate(-60%,-60%)}
.attach-btn-search::after{content:"";position:absolute;left:50%;top:50%;width:8px;height:2px;background:currentColor;border-radius:2px;transform:translate(10%,35%) rotate(45deg)}
.sat-document-info{margin:3px 0 0;color:#334155;font-size:12px;font-weight:700}
.sat-table .sat-money{text-align:right;font-variant-numeric:tabular-nums}
.upload-row.sat-selected input[type=file]{display:none}
.sat-file-selected{grid-column:2;height:24px;border:1px solid #c7d7eb;background:#f8fbff;color:#0f3b6d;border-radius:7px;padding:4px 8px;font-size:10px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center}
.upload-row.sat-selected .sat-file-selected{display:flex}
.about-modal-overlay{
    position:fixed;
    inset:0;
    z-index:1300;
    background:rgba(15,23,42,.42);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}
.about-modal-overlay[hidden]{display:none!important}
.about-modal{
    width:min(720px,94vw);
    background:#fff;
    border:1px solid #dbe5f0;
    border-radius:12px;
    box-shadow:0 24px 70px rgba(15,23,42,.25);
    display:grid;
    grid-template-columns:150px 1fr;
    overflow:hidden;
}
.about-logo{
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f8fafc;
    color:#f28c00;
    font-weight:900;
    font-size:46px;
    border-right:1px solid #e5edf7;
}
.about-content{padding:18px 20px}
.about-content h2{margin:0;color:#0f172a;font-size:22px}
.about-version,.about-site,.about-company{margin:4px 0;color:#334155;font-size:13px}
.about-company{font-weight:800}
.about-description{
    margin-top:12px;
    border:1px solid #e2e8f0;
    border-radius:8px;
    padding:10px 12px;
    color:#10233f;
    font-size:12px;
    line-height:1.45;
    max-height:240px;
    overflow:auto;
}
.about-description p{margin:6px 0}
.about-actions{display:flex;justify-content:flex-end;margin-top:12px}

/* CE ajuste de scroll: el grid ya no queda oculto debajo del pie de acciones. */
@media (min-width:1100px){
    .attach-modern-window.no-doc-nav .attach-modern-body.ce-desktop-layout > .ce-grid-panel{
        display:flex!important;
        flex-direction:column!important;
        overflow:hidden!important;
    }
    .ce-tabs,
    .ce-grid-footer,
    .ce-tab-actions{
        flex:0 0 auto!important;
    }
    #tabLista.ce-tab-page.active,
    #tabSin.ce-tab-page.active,
    #tabCon.ce-tab-page.active{
        display:flex!important;
        flex:1 1 auto!important;
        min-height:0!important;
        flex-direction:column!important;
    }
    #tabLista .attach-count{
        flex:0 0 auto!important;
    }
    .ce-grid-scroll{
        flex:1 1 auto!important;
        height:auto!important;
        min-height:0!important;
        padding-bottom:8px!important;
    }
    .ce-tab-page textarea{
        flex:1 1 auto!important;
        height:auto!important;
        min-height:0!important;
    }
}

/* Tema ApiData - opcion 1 oscura corporativa (override final) */
.sidebar{
    background:#1f2a33!important;
    color:#f5f7fa!important;
}
.sidebar-brand{
    background:#fff!important;
    border-right:1px solid #d8e0ea!important;
}
.nav-section{
    color:#9aa8b6!important;
    font-weight:800!important;
    text-transform:uppercase!important;
    letter-spacing:.08em!important;
}
.side-link,
.side-link-button,
.side-group-title{
    color:#f5f7fa!important;
}
.side-link span,
.side-group-title span{
    color:#f5f7fa!important;
}
.side-link:hover,
.side-link-button:hover,
.side-group-title:hover{
    background:#34424d!important;
    color:#fff!important;
}
.side-link.active{
    background:#2d3a44!important;
    color:#fff!important;
    box-shadow:inset 4px 0 0 #f28c00!important;
}
.side-group.active,
.side-group.open{
    background:#2d3a44!important;
}
.side-group.active .side-group-title,
.side-group.open .side-group-title{
    color:#fff!important;
}
.side-sub-link{
    color:#d8dee6!important;
}
.side-sub-link:hover{
    background:#34424d!important;
    color:#fff!important;
}
.side-sub-link.active{
    background:#3a4650!important;
    color:#fff!important;
    box-shadow:inset 4px 0 0 #f28c00!important;
}
.side-group-title::after{
    color:#aeb8c2!important;
}


/* Carga masiva CFDI */
.bulk-page{padding:24px}.bulk-card{background:#fff;border:1px solid #dfe5ea;border-radius:12px;padding:22px;box-shadow:0 4px 18px rgba(25,39,52,.06)}
.bulk-drop{display:flex;min-height:150px;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:2px dashed #aebbc5;border-radius:10px;background:#f8fafb;cursor:pointer;text-align:center}.bulk-drop:hover{border-color:#ef8b00;background:#fffaf3}.bulk-drop strong{font-size:18px}.bulk-drop span{color:#657580}.bulk-drop input{margin-top:10px}
.bulk-actions{display:flex;align-items:center;justify-content:space-between;margin-top:18px;color:#657580}.bulk-summary{display:flex;gap:12px;margin:18px 0}.bulk-summary>div{display:flex;min-width:130px;flex-direction:column;padding:14px 18px;border-radius:9px;background:#344652;color:#fff}.bulk-summary strong{font-size:24px}.bulk-summary span{font-size:12px;text-transform:uppercase}.bulk-summary .ok{background:#267a55}.bulk-summary .bad{background:#a83c3c}
.bulk-results{background:#fff}.bulk-results table{min-width:1100px}.bulk-status{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700}.bulk-status.success{background:#dff3e8;color:#17643f}.bulk-status.error{background:#f9dddd;color:#922f2f}.number{text-align:right;white-space:nowrap}
@media(max-width:700px){.bulk-page{padding:14px}.bulk-actions{align-items:stretch;flex-direction:column;gap:12px}.bulk-summary{overflow:auto}}
.bulk-compact{font-size:11px;padding:10px}.bulk-heading{margin-bottom:8px}.bulk-heading h1{font-size:18px!important;margin:2px 0!important}.bulk-heading p,.bulk-heading .eyebrow{font-size:11px!important;margin:0!important}.bulk-compact .bulk-card{padding:10px;border-radius:9px}.bulk-compact .bulk-drop{min-height:82px;gap:3px}.bulk-compact .bulk-drop strong{font-size:12px}.bulk-compact .bulk-drop span,.bulk-compact .bulk-actions{font-size:11px}.bulk-compact .bulk-actions{margin-top:8px}.bulk-compact button{height:28px;font-size:11px;padding:0 13px}.bulk-compact .bulk-summary{margin:8px 0;gap:7px}.bulk-compact .bulk-summary>div{min-width:92px;padding:7px 10px;border-radius:7px}.bulk-compact .bulk-summary strong{font-size:16px}.bulk-compact .bulk-summary span{font-size:9px}
.bulk-tabs{display:flex;gap:2px;border-bottom:1px solid #cbd5e1;margin-bottom:8px}.bulk-tabs a{height:29px;padding:7px 12px;border:1px solid transparent;border-bottom:0;border-radius:6px 6px 0 0;color:#334155;text-decoration:none;font-size:11px}.bulk-tabs a.active{background:#fff;border-color:#cbd5e1;color:#0f172a;font-weight:700}
.bulk-filter{display:flex;align-items:end;gap:7px;flex-wrap:wrap;background:#fff;border:1px solid #dbe5f0;border-radius:9px;padding:8px;margin-bottom:7px}.bulk-filter>label{display:flex;flex-direction:column;gap:3px;font-size:10px;font-weight:700}.bulk-filter input,.bulk-filter select{height:26px;border:1px solid #d8e1ec;border-radius:6px;padding:0 7px;font-size:11px}.bulk-filter input[type=search]{width:210px}.bulk-filter .bulk-check,.bulk-rules .bulk-check{flex-direction:row;align-items:center;font-weight:500}.bulk-check input[type=checkbox]{width:14px;height:14px}.bulk-rules{flex-basis:100%;border-top:1px solid #e2e8f0;padding-top:6px}.bulk-rules summary{cursor:pointer;font-weight:700}.bulk-rules>div{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding-top:7px}.bulk-rules label{display:flex;align-items:center;gap:3px}.bulk-rules input[type=number]{width:60px}.bulk-count{padding:5px 2px;color:#475569;font-size:10px}
.bulk-grid{height:auto;max-height:calc(100vh - 225px);min-height:180px;overflow-x:auto;overflow-y:auto;background:#fff;border:1px solid #dbe5f0;border-radius:8px}.bulk-grid table{width:max-content;min-width:100%;border-collapse:collapse;font-size:11px}.bulk-grid th{position:sticky;top:0;z-index:1;background:#f1f5f9;border-bottom:1px solid #dbe5f0;text-align:left;padding:6px 7px;white-space:nowrap}.bulk-grid td{border-bottom:1px solid #eef2f7;padding:5px 7px;white-space:nowrap;max-width:230px;overflow:hidden;text-overflow:ellipsis}.bulk-grid tr:hover td{background:#eaf2ff}.bulk-compact .bulk-status{font-size:10px;padding:3px 6px}.bulk-apply{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding-top:7px;color:#64748b}.bulk-apply button:disabled{opacity:.55}.bulk-date-choice{display:flex;align-items:center;gap:7px;border-left:1px solid #cbd5e1;padding-left:9px}.bulk-date-choice label{display:flex;align-items:center;gap:3px}.bulk-compact:has(#bulkApplyForm) .bulk-grid{max-height:calc(100vh - 305px)}.bulk-select-actions{display:flex;gap:6px}.bulk-select-actions button{border:1px solid #cbd5e1;border-radius:7px;background:#f1f5f9;color:#0f172a}.bulk-apply-spacer{flex:1}
.bulk-grid-comprobantes{overflow-x:hidden}.bulk-grid-comprobantes table{width:100%;min-width:0;table-layout:fixed}.bulk-grid-comprobantes th:nth-child(1){width:6%}.bulk-grid-comprobantes th:nth-child(2){width:19%}.bulk-grid-comprobantes th:nth-child(3){width:8.5%}.bulk-grid-comprobantes th:nth-child(4){width:3%}.bulk-grid-comprobantes th:nth-child(5){width:4.5%}.bulk-grid-comprobantes th:nth-child(6){width:19%}.bulk-grid-comprobantes th:nth-child(7){width:5%}.bulk-grid-comprobantes th:nth-child(8),.bulk-grid-comprobantes th:nth-child(9){width:6.5%}.bulk-grid-comprobantes th:nth-child(10){width:18%}.bulk-grid-comprobantes th:nth-child(11){width:6.5%}.bulk-grid-comprobantes th,.bulk-grid-comprobantes td{min-width:0;max-width:none;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1050px){.bulk-grid-comprobantes{overflow-x:auto}.bulk-grid-comprobantes table{width:max-content;min-width:1100px;table-layout:auto}}
.bulk-message{border-radius:7px;padding:7px 10px;margin-bottom:7px;font-size:11px;font-weight:700}.bulk-message.success{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}.bulk-message.error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}
.bulk-mapping-filter>label{display:none}.bulk-mapping-filter>.bulk-source-note{margin:0;color:#475569;flex:1}.bulk-mapping-filter>.bulk-rules{order:3}
.bulk-file-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:22px;padding:0 6px;border-radius:5px;background:#f28c00;color:#fff!important;font-size:10px;font-weight:700;text-decoration:none}.bulk-file-button:hover{background:#d97706}

/* Navegacion Grafito ApiData - opcion 2 */
.sidebar{background:linear-gradient(180deg,#202b35 0%,#26333e 100%)!important;box-shadow:8px 0 28px rgba(15,23,42,.14)!important;display:flex!important;flex-direction:column!important}
.sidebar-brand{height:78px!important;margin:12px 12px 5px!important;border:0!important;border-radius:12px!important;background:#fff!important;box-shadow:0 7px 22px rgba(0,0,0,.18)!important;flex:0 0 auto!important}
.sidebar-brand img{max-width:150px!important;max-height:60px!important}
.side-nav{padding:12px 10px 14px!important;display:flex!important;flex-direction:column!important;height:calc(100vh - 95px)!important;overflow-y:auto!important;overflow-x:hidden!important}
.nav-section{color:#f5a000!important;font-size:10px!important;font-weight:800!important;letter-spacing:.13em!important;margin:11px 12px 7px!important}
.side-link,.side-link-button,.side-group-title{min-height:39px!important;height:auto!important;margin:2px 0!important;padding:8px 11px!important;border-radius:10px!important;color:#eef3f7!important;font-size:12px!important;font-weight:650!important;gap:11px!important;transition:background .16s ease,color .16s ease,transform .16s ease!important}
.side-group{position:relative!important;margin:1px 0!important;padding:0!important;border-radius:11px!important;background:transparent!important}
.side-icon{width:22px!important;height:22px!important;min-width:22px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;color:#cbd5df!important}
.side-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.side-link:hover,.side-link-button:hover,.side-group-title:hover{background:rgba(255,255,255,.075)!important;color:#fff!important;transform:translateX(2px)}
.side-link:hover .side-icon,.side-link-button:hover .side-icon,.side-group-title:hover .side-icon{color:#f5a000!important}
.side-link.active{background:#fff!important;color:#202b35!important;box-shadow:0 8px 20px rgba(0,0,0,.17),inset 4px 0 0 #f5a000!important}
.side-link.active .side-icon{color:#f5a000!important}
.side-group.open,.side-group.active{background:transparent!important}
.side-group.open>.side-group-title,.side-group.active>.side-group-title{background:#fff!important;color:#202b35!important;box-shadow:0 8px 20px rgba(0,0,0,.16),inset 4px 0 0 #f5a000!important}
.side-group.open>.side-group-title .side-icon,.side-group.active>.side-group-title .side-icon{color:#f5a000!important}
.side-group-title::after{content:"›"!important;color:#aebbc6!important;font-size:20px!important;font-weight:400!important;line-height:1!important;transform:rotate(0);transition:transform .16s ease}
.side-group.open>.side-group-title::after,.side-group.active>.side-group-title::after{content:"›"!important;color:#f5a000!important;transform:rotate(90deg)}
.side-sub-link{position:relative!important;margin:2px 8px 2px 43px!important;padding:7px 9px 7px 13px!important;border-radius:7px!important;color:#c9d3dc!important;font-size:11px!important;border-left:1px dashed rgba(245,160,0,.48)!important}
.side-sub-link::before{content:"";position:absolute;left:-3px;top:50%;width:5px;height:5px;margin-top:-2px;border-radius:50%;background:#f5a000}
.side-sub-link:hover{background:rgba(255,255,255,.08)!important;color:#fff!important}
.side-sub-link.active{background:rgba(245,160,0,.15)!important;color:#fff!important;box-shadow:none!important;border-left-color:#f5a000!important}
.side-nav>.side-group:last-of-type{margin-top:auto!important;padding-top:10px!important;border-top:1px solid rgba(255,255,255,.11)!important;border-radius:0!important}
.side-link-button{border-top:0!important;margin-top:1px!important}
.app-shell.sidebar-collapsed .sidebar-brand{margin:10px 7px 5px!important}.app-shell.sidebar-collapsed .sidebar-brand img{max-width:48px!important}.app-shell.sidebar-collapsed .side-icon{width:24px!important;min-width:24px!important}.app-shell.sidebar-collapsed .side-link,.app-shell.sidebar-collapsed .side-group-title{padding:8px 0!important}.app-shell.sidebar-collapsed .side-group.open>.side-group-title,.app-shell.sidebar-collapsed .side-group.active>.side-group-title{box-shadow:inset 3px 0 0 #f5a000!important}
.bulk-tab-tall .bulk-grid{height:calc(100vh - 175px)!important;max-height:calc(100vh - 175px)!important;min-height:320px}
.sat-download-page{font-size:12px}.sat-download-page .page-heading{margin-bottom:10px}.sat-download-card{position:relative;width:100%;max-width:none;min-height:calc(100vh - 135px);border:1px solid #dbe5f0;border-radius:10px;background:#fff;overflow:hidden}.sat-download-page #satTokenForm{display:none}.sat-download-message{padding:7px 10px;background:#ecfdf5;color:#166534;border-bottom:1px solid #dbe5f0}.sat-download-message.error{background:#fef2f2;color:#b91c1c}.sat-download-page .sat-results{height:calc(100vh - 365px);min-height:260px;overflow:auto}.sat-download-page .sat-table{font-size:11px}
.sat-download-page{height:calc(100vh - 58px);overflow:hidden}.sat-download-card{height:calc(100vh - 125px)!important;min-height:0!important;display:flex;flex-direction:column}.sat-download-card .sat-tab-page.active{display:flex;flex:1;min-height:0;overflow:hidden}.sat-download-page .sat-results{height:auto!important;min-height:0!important;flex:1;overflow:auto;border:1px solid #dbe5f0;border-radius:7px;margin:8px}.sat-download-page .sat-table{width:max-content;min-width:100%;border-collapse:collapse}.sat-download-page .sat-table thead th{position:sticky;top:0;z-index:2;background:#f1f5f9}.sat-download-page .sat-process-log{height:100%;width:100%;margin:8px}
.dashboard-real{font-size:12px}.dashboard-real .kpi-card{text-decoration:none;color:inherit}.dashboard-lists{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.dashboard-panel{padding:0;overflow:hidden}.dashboard-panel .panel-header{padding:12px 14px}.dashboard-panel .panel-header span{color:#64748b}.dashboard-grid{max-height:245px;overflow:auto;border-top:1px solid #e2e8f0}.dashboard-grid .activity-table{width:max-content;min-width:100%;font-size:11px}.dashboard-grid .activity-table th{position:sticky;top:0;background:#f1f5f9;z-index:1;white-space:nowrap}.dashboard-grid .activity-table td{white-space:nowrap;max-width:210px;overflow:hidden;text-overflow:ellipsis}.dashboard-empty{text-align:center;color:#64748b;padding:24px!important}.recent-panel{margin-top:14px}.recent-panel .dashboard-grid{max-height:265px}@media(max-width:1100px){.dashboard-lists{grid-template-columns:1fr}}
.dashboard-real .page-title h1{font-size:25px}.dashboard-real .page-title p{font-size:12px;margin-bottom:12px}.dashboard-real .kpi-grid{gap:10px;margin-bottom:10px}.dashboard-real .kpi-card{min-height:88px;padding:11px;gap:10px}.dashboard-real .kpi-icon{width:42px;height:42px;font-size:16px}.dashboard-real .kpi-card span{font-size:11px}.dashboard-real .kpi-card strong{font-size:23px;margin:1px 0}.dashboard-real .kpi-card small{font-size:10px}.dashboard-real .dashboard-lists,.dashboard-real .recent-panel{margin-top:10px;gap:10px}.dashboard-real .dashboard-panel .panel-header{padding:8px 10px;margin:0}.dashboard-real .panel-header h2{font-size:14px}.dashboard-real .dashboard-grid{max-height:190px}.dashboard-real .recent-panel .dashboard-grid{max-height:200px}.dashboard-real .activity-table th,.dashboard-real .activity-table td{font-size:10px;padding:5px 6px}
.compare-page{font-size:11px}.compare-filter{display:flex;align-items:end;gap:8px;background:#fff;border:1px solid #dbe5f0;border-radius:9px;padding:9px;margin-bottom:9px}.compare-filter label{display:grid;gap:3px;font-weight:700}.compare-filter input{height:30px;border:1px solid #cbd5e1;border-radius:6px;padding:0 8px}.compare-filter input[type=search]{width:220px}.compare-filter a{padding:8px;color:#475569}.compare-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-bottom:9px}.compare-summary>div{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #dbe5f0;border-radius:9px;padding:8px 12px}.compare-summary span{font-weight:700}.compare-summary strong{font-size:20px;color:#f28c00}.compare-summary small{margin-left:auto}.compare-panels{display:grid;grid-template-columns:1fr 1fr;gap:9px}.compare-panels article{background:#fff;border:1px solid #dbe5f0;border-radius:9px;overflow:hidden}.compare-panels header{display:flex;justify-content:space-between;align-items:center;padding:8px 10px}.compare-panels h2{font-size:14px;margin:0}.compare-grid{height:calc(100vh - 270px);min-height:300px;overflow:auto;border-top:1px solid #e2e8f0}.compare-grid table{width:max-content;min-width:100%;border-collapse:collapse;font-size:10px}.compare-grid th{position:sticky;top:0;background:#f1f5f9;text-align:left;padding:6px;white-space:nowrap}.compare-grid td{padding:5px 6px;border-bottom:1px solid #eef2f7;white-space:nowrap;max-width:190px;overflow:hidden;text-overflow:ellipsis}@media(max-width:1100px){.compare-panels{grid-template-columns:1fr}.compare-grid{height:330px}}
.compare-filter{padding:6px 8px;margin-bottom:6px;gap:6px}.compare-filter label{font-size:10px;gap:2px}.compare-filter input,.compare-filter select{height:26px;border:1px solid #cbd5e1;border-radius:5px;padding:0 7px;font-size:10px}.compare-filter .attach-btn-primary{height:26px;padding:3px 12px}.compare-filter a{padding:6px}.compare-summary{gap:6px;margin-bottom:6px}.compare-summary>div{padding:5px 10px;gap:9px;min-height:38px}.compare-summary span{font-size:10px}.compare-summary strong{font-size:16px}.compare-summary small{font-size:15px;font-weight:800;color:#334155}.compare-panels header{padding:6px 9px}.compare-grid{height:calc(100vh - 315px);min-height:240px}
.bulk-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border:1px solid #d9e2ec;border-top:0;background:#fff;font-size:12px}
.bulk-page-controls{display:flex;align-items:center;gap:6px}
.bulk-page-controls label{display:flex;align-items:center;gap:5px}
.bulk-page-controls select,.bulk-page-controls button{height:29px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;padding:0 9px;font-size:12px}
.bulk-page-controls button:not(:disabled){cursor:pointer}
.bulk-page-controls button:disabled{opacity:.45}
.bulk-page-number{min-width:92px;text-align:center;font-weight:700}
/* En escritorio, Carga Masiva ocupa exactamente el alto visible: sólo desplaza la tabla. */
@media(min-width:1051px){
    body:has(.bulk-tab-tall){overflow-y:hidden}
    .content:has(.bulk-tab-tall){height:calc(100vh - 58px);overflow:hidden;box-sizing:border-box}
    .bulk-tab-tall{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
    .bulk-tab-tall #bulkApplyForm{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden}
    .bulk-tab-tall .bulk-grid{flex:1 1 auto;height:auto!important;max-height:none!important;min-height:0!important}
    .bulk-tab-tall .bulk-pager{flex:0 0 auto}
    .bulk-tab-tall .bulk-apply{flex:0 0 auto;background:#fff;padding:7px 4px 2px}
}
.compare-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:7px 0}.compare-legend>span{padding:4px 8px;border-radius:4px}.compare-legend .linked,.compare-grid .compare-row.linked>td{background:#eaf6ed;color:#153526}.compare-legend .possible,.compare-grid .compare-row.possible>td{background:#fff7d6;color:#413610}.compare-grid .compare-row.none>td{background:#fff}.compare-row{cursor:pointer}.compare-grid .compare-row.selected>td,.compare-grid .compare-row.counterpart>td{box-shadow:inset 0 2px #4883b5,inset 0 -2px #4883b5}.compare-grid .compare-row.selected>td:first-child,.compare-grid .compare-row.counterpart>td:first-child{border-left:3px solid #276798}.compare-row:focus-visible{outline:2px solid #276798;outline-offset:-2px}.compare-grid th{z-index:1}#compare-selection{color:#334155}.compare-grid{height:calc(100vh - 350px)}

.compare-unmatched-heading{margin:18px 0 8px}.compare-unmatched-heading h2{font-size:16px;margin:0 0 4px}.compare-unmatched-heading p{margin:0;color:#475569}.compare-unmatched{margin-bottom:20px}.compare-unmatched .compare-grid{height:340px;min-height:240px}

/* Adjuntar: compact type selector and aligned XML/PDF file inputs. */
.attach-upload-panel{grid-template-columns:minmax(160px,220px) minmax(0,1fr)!important;align-items:start!important}
.attach-upload-panel .upload-type-row{grid-column:1;grid-row:1}
.attach-upload-panel .upload-xml-row{grid-column:2;grid-row:1}
.attach-upload-panel .upload-pdf-row{grid-column:2;grid-row:2}
@media(max-width:700px){
 .attach-upload-panel{grid-template-columns:minmax(0,1fr)!important}
 .attach-upload-panel .upload-type-row{grid-column:1;grid-row:1}
 .attach-upload-panel .upload-xml-row{grid-column:1;grid-row:2}
 .attach-upload-panel .upload-pdf-row{grid-column:1;grid-row:3}
}
.app-shell.sidebar-hidden .sidebar{display:none!important}.app-shell.sidebar-hidden .main{margin-left:0!important;width:100%!important}.app-shell.sidebar-hidden .ce-notification-console,body:has(.app-shell.sidebar-hidden) .ce-notification-console{left:0!important}

/* Painted button surface preserves the original link's layout dimensions. */
.sat-table a.compact-file-button,.bulk-grid a.compact-file-button{display:inline;padding:0;margin:0;border:0;min-width:0;height:auto;font:inherit;line-height:inherit;background:#f28c00;color:#fff!important;text-decoration:none;border-radius:2px;box-shadow:0 0 0 3px #f28c00;white-space:nowrap}
.sat-table a.compact-file-button:hover,.bulk-grid a.compact-file-button:hover{background:#d97706;box-shadow:0 0 0 3px #d97706}
.sat-table a.compact-file-button:focus-visible,.bulk-grid a.compact-file-button:focus-visible{outline:2px solid #153526;outline-offset:4px}
.saved-file-field{display:flex;align-items:center;gap:5px;min-width:0}.saved-file-field input{flex:1;min-width:0!important;width:0!important}.saved-file-action{flex:none;background:#f28c00;color:#fff!important;text-decoration:none;border-radius:4px;padding:2px 5px;font-size:10px;line-height:16px}.saved-file-action:hover{background:#d97706}.saved-file-action[hidden]{display:none!important}
.app-message-dialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:470px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #dbe5f0;border-radius:8px;background:#fff;padding:22px;color:#172033;box-shadow:0 14px 45px #0003;font-family:inherit}.app-message-dialog::backdrop{background:rgba(15,23,42,.38)}.app-message-dialog h2{margin:0 0 10px;font-size:16px;color:#008564}.app-message-dialog p{margin:0 0 26px;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.app-message-actions{display:flex;justify-content:flex-end;gap:8px}.app-message-actions button{min-height:32px;padding:6px 16px;border-radius:8px;font:inherit;font-weight:700;cursor:pointer}