/* AVIGRUPO · Sistema visual corporativo compartido.
   Capa de presentación aditiva: no modifica fuentes, cálculos, expedientes ni autorizaciones. */
:root{
  --r2-ink:#152c4b;--r2-strong:#112748;--r2-slate:#435d7d;--r2-muted:#647c98;
  --r2-navy:#122749;--r2-deep:#0c1c35;--r2-sidebar:#132747;
  --r2-gold:#c79a3d;--r2-gold-pale:#fff7e9;
  --r2-blue:#275b91;--r2-cyan:#247d94;--r2-page:#fff;
  --r2-border:#dbe4ef;--r2-line:#e9eef5;--r2-card:#ffffff;
  --r2-radius:14px;--r2-radius-sm:10px;
  --r2-shadow:0 4px 15px rgba(16,39,74,.045),0 16px 34px rgba(16,39,74,.025);
  --r2-shadow-hover:0 9px 22px rgba(16,39,74,.09),0 22px 40px rgba(16,39,74,.04);
  --av-page:var(--r2-page);--av-border:var(--r2-border);--av-gold:var(--r2-gold);
  --av-ink:var(--r2-ink);--av-muted:var(--r2-muted);
  color-scheme:light;
}
html{font-synthesis:none;scroll-padding-top:90px}
body{font-family:Inter,"Segoe UI Variable","Segoe UI",system-ui,sans-serif!important;background:var(--r2-page);color:var(--r2-ink);-webkit-font-smoothing:antialiased}
:where(h1,h2,h3,h4){font-family:inherit;letter-spacing:-.027em;text-wrap:balance;color:var(--r2-strong)}
:where(input,select,textarea,button){font-family:inherit}
:where(button,a,[role="button"]){-webkit-tap-highlight-color:transparent}
:where(button,a,input,select,textarea,[role="button"]):focus-visible{outline:3px solid #d8a536!important;outline-offset:3px!important}
::selection{background:#f4dfad;color:#0d2544}
.r2-icon{display:inline-block;width:19px;height:19px;min-width:19px;stroke:currentColor;fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.75;vertical-align:middle;pointer-events:none}
.r2-icon--sm{width:17px;height:17px;min-width:17px}
.r2-icon--lg{width:21px;height:21px;min-width:21px}
/* Navegación: solo una jerarquía, enlaces con zonas de pulsación adecuadas. */
#sidebar,.r1-standalone .r1-side{background:linear-gradient(172deg,#19345e 0%,#112746 47%,#0c1b33 100%)!important;color:#e8eff9!important}
#sidebar{border-right:1px solid #274369!important}
.r1-standalone .r1-side{border-right:1px solid #274369!important}
.r1-nav-heading,.r1-main-sidebar .menu-name{font-size:10px!important;letter-spacing:1.32px!important;font-weight:790!important;color:#9fb6d3!important;margin-top:20px!important;margin-bottom:10px!important}
.r1-main-sidebar .menu-name{padding-left:11px}
#nav .nav-item,.r1-nav-link{border-radius:11px!important;min-height:45px!important;font-size:12px!important;font-weight:670!important;letter-spacing:.01em!important;box-shadow:none!important;transition:background-color .16s,border-color .16s,color .16s!important}
#nav .nav-item{gap:11px!important}
#nav .nav-item:not(.active){background:transparent!important;color:#dbe5f4!important;border:1px solid transparent!important}
#nav .nav-item:not(.active):hover,.r1-nav-link:not(.is-current):hover{background:#ffffff12!important;border-color:#ffffff15!important}
#nav .nav-item.active,.r1-nav-link.is-current,.r1-nav-link[aria-current="page"]{background:#fdfefe!important;color:#142d50!important;border:1px solid #e4eaf2!important;box-shadow:inset 3px 0 #d6a449,0 4px 14px #06163120!important}
.r1-nav-link{padding:10px 12px!important;color:#dbe5f4!important}
.r1-nav-icon,#nav .nav-symbol{width:33px!important;height:33px!important;min-width:33px!important;flex:0 0 33px!important;display:inline-grid!important;place-items:center!important;color:#e9c272!important;background:#ffffff0c!important;border:1px solid #ffffff15!important;border-radius:9px!important;font-size:18px!important}
.r1-nav-link.is-current .r1-nav-icon,#nav .active .nav-symbol{color:#88651b!important;background:#fff1d0!important;border-color:#f0ddac!important}
.r1-nav-link .r1-nav-text{flex:1;line-height:1.35}
.r1-main-sidebar .brand{padding-bottom:16px!important;border-bottom:1px solid #ffffff19}
.r1-logo{border-bottom:1px solid #ffffff18;margin-bottom:3px}
.r1-logo img{background:#fff!important;box-shadow:0 4px 14px #07172d40}
.r1-nav-foot,.r1-main-sidebar .av-sidebar-end{border-top:1px solid #ffffff16;color:#cfdeef!important;line-height:1.6}
.r1-nav-foot span,.r1-main-sidebar .av-sidebar-end span{color:#a4b9d2!important}
/* Marco, encabezados, pestañas y ritmo global del dashboard. */
#main-content,.main-wrap{background:var(--r2-page)!important}
.main-wrap .main{max-width:none!important}
.av-topbar{border-bottom:1px solid var(--r2-border)!important;background:#fff!important;min-height:66px!important;box-shadow:0 2px 10px #17385b06!important}
.av-topbar-crumb{font-size:11px!important;letter-spacing:.015em!important}
.av-topbar-crumb strong{color:#163b65!important}
.av-topbar-context{color:#556f8f!important;background:#f2f6fb!important;border:1px solid #e2ebf5!important;border-radius:999px!important;padding:6px 10px!important}
.av-account-actions{background:#f8fafc!important;border:1px solid #e6edf5!important;border-radius:11px!important;min-height:38px;padding:2px 4px!important}
.av-account-name{font-weight:740!important;color:var(--r2-strong)!important}
.e45-top-action,.av-compact-button,.icon-button{border-radius:10px!important;min-height:38px!important}
.av-hnav{background:#fff!important;border-bottom:1px solid var(--r2-border)!important;box-shadow:0 5px 14px #112d5008!important}
.av-hnav-header{padding-block:12px 4px!important}
.av-hnav-overline{color:#a07628!important;letter-spacing:1.3px!important;font-weight:850!important}
.av-hnav-heading strong{font-size:14px!important;font-weight:760!important;color:var(--r2-strong)!important}
.av-section-tab{border-radius:10px 10px 0 0!important;font-size:11.5px!important;font-weight:690!important;min-height:44px!important;transition:background-color .15s,color .15s,border-color .15s!important}
.av-section-tab.active{color:#162e50!important}
.av-section-tab.active:after{background:#cda347!important;box-shadow:none!important}
.av-section-subtab{font-size:11px!important;font-weight:690!important}
.av-hnav-arrow{border-radius:10px!important}
.av-page-hero{background:linear-gradient(105deg,#142a4b 0%,#25446e 80%)!important;border-radius:16px!important;box-shadow:0 11px 22px #17314a1a!important}
.av-page-hero h1{font-size:clamp(27px,2.7vw,37px)!important;letter-spacing:-.038em!important}
.av-page-hero-description,.av-page-hero p{line-height:1.6!important}
.filterbar{border:1px solid var(--r2-border)!important;border-radius:13px!important;background:#fff!important;box-shadow:var(--r2-shadow)!important}
#content{min-width:0}
/* Cuatro módulos SAP: presentación ejecutiva más densa, tarjetas con misma superficie. */
body[data-b3-active="true"] #b3-portal{max-width:1540px!important;padding:0 1px 40px!important}
.b3-hero{min-height:180px!important;padding:28px 34px!important;border-radius:17px!important;background:linear-gradient(118deg,#102441 0%,#1a365f 63%,#294b78 100%)!important;box-shadow:0 12px 26px #102e4b22!important}
.b3-hero:before{opacity:.45}
.b3-hero h1{font-size:clamp(29px,3vw,40px)!important;line-height:1.16!important;letter-spacing:-.045em!important;margin:10px 0 9px!important}
.b3-hero p{font-size:13px!important;max-width:690px;line-height:1.55!important}
.b3-hero-pills{margin-top:15px!important}
.b3-hero-number b{font-size:82px!important;letter-spacing:-8px!important;color:#e4b754!important}
.b3-snapshot{padding:14px 4px 15px!important;font-size:10.5px!important;line-height:1.45!important}
.b3-snapshot strong{font-size:11px!important}
.b3-metric-grid{gap:13px!important;margin-bottom:19px!important}
.b3-metric{min-height:137px!important;border:1px solid var(--r2-border)!important;border-radius:14px!important;box-shadow:var(--r2-shadow)!important;padding:19px 18px 16px!important;background:#fff!important}
.b3-metric:before{background:#cda34c!important;left:18px!important;right:18px!important;height:2px!important}
.b3-metric-label{font-size:11px!important;color:#576f8c!important;max-width:90%!important;min-height:25px!important}
.b3-metric strong{font-size:clamp(22px,2.2vw,30px)!important;letter-spacing:-.05em!important;font-weight:800!important;color:#173458!important}
.b3-metric small{font-size:10.5px!important;color:#7287a2!important}
.b3-surface,.b3-status-strip{border:1px solid var(--r2-border)!important;box-shadow:var(--r2-shadow)!important;border-radius:14px!important;background:#fff!important}
.b3-surface{padding:22px 23px!important}
.b3-section-heading h2{font-size:19px!important;line-height:1.28!important;color:var(--r2-strong)!important}
.b3-section-heading small{font-size:10px!important;letter-spacing:1.1px!important;color:#a27a2d!important}
.b3-kri-card{border-radius:12px!important;border-color:var(--r2-border)!important;box-shadow:var(--r2-shadow)!important;min-height:160px!important;gap:12px!important}
.b3-kri-card:hover{box-shadow:var(--r2-shadow-hover)!important;border-color:#a6c0da!important;transform:translateY(-2px)!important}
.b3-kri-card>strong{font-size:14px!important;line-height:1.42!important}
.b3-badge{font-size:10px!important;min-height:26px!important;letter-spacing:.03em!important}
.b3-warning-list li{background:#f9fafc!important;color:#485f7a!important;font-size:11.5px!important;line-height:1.55!important;border-color:#e9edf4!important}
.b3-ring{box-shadow:none!important}
.b3-table-wrap,.b4-table-wrap{border-radius:11px!important}
.b3-table thead th{font-size:10px!important;letter-spacing:.06em!important;background:#eff4f9!important;color:#46617f!important}
.b3-table th,.b3-table td{font-size:11.5px!important;padding:13px 14px!important}
.b3-link-button,.b3-back,.b3-error button{font-size:12px!important;border-radius:10px!important;min-height:39px!important}
/* Vistas globales: integración, metadatos, API, expedientes. */
.r1-standalone .shell,.r1-standalone .workspace,.r1-standalone .body-wrap{background:var(--r2-page)!important}
.r1-standalone .topbar{background:#fff!important;border-bottom:1px solid var(--r2-border)!important;min-height:65px!important;box-shadow:0 2px 13px #102e4c08!important}
.r1-standalone .r1-trail{font-size:11.5px!important;color:#607897!important;gap:9px!important}
.r1-standalone .r1-trail strong{color:#1c3555!important;font-weight:780!important}
.r1-standalone :where(.heading,.page-heading,.hero,.b1-head,.b2-heading){min-width:0}
.r1-standalone .heading h1,.r1-standalone .page-heading h1,.r1-standalone .hero h1,.r1-standalone .b1-heading h1,.r1-standalone .b2-heading h1{font-size:clamp(28px,2.9vw,39px)!important;letter-spacing:-.045em!important;line-height:1.15!important;color:#162f52!important}
.r1-standalone :where(.heading,.page-heading,.hero,.b1-heading,.b2-heading) p{font-size:13px!important;line-height:1.62!important;color:#627b99!important}
.r1-standalone :where(.eyebrow,.b1-eyebrow,.b2-eyebrow){font-size:10px!important;letter-spacing:1.28px!important;font-weight:820!important;color:#a47b2c!important}
.r1-standalone :where(.panel,.b1-panel,.b2-panel,.surface,.r1-case-filter,.listings,.metric,.metrics>article){border:1px solid var(--r2-border)!important;border-radius:14px!important;background:#fff!important;box-shadow:var(--r2-shadow)!important}
.r1-standalone :where(.panel,.b1-panel,.b2-panel,.surface,.r1-case-filter){padding:22px!important}
.r1-standalone :where(.panel-header,.section-head) h2,.r1-standalone .b1-section-heading h2{font-size:19px!important;line-height:1.3!important;letter-spacing:-.025em!important;color:#1a3456!important}
.r1-standalone :where(.metrics,.b1-metrics,.b2-metrics)>article,.r1-standalone .metric{padding:20px!important;min-width:0}
.r1-standalone :where(.metrics,.b1-metrics,.b2-metrics)>article strong,.r1-standalone .metric strong{color:#1a365a!important;font-weight:800!important;letter-spacing:-.035em!important;font-variant-numeric:tabular-nums}
.r1-standalone :where(.metrics,.b1-metrics,.b2-metrics)>article span,.r1-standalone .metric>span{font-size:10px!important;letter-spacing:.08em!important;font-weight:760!important;color:#687f9e!important}
.r1-standalone :where(.metrics,.b1-metrics,.b2-metrics)>article small,.r1-standalone .metric small{font-size:11px!important;color:#758aa5!important;line-height:1.48!important}
.r1-standalone :where(.r1-case-tabs button,.b2-module-btn,.b1-pagination button){font-size:11.5px!important;min-height:37px!important;border-radius:9px!important}
.r1-standalone :where(button,.pill,.primary,.outline,.refresh){transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s}
.r1-standalone :where(.primary,.refresh){background:#193c69!important;color:#fff!important;border:1px solid #193c69!important;border-radius:10px!important;box-shadow:0 5px 12px #1439631b!important}
.r1-standalone :where(.primary,.refresh):hover{background:#254e7c!important;border-color:#254e7c!important}
.r1-standalone :where(.outline,.b1-close,.text-button){border-radius:10px!important;min-height:38px!important}
.r1-standalone :where(input,select,textarea){font-size:12.5px!important;line-height:1.42!important;border-radius:9px!important}
.r1-standalone :where(input,select,textarea):focus{border-color:#5389be!important;box-shadow:0 0 0 3px #4883b715!important}
.r1-standalone :where(.tablewrap,.table-scroll,.b1-table-scroll,.b2-table-scroll){max-width:100%!important;overflow-x:auto!important;border-radius:10px!important}
.r1-standalone table{border-collapse:collapse;font-variant-numeric:tabular-nums}
.r1-standalone table thead th{font-size:10px!important;font-weight:790!important;letter-spacing:.075em!important;color:#526d8b!important;background:#f0f5fa!important}
.r1-standalone table td{font-size:11.5px!important;color:#425b77!important}
.r1-standalone table th,.r1-standalone table td{line-height:1.45!important}
.r1-standalone table tbody tr:hover{background:#f8fafd}
.r1-standalone .r1-case-filter{padding:17px 20px!important}
.r1-standalone .r1-case-tabs button.selected{background:#1d426e!important;color:white!important;border-color:#1d426e!important}
/* Seguridad de contenido: las rutas locales nunca pueden forzar ancho del viewport. */
.r1-standalone :where(code,pre,.path-box,.b1-source,.b2-source){overflow-wrap:anywhere;word-break:break-word;max-width:100%}
.r1-standalone :where(.path-box,.b1-source) code{white-space:normal!important}
/* Estados legibles y formularios extensos. */
.r1-standalone :where(.feedback,.b1-alert,.b2-warning,.alert-panel){border-radius:12px!important;line-height:1.6!important}
.r1-standalone :where(.feedback,[role="status"]){overflow-wrap:anywhere}
.r1-standalone .modal{border-radius:18px!important;box-shadow:0 25px 85px #0e203b35!important}
.r1-standalone .modal-backdrop:not([hidden]){backdrop-filter:blur(2px)}
/* Login también usa la identidad y la escala de diseño de los tableros. */
body:not([data-r1-page]) .auth-story{background:#fff!important}
body:not([data-r1-page]) .auth-panel{background:#fff!important}
body:not([data-r1-page]) .auth-card h2{color:#132d4e!important}
body:not([data-r1-page]) .auth-field{border-radius:12px!important;border-color:#dce5f0!important;box-shadow:0 3px 11px #1330500a!important}
body:not([data-r1-page]) .auth-submit{background:linear-gradient(100deg,#1a3c68,#102946)!important;border-radius:11px!important;box-shadow:0 10px 26px #14385b24!important}
body:not([data-r1-page]) .auth-visual{border-color:#ffffff32!important;box-shadow:0 18px 45px #08183142!important}
body:not([data-r1-page]) .auth-mini-cards>div{border-radius:10px!important}
body:not([data-r1-page]) .auth-eyebrow{color:#a78034!important}
/* Tablets y móviles: priorizar lectura y controles táctiles. */
@media(max-width:1120px){
  .av-topbar-context{display:none!important}
  .b3-hero{padding:26px 28px!important}
  .r1-standalone :where(.panel,.b1-panel,.b2-panel,.surface){padding:19px!important}
}
@media(max-width:900px){
  .r1-standalone .r1-side{box-shadow:14px 0 44px #06132855!important}
  .r1-standalone .r1-menu-toggle{border-radius:10px!important}
  .b3-snapshot{gap:8px!important}
  .b3-double,.b3-dashboard-grid{gap:12px!important}
}
@media(max-width:600px){
  .b3-hero{min-height:0!important;padding:23px 22px!important}
  .b3-hero h1{font-size:28px!important}
  .b3-hero-number{display:none!important}
  .b3-metric-grid{gap:9px!important}
  .b3-metric{min-height:128px!important;padding:15px 13px!important}
  .b3-metric strong{font-size:23px!important}
  .b3-surface{padding:18px 16px!important}
  .b3-snapshot{line-height:1.55!important}
  .r1-standalone .r1-trail{font-size:10px!important}
  .r1-standalone :where(.panel,.b1-panel,.b2-panel,.surface){padding:17px 15px!important}
  .r1-standalone :where(.metrics,.b1-metrics,.b2-metrics)>article{padding:16px!important}
  .r1-standalone .r1-case-filter{padding:14px!important}
  .r1-standalone .heading h1{font-size:30px!important}
  .r1-standalone .topbar{min-height:60px!important}
  .r1-standalone :where(.tablewrap,.b1-table-scroll,.b2-table-scroll){scrollbar-width:thin}
}
@media(prefers-reduced-motion:reduce){:where(button,a,.b3-kri-card,.b3-metric){transition:none!important;animation:none!important}}
@media print{
  :where(.r1-nav-heading,.r1-nav-entries,.r1-main-extra,.av-hnav-arrows,.r1-menu-toggle){display:none!important}
  body,.r1-standalone .shell,.r1-standalone .workspace{background:white!important}
  .b3-surface,.r1-standalone :where(.panel,.surface){box-shadow:none!important}
}
/* Afinación contrastes y densidad de cabecera: el elemento seleccionado es oscuro. */
#av-hnav-track .av-section-tab.active,#b3-hnav-track .av-section-tab.active{color:#ffffff!important;background:#183253!important;border-color:#183253!important}
#av-hnav-track .av-section-tab.active .av-section-label,#b3-hnav-track .av-section-tab.active .av-section-label{color:#ffffff!important;opacity:1!important}
#av-hnav-track .av-section-tab.active .r2-icon,#b3-hnav-track .av-section-tab.active .r2-icon{color:#e8bf64!important}
.av-topbar-start,.av-topbar-actions{min-width:0!important}
.av-topbar-crumb{min-width:0!important;max-width:360px!important;white-space:nowrap!important;overflow:hidden!important}
.av-topbar-crumb>span:last-child{display:inline-block;max-width:235px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}
@media(max-width:1510px){.av-topbar-context{display:none!important}.av-topbar-crumb{max-width:280px!important}}
@media(max-width:1200px){.av-topbar-crumb{max-width:220px!important}}
