:root{--navy:#0b2b57;--navy2:#123a6d;--blue:#1f63b3;--green:#16835c;--red:#d73a49;--bg:#f4f7fb;--card:#fff;--text:#11233e;--muted:#6b7d95;--line:#dfe7f0;--shadow:0 10px 28px rgba(22,45,78,.08);--radius:16px}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--text);background:var(--bg)}body{font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}.muted{color:var(--muted)}
.auth-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#081f40,#0e3568);position:relative;overflow:hidden}.auth-glow{position:absolute;width:420px;height:420px;border-radius:50%;filter:blur(40px);opacity:.25}.glow-a{background:#1f63b3;top:-180px;right:-120px}.glow-b{background:#16835c;bottom:-220px;left:-140px}.auth-card{width:min(460px,100%);background:rgba(255,255,255,.98);border-radius:24px;padding:38px;box-shadow:0 28px 70px rgba(0,0,0,.2);position:relative}.login-logo{width:220px;height:auto;margin-bottom:24px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.16em;color:#67809e}.auth-card h1{font-size:32px;line-height:1.1;margin:9px 0 12px}.auth-card p{color:var(--muted);line-height:1.6;margin:0 0 25px}.auth-form{display:grid;gap:15px}label{display:grid;gap:7px;font-weight:700;color:#233754}input,select,textarea{width:100%;border:1px solid var(--line);background:#fff;color:var(--text);border-radius:11px;padding:12px 13px;outline:none;transition:.18s}input:focus,select:focus,textarea:focus{border-color:#75a4d4;box-shadow:0 0 0 3px rgba(31,99,179,.1)}textarea{min-height:100px;resize:vertical}.link-btn{background:none;border:0;color:var(--blue);font-weight:700;padding:14px 0 0}.btn{border:1px solid var(--line);border-radius:11px;padding:10px 15px;font-weight:800;color:var(--text);background:#fff;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(22,45,78,.08)}.btn-primary{background:var(--navy);border-color:var(--navy);color:#fff}.btn-success{background:var(--green);border-color:var(--green);color:#fff}.btn-outline{background:#fff;color:var(--navy);border-color:#cbd8e6}.btn-light{background:#f7fbff}.btn-large{padding:13px 18px;font-size:15px}.full{width:100%;margin-top:14px}
.app-shell{min-height:100vh}.topbar{height:78px;background:linear-gradient(90deg,#0a2954,#0e3568);color:#fff;display:flex;align-items:center;padding:0 28px;gap:22px;position:sticky;top:0;z-index:20;box-shadow:0 6px 20px rgba(5,28,57,.16)}.brand{display:flex;align-items:center;gap:14px;min-width:265px}.brand img{width:152px;height:auto;max-height:42px;object-fit:contain;object-position:left center}.brand-divider{height:28px;width:1px;background:rgba(255,255,255,.25)}.brand span{font-size:12px;color:#b8c9dd;font-weight:700}.top-nav{display:flex;align-items:center;justify-content:center;gap:4px;flex:1;min-width:0}.nav-btn{border:0;background:transparent;color:#dbe7f5;border-radius:11px;padding:11px 12px;font-weight:800;white-space:nowrap;display:flex;align-items:center;gap:7px}.nav-btn:hover,.nav-btn.active{background:rgba(255,255,255,.13);color:#fff}.nav-badge{background:#e33d4e;color:#fff;border-radius:999px;font-size:10px;min-width:20px;height:20px;display:inline-grid;place-items:center;padding:0 5px}.top-user{display:flex;align-items:center;gap:10px;min-width:205px;justify-content:flex-end}.top-user strong{display:block;font-size:14px}.top-user small{display:block;color:#b8c9dd;margin-top:2px}.avatar,.profile-avatar{display:grid;place-items:center;background:#eaf1f8;color:var(--blue);font-weight:900;border-radius:50%;overflow:hidden;background-position:center;background-repeat:no-repeat}.avatar{width:38px;height:38px}.icon-btn{border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);color:#fff;border-radius:11px;width:38px;height:38px}
.main-content{max-width:1500px;margin:0 auto;padding:30px 34px 60px}.tab-content{display:none}.tab-content.active{display:block}.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin:0 0 22px}.page-heading.compact h2{font-size:30px;margin:6px 0 5px;letter-spacing:-.02em}.page-heading p{color:var(--muted);margin:0;line-height:1.5}.heading-actions{display:flex;gap:10px;align-items:center}.heading-actions select{min-width:260px}.filter-bar{display:flex;align-items:end;gap:12px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:18px;box-shadow:0 4px 16px rgba(22,45,78,.04)}.filter-bar label{font-size:12px;min-width:160px}.filter-bar .btn{height:42px}.kpi-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:13px}.kpi-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:17px 18px;box-shadow:var(--shadow);position:relative;overflow:hidden}.kpi-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--navy)}.kpi-card.accent-green:before{background:var(--green)}.kpi-card.accent-blue:before{background:var(--blue)}.kpi-card.accent-money:before{background:#b98513}.kpi-card.accent-dark:before{background:#42546e}.kpi-card span{font-size:10px;letter-spacing:.12em;font-weight:900;color:#71839a}.kpi-card strong{display:block;font-size:27px;margin:8px 0 3px;letter-spacing:-.03em}.kpi-card small{color:var(--muted)}.kpi-card b{color:var(--text)}.insight-strip{margin:16px 0}.insight-strip>div{border:1px solid #d8e4ef;background:#eef5fb;border-radius:13px;padding:12px 15px;color:#3f5c7b}.insight-strip strong{color:var(--navy)}.dashboard-grid{display:grid;grid-template-columns:1.15fr 1.15fr .8fr;gap:15px}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #edf1f5}.panel-head h3{margin:4px 0 0;font-size:17px}.panel-body{padding:20px}.chart-panel{min-height:320px}.small-panel{min-height:300px}.chart-box{height:245px;padding:14px 18px}.chart-box.small{height:235px}.alert-panel{min-height:300px}.alert-list{padding:10px 18px 18px}.alert-item{display:flex;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid #edf1f5}.alert-item strong{font-size:13px}.alert-item p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.4}.priority{border-radius:999px;padding:5px 8px;font-size:10px;font-weight:900;height:max-content}.priority.ALTA{background:#fde8eb;color:#c32639}.priority.MEDIA{background:#fff3d7;color:#9a6a00}.priority.BAJA{background:#e8f6ef;color:#167149}.data-table{width:100%;border-collapse:collapse}.data-table th{background:#f5f8fb;color:#637792;text-transform:uppercase;font-size:10px;letter-spacing:.08em;text-align:left;padding:11px 13px;white-space:nowrap}.data-table td{padding:12px 13px;border-top:1px solid #edf1f5;vertical-align:middle}.table-wrap{overflow:auto}.table-wrap.tall{max-height:620px}.green-text{color:var(--green)}.blue-text{color:var(--blue)}.red-text{color:var(--red)}
.form-panel{padding:24px;max-width:1050px}.form-grid{display:grid;gap:15px;margin-bottom:16px}.form-grid.two{grid-template-columns:repeat(2,1fr)}.form-grid.three{grid-template-columns:repeat(3,1fr)}.form-grid.four{grid-template-columns:repeat(4,1fr)}.conditional-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:15px 0}.conditional{display:none}.conditional.visible{display:grid}.form-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:18px}.rule-box{padding:12px 14px;border-radius:11px;background:#f2f6fa;border:1px solid #e0e8f0;color:#5d7088}.client-context{padding:13px 15px;border-radius:11px;background:#f6f9fc;border:1px solid #e2e9f1;color:#61748d;margin-bottom:16px;line-height:1.5}.autocomplete-list{position:relative;z-index:5}.autocomplete-item{display:grid;gap:3px;padding:12px 14px;border:1px solid var(--line);border-top:0;background:#fff;cursor:pointer}.autocomplete-item:first-child{border-top:1px solid var(--line);border-radius:10px 10px 0 0}.autocomplete-item:last-child{border-radius:0 0 10px 10px}.autocomplete-item strong{color:var(--text)}.autocomplete-item span,.autocomplete-item small{color:var(--muted)}
.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.portfolio-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:var(--shadow);transition:.18s}.portfolio-card:hover{transform:translateY(-3px);box-shadow:0 15px 32px rgba(22,45,78,.11)}.portfolio-top{display:flex;justify-content:space-between;align-items:center}.status-dot{font-size:11px;color:var(--green);font-weight:800}.portfolio-card h3{font-size:21px;margin:12px 0 5px}.portfolio-card p{color:var(--muted);min-height:42px;line-height:1.45}.portfolio-title{font-size:12px;color:#647893;font-weight:800;margin:15px 0}.project-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.project-metrics div{background:#f5f8fb;border-radius:11px;padding:10px}.project-metrics strong{display:block;font-size:18px}.project-metrics span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}.search-row{display:flex;gap:10px;padding:18px 20px;border-bottom:1px solid #edf1f5}.search-row input{flex:1}.hint{padding:13px 20px;color:var(--muted);font-size:12px}.status-pill{font-size:10px;font-weight:900;padding:5px 8px;border-radius:999px;white-space:nowrap}.status-pill.pending{background:#fde8eb;color:#c32639}.status-pill.done{background:#e8f6ef;color:#167149}.agenda-toolbar{display:flex;gap:8px;margin-bottom:15px}.agenda-filter{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 14px;font-weight:800;color:#637792}.agenda-filter.active{background:var(--navy);color:#fff;border-color:var(--navy)}.agenda-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.agenda-card{background:#fff;border:1px solid var(--line);border-left:4px solid #b8c4d1;border-radius:15px;padding:17px;box-shadow:var(--shadow)}.agenda-card.ALTA{border-left-color:var(--red)}.agenda-card.MEDIA{border-left-color:#d49a20}.agenda-card.BAJA{border-left-color:var(--green)}.agenda-date{font-size:11px;font-weight:900;color:#4e77a4}.agenda-card h3{font-size:15px;margin:10px 0}.agenda-card p{color:var(--muted);line-height:1.45}.agenda-actions{display:flex;justify-content:space-between;align-items:center;margin-top:15px}.settings-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:15px}.settings-admin{margin-top:15px}.profile-avatar{width:72px;height:72px;font-size:27px;margin-bottom:10px}.photo-upload{display:inline-flex;display:inline-grid;width:max-content;margin-bottom:20px;color:var(--blue)}.photo-upload input{display:none}.stack-list{padding:6px 20px 20px}.stack-item{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:13px 0;border-bottom:1px solid #edf1f5}.stack-item strong{display:block}.stack-item small{display:block;color:var(--muted);margin-top:4px}.inline-form{display:flex;gap:10px;align-items:center}.inline-form>*{flex:1}.user-create-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr .8fr auto;gap:10px;align-items:end}.user-create-action{align-self:end}.export-callout{margin:18px 0;padding:17px;border-radius:13px;background:#f3f7fb;border:1px solid #dfe8f1;display:flex;justify-content:space-between;gap:15px}.export-callout span{color:var(--muted)}
.modal{position:fixed;inset:0;background:rgba(7,25,48,.55);display:grid;place-items:center;padding:22px;z-index:50;backdrop-filter:blur(3px)}.modal-card{background:#fff;border-radius:20px;width:min(560px,100%);max-height:90vh;overflow:auto;padding:27px;position:relative;box-shadow:0 28px 80px rgba(0,0,0,.25)}.modal-card.wide{width:min(980px,100%)}.modal-close{position:absolute;right:16px;top:13px;border:0;background:#f1f5f9;width:32px;height:32px;border-radius:50%;font-size:20px}.modal-card h2{margin:7px 0 10px}.modal-card>p{color:var(--muted);line-height:1.5}.modal-section{border-top:1px solid #edf1f5;padding:18px 0}.section-title{font-weight:900;margin-bottom:12px}.radio-row{display:flex;gap:20px;margin-bottom:12px}.radio-row label{display:flex;align-items:center;gap:7px;font-weight:700}.radio-row input{width:auto}.check-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.check-card{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:10px;background:#fff}.check-card input{width:auto}.muted-checks{opacity:.55}.upload-row{display:flex;gap:10px;align-items:center}.upload-row input{flex:1}.file-hint{font-size:12px;color:var(--muted);margin-top:8px}.detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.detail-grid div{background:#f6f9fc;border:1px solid #e5ebf2;border-radius:12px;padding:12px}.detail-grid span{display:block;font-size:10px;color:#70829a;font-weight:900;letter-spacing:.08em}.detail-grid strong{display:block;margin-top:5px}.client-history{border-top:1px solid #edf1f5;padding-top:15px}.client-history h3{margin-top:0}.history-item{display:grid;grid-template-columns:180px 1fr;gap:5px;padding:12px 0;border-bottom:1px solid #edf1f5}.history-item span{color:var(--blue);font-weight:800}.history-item small{grid-column:1/-1;color:var(--muted)}.empty-state{padding:35px;text-align:center;color:var(--muted);border:1px dashed #ccd8e4;border-radius:12px;background:#fbfcfe}.toast{position:fixed;right:22px;bottom:22px;background:#102f5f;color:#fff;padding:13px 16px;border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.2);transform:translateY(20px);opacity:0;pointer-events:none;transition:.25s;z-index:100}.toast.show{transform:translateY(0);opacity:1}.toast.error{background:#c92d42}.loading{position:fixed;inset:0;background:rgba(255,255,255,.62);backdrop-filter:blur(2px);display:grid;place-items:center;align-content:center;gap:10px;z-index:90}.loader{width:34px;height:34px;border:4px solid #d9e2ed;border-top-color:var(--blue);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:1250px){.topbar{padding:0 16px}.brand{min-width:190px}.brand span,.brand-divider{display:none}.brand img{width:132px}.top-nav{gap:0}.nav-btn{padding:10px 8px}.nav-btn span{font-size:12px}.kpi-grid{grid-template-columns:repeat(3,1fr)}.dashboard-grid{grid-template-columns:1fr 1fr}.alert-panel{grid-column:1/-1}.project-grid,.agenda-grid{grid-template-columns:repeat(2,1fr)}.user-create-grid{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.topbar{height:auto;flex-wrap:wrap;padding:12px}.brand{order:1}.top-user{order:2;margin-left:auto}.top-nav{order:3;flex-basis:100%;overflow:auto;justify-content:flex-start}.nav-btn{padding:9px 10px}.main-content{padding:22px 16px}.page-heading{align-items:flex-start;flex-direction:column}.heading-actions{width:100%}.heading-actions select{flex:1}.dashboard-grid,.settings-grid,.project-grid,.agenda-grid{grid-template-columns:1fr}.form-grid.three,.form-grid.four,.conditional-grid{grid-template-columns:1fr}.filter-bar{flex-wrap:wrap}.filter-bar label{flex:1;min-width:140px}.history-item{grid-template-columns:1fr}.detail-grid{grid-template-columns:1fr 1fr}.user-create-grid{grid-template-columns:1fr}.inline-form{flex-direction:column;align-items:stretch}.export-callout{flex-direction:column}.check-grid{grid-template-columns:1fr}}
@media(max-width:560px){.top-user div:not(.avatar){display:none}.top-user{min-width:auto}.brand{min-width:auto}.brand img{width:122px}.nav-btn{padding:8px 9px}.nav-btn span{font-size:11px}.kpi-grid{grid-template-columns:1fr 1fr}.kpi-card strong{font-size:22px}.detail-grid{grid-template-columns:1fr}.auth-card{padding:28px}.modal{padding:10px}}


/* ===== RECUPERO · CARTERAS / ALTA DE CARTERA ===== */
.project-section{margin-bottom:30px}
.project-section-head{display:flex;justify-content:space-between;gap:28px;align-items:flex-end;margin-bottom:14px;padding:0 2px}
.project-section-head h3{font-size:1.45rem;color:var(--primary);margin:4px 0}
.project-section-head p{color:var(--gray-600);margin:0;max-width:760px}
.project-rollup{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.project-rollup div{min-width:92px;padding:10px 13px;background:#fff;border:1px solid var(--gray-200);border-radius:10px;text-align:center;box-shadow:var(--shadow)}
.project-rollup strong{display:block;font-size:1.05rem;color:var(--primary)}
.project-rollup span{display:block;font-size:.65rem;text-transform:uppercase;color:var(--gray-600);font-weight:700;margin-top:2px}
.portfolio-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px}
.portfolio-card{background:#fff;border:1px solid var(--gray-200);border-radius:14px;padding:18px;box-shadow:var(--shadow);transition:transform .2s,box-shadow .2s,border-color .2s;cursor:pointer}
.portfolio-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg);border-color:#b8c7dc}
.portfolio-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.portfolio-card h3{font-size:1.15rem;color:var(--primary);margin:10px 0 4px}
.portfolio-source{font-size:.78rem;color:var(--gray-600);min-height:22px}
.project-metrics.four{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0}
.project-metrics.four>div{background:var(--gray-100);border-radius:9px;padding:10px 8px;text-align:center;min-width:0}
.project-metrics.four strong{display:block;font-size:.98rem;color:var(--primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-metrics.four span{display:block;font-size:.62rem;text-transform:uppercase;color:var(--gray-600);font-weight:700;margin-top:3px}
.portfolio-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--gray-200);padding-top:12px;font-size:.72rem;color:var(--gray-600)}
.portfolio-footer .btn{flex:0 0 auto}
.portfolio-empty{min-height:260px}
.empty-icon{font-size:2rem;color:var(--primary);margin-bottom:8px}
.cartera-create-modal{max-height:92vh}
.cartera-create-modal>p{margin-bottom:18px}
.modal-step{display:grid;grid-template-columns:44px 1fr;gap:14px;padding:18px 0;border-top:1px solid var(--gray-200)}
.modal-step:first-of-type{border-top:0}
.step-number{width:36px;height:36px;border-radius:50%;background:#edf3fb;color:var(--primary);display:flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:800}
.modal-section{min-width:0}
.modal-section .section-title{margin:0 0 10px;padding:0;border:0;font-size:.95rem}
.optional{font-size:.65rem;color:var(--gray-500);font-weight:500;text-transform:none}
.field-hint,.file-hint{font-size:.73rem;color:var(--gray-600);margin-top:8px}
.radio-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.radio-card{display:flex!important;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--gray-300);border-radius:10px;cursor:pointer;background:#fff}
.radio-card:has(input:checked){border-color:#8fa9ca;background:#f7faff}
.radio-card input{margin-top:3px}
.radio-card span{display:flex;flex-direction:column;gap:3px}
.radio-card strong{font-size:.82rem;color:var(--primary)}
.radio-card small{font-size:.7rem;color:var(--gray-600)}
.file-status{display:flex;align-items:center;gap:8px;margin-top:12px;padding:10px 12px;border-radius:9px;background:var(--gray-100);font-size:.75rem;color:var(--gray-600)}
.file-status-dot{width:9px;height:9px;border-radius:50%;background:var(--gray-400);flex:0 0 auto}
.file-status.valid{background:#edf9f0;color:#17652b}.file-status.valid .file-status-dot{background:#28a745}
.file-status.invalid{background:#fff1f2;color:#a3212d}.file-status.invalid .file-status-dot{background:#dc3545}
.file-status.validating{background:#f3f7fc;color:var(--primary)}.file-status.validating .file-status-dot{background:#2f6fab}
.form-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:8px;padding-top:18px;border-top:1px solid var(--gray-200)}
.form-footer>div{display:flex;flex-direction:column;gap:2px}
.muted-checks{opacity:.72}
@media(max-width:900px){
 .project-section-head{align-items:flex-start;flex-direction:column}.project-rollup{justify-content:flex-start}
 .radio-row{grid-template-columns:1fr}.project-metrics.four{grid-template-columns:repeat(2,1fr)}
}

/* ---------- Login RECUPERO · acceso operativo ---------- */
.auth-screen{background:radial-gradient(circle at 12% 12%,rgba(44,112,195,.22),transparent 32%),radial-gradient(circle at 88% 88%,rgba(19,153,112,.14),transparent 30%),linear-gradient(135deg,#061a36 0%,#0c2f5d 58%,#08254a 100%)}
.auth-card{width:min(500px,calc(100vw - 32px));padding:42px 44px 38px;border:1px solid rgba(255,255,255,.72);box-shadow:0 34px 90px rgba(0,0,0,.28);animation:authIn .45s ease both}
.login-logo{width:245px;margin:0 0 28px}
.auth-kicker{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.auth-status{font-size:11px;font-weight:800;color:#4b6b8f;white-space:nowrap;display:flex;align-items:center;gap:6px}
.auth-status i{width:7px;height:7px;border-radius:50%;background:#24b47e;box-shadow:0 0 0 4px rgba(36,180,126,.12)}
.auth-card h1{font-size:36px;letter-spacing:-.035em;margin:10px 0 13px}
.auth-card h1 em{font-style:normal;color:#1e5da5}
.auth-lead{font-size:15px;max-width:410px;margin-bottom:28px!important}
.auth-form{gap:17px}
.auth-form label{font-size:13px}
.auth-form input{height:52px;font-size:15px;padding:0 15px;border-radius:13px}
.username-input{text-transform:uppercase;letter-spacing:.04em;font-weight:800;direction:ltr!important;text-align:left!important;unicode-bidi:plaintext!important;writing-mode:horizontal-tb!important}
.auth-submit{height:54px;margin-top:5px;border-radius:13px;justify-content:space-between;padding:0 18px 0 20px;font-size:15px}
.auth-help{display:flex;align-items:center;justify-content:space-between;margin-top:15px;gap:12px}
.auth-help>span{font-size:12px;color:#7890aa}
.auth-help .link-btn{padding:0;font-size:13px}
.initial-password-note{display:grid;gap:3px;border:1px solid #dce7f2;background:#f7fbff;border-radius:11px;padding:12px 14px;align-content:center}
.initial-password-note span{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#6b84a0}
.initial-password-note strong{font-size:16px;color:#0b376b;letter-spacing:.08em}
.initial-password-note small{font-size:11px;color:#71859d}
@keyframes authIn{from{opacity:0;transform:translateY(10px) scale(.99)}to{opacity:1;transform:none}}
@media(max-width:560px){.auth-card{padding:30px 24px}.auth-kicker{align-items:flex-start;flex-direction:column;gap:7px}.auth-card h1{font-size:30px}.login-logo{width:205px}}

/* ===== RECUPERO · REDISEÑO CARTERAS ===== */
#tab-carteras{animation:portfolioPageIn .35s ease both}
.portfolio-page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:28px;margin-bottom:24px}
.portfolio-heading-copy h2{font-size:34px;letter-spacing:-.035em;margin:7px 0 6px;color:#0d2c54}
.portfolio-heading-copy p{max-width:790px;color:#637792;font-size:14px;line-height:1.55;margin:0}
.portfolio-heading-actions{display:flex;align-items:center}
.portfolio-overview{background:linear-gradient(135deg,#0b2b57 0%,#123f76 100%);border-radius:20px;padding:20px 22px;margin-bottom:24px;color:#fff;box-shadow:0 16px 35px rgba(12,43,87,.16);position:relative;overflow:hidden}
.portfolio-overview:after{content:"";position:absolute;width:240px;height:240px;border-radius:50%;right:-90px;top:-120px;background:rgba(255,255,255,.06)}
.portfolio-overview-title{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:16px;position:relative;z-index:1}
.portfolio-overview-title .eyebrow{color:#a9c3e1}.portfolio-overview-title strong{display:block;font-size:18px;margin-top:3px}.portfolio-overview-note{font-size:11px;color:#bfd0e4}
.portfolio-overview-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;position:relative;z-index:1}
.portfolio-overview-grid>div{background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:12px 14px}
.portfolio-overview-grid span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.1em;color:#bdd0e5;font-weight:800}.portfolio-overview-grid strong{display:block;font-size:20px;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-section{margin-bottom:26px}
.project-project-card{display:flex;justify-content:space-between;align-items:center;gap:22px;padding:20px 22px;background:#fff;border:1px solid #dce6f0;border-radius:18px 18px 0 0;box-shadow:0 5px 18px rgba(22,45,78,.05)}
.project-identity{display:flex;align-items:center;gap:14px;min-width:0}.project-avatar{width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#0b2b57,#1f63b3);color:#fff;display:grid;place-items:center;font-weight:900;font-size:20px;box-shadow:0 8px 18px rgba(31,99,179,.2)}
.project-identity h3{margin:3px 0 3px;font-size:22px;color:#102f5f}.project-identity p{margin:0;color:#6b7d95;line-height:1.4}.project-rollup{display:grid;grid-template-columns:repeat(4,minmax(78px,1fr));gap:8px;flex:0 0 auto}.project-rollup div{min-width:82px;padding:8px 11px;background:#f5f8fb;border:1px solid #e7edf4;border-radius:11px;text-align:center}.project-rollup strong{display:block;color:#102f5f;font-size:16px}.project-rollup span{display:block;margin-top:3px;color:#74869d;font-size:9px;text-transform:uppercase;font-weight:800;letter-spacing:.06em}
.portfolio-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:16px;background:#edf3f8;border:1px solid #dce6f0;border-top:0;border-radius:0 0 18px 18px;padding:18px}
.portfolio-card{position:relative;background:#fff;border:1px solid #dbe5ef;border-radius:16px;padding:20px 20px 17px;box-shadow:0 7px 20px rgba(22,45,78,.06);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;overflow:hidden;cursor:default}
.portfolio-card:hover{transform:translateY(-3px);box-shadow:0 15px 30px rgba(22,45,78,.11);border-color:#b9cce0}
.portfolio-card-accent{position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg,#1f63b3,#16835c)}
.portfolio-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.portfolio-label{display:flex;align-items:center;gap:8px}.portfolio-icon{width:28px;height:28px;border-radius:8px;background:#edf4fb;color:#1f63b3;display:grid;place-items:center;font-size:13px}.access-badge{font-size:10px;font-weight:900;color:#167149;background:#e9f7f0;border:1px solid #ccebdc;border-radius:999px;padding:6px 9px}
.portfolio-card h3{font-size:20px;color:#102f5f;margin:15px 0 5px}.portfolio-source{font-size:12px;color:#74869d!important;min-height:0!important;margin:0 0 18px!important}.portfolio-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px}.portfolio-metrics>div{padding:12px;border:1px solid #e6edf4;background:#f8fafc;border-radius:11px;min-width:0}.portfolio-metrics span{display:block;color:#73869e;text-transform:uppercase;letter-spacing:.06em;font-size:9px;font-weight:900}.portfolio-metrics strong{display:block;color:#102f5f;font-size:16px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.portfolio-footer{border-top:1px solid #edf1f5;padding-top:14px;display:flex;justify-content:space-between;align-items:flex-end;gap:14px}.portfolio-footer>div{min-width:0}.portfolio-footer-label{display:block;color:#8a9aae;font-size:8px;letter-spacing:.1em;font-weight:900;margin-bottom:3px}.portfolio-footer strong{display:block;color:#506783;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:250px}.portfolio-open-btn{min-width:145px}.portfolio-open-btn span{transition:transform .18s}.portfolio-open-btn:hover span{transform:translateX(3px)}
.client-panel-head{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:19px 22px;border-bottom:1px solid #e9eef4}.client-panel-brand{display:flex;align-items:center;gap:13px}.client-panel-brand h3{margin:3px 0 0;font-size:21px;color:#102f5f}.back-icon-btn{width:38px;height:38px;border:1px solid #d5e0eb;background:#f7faff;color:#0b2b57;border-radius:11px;font-size:19px;font-weight:800}.client-panel-hint{font-size:11px;color:#71849b}.client-search-bar{display:flex;gap:10px;padding:15px 22px;background:#f8fafc;border-bottom:1px solid #e9eef4}.search-input-wrap{position:relative;flex:1}.search-input-wrap>span{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:18px;color:#7c8ea5;pointer-events:none}.search-input-wrap input{padding-left:40px;height:44px}.client-search-bar .btn{min-width:90px}.client-table-meta{display:flex;justify-content:space-between;gap:15px;padding:11px 22px;color:#72859d;font-size:11px}.client-table-meta span:first-child{font-weight:900;color:#405a77}.client-data-table tbody tr.client-row{cursor:pointer;transition:background .15s}.client-data-table tbody tr.client-row:hover{background:#f5f9fd}.client-data-table tbody tr.client-row td:first-child{color:#102f5f}.client-data-table tbody tr.client-row td:first-child strong{font-size:12px}
@keyframes portfolioPageIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media(max-width:1100px){.portfolio-overview-grid{grid-template-columns:repeat(3,1fr)}.project-project-card{align-items:flex-start;flex-direction:column}.project-rollup{width:100%;grid-template-columns:repeat(4,1fr)}}
@media(max-width:700px){.portfolio-page-head{align-items:flex-start;flex-direction:column}.portfolio-heading-actions{width:100%}.portfolio-heading-actions .btn{width:100%}.portfolio-overview-title{align-items:flex-start;flex-direction:column}.portfolio-overview-grid{grid-template-columns:repeat(2,1fr)}.project-rollup{grid-template-columns:repeat(2,1fr)}.portfolio-grid{grid-template-columns:1fr}.portfolio-footer{align-items:stretch;flex-direction:column}.portfolio-open-btn{width:100%}.client-panel-head{align-items:flex-start;flex-direction:column}.client-search-bar{flex-direction:column}.client-search-bar .btn{width:100%}.client-table-meta{align-items:flex-start;flex-direction:column}}

/* RECUPERO · CARTERAS — executive redesign */
#tab-carteras{max-width:100%;padding-bottom:34px}
#tab-carteras .portfolio-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:28px;margin-bottom:22px}
#tab-carteras .portfolio-heading-copy h2{font-size:31px;letter-spacing:-.025em;margin:5px 0 7px;color:#102f5f}
#tab-carteras .portfolio-heading-copy p{max-width:650px;margin:0;color:#627793;line-height:1.5;font-size:13px}
#tab-carteras .portfolio-heading-actions .btn{border-radius:9px;padding:11px 18px;box-shadow:0 8px 18px rgba(22,131,92,.15)}
#tab-carteras .portfolio-overview{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:0 0 24px}
.portfolio-kpi{min-height:72px;background:#fff;border:1px solid #e5ebf2;border-radius:10px;padding:13px 14px;display:flex;align-items:center;gap:11px;box-shadow:0 5px 18px rgba(24,48,80,.045)}
.portfolio-kpi-icon{width:31px;height:31px;border-radius:7px;display:grid;place-items:center;font-size:15px;font-weight:900;flex:0 0 auto}.portfolio-kpi-icon.blue{background:#eaf2ff;color:#2678df}.portfolio-kpi-icon.purple{background:#f1eaff;color:#8847db}.portfolio-kpi-icon.green{background:#e8f7f0;color:#19935f}.portfolio-kpi-icon.orange{background:#fff0dc;color:#d9821e}.portfolio-kpi-icon.cyan{background:#e8f4ff;color:#2786d8}
.portfolio-kpi span{display:block;font-size:8px;font-weight:900;letter-spacing:.08em;color:#72849b}.portfolio-kpi strong{display:block;font-size:17px;color:#102f5f;line-height:1.1;margin-top:3px}.portfolio-kpi small{display:block;font-size:9px;color:#8a9aae;margin-top:3px}
.portfolio-list-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:0 0 12px;padding:0 2px}.portfolio-list-head h3{margin:0;color:#102f5f;font-size:15px}.portfolio-list-head span{font-size:10px;color:#8191a5}.portfolio-list-tools{display:flex;gap:6px;align-items:center}.portfolio-search{position:relative}.portfolio-search span{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:#7d8ea4;font-size:15px}.portfolio-search input{width:220px;height:35px;padding:0 11px 0 31px;border:1px solid #dce5ee;border-radius:7px;background:#fff;font-size:10px}.portfolio-view-btn{width:35px;height:35px;border:1px solid #dce5ee;border-radius:7px;background:#fff;color:#72859c}.portfolio-view-btn.active{color:#1766d2;background:#f1f6ff}
.projects-stack{display:flex;flex-direction:column;gap:14px}.project-modern-card{background:#fff;border:1px solid #e0e8f0;border-radius:11px;box-shadow:0 7px 22px rgba(21,48,80,.055);overflow:hidden}.project-modern-head{display:grid;grid-template-columns:minmax(300px,1.35fr) minmax(450px,2fr) 20px;align-items:center;gap:18px;padding:16px 18px;border-bottom:1px solid #edf1f5}.project-modern-identity{display:flex;align-items:center;gap:11px;min-width:0}.project-modern-avatar{width:35px;height:35px;border-radius:7px;background:linear-gradient(145deg,#1655a3,#1e74d0);color:#fff;display:grid;place-items:center;font-weight:900;font-size:17px;box-shadow:0 5px 12px rgba(31,99,179,.16)}.project-code-line{font-size:8px;letter-spacing:.08em;font-weight:900;color:#6f8198;text-transform:uppercase}.status-dot-label{display:inline-flex;align-items:center;gap:4px;margin-left:6px;padding:2px 6px;border-radius:999px;background:#e8f7ef;color:#168154;font-size:7px;letter-spacing:.04em}.status-dot-label:before{content:'';width:4px;height:4px;border-radius:50%;background:#22a66e}.project-modern-identity h3{font-size:18px;color:#102f5f;margin:3px 0 2px}.project-modern-identity p{margin:0;color:#71849b;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-modern-stats{display:grid;grid-template-columns:repeat(5,minmax(70px,1fr));gap:7px}.project-modern-stats div{text-align:center}.project-modern-stats span{display:block;color:#8292a7;font-size:7px;font-weight:900;letter-spacing:.07em}.project-modern-stats strong{display:block;color:#17375f;font-size:12px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-chevron{color:#72859b;font-size:14px}
.project-modern-body{padding:10px;background:#f6f9fc}.portfolio-modern-card{display:grid;grid-template-columns:minmax(0,1fr) 245px;background:#fff;border:1px solid #e0e9f2;border-radius:8px;min-height:130px;overflow:hidden}.portfolio-modern-main{padding:14px 14px 12px}.portfolio-modern-title{display:flex;gap:10px}.portfolio-folder{width:31px;height:31px;border-radius:7px;background:#edf4fc;color:#2b82dd;display:grid;place-items:center;font-size:13px;flex:0 0 auto}.portfolio-name-line{display:flex;align-items:center;gap:7px}.portfolio-name-line h4{margin:0;color:#102f5f;font-size:13px}.status-chip{padding:3px 6px;border-radius:999px;background:#e8f7ef;color:#168154;font-size:7px;font-weight:900}.portfolio-modern-title p{margin:3px 0 5px;color:#7b8ca1;font-size:8px}.source-chip{display:inline-block;padding:3px 6px;border-radius:4px;background:#f1f6fb;color:#5f7590;font-size:7px}.portfolio-modern-metrics{display:grid;grid-template-columns:repeat(3,110px);gap:8px;margin:11px 0 10px}.portfolio-modern-metrics div{background:#f7fafc;border-radius:6px;padding:7px 8px}.portfolio-modern-metrics span{display:block;font-size:7px;color:#7b8da2;font-weight:900}.portfolio-modern-metrics strong{display:block;font-size:13px;color:#163b67;margin-top:3px}.portfolio-modern-meta{display:grid;grid-template-columns:repeat(4,minmax(90px,1fr));gap:8px}.portfolio-modern-meta div{border-top:1px solid #edf1f5;padding-top:7px}.portfolio-modern-meta span{display:block;font-size:7px;color:#8595a9}.portfolio-modern-meta strong{display:block;font-size:8px;color:#4c6684;margin-top:2px}.portfolio-modern-activity{border-left:1px solid #e8eef4;padding:16px 15px;display:flex;flex-direction:column;justify-content:space-between;background:#fbfcfe}.activity-title{font-size:7px;letter-spacing:.07em;text-transform:uppercase;color:#8292a6;font-weight:900}.activity-value{display:flex;align-items:center;gap:8px;margin-top:7px}.activity-icon{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#e8f7ef;color:#168154;font-size:11px}.activity-value strong{display:block;color:#385675;font-size:9px}.activity-value small{display:block;color:#7d8fa5;font-size:7px;margin-top:2px}.activity-muted{color:#9aa7b7;font-size:8px}.portfolio-open-btn{width:100%;height:35px;border-radius:6px;font-size:9px}.portfolio-open-btn span{margin-left:6px}.project-no-portfolio{padding:24px;color:#7b8da2;font-size:10px}.portfolio-filtered{display:none}
@media(max-width:1200px){#tab-carteras .portfolio-overview{grid-template-columns:repeat(3,1fr)}.project-modern-head{grid-template-columns:1fr}.project-modern-stats{max-width:650px}.project-chevron{display:none}.portfolio-modern-card{grid-template-columns:1fr}.portfolio-modern-activity{border-left:0;border-top:1px solid #e8eef4;gap:12px}.portfolio-open-btn{width:180px}}
@media(max-width:760px){#tab-carteras .portfolio-page-head{flex-direction:column}.portfolio-heading-actions,.portfolio-heading-actions .btn{width:100%}#tab-carteras .portfolio-overview{grid-template-columns:1fr 1fr}.portfolio-list-head{align-items:flex-start;flex-direction:column}.portfolio-list-tools{width:100%}.portfolio-search,.portfolio-search input{width:100%}.portfolio-modern-metrics{grid-template-columns:repeat(3,1fr)}.portfolio-modern-meta{grid-template-columns:1fr 1fr}}


/* RECUPERO · HEADER / NOTIFICACIONES */
.top-user{position:relative;min-width:315px;gap:11px}
.top-user-copy{min-width:105px}
.notification-wrap{position:relative}
.notification-btn{position:relative;width:42px;height:42px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.08);color:#fff;border-radius:12px;display:grid;place-items:center;font-size:18px;line-height:1}
.notification-btn:hover{background:rgba(255,255,255,.15)}
.notification-badge{position:absolute;right:-5px;top:-6px;background:#e33d4e;color:#fff;border:2px solid #0d3568;border-radius:999px;min-width:19px;height:19px;padding:0 4px;display:grid;place-items:center;font-size:9px;font-weight:900}
.notification-panel{position:absolute;right:0;top:52px;width:390px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 20px 50px rgba(10,37,75,.2);overflow:hidden;color:var(--text);z-index:60}
.notification-head{padding:15px 16px;border-bottom:1px solid #edf1f5;display:flex;align-items:center;justify-content:space-between;gap:12px}
.notification-head>div{display:grid;gap:3px}.notification-head strong{font-size:16px}
.compact-link{padding:0!important;font-size:10px!important}
.notification-list{max-height:470px;overflow:auto}
.notification-item{width:100%;border:0;border-bottom:1px solid #edf1f5;background:#fff;text-align:left;padding:12px 14px;display:grid;grid-template-columns:34px 1fr 8px;gap:10px;align-items:start}
.notification-item:hover{background:#f7fafc}.notification-item.unread{background:#f5f9fd}
.notification-type{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#edf4fb;color:var(--navy);font-weight:900;font-size:12px}.notification-type.alta{background:#fde8eb;color:#c32639}.notification-type.media{background:#fff4d9;color:#9a6a00}.notification-type.baja{background:#e8f6ef;color:#167149}
.notification-copy{display:grid;gap:3px;min-width:0}.notification-copy strong{font-size:12px}.notification-copy small{color:#687b93;font-size:11px;line-height:1.4}.notification-copy em{color:#9aa8b8;font-size:9px;font-style:normal}
.notification-unread-dot{width:7px;height:7px;border-radius:50%;background:#e33d4e;margin-top:6px}
.notification-empty{padding:30px 20px;display:grid;gap:5px;text-align:center}.notification-empty span{color:var(--muted);font-size:12px}
.logout-btn{border:0;background:#dc3545;color:#fff;border-radius:11px;width:42px;height:42px;display:grid;place-items:center;font-weight:900;box-shadow:0 5px 14px rgba(220,53,69,.25)}.logout-btn:hover{background:#bd2635;transform:translateY(-1px)}.logout-btn span{font-size:22px;line-height:1}.logout-btn em{display:none}
@media(max-width:1250px){.top-user{min-width:260px}.logout-btn em{display:none}.notification-panel{right:-70px}}
@media(max-width:900px){.top-user{min-width:auto}.notification-panel{position:fixed;right:12px;top:68px;width:min(390px,calc(100vw - 24px))}}

.photo-crop-modal{position:fixed;inset:0;background:rgba(5,25,48,.62);display:grid;place-items:center;padding:20px;z-index:100}.photo-crop-modal.hidden{display:none}.photo-crop-card{width:min(560px,100%);background:#fff;border-radius:20px;box-shadow:0 30px 80px rgba(0,0,0,.28);overflow:hidden}.photo-crop-head{padding:20px;border-bottom:1px solid #edf1f5;display:flex;justify-content:space-between;gap:15px}.photo-crop-head h3{margin:5px 0;font-size:21px}.photo-crop-head p{margin:0;color:var(--muted);font-size:12px}.icon-close{border:0;background:#f3f6f9;border-radius:10px;width:36px;height:36px;font-size:23px;color:#4f6279}.photo-crop-stage{width:min(390px,calc(100vw - 70px));height:min(390px,calc(100vw - 70px));margin:22px auto 15px;background:#0b2348;overflow:hidden;border-radius:16px;touch-action:none;cursor:grab;box-shadow:inset 0 0 0 1px rgba(255,255,255,.15)}.photo-crop-stage canvas{display:block;touch-action:none}.photo-crop-controls{padding:0 22px 18px;display:flex;gap:15px;align-items:center}.photo-crop-controls label{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:800}.photo-crop-controls input{width:160px}.photo-crop-controls span{font-size:11px;color:var(--muted)}.photo-crop-actions{padding:16px 20px;border-top:1px solid #edf1f5;display:flex;justify-content:flex-end;gap:9px}

/* RECUPERO · Personalización por usuario v12 */
:root{--user-font:Inter;--user-font-color:#11233e}
html,body{font-family:var(--user-font),Inter,Segoe UI,Arial,sans-serif;color:var(--user-font-color)}
body{background-repeat:no-repeat}
body,button,input,select,textarea{color:var(--user-font-color)}

html[data-theme="dark"]{--bg:#0a1424;--card:#111e30;--text:#e8eef7;--muted:#9fb0c5;--line:#26374b;--shadow:0 14px 36px rgba(0,0,0,.28)}
html[data-theme="dark"] body{background-color:var(--bg);color:var(--text)}
html[data-theme="dark"] .main-content{color:var(--text)}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .agenda-card,
html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .portfolio-card,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .search-row,
html[data-theme="dark"] .autocomplete-item,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .settings-sidebar,
html[data-theme="dark"] .settings-nav-btn,
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .agenda-slot-popover,
html[data-theme="dark"] .agenda-modal-card,
html[data-theme="dark"] .agenda-login-card{background:#111e30;color:#e8eef7;border-color:#2a3b51}
html[data-theme="dark"] .panel-head,
html[data-theme="dark"] .search-row,
html[data-theme="dark"] .settings-form-footer,
html[data-theme="dark"] .agenda-modal-head{border-color:#24354a}
html[data-theme="dark"] .panel h1,html[data-theme="dark"] .panel h2,html[data-theme="dark"] .panel h3,
html[data-theme="dark"] .settings-section-heading h3,html[data-theme="dark"] .page-heading h2{color:#f1f5fb}
html[data-theme="dark"] .muted,html[data-theme="dark"] small,html[data-theme="dark"] p{color:#9fb0c5}
html[data-theme="dark"] .data-table th{background:#152438;color:#9fb0c5}
html[data-theme="dark"] .data-table td,.data-table tr{border-color:#26384d}
html[data-theme="dark"] .calendar-slot{border-color:#25384e}
html[data-theme="dark"] .calendar-hour,.calendar-day-head span{color:#90a5bd}
html[data-theme="dark"] .calendar-day-head{border-color:#25384e;background:#132238}
html[data-theme="dark"] .calendar-time-col{background:#101d30}
html[data-theme="dark"] .agenda-context-line,.agenda-meta,.agenda-mobile-priority,.agenda-detail-item span{color:#9fb0c5}
html[data-theme="dark"] .notification-empty,html[data-theme="dark"] .notification-copy small{color:#9fb0c5}
html[data-theme="dark"] .settings-nav-btn:hover,html[data-theme="dark"] .settings-nav-btn.active{background:#1a2b42}
html[data-theme="dark"] .reminder-card,html[data-theme="dark"] .notification-rule-card,html[data-theme="dark"] .security-callout,html[data-theme="dark"] .team-stat,html[data-theme="dark"] .appearance-card,html[data-theme="dark"] .appearance-hero,html[data-theme="dark"] .appearance-footer{background:#132236;border-color:#2a3b51}
html[data-theme="dark"] .reminder-number,.appearance-chips span,.font-preview,.background-note,.color-value{background:#182b43;color:#b9c8da;border-color:#30445c}
html[data-theme="dark"] .system-warning{background:#292519;border-color:#594b27}

/* Apariencia */
.appearance-hero{display:grid;grid-template-columns:1.05fr .95fr;gap:22px;padding:20px;margin-bottom:15px;align-items:center}
.appearance-preview{height:145px;border:1px solid #dfe7f0;border-radius:16px;background:linear-gradient(135deg,#f7fafc,#eef4fa);overflow:hidden;position:relative;box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}
.appearance-preview-top{height:30px;background:linear-gradient(90deg,#0a2954,#1f63b3)}
.appearance-preview-body{padding:16px;display:grid;grid-template-columns:1.3fr .8fr;gap:10px}.appearance-preview-body div{height:38px;background:#fff;border:1px solid #dfe7f0;border-radius:9px}.appearance-preview-body div:first-child{grid-row:span 2;height:86px}.appearance-copy h3{font-size:23px;margin:6px 0}.appearance-copy p{color:var(--muted);line-height:1.55}.appearance-chips{display:flex;gap:7px;flex-wrap:wrap}.appearance-chips span{padding:7px 9px;border-radius:999px;background:#eef5fb;color:#56718f;font-size:10px;font-weight:900}
.appearance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.appearance-card .panel-body{min-height:118px}.appearance-card label{font-size:12px}.theme-options{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.theme-option{appearance:none;border:1px solid #dfe7f0;background:#fff;border-radius:12px;padding:11px;text-align:left;display:grid;gap:5px;transition:.18s}.theme-option:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(22,45,78,.07)}.theme-option.active{border-color:#4c87ed;box-shadow:0 0 0 3px rgba(76,135,237,.10)}.theme-option strong{font-size:12px}.theme-option small{font-size:9px;color:#71839a}.theme-swatch{height:34px;border-radius:8px;border:1px solid #d6e0eb;display:block}.theme-swatch.light{background:linear-gradient(135deg,#fff,#edf4fb)}.theme-swatch.dark{background:linear-gradient(135deg,#0b1627,#1a2a40)}.theme-swatch.system{background:linear-gradient(90deg,#fff 0 50%,#1a2a40 50%)}
.font-preview{margin-top:12px;padding:11px 12px;border:1px solid #dfe7f0;background:#f6f9fc;border-radius:11px;font-size:18px}.color-setting{display:grid;grid-template-columns:1fr 110px;align-items:center;gap:14px}.color-setting input[type=color]{height:46px;padding:4px;border-radius:11px}.color-value{padding:10px 12px;background:#f5f8fb;border:1px solid #dfe7f0;border-radius:10px;text-align:center;font-size:11px;font-weight:900;letter-spacing:.06em}.background-mode{display:flex;gap:7px;margin-bottom:13px}.background-mode-btn{border:1px solid #dbe5ef;background:#f8fbfd;border-radius:9px;padding:8px 11px;font-size:11px;font-weight:900;color:#617894}.background-mode-btn.active{background:#0b2b57;color:#fff;border-color:#0b2b57}.background-upload-row{display:flex;align-items:center;gap:8px}.background-upload-row span{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.background-note{margin-top:10px;padding:9px 11px;background:#f5f8fb;border:1px solid #dfe7f0;border-radius:10px;color:#7a8ca1;font-size:10px;line-height:1.45}.appearance-footer{margin-top:15px;padding:15px 18px;display:flex;align-items:center;justify-content:space-between;gap:18px}.appearance-footer strong{display:block}.appearance-footer span{display:block;color:var(--muted);font-size:11px;margin-top:3px}

@media(max-width:900px){.appearance-hero,.appearance-grid{grid-template-columns:1fr}.theme-options{grid-template-columns:1fr}.appearance-footer{align-items:flex-start;flex-direction:column}}


/* RECUPERO · Apariencia v13 — aplicación efectiva y consistente */
html[data-theme="dark"] {
  color-scheme: dark;
}
html[data-theme="dark"] body {
  background-color: var(--bg);
  color: var(--user-font-color, #e8eef7);
}
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .settings-main,
html[data-theme="dark"] .settings-section-heading,
html[data-theme="dark"] .page-heading,
html[data-theme="dark"] .panel-body,
html[data-theme="dark"] .panel-head {
  color: var(--user-font-color, #e8eef7);
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .agenda-card,
html[data-theme="dark"] .portfolio-card,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .search-row,
html[data-theme="dark"] .settings-sidebar,
html[data-theme="dark"] .theme-option,
html[data-theme="dark"] .appearance-preview,
html[data-theme="dark"] .appearance-card,
html[data-theme="dark"] .appearance-hero,
html[data-theme="dark"] .appearance-footer,
html[data-theme="dark"] .font-preview,
html[data-theme="dark"] .background-note,
html[data-theme="dark"] .color-value {
  color: var(--user-font-color, #e8eef7);
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background:#0f1b2c;
  color:var(--user-font-color, #e8eef7);
}
html[data-theme="dark"] .theme-option {
  background:#132236;
}
html[data-theme="dark"] .theme-option small,
html[data-theme="dark"] .appearance-copy p,
html[data-theme="dark"] .appearance-footer span,
html[data-theme="dark"] .muted {
  color:#9fb0c5;
}
html[data-theme="dark"] .appearance-preview {
  background:linear-gradient(135deg,#182a40,#102034);
  border-color:#2c4059;
}
html[data-theme="dark"] .appearance-preview-body div {
  background:#152438;
  border-color:#2b3f58;
}
html[data-theme="dark"] .appearance-preview-top {
  background:linear-gradient(90deg,#0a2954,#1f63b3);
}

/* El color elegido por el usuario debe dominar sobre los colores tipográficos decorativos. */
.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content label,
.main-content .panel-head strong,
.main-content .panel-body strong,
.main-content .page-heading h2,
.main-content .settings-section-heading h3,
.main-content .settings-section-heading strong,
.settings-main h1,
.settings-main h2,
.settings-main h3,
.settings-main h4 {
  color:var(--user-font-color, var(--text));
}
body .font-preview {
  font-family:var(--user-font), Inter, Segoe UI, Arial, sans-serif;
  color:var(--user-font-color, var(--text));
}


/* RECUPERO v14 · Dark theme contrast polish */
html[data-theme="dark"]{
  --bg:#0a1424;
  --card:#111f33;
  --text:#f3f7ff;
  --muted:#a8b8cc;
  --line:#2d4562;
  --shadow:0 14px 34px rgba(0,0,0,.28);
}
html[data-theme="dark"] body{background:var(--bg)!important;color:#f3f7ff!important}
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .page-heading,
html[data-theme="dark"] .page-heading p,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] label,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .muted{color:#f3f7ff}
html[data-theme="dark"] .page-heading p,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .kpi-card span,
html[data-theme="dark"] .kpi-card small,
html[data-theme="dark"] .agenda-command-copy small,
html[data-theme="dark"] .agenda-filter-group label,
html[data-theme="dark"] .agenda-live-state,
html[data-theme="dark"] .calendar-hour,
html[data-theme="dark"] .calendar-day-head,
html[data-theme="dark"] .panel-head .eyebrow,
html[data-theme="dark"] .panel-body .muted{color:#9fb2c8!important}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .portfolio-card,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .search-row,
html[data-theme="dark"] .form-panel,
html[data-theme="dark"] .agenda-card,
html[data-theme="dark"] .rule-box,
html[data-theme="dark"] .client-context,
html[data-theme="dark"] .insight-strip>div{
  background:#111f33!important;color:#f3f7ff!important;border-color:#2d4562!important;box-shadow:var(--shadow)
}
html[data-theme="dark"] .panel-head{border-bottom-color:#2d4562!important}
html[data-theme="dark"] .panel-head h3,
html[data-theme="dark"] .panel-head strong,
html[data-theme="dark"] .kpi-card strong,
html[data-theme="dark"] .kpi-card b,
html[data-theme="dark"] .portfolio-card h3,
html[data-theme="dark"] .portfolio-card strong,
html[data-theme="dark"] .data-table td,
html[data-theme="dark"] .agenda-card h3,
html[data-theme="dark"] .agenda-card strong,
html[data-theme="dark"] .calendar-day-head strong{color:#f3f7ff!important}
html[data-theme="dark"] .data-table th{background:#0e1a2b!important;color:#9fb2c8!important;border-bottom:1px solid #2d4562!important}
html[data-theme="dark"] .data-table td{border-top-color:#243b56!important}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background:#0e1a2b!important;color:#f4f8ff!important;border-color:#36506f!important
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#7f94ad!important}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{border-color:#5d8fff!important;box-shadow:0 0 0 3px rgba(93,143,255,.18)!important}
html[data-theme="dark"] .btn{background:#f3f7ff!important;color:#0b1d33!important;border-color:#f3f7ff!important}
html[data-theme="dark"] .btn:hover{background:#ffffff!important;color:#08172a!important}
html[data-theme="dark"] .btn-primary{background:#2f6ff0!important;border-color:#2f6ff0!important;color:#fff!important;box-shadow:0 8px 20px rgba(47,111,240,.28)}
html[data-theme="dark"] .btn-success{background:#1f9b70!important;border-color:#1f9b70!important;color:#fff!important}
html[data-theme="dark"] .btn-outline{background:#14263d!important;color:#eaf1fb!important;border-color:#42607f!important}
html[data-theme="dark"] .btn-light{background:#172941!important;color:#f1f6fd!important;border-color:#34506e!important}
html[data-theme="dark"] .filter-bar{box-shadow:0 8px 24px rgba(0,0,0,.22)!important}
html[data-theme="dark"] .topbar{box-shadow:0 10px 24px rgba(0,0,0,.34)}
html[data-theme="dark"] .agenda-commandbar,
html[data-theme="dark"] .agenda-context{background:linear-gradient(135deg,#102238,#122a3b)!important;border-color:#2d4562!important;color:#dce8f7!important}
html[data-theme="dark"] .agenda-command-copy strong,
html[data-theme="dark"] .agenda-context strong{color:#f3f7ff!important}
html[data-theme="dark"] .agenda-limit-wrap,
html[data-theme="dark"] .agenda-limit-date,
html[data-theme="dark"] .agenda-filter,
html[data-theme="dark"] .agenda-nav-btn{background:#13243a!important;color:#edf5ff!important;border-color:#36516f!important}
html[data-theme="dark"] .agenda-filter.active{background:#2f6ff0!important;border-color:#2f6ff0!important;color:#fff!important}
html[data-theme="dark"] .calendar-head{background:#101d2f!important;border-color:#2a425e!important}
html[data-theme="dark"] .calendar-time-col{background:#0d1929!important;border-color:#2a425e!important}
html[data-theme="dark"] .calendar-day-col{background:linear-gradient(to bottom,transparent 63px,#203651 64px)!important;background-size:100% 64px!important;border-color:#2a425e!important}
html[data-theme="dark"] .calendar-day-col.today{background-color:#102238!important}
html[data-theme="dark"] .calendar-slot{border-bottom-color:#213853!important}
html[data-theme="dark"] .calendar-event{color:#071522!important;border-color:#36516f!important}
html[data-theme="dark"] .calendar-event strong{color:#071522!important}
html[data-theme="dark"] .calendar-event small,
html[data-theme="dark"] .calendar-event em{color:#233b55!important}
html[data-theme="dark"] .calendar-now-line{background:#ff6d63}
html[data-theme="dark"] .calendar-event .slot-count{background:#f3f7ff;color:#0b2348}
html[data-theme="dark"] .agenda-modal-backdrop{background:rgba(1,8,18,.72)!important}
html[data-theme="dark"] .agenda-modal-card,
html[data-theme="dark"] .agenda-slot-popover,
html[data-theme="dark"] .agenda-login-card{background:#101d2f!important;border-color:#38536f!important;color:#f3f7ff!important;box-shadow:0 28px 80px rgba(0,0,0,.42)!important}
html[data-theme="dark"] .agenda-modal-head h3,
html[data-theme="dark"] .agenda-detail-item strong,
html[data-theme="dark"] .agenda-completion-panel strong,
html[data-theme="dark"] .agenda-completed-note strong,
html[data-theme="dark"] .agenda-slot-popover-head strong,
html[data-theme="dark"] .agenda-login-head h3,
html[data-theme="dark"] .login-pending-summary strong,
html[data-theme="dark"] .login-pending-copy strong{color:#f3f7ff!important}
html[data-theme="dark"] .agenda-modal-close{background:#f3f7ff!important;color:#12263c!important;border-color:#f3f7ff!important}
html[data-theme="dark"] .agenda-detail-item{background:#14253a!important;border-color:#35506d!important}
html[data-theme="dark"] .agenda-detail-item span{color:#9eb2c9!important}
html[data-theme="dark"] .agenda-completion-panel{background:linear-gradient(135deg,#112c27,#122338)!important;border-color:#2e7b65!important}
html[data-theme="dark"] .agenda-completed-note{background:#103024!important;color:#cce8dc!important;border-left-color:#1fa372!important}
html[data-theme="dark"] .agenda-slot-popover-head{background:linear-gradient(135deg,#15273d,#122236)!important;border-color:#29445f!important}
html[data-theme="dark"] .agenda-slot-popover-head button{background:#1a2d45!important;color:#d7e3f0!important}
html[data-theme="dark"] .agenda-slot-row{background:#101d2f!important;color:#edf5ff!important;border-color:#243c56!important}
html[data-theme="dark"] .agenda-slot-row:hover{background:#172b43!important;border-color:#3b5877!important}
html[data-theme="dark"] .agenda-slot-row strong{color:#f1f6fd!important}
html[data-theme="dark"] .agenda-slot-row small{color:#9bb0c5!important}
html[data-theme="dark"] .login-pending-summary{background:#0d1929!important;border-bottom-color:#29425d!important}
html[data-theme="dark"] .login-pending-summary span,
html[data-theme="dark"] .login-pending-item{background:#13243a!important;border-color:#29425d!important;color:#f3f7ff!important}
html[data-theme="dark"] .login-pending-item:hover{background:#172b43!important}
html[data-theme="dark"] .login-pending-copy small,
html[data-theme="dark"] .login-pending-copy em,
html[data-theme="dark"] .agenda-login-head p,
html[data-theme="dark"] .agenda-login-footer{color:#a3b5ca!important}
html[data-theme="dark"] .autocomplete-item{background:#102036!important;border-color:#2d4562!important;color:#f3f7ff!important}
html[data-theme="dark"] .autocomplete-item strong{color:#f3f7ff!important}
html[data-theme="dark"] .autocomplete-item span,
html[data-theme="dark"] .autocomplete-item small{color:#9fb2c8!important}

/* RECUPERO v14 · Registrar and generic surface contrast */
html[data-theme="dark"] .rg-credit-card,
html[data-theme="dark"] .rg-call-box,
html[data-theme="dark"] .rg-call-target,
html[data-theme="dark"] .rg-phone-option,
html[data-theme="dark"] .rg-active-call-panel,
html[data-theme="dark"] .rg-active-call-row,
html[data-theme="dark"] .rg-rule,
html[data-theme="dark"] .rg-followup-card,
html[data-theme="dark"] .pf-record-info-item,
html[data-theme="dark"] .pf-history-row,
html[data-theme="dark"] .pf-history-list,
html[data-theme="dark"] .pf-credit-highlight,
html[data-theme="dark"] .pf-gestion-detail-grid>div,
html[data-theme="dark"] .pf-gestion-detail-notes p,
html[data-theme="dark"] .pf-detail-call,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-panel{
  background:#111f33!important;color:#f3f7ff!important;border-color:#2d4562!important
}
html[data-theme="dark"] .rg-call-box{background:linear-gradient(180deg,#13263d,#101e31)!important;border-color:#36577a!important}
html[data-theme="dark"] .rg-call-target{background:#0f1b2d!important;border-color:#34506f!important}
html[data-theme="dark"] .rg-call-target-copy strong,
html[data-theme="dark"] .rg-call-timer,
html[data-theme="dark"] .rg-phone-option-main strong,
html[data-theme="dark"] .rg-active-call-row strong,
html[data-theme="dark"] .pf-record-title-wrap .pf-modal-title,
html[data-theme="dark"] .pf-record-section-head h3,
html[data-theme="dark"] .pf-record-info-item strong,
html[data-theme="dark"] .pf-credit-main strong,
html[data-theme="dark"] .pf-credit-balance strong,
html[data-theme="dark"] .pf-history-main strong,
html[data-theme="dark"] .pf-gestion-detail-grid strong,
html[data-theme="dark"] .pf-detail-call-copy strong{color:#f4f8ff!important}
html[data-theme="dark"] .rg-call-target-copy small,
html[data-theme="dark"] .rg-call-note,
html[data-theme="dark"] .rg-phone-option-main small,
html[data-theme="dark"] .rg-active-call-row small,
html[data-theme="dark"] .rg-active-call-empty,
html[data-theme="dark"] .pf-record-project,
html[data-theme="dark"] .pf-credit-main small,
html[data-theme="dark"] .pf-credit-note,
html[data-theme="dark"] .pf-history-main small,
html[data-theme="dark"] .pf-empty-small,
html[data-theme="dark"] .pf-gestion-detail-meta,
html[data-theme="dark"] .pf-gestion-detail-notes p{color:#9fb2c8!important}
html[data-theme="dark"] .rg-call-lock{background:#3a2915!important;color:#ffd59b!important}
html[data-theme="dark"] .rg-active-call-status{background:#4a3514!important;color:#ffd88d!important}
html[data-theme="dark"] .rg-active-call-actions .btn-danger{background:#3a1820!important;color:#ffb6bd!important;border-color:#773441!important}
html[data-theme="dark"] .rg-phone-option:hover,
html[data-theme="dark"] .pf-history-row:hover{background:#172b43!important}
html[data-theme="dark"] .rg-phone-add{border-top-color:#2d4562!important}
html[data-theme="dark"] .rg-credit-card:hover{border-color:#4b78ac!important;background:#152a42!important}
html[data-theme="dark"] .modal-card button,
html[data-theme="dark"] .modal-content button,
html[data-theme="dark"] .modal-panel button{color:inherit}

/* RECUPERO v15 · Contrast, theme isolation and dark-surface cleanup */

/* IMPORTANT: these cards are dark ONLY when dark mode is active. */
html[data-theme="dark"] .reminder-card,
html[data-theme="dark"] .notification-rule-card,
html[data-theme="dark"] .security-callout,
html[data-theme="dark"] .team-stat,
html[data-theme="dark"] .appearance-card,
html[data-theme="dark"] .appearance-hero,
html[data-theme="dark"] .appearance-footer{background:#132236!important;border-color:#2a3b51!important;color:#eef5ff!important}

/* Explicit light-mode restoration prevents inherited/stale dark styling. */
html[data-theme="claro"] .reminder-card,
html[data-theme="claro"] .notification-rule-card,
html[data-theme="claro"] .security-callout,
html[data-theme="claro"] .team-stat,
html[data-theme="claro"] .appearance-card,
html[data-theme="claro"] .appearance-hero,
html[data-theme="claro"] .appearance-footer{background:#fff!important;border-color:var(--line)!important;color:var(--text)!important}

/* Dark mode: force a readable neutral text color even if a custom dark font color was saved. */
html[data-theme="dark"]{--user-font-color:#eef5ff!important}
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] label,
html[data-theme="dark"] .settings-section-heading h3,
html[data-theme="dark"] .settings-sidebar-head strong,
html[data-theme="dark"] .settings-nav-btn strong,
html[data-theme="dark"] .settings-nav-btn small,
html[data-theme="dark"] .settings-sidebar-foot small,
html[data-theme="dark"] .appearance-copy h3,
html[data-theme="dark"] .appearance-copy p,
html[data-theme="dark"] .appearance-card label,
html[data-theme="dark"] .theme-option strong,
html[data-theme="dark"] .theme-option small,
html[data-theme="dark"] .font-preview,
html[data-theme="dark"] .background-note,
html[data-theme="dark"] .color-value,
html[data-theme="dark"] .appearance-footer strong,
html[data-theme="dark"] .appearance-footer span{color:#eef5ff!important}
html[data-theme="dark"] .appearance-copy p,
html[data-theme="dark"] .theme-option small,
html[data-theme="dark"] .appearance-footer span{color:#9fb2c8!important}
html[data-theme="dark"] .theme-option{background:#17283d!important;border-color:#35506d!important;color:#eef5ff!important}
html[data-theme="dark"] .theme-option.active{border-color:#5d8df8!important;box-shadow:0 0 0 3px rgba(93,141,248,.18)!important}
html[data-theme="dark"] .font-preview{background:#0f1b2d!important;border-color:#35506d!important}
html[data-theme="dark"] .color-value,
html[data-theme="dark"] .background-note{background:#17283d!important;border-color:#35506d!important}
html[data-theme="dark"] .background-mode-btn{background:#17283d!important;color:#dce8f5!important;border-color:#35506d!important}
html[data-theme="dark"] .background-mode-btn.active{background:#2f6df6!important;color:#fff!important;border-color:#2f6df6!important}
html[data-theme="dark"] .appearance-preview{background:linear-gradient(135deg,#182b43,#102034)!important;border-color:#36506d!important}
html[data-theme="dark"] .appearance-preview-body div{background:#17283d!important;border-color:#35506d!important}

/* Dark dashboard: convert the executive dashboard surfaces, controls and text. */
html[data-theme="dark"] .dashboard-screen{--db-ink:#eef5ff;--db-bg:#0a1424}
html[data-theme="dark"] .db-header{border-bottom-color:#2a3e57!important}
html[data-theme="dark"] .db-title,
html[data-theme="dark"] .db-panel-head h3,
html[data-theme="dark"] .db-kpi-value,
html[data-theme="dark"] .db-performance-value,
html[data-theme="dark"] .db-funnel-stage strong,
html[data-theme="dark"] .db-funnel-stage b,
html[data-theme="dark"] .db-result-item b,
html[data-theme="dark"] .db-table td{color:#eef5ff!important}
html[data-theme="dark"] .db-subtitle,
html[data-theme="dark"] .db-panel-subtitle,
html[data-theme="dark"] .db-header-controls label,
html[data-theme="dark"] .db-kpi-label,
html[data-theme="dark"] .db-kpi-context,
html[data-theme="dark"] .db-funnel-stage small,
html[data-theme="dark"] .db-result-item span,
html[data-theme="dark"] .db-performance-name,
html[data-theme="dark"] .db-performance-note,
html[data-theme="dark"] .db-evolution-foot,
html[data-theme="dark"] .db-table th{color:#9fb2c8!important}
html[data-theme="dark"] .db-input,
html[data-theme="dark"] .db-select,
html[data-theme="dark"] .db-refresh,
html[data-theme="dark"] .db-icon-button{background:#111f33!important;color:#eef5ff!important;border-color:#35506d!important}
html[data-theme="dark"] .db-refresh:hover,
html[data-theme="dark"] .db-icon-button:hover{background:#1a2d45!important;color:#fff!important;border-color:#5a86bd!important}
html[data-theme="dark"] .db-panel,
html[data-theme="dark"] .db-kpi,
html[data-theme="dark"] .db-performance-card,
html[data-theme="dark"] .db-funnel-stage{background:#111f33!important;border-color:#2d4562!important;color:#eef5ff!important}
html[data-theme="dark"] .db-kpi{background:linear-gradient(145deg,#111f33 0%,#0e1b2d 100%)!important}
html[data-theme="dark"] .db-panel-head,
html[data-theme="dark"] .db-table thead{border-bottom-color:#2b415a!important;background:#14253a!important}
html[data-theme="dark"] .db-meta-item,
html[data-theme="dark"] .db-panel-badge{background:#182b43!important;border-color:#304761!important;color:#afbed0!important}
html[data-theme="dark"] .db-funnel-stage,
html[data-theme="dark"] .db-result-item:hover,
html[data-theme="dark"] .db-table tbody tr:hover{background:#172b43!important}
html[data-theme="dark"] .db-progress{background:#24384f!important}
html[data-theme="dark"] .db-eye{background:#1a2d45!important;color:#dbe7f4!important}
html[data-theme="dark"] .db-table td{border-bottom-color:#263d55!important}
html[data-theme="dark"] .db-evolution-foot{border-top-color:#263d55!important}

/* Dark cartera / portfolio surfaces. */
html[data-theme="dark"] .project-modern-card,
html[data-theme="dark"] .portfolio-modern-card,
html[data-theme="dark"] .portfolio-modern-activity,
html[data-theme="dark"] .project-metrics div,
html[data-theme="dark"] .portfolio-modern-metrics div,
html[data-theme="dark"] .portfolio-modern-meta div{background:#111f33!important;border-color:#2d4562!important;color:#eef5ff!important}
html[data-theme="dark"] .project-modern-body{background:#0d1929!important}
html[data-theme="dark"] .portfolio-name-line h4,
html[data-theme="dark"] .portfolio-modern-title p,
html[data-theme="dark"] .portfolio-modern-meta strong,
html[data-theme="dark"] .activity-value strong,
html[data-theme="dark"] .project-metrics strong,
html[data-theme="dark"] .portfolio-modern-metrics strong{color:#eef5ff!important}
html[data-theme="dark"] .portfolio-modern-title p,
html[data-theme="dark"] .portfolio-modern-meta span,
html[data-theme="dark"] .portfolio-modern-metrics span,
html[data-theme="dark"] .activity-title,
html[data-theme="dark"] .activity-value small,
html[data-theme="dark"] .activity-muted{color:#9fb2c8!important}
html[data-theme="dark"] .project-modern-stats{color:#9fb2c8!important}

/* Dark REGISTRAR client card and remaining white surfaces. */
html[data-theme="dark"] .rg-client-card,
html[data-theme="dark"] .rg-client-info,
html[data-theme="dark"] .rg-client-empty,
html[data-theme="dark"] .rg-context-box,
html[data-theme="dark"] .rg-notes-box,
html[data-theme="dark"] .rg-conditional,
html[data-theme="dark"] .rg-followup-box,
html[data-theme="dark"] .rg-cond-field,
html[data-theme="dark"] .rg-footer{background:#111f33!important;border-color:#2d4562!important;color:#eef5ff!important}
html[data-theme="dark"] .rg-client-empty strong,
html[data-theme="dark"] .rg-client-empty span,
html[data-theme="dark"] .rg-info-section-title,
html[data-theme="dark"] .rg-info-cell span,
html[data-theme="dark"] .rg-info-cell strong,
html[data-theme="dark"] .rg-followup-head strong,
html[data-theme="dark"] .rg-followup-head span,
html[data-theme="dark"] .rg-notes-box label{color:#eef5ff!important}
html[data-theme="dark"] .rg-client-empty span,
html[data-theme="dark"] .rg-info-cell span,
html[data-theme="dark"] .rg-followup-head span{color:#9fb2c8!important}
html[data-theme="dark"] .rg-input,
html[data-theme="dark"] .rg-select,
html[data-theme="dark"] .rg-textarea{background:#0f1b2d!important;color:#eef5ff!important;border-color:#35506d!important}
html[data-theme="dark"] .rg-result-box label,
html[data-theme="dark"] .rg-search-box label{color:#eef5ff!important}

/* Agenda: programming comment must be readable in BOTH themes. */
html[data-theme="claro"] .agenda-programming-note{background:#f5f9fd!important;border-color:#d8e5ef!important;border-left-color:#2d87c9!important}
html[data-theme="claro"] .agenda-programming-note .agenda-note-kicker{color:#6f849b!important}
html[data-theme="claro"] .agenda-programming-note .agenda-note-body{color:#24425f!important}
html[data-theme="claro"] .agenda-programming-note .agenda-note-empty{color:#8596a9!important}
html[data-theme="dark"] .agenda-programming-note .agenda-note-kicker{color:#a8bdd3!important}
html[data-theme="dark"] .agenda-programming-note .agenda-note-body{color:#eef5ff!important}
html[data-theme="dark"] .agenda-programming-note .agenda-note-empty{color:#9fb2c8!important}

/* RECUPERO v16 · Modo oscuro definitivo + apariencia global */
.appearance-footer-actions{display:flex;align-items:center;gap:9px}
.btn-danger-outline{background:#fff!important;color:#b4232f!important;border:1px solid #e1a4aa!important}
.btn-danger-outline:hover{background:#fff3f4!important;color:#8f1823!important;border-color:#c96d76!important}
.appearance-disabled{opacity:.58;filter:saturate(.65)}
.appearance-disabled input,.appearance-disabled select,.appearance-disabled button{cursor:not-allowed!important}
.appearance-dark-lock-note{display:block;margin-top:8px;padding:8px 10px;border-radius:9px;background:#eef4fb;color:#536b87;font-size:10px;line-height:1.4}
html:not([data-theme="dark"]) .appearance-card,
html:not([data-theme="dark"]) .appearance-hero,
html:not([data-theme="dark"]) .appearance-footer,
html:not([data-theme="dark"]) .settings-sidebar-foot,
html:not([data-theme="dark"]) .system-card,
html:not([data-theme="dark"]) .settings-sidebar{background:var(--card,#fff)!important;color:var(--user-font-color,var(--text))!important;border-color:var(--line)!important}
html:not([data-theme="dark"]) .appearance-card .panel-head,
html:not([data-theme="dark"]) .appearance-card .panel-body{background:transparent!important;color:var(--user-font-color,var(--text))!important}
html:not([data-theme="dark"]) .appearance-copy h3,
html:not([data-theme="dark"]) .appearance-card h3,
html:not([data-theme="dark"]) .appearance-card p,
html:not([data-theme="dark"]) .appearance-footer strong,
html:not([data-theme="dark"]) .appearance-footer span,
html:not([data-theme="dark"]) .system-card h3,
html:not([data-theme="dark"]) .settings-sidebar-foot small{color:var(--user-font-color,var(--text))!important}

/* El color elegido en modo claro se aplica a la tipografía de la plataforma. */
html:not([data-theme="dark"]) .main-content h1,
html:not([data-theme="dark"]) .main-content h2,
html:not([data-theme="dark"]) .main-content h3,
html:not([data-theme="dark"]) .main-content h4,
html:not([data-theme="dark"]) .main-content h5,
html:not([data-theme="dark"]) .main-content h6,
html:not([data-theme="dark"]) .main-content p,
html:not([data-theme="dark"]) .main-content label,
html:not([data-theme="dark"]) .main-content td,
html:not([data-theme="dark"]) .main-content th,
html:not([data-theme="dark"]) .main-content li,
html:not([data-theme="dark"]) .main-content dd,
html:not([data-theme="dark"]) .main-content dt,
html:not([data-theme="dark"]) .main-content .eyebrow,
html:not([data-theme="dark"]) .main-content .muted,
html:not([data-theme="dark"]) .main-content .pf-project-code,
html:not([data-theme="dark"]) .main-content .pf-project-desc,
html:not([data-theme="dark"]) .main-content .pf-project-name,
html:not([data-theme="dark"]) .main-content .pf-stat span,
html:not([data-theme="dark"]) .main-content .pf-stat strong,
html:not([data-theme="dark"]) .main-content .pf-cartera-name-line h4,
html:not([data-theme="dark"]) .main-content .pf-cartera-desc,
html:not([data-theme="dark"]) .main-content .pf-source-chip,
html:not([data-theme="dark"]) .main-content .pf-metric span,
html:not([data-theme="dark"]) .main-content .pf-metric strong,
html:not([data-theme="dark"]) .main-content .pf-meta-item span,
html:not([data-theme="dark"]) .main-content .pf-meta-item strong,
html:not([data-theme="dark"]) .main-content .pf-activity-title,
html:not([data-theme="dark"]) .main-content .pf-activity-value strong,
html:not([data-theme="dark"]) .main-content .pf-activity-value small,
html:not([data-theme="dark"]) .main-content .settings-section-heading p,
html:not([data-theme="dark"]) .main-content .settings-sidebar-foot small{color:var(--user-font-color,#11233e)!important}
html:not([data-theme="dark"]) .main-content .status-dot,
html:not([data-theme="dark"]) .main-content .status-pill,
html:not([data-theme="dark"]) .main-content .status-chip,
html:not([data-theme="dark"]) .main-content .status-pil,
html:not([data-theme="dark"]) .main-content .pf-status-badge,
html:not([data-theme="dark"]) .main-content .pf-status-chip,
html:not([data-theme="dark"]) .main-content .pf-folder,
html:not([data-theme="dark"]) .main-content .pf-project-avatar,
html:not([data-theme="dark"]) .main-content .pf-kpi-icon,
html:not([data-theme="dark"]) .main-content .pf-open-btn,
html:not([data-theme="dark"]) .main-content .green-text,
html:not([data-theme="dark"]) .main-content .blue-text{ }

/* Carteras: superficies y tipografía visibles en oscuro. */
html[data-theme="dark"] #tab-carteras .pf-kpi,
html[data-theme="dark"] #tab-carteras .pf-project,
html[data-theme="dark"] #tab-carteras .pf-project-head,
html[data-theme="dark"] #tab-carteras .pf-cartera,
html[data-theme="dark"] #tab-carteras .pf-cartera-side,
html[data-theme="dark"] #tab-carteras .pf-view-toggle,
html[data-theme="dark"] #tab-carteras .pf-view-btn.active,
html[data-theme="dark"] #tab-carteras .portfolio-modern-card,
html[data-theme="dark"] #tab-carteras .portfolio-modern-activity,
html[data-theme="dark"] #tab-carteras .portfolio-modern-metrics div{background:#111f33!important;border-color:#304860!important;color:#f3f7ff!important}
html[data-theme="dark"] #tab-carteras .pf-project-head{background:linear-gradient(180deg,#15273d,#111f33)!important}
html[data-theme="dark"] #tab-carteras .pf-project-body{background:#0e1a2b!important}
html[data-theme="dark"] #tab-carteras .pf-cartera:hover{background:#16283e!important;border-color:#46617f!important}
html[data-theme="dark"] #tab-carteras .pf-title,
html[data-theme="dark"] #tab-carteras .pf-project-name,
html[data-theme="dark"] #tab-carteras .pf-project-code,
html[data-theme="dark"] #tab-carteras .pf-project-desc,
html[data-theme="dark"] #tab-carteras .pf-stat span,
html[data-theme="dark"] #tab-carteras .pf-stat strong,
html[data-theme="dark"] #tab-carteras .pf-cartera-name-line h4,
html[data-theme="dark"] #tab-carteras .pf-cartera-desc,
html[data-theme="dark"] #tab-carteras .pf-source-chip,
html[data-theme="dark"] #tab-carteras .pf-metric span,
html[data-theme="dark"] #tab-carteras .pf-metric strong,
html[data-theme="dark"] #tab-carteras .pf-meta-item span,
html[data-theme="dark"] #tab-carteras .pf-meta-item strong,
html[data-theme="dark"] #tab-carteras .pf-activity-title,
html[data-theme="dark"] #tab-carteras .pf-activity-value strong,
html[data-theme="dark"] #tab-carteras .pf-activity-value small,
html[data-theme="dark"] #tab-carteras .pf-kpi-label,
html[data-theme="dark"] #tab-carteras .pf-kpi-value,
html[data-theme="dark"] #tab-carteras .pf-kpi-data small,
html[data-theme="dark"] #tab-carteras .portfolio-name-line h4,
html[data-theme="dark"] #tab-carteras .portfolio-modern-title p,
html[data-theme="dark"] #tab-carteras .source-chip,
html[data-theme="dark"] #tab-carteras .portfolio-modern-metrics span,
html[data-theme="dark"] #tab-carteras .portfolio-modern-metrics strong,
html[data-theme="dark"] #tab-carteras .portfolio-modern-meta span,
html[data-theme="dark"] #tab-carteras .portfolio-modern-meta strong,
html[data-theme="dark"] #tab-carteras .activity-title,
html[data-theme="dark"] #tab-carteras .activity-value strong,
html[data-theme="dark"] #tab-carteras .activity-value small{color:#f3f7ff!important}
html[data-theme="dark"] #tab-carteras .pf-kpi-label,
html[data-theme="dark"] #tab-carteras .pf-project-code,
html[data-theme="dark"] #tab-carteras .pf-project-desc,
html[data-theme="dark"] #tab-carteras .pf-stat span,
html[data-theme="dark"] #tab-carteras .pf-cartera-desc,
html[data-theme="dark"] #tab-carteras .pf-source-chip,
html[data-theme="dark"] #tab-carteras .pf-metric span,
html[data-theme="dark"] #tab-carteras .pf-meta-item span,
html[data-theme="dark"] #tab-carteras .pf-activity-title,
html[data-theme="dark"] #tab-carteras .portfolio-modern-title p,
html[data-theme="dark"] #tab-carteras .source-chip,
html[data-theme="dark"] #tab-carteras .portfolio-modern-metrics span,
html[data-theme="dark"] #tab-carteras .portfolio-modern-meta span,
html[data-theme="dark"] #tab-carteras .activity-title,
html[data-theme="dark"] #tab-carteras .activity-value small{color:#9fb2c8!important}
html[data-theme="dark"] #tab-carteras .pf-cartera-side{border-left-color:#304860!important}
html[data-theme="dark"] #tab-carteras .pf-cartera-main,
html[data-theme="dark"] #tab-carteras .portfolio-modern-main{color:#f3f7ff!important}
html[data-theme="dark"] #tab-carteras .pf-search input,
html[data-theme="dark"] #tab-carteras .portfolio-search input{background:#0e1a2b!important;color:#f3f7ff!important;border-color:#36506f!important}
html[data-theme="dark"] #tab-carteras .pf-view-toggle{background:#0e1a2b!important}
html[data-theme="dark"] #tab-carteras .pf-view-btn{color:#b8c8da!important}
html[data-theme="dark"] #tab-carteras .pf-view-btn.active{background:#1b3049!important;color:#fff!important}
html[data-theme="dark"] #tab-carteras .portfolio-modern-card{background:#111f33!important}
html[data-theme="dark"] #tab-carteras .portfolio-modern-activity{background:#0e1a2b!important;border-color:#304860!important}
html[data-theme="dark"] #tab-carteras .portfolio-modern-metrics div{background:#172a40!important}

/* Sistema / Ajustes y controles de apariencia en oscuro. */
html[data-theme="dark"] .settings-sidebar-foot,
html[data-theme="dark"] .system-card,
html[data-theme="dark"] .system-warning,
html[data-theme="dark"] .appearance-card,
html[data-theme="dark"] .appearance-hero,
html[data-theme="dark"] .appearance-footer{background:#111f33!important;border-color:#304860!important;color:#f3f7ff!important}
html[data-theme="dark"] .settings-sidebar-foot small,
html[data-theme="dark"] .system-warning span,
html[data-theme="dark"] .system-rules span,
html[data-theme="dark"] .appearance-card p,
html[data-theme="dark"] .appearance-copy p,
html[data-theme="dark"] .appearance-footer span{color:#b0c1d4!important}
html[data-theme="dark"] .theme-option{background:#172a40!important;border-color:#36506f!important;color:#f3f7ff!important}
html[data-theme="dark"] .theme-option strong{color:#fff!important}
html[data-theme="dark"] .theme-option small{color:#b0c1d4!important}
html[data-theme="dark"] .font-preview,
html[data-theme="dark"] .color-value,
html[data-theme="dark"] .background-note{background:#0e1a2b!important;border-color:#36506f!important;color:#f3f7ff!important}
html[data-theme="dark"] .background-mode-btn{background:#172a40!important;color:#eaf1fb!important;border-color:#36506f!important}
html[data-theme="dark"] .background-mode-btn.active{background:#2f6ff0!important;color:#fff!important;border-color:#2f6ff0!important}
html[data-theme="dark"] .appearance-dark-lock-note{background:#172a40!important;color:#b7c8da!important;border:1px solid #36506f}

/* Comentario de la gestión original: contraste explícito en ambos temas. */
html:not([data-theme="dark"]) .agenda-programming-note .agenda-note-body{color:#11233e!important}
html[data-theme="dark"] .agenda-programming-note .agenda-note-body{color:#fff!important}

/* BETA 1.0 · Forzar limpieza de tema al pasar de oscuro → claro */
html[data-theme="claro"] body,
html[data-theme="claro"] .main-content{
  background-color:var(--user-bg-color,#f4f7fb)!important;
  color:var(--user-font-color,#11233e)!important;
}
html[data-theme="claro"] .dashboard-screen{--db-bg:#f5f8fc;--db-ink:var(--user-font-color,#102f5f)}
html[data-theme="claro"] .dashboard-screen .db-panel,
html[data-theme="claro"] .dashboard-screen .db-kpi,
html[data-theme="claro"] .dashboard-screen .db-conversion-detail-row,
html[data-theme="claro"] .dashboard-screen .db-result-table-wrap,
html[data-theme="claro"] .dashboard-screen .db-ranking-list,
html[data-theme="claro"] .dashboard-screen .db-priority-card,
html[data-theme="claro"] .dashboard-screen .db-priority-item{
  color:var(--user-font-color,#11233e);
}

/* Apariencia / Configuración: explícitamente restaurar superficies claras */
html[data-theme="claro"] .settings-shell,
html[data-theme="claro"] .settings-sidebar,
html[data-theme="claro"] .settings-main,
html[data-theme="claro"] .appearance-hero,
html[data-theme="claro"] .appearance-preview,
html[data-theme="claro"] .appearance-card,
html[data-theme="claro"] .appearance-footer,
html[data-theme="claro"] .system-card,
html[data-theme="claro"] .settings-sidebar-foot{
  background:#fff!important;
  color:var(--user-font-color,#11233e)!important;
  border-color:#dfe7f0!important;
}
html[data-theme="claro"] .appearance-card .panel-head,
html[data-theme="claro"] .appearance-card .panel-body{background:transparent!important;color:var(--user-font-color,#11233e)!important}
html[data-theme="claro"] .appearance-copy h3,
html[data-theme="claro"] .appearance-copy p,
html[data-theme="claro"] .appearance-card h3,
html[data-theme="claro"] .appearance-card p,
html[data-theme="claro"] .appearance-card label,
html[data-theme="claro"] .settings-section-heading h3,
html[data-theme="claro"] .settings-section-heading p,
html[data-theme="claro"] .settings-sidebar-head strong,
html[data-theme="claro"] .settings-nav-btn strong,
html[data-theme="claro"] .settings-nav-btn small,
html[data-theme="claro"] .settings-sidebar-foot small,
html[data-theme="claro"] .appearance-footer strong,
html[data-theme="claro"] .appearance-footer span{
  color:var(--user-font-color,#11233e)!important;
}
html[data-theme="claro"] .appearance-card p,
html[data-theme="claro"] .appearance-copy p,
html[data-theme="claro"] .appearance-footer span,
html[data-theme="claro"] .settings-sidebar-foot small{color:#71839a!important}
html[data-theme="claro"] .theme-option,
html[data-theme="claro"] .font-preview,
html[data-theme="claro"] .color-value,
html[data-theme="claro"] .background-note,
html[data-theme="claro"] .background-mode-btn{
  background:#fff!important;
  color:var(--user-font-color,#11233e)!important;
  border-color:#dfe7f0!important;
}
html[data-theme="claro"] .theme-option small{color:#71839a!important}
html[data-theme="claro"] .background-mode-btn.active{background:#0e418e!important;color:#fff!important;border-color:#0e418e!important}

/* Apariencia: evitar que un estado dark quede pegado tras cambiar a claro */
html[data-theme="claro"] .appearance-dark-lock-note{background:#eef5fb!important;color:#58708a!important;border-color:#d6e3ef!important}
html[data-theme="claro"] .appearance-disabled{opacity:1!important;filter:none!important}


/* BETA 1.0 v1.2 · Theme state reconciliation (oscuro ↔ claro) */
html[data-theme="dark"] .dashboard-screen .db-conversion-detail-row{
  background:linear-gradient(145deg,#14263c,#101e31)!important;
  border-color:#2e4763!important;
  color:#f3f7ff!important;
}
html[data-theme="dark"] .dashboard-screen .db-conversion-detail-row .db-conversion-detail-copy strong,
html[data-theme="dark"] .dashboard-screen .db-conversion-detail-row .db-conversion-detail-metric b{color:#f3f7ff!important}
html[data-theme="dark"] .dashboard-screen .db-conversion-detail-row .db-conversion-detail-copy small{color:#9eb2c9!important}
html[data-theme="claro"] .dashboard-screen .db-conversion-detail-row{
  background:#fbfcfe!important;border-color:#edf1f6!important;color:var(--user-font-color,#11233e)!important;
}
html[data-theme="claro"] .dashboard-screen .db-conversion-detail-row .db-conversion-detail-copy strong,
html[data-theme="claro"] .dashboard-screen .db-conversion-detail-row .db-conversion-detail-metric b{color:var(--user-font-color,#17365b)!important}
html[data-theme="claro"] .dashboard-screen .db-conversion-detail-row .db-conversion-detail-copy small{color:#95a3b4!important}

/* Apariencia: al volver a claro no heredar ninguna superficie oscura. */
html[data-theme="claro"] #tab-ajustes,
html[data-theme="claro"] #tab-ajustes .settings-main,
html[data-theme="claro"] #tab-ajustes .settings-section,
html[data-theme="claro"] #tab-ajustes .settings-shell{color:var(--user-font-color,#11233e)!important}
html[data-theme="claro"] #tab-ajustes .settings-nav-btn{background:transparent!important;color:#5f728b!important;border-color:transparent!important}
html[data-theme="claro"] #tab-ajustes .settings-nav-btn.active{background:#eaf2fb!important;color:#11233e!important}

/* El modo oscuro no deja estilos de fondo inline residuales. */
html[data-theme="claro"] body.auth-booting{background:#071f56!important}


/* BETA 1.0 v1.2 · Final theme reconciliation */
html[data-theme="dark"] .dashboard-screen .db-conversion-detail-row{background:linear-gradient(145deg,#14263c,#101e31)!important;border-color:#2e4763!important;color:#f3f7ff!important}
html[data-theme="dark"] .dashboard-screen .db-conversion-detail-copy strong,html[data-theme="dark"] .dashboard-screen .db-conversion-detail-metric b{color:#f3f7ff!important}
html[data-theme="dark"] .dashboard-screen .db-conversion-detail-copy small{color:#9eb2c9!important}
html[data-theme="claro"] .dashboard-screen .db-conversion-detail-row{background:#fbfcfe!important;border-color:#edf1f6!important;color:var(--user-font-color,#11233e)!important}
html[data-theme="claro"] .dashboard-screen .db-conversion-detail-copy strong,html[data-theme="claro"] .dashboard-screen .db-conversion-detail-metric b{color:var(--user-font-color,#17365b)!important}
html[data-theme="claro"] .dashboard-screen .db-conversion-detail-copy small{color:#95a3b4!important}
html[data-theme="claro"] #tab-ajustes .settings-nav-btn{background:transparent!important;color:#5f728b!important;border-color:transparent!important}
html[data-theme="claro"] #tab-ajustes .settings-nav-btn.active{background:#eaf2fb!important;color:var(--user-font-color,#11233e)!important}


/* ================================================================
   RECUPERO · NAVBAR v1.2 VISUAL REFRESH
   Referencia: barra flotante azul pizarra, compacta y redondeada.
   No altera la lógica de navegación ni los roles existentes.
   ================================================================ */
.topbar{
  height:64px;
  margin:8px 16px 0;
  padding:0 16px 0 20px;
  gap:12px;
  position:sticky;
  top:8px;
  z-index:100;
  border-radius:13px;
  background:#273555;
  color:#fff;
  box-shadow:0 7px 18px rgba(24,39,67,.20),0 1px 2px rgba(9,18,34,.12);
  border:1px solid rgba(255,255,255,.06);
}
.brand{min-width:182px;height:100%;display:flex;align-items:center;gap:10px}
.brand img{width:136px;height:auto;max-height:38px;object-fit:contain;object-position:left center}
.top-nav{height:100%;display:flex;align-items:center;justify-content:center;gap:3px;flex:1;min-width:0}
.nav-btn{
  position:relative;
  height:54px;
  min-width:68px;
  border:0;
  background:transparent;
  color:rgba(255,255,255,.88);
  border-radius:11px;
  padding:5px 9px 6px;
  font-size:10px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}
.nav-btn::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:1px;
  width:22px;
  height:2px;
  border-radius:99px;
  background:transparent;
  transform:translateX(-50%) scaleX(.35);
  transition:background .18s ease,transform .18s ease;
}
.nav-btn:hover{background:rgba(255,255,255,.055);color:#fff}
.nav-btn.active{
  background:rgba(102,130,174,.38);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045);
}
.nav-btn.active::after{background:#4e91ff;transform:translateX(-50%) scaleX(1)}
.nav-icon{
  width:18px;
  height:18px;
  flex:0 0 18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.94;
}
.nav-btn.active .nav-icon{color:#6ea8ff;opacity:1}
.nav-btn.nav-bounce{animation:navItemBounce .34s cubic-bezier(.2,.85,.25,1)}
@keyframes navItemBounce{
  0%{transform:translateY(0) scale(1)}
  35%{transform:translateY(-3px) scale(1.015)}
  68%{transform:translateY(1px) scale(.995)}
  100%{transform:translateY(0) scale(1)}
}
.top-user{
  min-width:286px;
  height:100%;
  gap:9px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  position:relative;
}
.notification-wrap{position:relative;display:flex;align-items:center;margin:0 5px 0 4px;padding-left:17px;border-left:1px solid rgba(255,255,255,.18)}
.notification-btn{
  position:relative;
  width:38px;
  height:38px;
  border:0;
  background:rgba(255,255,255,.08);
  color:#fff;
  border-radius:10px;
  display:grid;
  place-items:center;
  transition:background .18s ease,transform .18s ease;
}
.notification-btn:hover{background:rgba(255,255,255,.14);transform:translateY(-1px)}
.notification-icon{width:20px;height:20px;fill:none;stroke:#fff;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.notification-badge{
  position:absolute;right:-4px;top:-5px;
  background:#5368f4;color:#fff;border:2px solid #273555;
  border-radius:999px;min-width:17px;height:17px;padding:0 3px;
  display:grid;place-items:center;font-size:8px;font-weight:900;line-height:1;
}
.avatar{width:38px;height:38px;flex:0 0 38px;background:#e9edf4;color:#273555}
.top-user-copy{min-width:116px;max-width:145px;line-height:1.05}
.top-user-copy strong{display:block;font-size:11px;font-weight:800;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-user-copy small{display:block;color:rgba(255,255,255,.74);font-size:9px;font-weight:600;margin-top:4px;white-space:nowrap}
.top-user-chevron{
  width:20px;height:24px;padding:0;margin:0 3px 0 -7px;border:0;background:transparent;color:rgba(255,255,255,.82);display:grid;place-items:center
}
.top-user-chevron svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.logout-btn{
  width:38px;height:38px;flex:0 0 38px;border:0;border-radius:10px;
  background:rgba(218,64,72,.30);color:#ff5b63;box-shadow:none;
  display:grid;place-items:center;transition:background .18s ease,transform .18s ease,color .18s ease
}
.logout-btn:hover{background:rgba(218,64,72,.44);color:#ff747a;transform:translateY(-1px)}
.logout-btn span{font-size:21px;line-height:1}
.notification-panel{top:48px}

@media(max-width:1250px){
  .topbar{height:62px;margin:8px 16px 0;padding-left:16px;padding-right:12px;gap:7px}
  .brand{min-width:154px}.brand img{width:128px}
  .top-nav{gap:1px}.nav-btn{min-width:62px;padding-left:6px;padding-right:6px;font-size:9px}.nav-icon{width:17px;height:17px;flex-basis:17px}
  .top-user{min-width:238px;gap:7px}.notification-wrap{padding-left:12px;margin-left:1px}.top-user-copy{min-width:92px}.top-user-copy strong{font-size:10px}.top-user-copy small{font-size:8px}
}
@media(max-width:900px){
  .topbar{height:auto;min-height:62px;position:sticky;top:6px;margin:6px 10px 0;padding:8px 10px;flex-wrap:wrap;row-gap:6px;border-radius:13px}
  .brand{order:1;min-width:auto}.brand img{width:125px}
  .top-user{order:2;margin-left:auto;height:46px;min-width:auto}.notification-wrap{padding-left:0;border-left:0;margin-left:0}.top-user-copy{display:none}.top-user-chevron{display:none}
  .top-nav{order:3;flex-basis:100%;height:52px;overflow:auto;justify-content:flex-start;scrollbar-width:none}.top-nav::-webkit-scrollbar{display:none}
  .nav-btn{min-width:64px;height:48px}
  .notification-panel{position:fixed;right:12px;top:68px;width:min(390px,calc(100vw - 24px))}
}
@media(max-width:560px){
  .topbar{margin:5px 7px 0;padding:7px 8px}.brand img{width:116px}.nav-btn{min-width:60px;padding-left:5px;padding-right:5px;font-size:8px}.nav-icon{width:16px;height:16px}
  .notification-btn,.logout-btn,.avatar{width:36px;height:36px;flex-basis:36px}.notification-icon{width:18px;height:18px}
}
@media(prefers-reduced-motion:reduce){.nav-btn,.nav-btn.nav-bounce{animation:none!important;transition:none!important}}

/* ================================================================
   RECUPERO BETA 1.1.0.3 · NAVBAR POLISH + LOGIN AGENDA LOCK
   - La ventana de Control de Agenda siempre queda por encima de la
     navegación al iniciar sesión.
   - Navegación con mayor presencia visual, siguiendo la referencia.
   ================================================================ */
.topbar{
  height:82px;
  margin:10px 16px 0;
  padding:0 20px 0 26px;
  gap:16px;
  z-index:100;
  border-radius:14px;
}
.brand{
  min-width:194px;
  gap:12px;
}
.brand img{
  width:160px;
  max-height:46px;
}
.top-nav{
  gap:5px;
}
.nav-btn{
  height:70px;
  min-width:82px;
  border-radius:13px;
  padding:6px 11px 7px;
  font-size:11px;
  font-weight:800;
  gap:5px;
}
.nav-icon{
  width:21px;
  height:21px;
  flex-basis:21px;
  stroke-width:1.7;
}
.nav-btn.active{
  background:rgba(102,130,174,.40);
}
.nav-btn::after{
  width:25px;
  height:2px;
  bottom:1px;
}
.top-user{
  min-width:284px;
  gap:11px;
}
.notification-wrap{
  margin-left:5px;
  padding-left:18px;
}
.notification-btn{
  width:44px;
  height:44px;
  border-radius:12px;
}
.notification-icon{
  width:21px;
  height:21px;
  stroke-width:1.7;
}
.avatar{
  width:42px;
  height:42px;
  flex-basis:42px;
}
.top-user-copy{
  min-width:112px;
  max-width:150px;
}
.top-user-copy strong{font-size:12px}
.top-user-copy small{font-size:10px;margin-top:4px}
.top-user-chevron{
  width:20px;
  height:26px;
}
.logout-btn{
  width:44px;
  height:44px;
  flex-basis:44px;
  border-radius:12px;
}
.logout-btn span{font-size:23px}

/* El modal de bienvenida/control de agenda es un bloqueo real de entrada.
   Debe cubrir también la navbar y capturar cualquier interacción mientras
   permanezca abierto. */
.agenda-login-modal{
  z-index:5000 !important;
  pointer-events:auto !important;
}
.agenda-login-modal .agenda-modal-backdrop{
  z-index:0 !important;
  pointer-events:auto !important;
}
.agenda-login-card{
  z-index:10 !important;
}
.agenda-mascot-wrap.agenda-mascot-wrap--agenda{
  z-index:30 !important;
}

@media(max-width:1100px){
  .topbar{
    height:76px;
    margin:9px 12px 0;
    padding-left:18px;
    padding-right:14px;
    gap:9px;
  }
  .brand{min-width:176px}
  .brand img{width:148px;max-height:42px}
  .top-nav{gap:2px}
  .nav-btn{
    min-width:74px;
    height:64px;
    padding-left:8px;
    padding-right:8px;
    font-size:10px;
  }
  .nav-icon{width:20px;height:20px;flex-basis:20px}
  .top-user{min-width:260px;gap:8px}
  .top-user-copy{min-width:94px;max-width:125px}
  .top-user-copy strong{font-size:11px}
  .top-user-copy small{font-size:9px}
  .notification-wrap{padding-left:13px;margin-left:1px}
}

@media(max-width:900px){
  .topbar{
    height:auto;
    min-height:62px;
    position:sticky;
    top:6px;
    margin:6px 10px 0;
    padding:8px 10px;
    flex-wrap:wrap;
    row-gap:6px;
    border-radius:13px;
  }
  .brand{order:1;min-width:auto}
  .brand img{width:140px}
  .top-user{order:2;margin-left:auto;height:46px;min-width:auto}
  .top-nav{order:3;flex-basis:100%;height:52px;overflow:auto;justify-content:flex-start;scrollbar-width:none}
  .top-nav::-webkit-scrollbar{display:none}
  .nav-btn{min-width:68px;height:48px;font-size:10px}
  .nav-icon{width:19px;height:19px;flex-basis:19px}
}

@media(max-width:560px){
  .brand img{width:124px}
  .nav-btn{min-width:62px;padding-left:5px;padding-right:5px;font-size:9px}
  .nav-icon{width:17px;height:17px;flex-basis:17px}
}

/* ================================================================
   RECUPERO BETA 1.1.0.5 · NAVBAR SCALE & DISTRIBUTION
   - Más presencia visual en logo, iconos y etiquetas.
   - Distribución horizontal amplia para eliminar el agrupamiento.
   - El modal inicial de Agenda siempre domina la capa de navegación.
   ================================================================ */
.topbar{
  height:82px!important;
  margin:10px 16px 0!important;
  padding:0 20px 0 28px!important;
  gap:20px!important;
  position:sticky!important;
  top:8px!important;
  z-index:100!important;
  border-radius:14px!important;
  background:#273555!important;
}

.brand{
  min-width:285px!important;
  flex:0 0 285px!important;
  height:100%!important;
  gap:12px!important;
}
.brand img{
  width:190px!important;
  max-width:190px!important;
  max-height:56px!important;
  height:auto!important;
}

.top-nav{
  height:100%!important;
  flex:1 1 auto!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-evenly!important;
  gap:8px!important;
}

.nav-btn{
  height:70px!important;
  min-width:104px!important;
  flex:0 1 116px!important;
  padding:6px 12px 7px!important;
  border-radius:13px!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1.05!important;
  gap:6px!important;
}
.nav-icon{
  width:25px!important;
  height:25px!important;
  flex:0 0 25px!important;
  stroke-width:1.75!important;
}
.nav-btn::after{
  width:30px!important;
  height:2px!important;
}

.top-user{
  min-width:350px!important;
  flex:0 0 350px!important;
  gap:12px!important;
}
.notification-wrap{
  margin-left:7px!important;
  padding-left:20px!important;
}
.notification-btn{
  width:48px!important;
  height:48px!important;
  border-radius:13px!important;
}
.notification-icon{
  width:23px!important;
  height:23px!important;
  stroke-width:1.75!important;
}
.avatar{
  width:46px!important;
  height:46px!important;
  flex-basis:46px!important;
}
.top-user-copy{
  min-width:132px!important;
  max-width:170px!important;
}
.top-user-copy strong{font-size:13px!important}
.top-user-copy small{font-size:10px!important;margin-top:4px!important}
.top-user-chevron{width:22px!important;height:28px!important}
.logout-btn{
  width:48px!important;
  height:48px!important;
  flex-basis:48px!important;
  border-radius:13px!important;
}
.logout-btn span{font-size:25px!important}

/* El bloqueo de bienvenida no puede quedar debajo de una barra sticky. */
.agenda-login-modal{
  position:fixed!important;
  inset:0!important;
  z-index:10000!important;
  isolation:isolate!important;
  pointer-events:auto!important;
}
.agenda-login-modal .agenda-modal-backdrop{
  position:absolute!important;
  inset:0!important;
  z-index:0!important;
  pointer-events:auto!important;
}
.agenda-login-card{position:relative!important;z-index:10!important}
.agenda-mascot-wrap.agenda-mascot-wrap--agenda{z-index:20!important}

@media(max-width:1250px){
  .topbar{padding-left:22px!important;padding-right:16px!important;gap:12px!important}
  .brand{min-width:235px!important;flex-basis:235px!important}
  .brand img{width:172px!important;max-width:172px!important;max-height:52px!important}
  .top-nav{gap:4px!important}
  .nav-btn{min-width:92px!important;flex-basis:100px!important;font-size:12px!important}
  .nav-icon{width:23px!important;height:23px!important;flex-basis:23px!important}
  .top-user{min-width:300px!important;flex-basis:300px!important}
}

@media(max-width:1000px){
  .topbar{height:76px!important}
  .brand{min-width:195px!important;flex-basis:195px!important}
  .brand img{width:155px!important;max-width:155px!important}
  .nav-btn{min-width:80px!important;flex-basis:88px!important;height:64px!important;font-size:11px!important}
  .nav-icon{width:21px!important;height:21px!important;flex-basis:21px!important}
  .top-user{min-width:260px!important;flex-basis:260px!important}
}

@media(max-width:900px){
  .topbar{height:auto!important;min-height:62px!important;padding:8px 10px!important;gap:7px!important}
  .brand{min-width:auto!important;flex:0 0 auto!important}
  .brand img{width:140px!important;max-width:140px!important;max-height:46px!important}
  .top-nav{height:54px!important;flex-basis:100%!important;justify-content:flex-start!important;gap:4px!important;overflow:auto!important}
  .nav-btn{min-width:78px!important;flex:0 0 78px!important;height:50px!important;font-size:10px!important}
  .nav-icon{width:19px!important;height:19px!important;flex-basis:19px!important}
  .top-user{min-width:auto!important;flex:0 0 auto!important}
}

/* ================================================================
   RECUPERO BETA 1.1.0.5 · NAVBAR BALANCE
   Distribución más compacta, simétrica y proporcionada.
   ================================================================ */
.topbar{
  height:76px!important;
  margin:9px 16px 0!important;
  padding:0 20px 0 26px!important;
  gap:12px!important;
  border-radius:14px!important;
  background:#273555!important;
}
.brand{
  min-width:245px!important;
  flex:0 0 245px!important;
  gap:10px!important;
}
.brand img{
  width:176px!important;
  max-width:176px!important;
  max-height:50px!important;
}
.top-nav{
  flex:1 1 auto!important;
  min-width:0!important;
  height:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
}
.nav-btn{
  min-width:96px!important;
  flex:0 0 104px!important;
  height:66px!important;
  padding:6px 8px 7px!important;
  border-radius:12px!important;
  font-size:12px!important;
  font-weight:800!important;
  gap:6px!important;
}
.nav-icon{
  width:23px!important;
  height:23px!important;
  flex-basis:23px!important;
  stroke-width:1.75!important;
}
.nav-btn::after{width:28px!important;height:2px!important}
.top-user{
  min-width:330px!important;
  flex:0 0 330px!important;
  gap:10px!important;
}
.notification-wrap{margin-left:4px!important;padding-left:17px!important}
.notification-btn{width:46px!important;height:46px!important;border-radius:12px!important}
.notification-icon{width:22px!important;height:22px!important}
.avatar{width:44px!important;height:44px!important;flex-basis:44px!important}
.top-user-copy{min-width:124px!important;max-width:160px!important}
.top-user-copy strong{font-size:12px!important}
.top-user-copy small{font-size:10px!important;margin-top:3px!important}
.top-user-chevron{width:20px!important;height:26px!important}
.logout-btn{width:46px!important;height:46px!important;flex-basis:46px!important;border-radius:12px!important}
.logout-btn span{font-size:24px!important}

@media(max-width:1250px){
  .topbar{padding-left:20px!important;padding-right:14px!important;gap:8px!important}
  .brand{min-width:210px!important;flex-basis:210px!important}
  .brand img{width:160px!important;max-width:160px!important}
  .top-nav{gap:2px!important}
  .nav-btn{min-width:88px!important;flex-basis:94px!important;font-size:11px!important}
  .nav-icon{width:22px!important;height:22px!important;flex-basis:22px!important}
  .top-user{min-width:285px!important;flex-basis:285px!important}
}

/* BETA 1.2.2.1 · menú contextual del usuario */
.top-user-menu{position:absolute;z-index:120;right:50px;top:calc(100% - 5px);width:250px;padding:7px;border:1px solid rgba(211,224,240,.95);border-radius:14px;background:#fff;box-shadow:0 18px 48px rgba(5,25,55,.22);color:#17365b}.top-user-menu.hidden{display:none!important}.top-user-menu::before{content:"";position:absolute;right:18px;top:-6px;width:11px;height:11px;background:#fff;border-left:1px solid #d3e0f0;border-top:1px solid #d3e0f0;transform:rotate(45deg)}.top-user-menu-item{position:relative;z-index:1;width:100%;display:flex;align-items:center;gap:10px;padding:10px;border:0;border-radius:10px;background:transparent;color:#17365b;text-align:left;cursor:pointer}.top-user-menu-item:hover{background:#f2f6fc}.top-user-menu-icon{width:34px;height:34px;flex:0 0 34px;border-radius:9px;background:#edf4ff;color:#225fc7;display:grid;place-items:center}.top-user-menu-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.top-user-menu-item strong,.top-user-menu-item small{display:block}.top-user-menu-item strong{font-size:11px;color:#17365b}.top-user-menu-item small{margin-top:2px;font-size:8px;color:#7c8da3}.top-user-chevron[aria-expanded="true"]{background:rgba(255,255,255,.12);border-radius:7px}.top-user-chevron[aria-expanded="true"] svg{transform:rotate(180deg)}.top-user-chevron svg{transition:transform .16s ease}
html[data-theme="dark"] .top-user-menu,body.dark .top-user-menu{background:#12223a;border-color:#2b4768;color:#f5f9ff}html[data-theme="dark"] .top-user-menu::before,body.dark .top-user-menu::before{background:#12223a;border-color:#2b4768}html[data-theme="dark"] .top-user-menu-item,body.dark .top-user-menu-item{color:#f5f9ff}html[data-theme="dark"] .top-user-menu-item:hover,body.dark .top-user-menu-item:hover{background:#172b46}html[data-theme="dark"] .top-user-menu-item strong,body.dark .top-user-menu-item strong{color:#f5f9ff}html[data-theme="dark"] .top-user-menu-icon,body.dark .top-user-menu-icon{background:#18345a;color:#7db0ff}
@media(max-width:900px){.top-user-menu{position:fixed;right:12px;top:62px;width:min(270px,calc(100vw - 24px))}.top-user-chevron.admin-only:not(.hidden){display:grid!important}}
/* La cabecera móvil ocupa su altura real y no invade el contenido. */
@media(max-width:900px){
  #app-view .topbar{position:relative!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 62px;height:auto!important;min-height:0!important;gap:8px!important;padding:10px!important;overflow:visible!important}
  #app-view .brand{min-width:0!important;flex:none!important;grid-column:1;grid-row:1}
  #app-view .brand img{width:140px!important;max-width:100%!important;max-height:44px!important}
  #app-view .top-user{position:relative!important;grid-column:2;grid-row:1;min-width:0!important;flex:none!important;gap:6px!important}
  #app-view .top-user-copy{display:none!important}
  #app-view .top-nav{position:static!important;transform:none!important;grid-column:1/-1;grid-row:2;min-width:0!important;width:100%!important;height:62px!important;flex:none!important;justify-content:flex-start!important;overflow-x:auto!important;gap:4px!important}
  #app-view .nav-btn,#app-view .nav-menu-btn{min-width:82px!important;flex:0 0 82px!important;height:54px!important;font-size:10px!important;padding:5px!important}
  #app-view .nav-gestiones-wrap{flex:0 0 82px!important}
  #app-view .nav-icon{width:20px!important;height:20px!important;flex-basis:20px!important}
  #app-view .nav-gestiones-menu{position:fixed!important;top:145px!important;left:auto!important;right:16px!important;max-width:calc(100vw - 32px)}
  #app-view .main-content{margin-top:0!important;padding-top:18px!important}
}

/* Cierre seguro de sesión: nunca revelar el login ni credenciales residuales durante la redirección. */
body.logout-transition{overflow:hidden!important;background:#06141d!important}
body.logout-transition #login-view,
body.logout-transition #app-view{visibility:hidden!important;pointer-events:none!important}
body.logout-transition::before{content:"";position:fixed;inset:0;z-index:299998;background:#06141d}
body.logout-transition::after{content:"";position:fixed;z-index:299999;left:50%;top:50%;width:28px;height:28px;margin:-14px;border:3px solid rgba(111,160,220,.18);border-top-color:#5f9fff;border-radius:50%;animation:logoutSpin .7s linear infinite}
@keyframes logoutSpin{to{transform:rotate(360deg)}}

/* ═══════════════════════════════════════════════════════════════════════
   SELECTOR DE FECHA UNIFICADO · 2026-09-09
   Todo campo DD/MM/AA dispone de acceso visual al calendario nativo.
   ═══════════════════════════════════════════════════════════════════════ */
.sv-date-control{position:relative;display:block;width:100%;min-width:0}
.sv-date-control>input[data-sv-date]{width:100%;padding-right:2.65rem!important}
.sv-date-picker{position:absolute;top:50%;right:.48rem;transform:translateY(-50%);width:1.9rem;height:1.9rem;padding:0;border:1px solid transparent;border-radius:.55rem;background:transparent;color:#6f8299;display:grid;place-items:center;cursor:pointer;transition:background .16s ease,color .16s ease,border-color .16s ease,transform .16s ease;z-index:2}
.sv-date-picker svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sv-date-picker:hover{background:#edf4ff;color:#2f6df6;border-color:#d8e6fa}
.sv-date-picker:focus-visible{outline:2px solid rgba(47,109,246,.34);outline-offset:1px}
.sv-date-control.is-disabled .sv-date-picker{opacity:.38;cursor:not-allowed;pointer-events:none}
.sv-date-native{position:absolute!important;right:.6rem!important;bottom:.25rem!important;width:1px!important;height:1px!important;min-width:0!important;max-width:1px!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important}
html[data-theme="dark"] .sv-date-picker{color:#9fb2c8}
html[data-theme="dark"] .sv-date-picker:hover{background:#1a3350;color:#9cc0ff;border-color:#2d4d70}


/* ═══════════════════════════════════════════════════════════════════════
   R7 · JERARQUÍA GLOBAL DE CAPAS + MENÚ GESTIONES MÓVIL
   ═══════════════════════════════════════════════════════════════════════ */
.toast{z-index:300600!important}
.loading{z-index:300500!important}
@media(max-width:900px){
  #app-view .nav-gestiones-menu{
    position:fixed!important;
    top:var(--gestiones-menu-top,145px)!important;
    left:12px!important;right:12px!important;width:auto!important;max-width:none!important;
    max-height:calc(100dvh - var(--gestiones-menu-top,145px) - 12px)!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    transform:translateY(0) scale(1)!important;transform-origin:50% 0!important;
    z-index:190!important;
  }
  #app-view .nav-gestiones-menu.hidden{transform:translateY(-8px) scale(.985)!important}
  #app-view .nav-gestiones-menu::before{display:none!important}
}

/* R9 · modal de límite del historial autenticado. Sin rediseñar el shell. */
#route-exit-modal{z-index:210000}
.route-exit-card{width:min(520px,100%);text-align:left}
.route-exit-card h2{color:var(--text);margin:8px 0 10px}
.route-exit-card>p{margin:0;color:var(--muted)}
.route-exit-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.route-exit-actions .btn{min-width:132px}
html[data-theme="dark"] .route-exit-card h2{color:#f3f7ff}
@media(max-width:560px){.route-exit-actions{flex-direction:column-reverse}.route-exit-actions .btn{width:100%}}
