/* BREKA — Enterprise Premium System Theme
   Capa visual global no destructiva. Mantiene IDs, data-* y flujos existentes. */
:root{
  --ep-bg:#f4f7fb;
  --ep-surface:#ffffff;
  --ep-surface-soft:#f8fafc;
  --ep-sidebar:#0c1b2e;
  --ep-sidebar-2:#12263d;
  --ep-navy:#10244f;
  --ep-blue:#2563eb;
  --ep-blue-soft:#eaf2ff;
  --ep-text:#10203f;
  --ep-muted:#64748b;
  --ep-border:#dfe7f0;
  --ep-border-strong:#cfd9e6;
  --ep-green:#079455;
  --ep-green-bg:#e8f7ef;
  --ep-amber:#b76e00;
  --ep-amber-bg:#fff5dc;
  --ep-red:#d92d20;
  --ep-red-bg:#fdecec;
  --ep-shadow:0 8px 24px rgba(15,35,65,.06);
  --ep-shadow-lg:0 18px 48px rgba(15,35,65,.10);
  --ep-radius:16px;
  --ep-radius-sm:12px;
}

html{background:var(--ep-bg)!important;color-scheme:light}
body{
  background:
    radial-gradient(circle at 84% 0%,rgba(37,99,235,.045),transparent 24%),
    linear-gradient(180deg,#f7f9fc 0%,#f3f6fa 100%)!important;
  color:var(--ep-text)!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif!important;
}
body,#app{min-height:100vh}
.muted{color:var(--ep-muted)!important}
.hidden{display:none!important}

/* Desktop shell */
@media(min-width:761px){
  .topbar{
    position:fixed!important;
    left:226px!important;right:0!important;top:0!important;
    width:auto!important;min-height:66px!important;height:66px!important;
    padding:0 28px!important;
    display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:14px!important;
    background:rgba(255,255,255,.94)!important;
    border:0!important;border-bottom:1px solid var(--ep-border)!important;
    box-shadow:0 1px 0 rgba(15,35,65,.02)!important;
    backdrop-filter:blur(16px) saturate(130%)!important;
    z-index:30!important;
  }
  .topbar>div{
    min-height:auto!important;padding:0 18px 0 0!important;
    display:flex!important;align-items:flex-end!important;justify-content:center!important;
    border-right:1px solid var(--ep-border)!important;
  }
  .topbar>div:before{display:none!important}
  .topbar b{font-size:13px!important;color:var(--ep-text)!important;line-height:1.15!important}
  .topbar small{font-size:11px!important;color:var(--ep-muted)!important;margin-top:2px!important}
  .topbar .btn{min-height:38px!important;padding:9px 15px!important;border-radius:10px!important}

  .bottom-nav{
    position:fixed!important;
    left:0!important;top:0!important;bottom:0!important;right:auto!important;
    width:226px!important;max-width:none!important;height:100vh!important;margin:0!important;
    padding:18px 10px 14px!important;
    display:flex!important;flex-direction:column!important;gap:2px!important;
    overflow:hidden!important;
    background:linear-gradient(180deg,var(--ep-sidebar) 0%,#0d2035 62%,#0a1a2b 100%)!important;
    border:0!important;border-right:1px solid rgba(255,255,255,.06)!important;
    border-radius:0!important;
    box-shadow:12px 0 32px rgba(10,27,46,.06)!important;
    backdrop-filter:none!important;
  }
  .nav-menu-scroll{padding-right:2px!important}
  .nav-caption{
    position:relative!important;
    min-height:68px!important;
    margin:0 0 10px!important;padding:3px 10px 10px 54px!important;
    color:transparent!important;border-bottom:1px solid rgba(255,255,255,.09)!important;
    letter-spacing:0!important;
  }
  .nav-caption:before{
    content:"B"!important;position:absolute!important;left:8px!important;top:0!important;
    width:38px!important;height:38px!important;border-radius:11px!important;
    display:grid!important;place-items:center!important;
    color:#f7bf42!important;font-size:21px!important;font-weight:900!important;
    background:linear-gradient(145deg,#132b46,#0a1a2b)!important;
    border:1px solid rgba(108,151,207,.25)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05)!important;
  }
  .nav-caption:after{
    content:"BREKA\A Facturación"!important;white-space:pre!important;
    position:absolute!important;left:56px!important;top:1px!important;
    color:#fff!important;font-size:14px!important;line-height:1.25!important;
    font-weight:850!important;letter-spacing:.01em!important;
  }
  .topbar+main,main{
    margin-left:226px!important;max-width:none!important;
    padding:92px 28px 48px!important;
  }
}

/* Navigation */
.bottom-nav .nav-direct,.bottom-nav .nav-group-toggle{
  min-height:42px!important;padding:8px 10px!important;border-radius:10px!important;
  color:#b8c6d6!important;font-size:13px!important;font-weight:650!important;
}
.bottom-nav .nav-direct span,.bottom-nav .nav-group-toggle span{
  margin:0!important;font-size:12.5px!important;color:inherit!important;
}
.bottom-nav .nav-direct:hover,.bottom-nav .nav-group-toggle:hover{
  background:rgba(255,255,255,.055)!important;color:#fff!important;
}
.bottom-nav .nav-direct.active,.nav-group.open .nav-group-toggle{
  color:#fff!important;
  background:linear-gradient(90deg,rgba(67,126,204,.30),rgba(67,126,204,.17))!important;
  box-shadow:inset 0 0 0 1px rgba(133,174,229,.08)!important;
}
.nav-icon{
  width:30px!important;height:30px!important;flex:0 0 30px!important;
  border-radius:8px!important;background:rgba(255,255,255,.035)!important;
  color:#cfe0f2!important;border:1px solid rgba(255,255,255,.05)!important;
  box-shadow:none!important;font-size:14px!important;
}
.nav-group-toggle>b{color:#9fb0c3!important}
.nav-submenu{padding-left:38px!important}
.bottom-nav .nav-submenu button{
  min-height:34px!important;padding:7px 8px 7px 13px!important;border-radius:8px!important;
  color:#93a6ba!important;font-size:11.5px!important;
}
.bottom-nav .nav-submenu button:hover,.bottom-nav .nav-submenu button.active{
  background:rgba(255,255,255,.055)!important;color:#fff!important;
}
.nav-submenu-label{color:#7f94aa!important}
.bottom-nav .nav-user{
  padding:12px 10px 0!important;border-top:1px solid rgba(255,255,255,.09)!important;
  background:transparent!important;
}
.bottom-nav .nav-user small{color:#6f8398!important}
.bottom-nav .nav-user b{color:#f5f8fb!important}
.bottom-nav .nav-user span{color:#9badbf!important}
.bottom-nav #navLogout{
  min-height:38px!important;margin-top:8px!important;
  background:rgba(255,255,255,.03)!important;color:#b9c8d7!important;
  border:1px solid rgba(255,255,255,.08)!important;border-radius:9px!important;
}
.bottom-nav #navLogout:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}

/* Shared surfaces */
.page-title{margin:0 0 20px!important}
.page-title h1{
  color:var(--ep-text)!important;font-size:32px!important;line-height:1.1!important;
  letter-spacing:-.035em!important;font-weight:850!important;
}
.page-title .muted{font-size:13px!important}
.panel,.stats article,.shortcut-section,.inventory-pane,.pos-catalog,.pos-cart-panel,
.location-cards article,.production-stats article,.admin-summary article{
  background:var(--ep-surface)!important;
  color:var(--ep-text)!important;
  border:1px solid var(--ep-border)!important;
  border-radius:var(--ep-radius)!important;
  box-shadow:var(--ep-shadow)!important;
}
.panel{padding:18px!important;margin-top:18px!important}
.panel h2,.panel h3{color:var(--ep-text)!important}
.panel-head{padding-bottom:12px!important;border-bottom:1px solid #edf1f6!important}
.panel-head h2{font-size:17px!important;margin:0!important}

.btn{
  min-height:40px!important;border-radius:10px!important;padding:10px 15px!important;
  font-weight:750!important;box-shadow:none!important;
}
.btn.primary,.primary{
  background:linear-gradient(180deg,#173f74,#102f5c)!important;color:#fff!important;
  border:1px solid #0f2d58!important;
}
.btn.primary:hover,.primary:hover{filter:brightness(1.08)!important}
.btn.gold,.gold{
  background:#fff!important;color:var(--ep-text)!important;
  border:1px solid var(--ep-border-strong)!important;
}
.btn.ghost,.ghost{
  background:#fff!important;color:#29415f!important;border:1px solid var(--ep-border-strong)!important;
}
.link{color:#1859ac!important}

/* Inputs */
label{color:#334155!important;font-size:12px!important}
input,select,textarea{
  background:#fff!important;color:#17233a!important;border:1px solid var(--ep-border-strong)!important;
  border-radius:10px!important;min-height:42px!important;
}
input::placeholder,textarea::placeholder{color:#94a3b8!important}
input:focus,select:focus,textarea:focus{
  border-color:#7aa7dd!important;box-shadow:0 0 0 3px rgba(37,99,235,.10)!important;
}
.search-box{
  background:#fff!important;border:1px solid var(--ep-border)!important;
  border-radius:10px!important;color:#65758a!important;
}

/* Dashboard reordered to match enterprise reference */
#page-dashboard{display:flex;flex-direction:column}
#page-dashboard>.page-title{order:1}
#page-dashboard>.stats{order:2}
#page-dashboard>#dashboardScope{order:3}
#page-dashboard>.dashboard-shortcuts{order:4}
#page-dashboard>.dashboard-summary-title{display:none!important}
#page-dashboard>.panel{order:5}

#page-dashboard .page-title:before{
  content:"";display:none
}
#page-dashboard .page-title h1{font-size:34px!important}
#page-dashboard .page-title h1::after{
  content:"Resumen operativo de tu negocio en tiempo real.";
  display:block;margin-top:6px;color:#6b7b91;font-size:13px;font-weight:500;letter-spacing:0
}
#companyRuc{
  display:inline-flex!important;align-items:center!important;gap:7px!important;
  color:#15824d!important;font-size:12px!important;font-weight:700!important;
}
#companyRuc:before{
  content:"";width:8px;height:8px;border-radius:50%;background:#14a466;box-shadow:0 0 0 3px #e7f7ef
}
.stats{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;
}
.stats article{
  min-height:116px!important;padding:18px 18px 16px!important;position:relative!important;overflow:hidden!important;
}
.stats article:after{
  content:""!important;position:absolute!important;right:16px!important;bottom:16px!important;top:auto!important;
  width:62px!important;height:34px!important;border-radius:0!important;
  background:linear-gradient(90deg,transparent 0 8%,#cfe2fb 8% 15%,transparent 15% 24%,#b9d6f7 24% 33%,transparent 33% 42%,#8fbeef 42% 52%,transparent 52% 61%,#6da7e5 61% 72%,transparent 72% 80%,#3e86d7 80% 92%,transparent 92%)!important;
  opacity:.72!important;
}
.stats span{color:#5d6c82!important;font-size:12px!important;font-weight:600!important}
.stats strong{color:#10203f!important;font-size:28px!important;margin-top:9px!important;letter-spacing:-.035em!important}
.dashboard-shortcuts{margin:16px 0 0!important}
.shortcut-section{
  margin-top:12px!important;padding:14px!important;border-radius:14px!important;
}
.shortcut-section:first-child{margin-top:0!important}
.shortcut-section-head{margin-bottom:11px!important}
.shortcut-section-head h2{font-size:15px!important;color:#13213d!important}
.shortcut-section-head::after{height:1px!important;background:#edf1f5!important}
.shortcut-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;gap:9px!important}
.shortcut-card{
  min-height:78px!important;padding:12px!important;display:grid!important;
  grid-template-columns:38px minmax(0,1fr) 18px!important;align-items:center!important;justify-content:stretch!important;
  gap:10px!important;text-align:left!important;
  border:1px solid var(--ep-border)!important;border-radius:11px!important;
  background:#fff!important;color:var(--ep-text)!important;
  box-shadow:none!important;
}
.shortcut-card::after{
  content:"›"!important;position:static!important;width:auto!important;height:auto!important;border-radius:0!important;
  background:none!important;color:#173357!important;font-size:22px!important;line-height:1!important;
}
.shortcut-card:hover{
  transform:translateY(-1px)!important;border-color:#c9d5e3!important;
  background:#fbfdff!important;box-shadow:0 7px 18px rgba(15,35,65,.06)!important;
}
.shortcut-icon{
  width:38px!important;height:38px!important;border-radius:10px!important;
  background:#f0f5fb!important;border:0!important;color:#173f74!important;
}
.shortcut-icon::before{width:20px!important;height:20px!important}
.shortcut-label{color:#17223d!important;font-size:12px!important;font-weight:750!important;text-align:left!important}

#page-dashboard>.panel{
  margin-top:16px!important;
  border-radius:14px!important;
}

/* Tables and rows */
.doc-row,.simple-row,.inventory-row{
  border-color:#edf1f5!important;color:#27364d!important;
}
.doc-row:hover,.simple-row:hover{background:#f8fafc!important}
.doc-main b{color:#17233c!important}
.doc-main small{color:#6c7d91!important}
.table-panel{background:#fff!important}
.badge{
  border:0!important;padding:5px 9px!important;font-size:11px!important;font-weight:750!important;
}
.badge:before{width:6px!important;height:6px!important;box-shadow:none!important}
.accepted{background:var(--ep-green-bg)!important;color:var(--ep-green)!important}
.accepted_with_observation,.queued,.sending,.draft{background:var(--ep-amber-bg)!important;color:var(--ep-amber)!important}
.voided,.error,.rejected{background:var(--ep-red-bg)!important;color:var(--ep-red)!important}

/* Product/inventory/POS */
#page-inventory{
  background:transparent!important;color:var(--ep-text)!important;border-radius:0!important;
  padding:0!important;box-shadow:none!important;
}
.inventory-title h1,.pane-head h2,.product-row strong,.product-hero h3,.detail-stock h3{color:var(--ep-text)!important}
.inventory-pane{padding:16px!important}
.pane-head{border-color:#edf1f5!important}
.inventory-head{background:#f7f9fc!important;color:#607086!important}
.product-row{background:#fff!important;color:#26364d!important}
.product-row:hover,.product-row.selected{background:#f4f8fd!important}
.product-thumb,.product-image{background:#eef3f8!important;color:#315a88!important}
.sync-note{background:#eef8f3!important;color:#27754e!important}
.request-items,.request-history,.inventory-scroll{border-color:var(--ep-border)!important}
.request-item-row,.request-group-item,.dispatch-product-row{
  background:#fff!important;border-color:var(--ep-border)!important;color:#26364d!important;
}
.pos-catalog,.pos-cart-panel{padding:16px!important}
#page-pos .pos-location-bar,#page-pos .pos-doc-toggle,#page-pos .barcode-entry,#page-pos .pos-search-prompt,#page-pos .pos-empty{
  background:#fff!important;color:#334155!important;border-color:var(--ep-border)!important;
}
.pos-categories button{background:#f4f7fa!important;color:#5c6d81!important}
.pos-categories button.active,.pos-doc-toggle button.active{background:#eaf2ff!important;color:#174f98!important}
.pos-product{
  background:#fff!important;color:#17233a!important;border-color:var(--ep-border)!important;
}
.pos-product:hover{background:#f8fbff!important;border-color:#bdd0e6!important}
.pos-product-icon{background:#eef4fa!important;color:#315d8d!important}
.pos-product-info small,.pos-product-info code{color:#728397!important}
.pos-product-price{color:#102f5c!important}
.pos-cart-row,.pos-totals{background:#f8fafc!important;border-color:var(--ep-border)!important;color:#25354b!important}
.pos-cart-row small,.pos-totals>span{color:#66768a!important}
.pos-totals strong,.pos-totals b{color:#13213a!important}

/* Admin, production, settings cards */
.production-flow,.quality-model,.quality-row,.quality-summary span,
.location-management-card,.cash-register-card,.admin-card,.settings-card{
  background:#fff!important;color:#24344b!important;border-color:var(--ep-border)!important;
}
.quality-model h3{background:#f7f9fc!important;color:#17233a!important}

/* Modal system */
.modal-bg{background:rgba(15,28,45,.42)!important;backdrop-filter:blur(6px)!important}
.modal,.modal-content,.dialog{
  background:#fff!important;color:#26354a!important;border:1px solid var(--ep-border)!important;
  border-radius:18px!important;box-shadow:0 24px 70px rgba(15,35,65,.18)!important;
}
.modal:before{display:none!important}
.modal .modal-head{background:#fff!important;border-bottom:1px solid #edf1f5!important}
.modal h2,.modal h3,.modal label{color:#20324a!important}
.modal .close{background:#f5f7fa!important;color:#334155!important;border:1px solid var(--ep-border)!important}

/* Auth */
.auth{background:linear-gradient(135deg,#eef3f9,#f9fbfd)!important}
.login-card{
  border:1px solid var(--ep-border)!important;border-radius:20px!important;
  box-shadow:0 24px 60px rgba(15,35,65,.12)!important;
}
.brand-b{background:linear-gradient(145deg,#173f74,#0e2b53)!important;color:#f7bf42!important}

/* Mobile keeps the same premium language */
@media(max-width:760px){
  body{background:#f5f7fa!important}
  .topbar{
    min-height:62px!important;padding:10px 14px!important;
    background:rgba(255,255,255,.96)!important;border-bottom:1px solid var(--ep-border)!important;
    box-shadow:none!important;
  }
  .topbar>div{padding-left:0!important;min-height:auto!important}
  .topbar>div:before{display:none!important}
  .topbar b{font-size:15px!important;color:var(--ep-text)!important}
  .topbar small{font-size:10px!important;color:var(--ep-muted)!important}
  main{padding:18px 12px 92px!important}
  .bottom-nav{
    background:linear-gradient(180deg,var(--ep-sidebar),#0b1d31)!important;
    border:0!important;border-radius:0 16px 16px 0!important;
  }
  .nav-caption{color:#fff!important;border-color:rgba(255,255,255,.09)!important}
  .page-title h1{font-size:28px!important}
  .stats{grid-template-columns:1fr 1fr!important}
  .stats article{min-height:104px!important;padding:14px!important}
  .stats strong{font-size:23px!important}
  .shortcut-grid{grid-template-columns:1fr 1fr!important}
  .shortcut-card{min-height:70px!important;grid-template-columns:34px minmax(0,1fr) 16px!important;padding:10px!important}
  .shortcut-icon{width:34px!important;height:34px!important}
  .shortcut-label{font-size:11.5px!important}
  .panel,.shortcut-section,.inventory-pane,.pos-catalog,.pos-cart-panel{border-radius:13px!important}
}

@media(max-width:420px){
  .stats{grid-template-columns:1fr!important}
  .shortcut-grid{grid-template-columns:1fr!important}
}


/* 2026-09-22 — polish pass based on real deployed screenshot */
@media(min-width:761px){
  .topbar>div{display:none!important}
  .topbar{
    justify-content:flex-end!important;
    padding:0 30px!important;
  }
  .topbar #newDocument{
    width:auto!important;
    min-width:172px!important;
    max-width:none!important;
    flex:0 0 auto!important;
    margin-left:auto!important;
    background:#fff!important;
    color:#173357!important;
    border:1px solid #d6e0eb!important;
    box-shadow:0 2px 7px rgba(15,35,65,.035)!important;
  }
  .topbar #newDocument:hover{
    background:#f8fbff!important;
    border-color:#b9cbe0!important;
  }
  .topbar+main,main{
    max-width:1540px!important;
    margin-right:auto!important;
    padding-left:30px!important;
    padding-right:30px!important;
  }
}

#page-dashboard .page-title{
  align-items:flex-start!important;
  margin-bottom:18px!important;
}
#page-dashboard .page-title h1{
  font-size:36px!important;
  font-weight:850!important;
}
#page-dashboard #companyRuc{
  margin-top:11px!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  background:#edf8f2!important;
}

#page-dashboard #dashboardScope{
  order:3!important;
  margin:12px 0 2px!important;
  padding:0!important;
  font-size:12px!important;
  line-height:1.45!important;
  color:#718096!important;
}

.stats article{
  min-height:126px!important;
  padding:20px!important;
}
.stats span{
  font-size:12px!important;
  line-height:1.35!important;
}
.stats strong{
  font-size:30px!important;
  margin-top:12px!important;
}

.dashboard-shortcuts{
  gap:14px!important;
}
.shortcut-section{
  padding:13px!important;
  box-shadow:0 6px 18px rgba(15,35,65,.045)!important;
}
.shortcut-section-head{
  margin-bottom:10px!important;
}
.shortcut-section-head h2{
  font-size:14px!important;
  font-weight:800!important;
}
.shortcut-card{
  min-height:72px!important;
}
.shortcut-label{
  line-height:1.25!important;
}

#page-dashboard>.panel{
  box-shadow:0 6px 18px rgba(15,35,65,.045)!important;
}

@media(min-width:1200px){
  #page-dashboard .shortcut-section:first-child .shortcut-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
  #page-dashboard .shortcut-section:nth-child(2) .shortcut-grid{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
  }
  #page-dashboard .shortcut-section:nth-child(3) .shortcut-grid,
  #page-dashboard .shortcut-section:nth-child(4) .shortcut-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

/* Make the whole application feel less flat and more like the approved reference */
.page{
  animation:epFadeIn .16s ease-out;
}
@keyframes epFadeIn{
  from{opacity:.96;transform:translateY(2px)}
  to{opacity:1;transform:none}
}
.panel,.stats article,.shortcut-section,.inventory-pane,.pos-catalog,.pos-cart-panel{
  box-shadow:0 5px 16px rgba(18,45,78,.045)!important;
}


/* Reference-match pass: make the deployed dashboard visually track the approved mockup */
@media(min-width:761px){
  .topbar{
    left:226px!important;
    height:68px!important;
    min-height:68px!important;
    justify-content:center!important;
    gap:14px!important;
    padding:0 28px!important;
  }
  .topbar .topbar-company-source{display:none!important}
  .topbar #newDocument{display:none!important}
  .ep-global-search{
    width:min(520px,42vw)!important;
    min-height:40px!important;
    display:flex!important;align-items:center!important;gap:10px!important;
    border:1px solid #dbe4ef!important;border-radius:9px!important;
    background:#fff!important;color:#63748a!important;
    padding:0 10px 0 13px!important;
    box-shadow:0 2px 8px rgba(20,45,75,.035)!important;
    font:inherit!important;cursor:pointer!important;
  }
  .ep-global-search>span:nth-child(2){flex:1;text-align:left;font-size:12px}
  .ep-search-icon{font-size:21px;color:#173b6c}
  .ep-global-search kbd{
    border:0!important;border-radius:6px!important;background:#f1f5fa!important;
    padding:5px 8px!important;color:#5a6c82!important;font-size:10px!important;
    font-family:inherit!important;font-weight:700!important;
  }
  .ep-notification{
    position:relative!important;width:42px!important;height:42px!important;border:0!important;
    border-left:1px solid #e2e8f0!important;border-right:1px solid #e2e8f0!important;
    background:transparent!important;color:#10294d!important;font-size:20px!important;
    cursor:pointer!important;
  }
  .ep-notification i{
    position:absolute;right:8px;top:8px;width:8px;height:8px;border-radius:50%;
    background:#e3343d;border:2px solid #fff;
  }
  .ep-company-summary{
    display:grid!important;align-content:center!important;
    min-width:160px!important;padding-left:2px!important;border:0!important;
  }
  .ep-company-summary b{font-size:12px!important;color:#10203f!important}
  .ep-company-summary small{font-size:10px!important;color:#718096!important}
}
@media(max-width:760px){
  .ep-global-search,.ep-notification,.ep-company-summary{display:none!important}
}

/* Keep only the first dashboard shortcut section on the home dashboard, like the reference.
   Other workflows remain available from the sidebar. */
#page-dashboard #dashboardShortcuts .shortcut-section:not(:first-child){display:none!important}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child{
  margin-top:0!important;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-section-head h2{
  font-size:0!important;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-section-head h2:before{
  content:"Accesos rápidos";
  font-size:16px!important;
  color:#10203f!important;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-section-head h2:after{
  content:"  Las tareas más comunes de tu operación diaria.";
  font-size:11px!important;
  font-weight:500!important;
  color:#6b7b91!important;
  margin-left:10px!important;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-card:first-child{display:none!important}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
#page-dashboard #dashboardShortcuts{
  order:4!important;
  margin:14px 0 0!important;
}

/* Lower dashboard: charts, AI and health column */
.ep-dashboard-lower{
  order:5!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.85fr) minmax(300px,.8fr)!important;
  gap:14px!important;
  margin-top:14px!important;
}
.ep-dashboard-main{min-width:0}
.ep-dashboard-side{display:grid;gap:14px;align-content:start}
.ep-analytics-row{
  display:grid!important;
  grid-template-columns:1.15fr .95fr!important;
  gap:14px!important;
}
.ep-analytics-card,.ep-ai-card,.ep-system-card{
  background:#fff!important;
  border:1px solid #dfe7f0!important;
  border-radius:14px!important;
  box-shadow:0 6px 18px rgba(15,35,65,.045)!important;
}
.ep-analytics-card{padding:15px!important;min-height:218px!important}
.ep-card-title{display:flex;justify-content:space-between;align-items:center;gap:10px}
.ep-card-title h2{margin:0!important;font-size:15px!important;color:#10203f!important}
.ep-card-title>span{
  border:1px solid #dce5ef;border-radius:8px;background:#fff;
  padding:7px 9px;font-size:10px;color:#607086;
}
.ep-bars{
  height:132px;margin-top:14px;
  display:grid;grid-template-columns:repeat(7,1fr);align-items:end;gap:10px;
  padding:12px 12px 0;border-left:1px solid #e5ebf2;border-bottom:1px solid #e5ebf2;
  background:
    linear-gradient(#eef2f6 1px,transparent 1px) 0 25%/100% 25%;
}
.ep-bars i{
  display:block;height:var(--h);min-height:18px;border-radius:1px 1px 0 0;
  background:linear-gradient(180deg,#69a8ea,#4b8fd8);
}
.ep-bars i:last-child{background:linear-gradient(180deg,#2869b1,#185395)}
.ep-chart-labels{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;padding:7px 12px 0}
.ep-chart-labels span{text-align:center;font-size:9px;color:#687990}
.ep-status-content{display:grid;grid-template-columns:150px 1fr;gap:14px;align-items:center;margin-top:20px}
.ep-donut{
  width:132px;height:132px;border-radius:50%;
  display:grid;place-content:center;text-align:center;
  background:
    radial-gradient(circle at center,#fff 0 46%,transparent 47%),
    conic-gradient(#0aa06e 0 72%,#f7b42c 72% 84%,#e23a3a 84% 92%,#7b8ba1 92% 100%);
}
.ep-donut strong{font-size:20px;color:#10203f}
.ep-donut small{font-size:10px;color:#718096}
.ep-status-list{display:grid;gap:10px}
.ep-status-list span{display:flex;align-items:center;gap:8px;font-size:11px;color:#526174}
.ep-status-list i,.ep-system-card i{width:9px;height:9px;border-radius:50%;display:inline-block;flex:0 0 9px}
.ep-status-list .ok,.ep-system-card .ok{background:#0aa06e}
.ep-status-list .pending{background:#f4aa22}
.ep-status-list .bad{background:#e53935}
.ep-status-list .draft{background:#7b8ba1}

.ep-ai-card{
  padding:16px!important;
  min-height:178px!important;
  background:
    radial-gradient(circle at 100% 100%,rgba(126,105,255,.12),transparent 45%),
    linear-gradient(135deg,#fff,#f7f7ff)!important;
}
.ep-ai-card>div{display:flex;align-items:center;gap:10px}
.ep-ai-card h2{margin:0;font-size:16px;color:#10203f}
.ep-ai-icon{font-size:24px;color:#6256d9}
.ep-ai-card p{margin:14px 0 16px;color:#5f6f84;font-size:11px;line-height:1.55}
.ep-ai-card button{
  min-width:150px;border:0;border-radius:9px;background:#10294d;color:#fff;
  padding:11px 14px;font-weight:800;cursor:pointer;
}
.ep-ai-card button b{float:right}
.ep-system-card{padding:15px!important}
.ep-system-card p{
  margin:0;padding:10px 0;border-top:1px solid #edf1f5;
  display:grid;grid-template-columns:10px 1fr auto;align-items:center;gap:8px;
  font-size:10.5px;color:#34445a;
}
.ep-system-card p:first-of-type{margin-top:10px}
.ep-system-card p b{color:#0a8a5b;font-size:10px}

/* Put the live latest-documents panel under the charts, occupying the main column width */
#page-dashboard>.panel{
  order:6!important;
  width:calc((100% - 14px) * .698)!important;
  margin-top:14px!important;
  align-self:flex-start!important;
}
#page-dashboard>.dashboard-summary-title{display:none!important}

/* KPI tuning to more closely match the reference proportions */
.stats article{
  min-height:118px!important;
  border-radius:12px!important;
}
.stats article:before{
  content:"";position:absolute;left:16px;top:18px;width:28px;height:28px;border-radius:8px;
  background:#eff5fb;
}
.stats article span,.stats article strong{position:relative;z-index:1}
.stats article span{padding-left:40px}
.stats article strong{padding-left:40px}
.stats article:nth-child(2):before{background:#f2f5fb}
.stats article:nth-child(3):before{background:#eff6ff}
.stats article:nth-child(4):before{background:#eff6ff}

@media(max-width:1050px){
  .ep-dashboard-lower{grid-template-columns:1fr!important}
  .ep-dashboard-side{grid-template-columns:1fr 1fr}
  #page-dashboard>.panel{width:100%!important}
}
@media(max-width:760px){
  #page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-grid{grid-template-columns:1fr 1fr!important}
  .ep-dashboard-lower{display:block!important}
  .ep-analytics-row{grid-template-columns:1fr!important}
  .ep-dashboard-side{grid-template-columns:1fr!important;margin-top:12px}
  .ep-status-content{grid-template-columns:130px 1fr}
  .ep-analytics-card{margin-top:12px}
}


/* Final reference polish — 2026-09-22 */
@media(min-width:761px){
  .topbar>.ep-company-summary{
    display:grid!important;
    grid-template-columns:1fr!important;
    align-content:center!important;
    min-width:168px!important;
    min-height:40px!important;
    padding-left:14px!important;
    border-left:1px solid #e2e8f0!important;
  }
  .topbar>.ep-company-summary b{
    font-size:12px!important;
    line-height:1.15!important;
    color:#10203f!important;
    white-space:nowrap!important;
  }
  .topbar>.ep-company-summary small{
    display:block!important;
    margin-top:3px!important;
    color:#718096!important;
    font-size:10px!important;
  }
  .topbar{
    justify-content:flex-end!important;
  }
  .ep-global-search{
    margin-left:auto!important;
  }
}

/* Header status should match the approved reference: status here, RUC in the top bar */
#page-dashboard #companyRuc{
  font-size:0!important;
  background:transparent!important;
  padding:6px 0!important;
  color:#16824d!important;
  box-shadow:none!important;
}
#page-dashboard #companyRuc:before{
  width:8px!important;height:8px!important;
  box-shadow:none!important;
}
#page-dashboard #companyRuc:after{
  content:"RUC activo";
  font-size:12px!important;
  font-weight:700!important;
  color:#16824d!important;
}

/* KPI icon glyphs, without inventing business metrics */
.stats article:before{
  display:grid!important;place-items:center!important;
  color:#153f73!important;
  font-weight:900!important;
  font-size:16px!important;
}
.stats article:nth-child(1):before{content:"▥"!important}
.stats article:nth-child(2):before{content:"◷"!important}
.stats article:nth-child(3):before{content:"◉"!important}
.stats article:nth-child(4):before{content:"♙"!important}

/* More reference-like card proportions and typography */
#page-dashboard{
  max-width:1220px!important;
  margin:0 auto!important;
}
#page-dashboard .page-title{
  margin-bottom:14px!important;
}
#page-dashboard .page-title h1{
  font-size:32px!important;
}
.stats{
  gap:10px!important;
}
.stats article{
  min-height:112px!important;
  padding:16px!important;
}
.stats span{
  font-size:11.5px!important;
}
.stats strong{
  font-size:27px!important;
  margin-top:9px!important;
}
#page-dashboard #dashboardScope{
  margin:9px 0 0!important;
  font-size:10.5px!important;
}
#page-dashboard #dashboardShortcuts{
  margin-top:12px!important;
}
.shortcut-section{
  padding:12px!important;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-section-head h2:before{
  font-size:15px!important;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-section-head h2:after{
  font-size:10px!important;
}
.shortcut-card{
  min-height:68px!important;
  padding:10px!important;
}
.shortcut-label{
  font-size:11.5px!important;
}

/* Quick-action subtitles from the reference; informational UI only */
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-card{
  grid-template-columns:38px minmax(0,1fr) 16px!important;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-card .shortcut-label{
  display:grid!important;
  gap:3px!important;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-card:nth-child(2) .shortcut-label:after{
  content:"Emitir comprobante";font-size:9.5px;font-weight:500;color:#718096;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-card:nth-child(3) .shortcut-label:after{
  content:"Venta rápida";font-size:9.5px;font-weight:500;color:#718096;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-card:nth-child(4) .shortcut-label:after{
  content:"Enviar a cliente";font-size:9.5px;font-weight:500;color:#718096;
}
#page-dashboard #dashboardShortcuts .shortcut-section:first-child .shortcut-card:nth-child(5) .shortcut-label:after{
  content:"Facturas, boletas, etc.";font-size:9.5px;font-weight:500;color:#718096;
}

/* Compact lower dashboard to align with the approved reference */
.ep-dashboard-lower{
  margin-top:12px!important;
  grid-template-columns:minmax(0,1.82fr) minmax(285px,.78fr)!important;
  gap:12px!important;
}
.ep-analytics-row{gap:12px!important}
.ep-analytics-card{
  min-height:204px!important;
  padding:13px!important;
}
.ep-card-title h2{font-size:14px!important}
.ep-bars{height:122px!important;margin-top:11px!important}
.ep-donut{width:122px!important;height:122px!important}
.ep-status-content{grid-template-columns:138px 1fr!important;margin-top:16px!important}
.ep-ai-card{min-height:164px!important;padding:14px!important}
.ep-ai-card h2{font-size:15px!important}
.ep-ai-card p{margin:11px 0 13px!important}
.ep-system-card{padding:13px!important}
.ep-system-card p{padding:9px 0!important}

/* Sidebar footer to match the approved enterprise reference */
.ep-support-link{
  width:100%!important;
  display:flex!important;align-items:center!important;gap:9px!important;
  min-height:42px!important;
  padding:8px 10px!important;
  margin-top:auto!important;
  border:0!important;border-top:1px solid rgba(255,255,255,.09)!important;
  background:transparent!important;color:#b8c7d7!important;
  font:inherit!important;cursor:pointer!important;text-align:left!important;
}
.ep-support-link>span{
  width:22px;height:22px;border:1px solid #8194a8;border-radius:50%;
  display:grid;place-items:center;font-size:12px;font-weight:800;
}
.ep-support-link>b{font-size:11px!important;font-weight:600!important}
.bottom-nav .nav-user{
  position:relative!important;
  padding:12px 8px 0 50px!important;
  min-height:104px!important;
}
.ep-user-avatar{
  position:absolute!important;left:8px!important;top:14px!important;
  width:34px!important;height:34px!important;border-radius:50%!important;
  display:grid!important;place-items:center!important;
  background:#e9f0fb!important;color:#18385e!important;
  font-size:11px!important;font-weight:900!important;
}
.bottom-nav .nav-user small{
  font-size:7px!important;
  letter-spacing:.08em!important;
}
.bottom-nav .nav-user b{
  font-size:11px!important;
  margin-top:2px!important;
}
.bottom-nav .nav-user span#navUserRole{
  font-size:9px!important;
}
.bottom-nav #navLogout{
  width:auto!important;
  min-height:auto!important;
  margin:7px 0 0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#59a8e8!important;
  justify-content:flex-start!important;
  font-size:10px!important;
}
.bottom-nav #navLogout:hover{
  background:transparent!important;color:#8dc9f4!important;
}

@media(max-width:1300px) and (min-width:761px){
  #page-dashboard{max-width:none!important}
}


/* Wide-layout correction — match approved reference on large desktop screens */
@media(min-width:1301px){
  #page-dashboard{
    max-width:none!important;
    width:100%!important;
    margin:0!important;
  }
  .topbar+main,main{
    max-width:none!important;
    width:auto!important;
    margin-right:0!important;
    padding-left:28px!important;
    padding-right:28px!important;
  }
}

/* The analytics row should only be as tall as the charts + AI card. */
.ep-dashboard-side{
  display:block!important;
}
.ep-ai-card{
  height:100%!important;
  min-height:204px!important;
}

/* Bottom row now mirrors the reference: latest documents left, system/help right. */
.ep-dashboard-bottom{
  order:6!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.82fr) minmax(285px,.78fr)!important;
  gap:12px!important;
  margin-top:12px!important;
  align-items:start!important;
}
.ep-dashboard-bottom>.panel{
  width:auto!important;
  margin:0!important;
  align-self:stretch!important;
}
.ep-dashboard-bottom-side{
  display:grid!important;
  gap:12px!important;
}
.ep-dashboard-bottom .ep-system-card{
  min-height:0!important;
}
.ep-help-card{
  min-height:72px!important;
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  padding:12px 14px!important;
  background:#fff!important;
  border:1px solid #dfe7f0!important;
  border-radius:14px!important;
  box-shadow:0 6px 18px rgba(15,35,65,.045)!important;
}
.ep-help-icon{
  width:34px!important;height:34px!important;border-radius:50%!important;
  display:grid!important;place-items:center!important;
  background:#f1f5fb!important;color:#153f73!important;
  font-weight:900!important;
  border:1px solid #dfe7f0!important;
}
.ep-help-card div{display:grid!important;gap:2px!important}
.ep-help-card b{font-size:12px!important;color:#10203f!important}
.ep-help-card small{font-size:9.5px!important;color:#718096!important}
.ep-help-card button{
  min-height:34px!important;
  padding:8px 12px!important;
  border-radius:8px!important;
  border:1px solid #d7e1ec!important;
  background:#fff!important;
  color:#173357!important;
  font-size:10px!important;
  font-weight:700!important;
  cursor:pointer!important;
}

/* Prevent the old direct-child panel rule from shrinking the new bottom layout. */
#page-dashboard>.panel{
  width:auto!important;
}

/* Better use of horizontal space at 1440px+ to reproduce the reference density. */
@media(min-width:1440px){
  #page-dashboard .page-title h1{font-size:34px!important}
  .stats article{min-height:118px!important}
  .shortcut-card{min-height:72px!important}
  .ep-analytics-card{min-height:214px!important}
  .ep-ai-card{min-height:214px!important}
}

/* Responsive collapse */
@media(max-width:1050px){
  .ep-dashboard-bottom{
    grid-template-columns:1fr!important;
  }
  .ep-dashboard-bottom-side{
    grid-template-columns:1fr 1fr!important;
  }
}
@media(max-width:760px){
  .ep-dashboard-bottom{
    display:block!important;
  }
  .ep-dashboard-bottom-side{
    grid-template-columns:1fr!important;
    margin-top:12px!important;
  }
  .ep-help-card{
    grid-template-columns:34px minmax(0,1fr)!important;
  }
  .ep-help-card button{
    grid-column:1/-1!important;
    width:100%!important;
  }
}


/* Functional dashboard control states */
.ep-global-search:focus-visible,.ep-notification:focus-visible,.ep-support-link:focus-visible,
.ep-ai-card button:focus-visible,.ep-help-card button:focus-visible,.ep-card-title>span:focus-visible{
  outline:3px solid rgba(37,99,235,.18)!important;
  outline-offset:2px!important;
}
.ep-card-title>span{cursor:pointer!important}
.ep-action-modal{width:min(520px,100%)!important}
.ep-action-modal-body{padding:4px 0 6px!important}
.ep-action-modal-actions{
  display:flex!important;justify-content:flex-end!important;gap:9px!important;
  margin-top:18px!important;padding-top:14px!important;border-top:1px solid #e8edf3!important;
}
.ep-notice-card{
  border:1px solid #dfe7f0;border-radius:12px;padding:14px;background:#f8fafc;color:#334155;
}
.ep-notice-card b{display:block;color:#10203f;margin-bottom:5px}
.ep-notice-card p{margin:0;color:#64748b;line-height:1.5}
.ep-notice-card.warning{background:#fff9ed;border-color:#f3ddb4}
.ep-notice-card.success{background:#effaf4;border-color:#ccebd9}
.ep-system-detail-list{display:grid}
.ep-system-detail-row{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:12px 2px;border-top:1px solid #edf1f5;
}
.ep-system-detail-row:first-child{border-top:0}
.ep-system-detail-row span{color:#526174}
.ep-system-detail-row b{color:#0a8a5b}
.ep-support-modal-copy p{color:#526174;line-height:1.55;margin:8px 0}
@media(max-width:520px){
  .ep-action-modal-actions{display:grid!important;grid-template-columns:1fr!important}
}
