
/* =========================================================
   eCASILLA MUNICIPAL · ARQUITECTURA UNIFICADA 2026
   Sidebar + topbar + hero + componentes coherentes
   ========================================================= */
:root{
  --ec-sidebar:292px;
  --ec-topbar:74px;
  --ec-petroleo:#07584f;
  --ec-petroleo-2:#08675b;
  --ec-petroleo-3:#0a7566;
  --ec-gold:#d6b24b;
  --ec-gold-2:#edcc6b;
  --ec-bg:#f4f8f6;
  --ec-card:#ffffff;
  --ec-text:#102b26;
  --ec-muted:#70837d;
  --ec-line:#dbe7e3;
  --ec-soft:#eef6f3;
  --ec-soft-2:#e6f2ee;
  --ec-success:#08705e;
  --ec-info:#286fa3;
  --ec-warning:#b6780c;
  --ec-danger:#cb4e4e;
  --ec-shadow:0 14px 38px rgba(9,58,49,.075);
  --ec-shadow-soft:0 7px 22px rgba(9,58,49,.055);
  --ec-radius:20px;
  --ec-radius-sm:13px;
}
*{box-sizing:border-box}
html{background:var(--ec-bg)}
body{
  margin:0!important;
  color:var(--ec-text)!important;
  background:
    radial-gradient(circle at 87% -8%,rgba(7,117,99,.055),transparent 28%),
    linear-gradient(180deg,#fbfdfc 0%,var(--ec-bg) 100%)!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif!important;
  -webkit-font-smoothing:antialiased;
}
body.ec-shell-active{
  padding-left:var(--ec-sidebar)!important;
  padding-top:var(--ec-topbar)!important;
  min-height:100vh!important;
}
body.ec-embedded{
  padding:0!important;
  background:#fff!important;
}
body.ec-embedded .ec-sidebar-unified,
body.ec-embedded .ec-topbar-unified,
body.ec-embedded .ec-unified-footer,
body.ec-embedded .mobile-nav-toggle,
body.ec-embedded .sidebar,
body.ec-embedded .app-topbar,
body.ec-embedded .topbar{
  display:none!important;
}
body.ec-embedded .main-content,
body.ec-embedded main{
  margin:0!important;
  width:100%!important;
  max-width:none!important;
  padding:18px!important;
}
a{color:inherit}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{transition:all .18s ease}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:3px solid rgba(8,112,94,.18)!important;
  outline-offset:2px!important;
}

/* ---------- OCULTAR SHELL ANTERIOR ---------- */
body.ec-shell-active .sidebar:not(.ec-sidebar-unified),
body.ec-shell-active .app-topbar:not(.ec-topbar-unified),
body.ec-shell-active .topbar:not(.ec-topbar-unified),
body.ec-shell-active .mobile-nav-toggle:not(.ec-mobile-toggle),
body.ec-shell-active .sidebar-overlay{
  display:none!important;
}
body.ec-shell-active .main-content{
  margin-left:0!important;
  width:100%!important;
  padding:28px 34px 32px!important;
  min-height:calc(100vh - var(--ec-topbar))!important;
}
body.ec-shell-active main{
  max-width:none!important;
}
body.ec-shell-active .sidebar-user,
body.ec-shell-active .user-footer-card,
body.ec-shell-active .account-summary-bottom{
  display:none!important;
}

/* ---------- SIDEBAR ---------- */
.ec-sidebar-unified{
  position:fixed;
  left:0;top:0;bottom:0;
  width:var(--ec-sidebar);
  z-index:3000;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  color:#fff;
  background:
    radial-gradient(circle at 10% 0%,rgba(227,193,91,.14),transparent 26%),
    linear-gradient(180deg,#07584f 0%,#056356 48%,#07554d 100%);
  border-right:1px solid rgba(255,255,255,.08);
  box-shadow:10px 0 34px rgba(4,49,42,.08);
}
.ec-sidebar-brand{
  min-height:126px;
  padding:22px 22px 18px;
  display:grid;
  grid-template-columns:66px 1fr;
  gap:14px;
  align-items:center;
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 12% 0%,rgba(247,211,106,.42),transparent 45%),
    linear-gradient(135deg,rgba(220,176,56,.24),rgba(255,255,255,.015));
  border-bottom:1px solid rgba(255,255,255,.10);
}
.ec-sidebar-brand:after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(100deg,rgba(232,192,76,.10),transparent 55%);
}
.ec-sidebar-brand img{
  position:relative;z-index:1;
  width:62px;height:62px;
  object-fit:contain;
  padding:4px;
  filter:brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0,0,0,.12));
}
.ec-sidebar-brand-copy{position:relative;z-index:1;min-width:0}
.ec-sidebar-brand-copy small{
  display:block;
  color:#e9f4f0;
  font-size:10px;
  font-weight:700;
  letter-spacing:.02em;
  line-height:1.25;
}
.ec-sidebar-brand-copy strong{
  display:block;
  margin-top:3px;
  font-size:17px;
  line-height:1.15;
  letter-spacing:.02em;
}
.ec-sidebar-product{
  padding:18px 24px 6px;
}
.ec-sidebar-product strong{
  display:block;
  font-size:28px;
  line-height:1;
  letter-spacing:-.035em;
}
.ec-sidebar-product span{
  display:block;
  margin-top:5px;
  color:#cce3dd;
  font-size:11px;
  line-height:1.35;
}
.ec-sidebar-scroll{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:10px 16px 20px;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.20) transparent;
}
.ec-nav-section{
  margin:18px 12px 7px;
  color:#e2bd50;
  font-size:9px;
  font-weight:900;
  letter-spacing:.15em;
  text-transform:uppercase;
}
.ec-nav-link{
  position:relative;
  display:flex;
  align-items:center;
  min-height:46px;
  gap:12px;
  padding:11px 13px;
  margin:3px 0;
  color:#f2f8f6;
  text-decoration:none;
  border:1px solid transparent;
  border-radius:13px;
  font-size:12px;
  font-weight:650;
}
.ec-nav-link svg{width:20px;height:20px;flex:0 0 20px;stroke:currentColor}
.ec-nav-link:hover{
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.08);
  transform:translateX(2px);
}
.ec-nav-link.active{
  background:linear-gradient(90deg,rgba(255,255,255,.13),rgba(255,255,255,.07));
  border-color:rgba(255,255,255,.11);
  box-shadow:inset 3px 0 0 var(--ec-gold);
  color:#fff;
}
.ec-nav-badge{
  margin-left:auto;
  min-width:20px;height:20px;
  display:grid;place-items:center;
  padding:0 6px;
  border-radius:999px;
  color:#fff;
  background:#0a8d74;
  border:1px solid rgba(255,255,255,.14);
  font-size:9px;
  font-weight:850;
}
.ec-sidebar-divider{
  height:1px;
  background:rgba(255,255,255,.10);
  margin:12px 0;
}
.ec-help-card{
  margin:10px 4px 14px;
  padding:13px 14px;
  display:flex;
  align-items:center;
  gap:11px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:14px;
  background:rgba(255,255,255,.035);
  color:#fff;
  cursor:pointer;
}
.ec-help-card svg{width:23px;height:23px}
.ec-help-card strong{font-size:11px}
.ec-help-card small{display:block;color:#c9dfd9;font-size:9px;margin-top:2px}
.ec-logout{
  margin:0 20px 20px;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:12px;
  color:#fff;
  text-decoration:none;
  background:rgba(255,255,255,.025);
  font-size:11px;
  font-weight:750;
}
.ec-logout:hover{background:rgba(255,255,255,.075)}

/* ---------- TOPBAR ---------- */
.ec-topbar-unified{
  position:fixed;
  top:0;left:var(--ec-sidebar);right:0;
  height:var(--ec-topbar);
  z-index:2900;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 30px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(14px);
  border-bottom:1px solid #e3ebe8;
  box-shadow:0 5px 22px rgba(16,59,51,.025);
}
.ec-topbar-left,.ec-topbar-right{display:flex;align-items:center;gap:12px}
.ec-topbar-appicon{
  width:40px;height:40px;
  display:grid;place-items:center;
  border-radius:11px;
  color:#fff;
  background:linear-gradient(135deg,#07584f,#0b7565);
  box-shadow:0 7px 16px rgba(7,88,79,.16);
}
.ec-topbar-appicon svg{width:20px;height:20px}
.ec-topbar-title{
  color:#123b34;
  font-size:15px;
  font-weight:820;
}
.ec-bell{
  position:relative;
  width:44px;height:44px;
  display:grid;place-items:center;
  border:1px solid var(--ec-line);
  border-radius:13px;
  background:#fff;
  color:#075e52;
}
.ec-bell svg{width:20px;height:20px}
.ec-bell-count{
  position:absolute;
  right:-5px;top:-6px;
  min-width:19px;height:19px;
  display:grid;place-items:center;
  padding:0 5px;
  border-radius:999px;
  background:#d54c4c;
  color:#fff;
  border:2px solid #fff;
  font-size:8px;
  font-weight:850;
}
.ec-user-chip{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:5px 10px 5px 5px;
  border:1px solid #e0e9e6;
  border-radius:14px;
  background:#fff;
}
.ec-avatar{
  width:38px;height:38px;
  display:grid;place-items:center;
  border-radius:50%;
  background:#eaf3f0;
  color:#086458;
  font-size:12px;
  font-weight:850;
}
.ec-user-copy{min-width:0}
.ec-user-copy strong{
  display:block;
  max-width:190px;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  color:#12372f;
  font-size:11px;
}
.ec-user-copy small{
  display:block;
  margin-top:2px;
  color:#7c8c87;
  font-size:9px;
}
.ec-mobile-toggle{
  display:none;
  width:42px;height:42px;
  place-items:center;
  border:1px solid var(--ec-line);
  border-radius:12px;
  background:#fff;
  color:#075e52;
}

/* ---------- CONTENIDO / HERO ---------- */
.ec-content-root{
  width:min(1600px,calc(100% - 52px));
  margin:0 auto;
}
.ec-unified-hero{
  position:relative;
  overflow:hidden;
  min-height:205px;
  margin:2px 0 20px;
  padding:32px 36px;
  display:flex;
  align-items:center;
  border:1px solid #dce8e4;
  border-radius:24px;
  background:
    linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.97) 54%,rgba(238,247,244,.92) 100%);
  box-shadow:var(--ec-shadow);
}
.ec-unified-hero:after{
  content:"";
  position:absolute;
  right:18px;bottom:0;
  width:min(520px,43%);
  height:100%;
  opacity:.72;
  background:url("../img/ecasilla-building-line-unified.svg") right bottom/contain no-repeat;
  pointer-events:none;
}
.ec-unified-hero-copy{
  position:relative;z-index:2;
  max-width:760px;
  padding-right:40px;
}
.ec-unified-kicker{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:10px;
  padding:5px 9px;
  border-radius:999px;
  color:#0b6a5b;
  background:#e9f5f1;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ec-unified-kicker:before{
  content:"";
  width:7px;height:7px;border-radius:50%;
  background:var(--ec-gold);
}
.ec-unified-hero h1{
  margin:0 0 10px!important;
  color:#0d2924!important;
  font-size:36px!important;
  line-height:1.06!important;
  letter-spacing:-.045em!important;
  font-weight:860!important;
}
.ec-unified-hero p{
  margin:0!important;
  max-width:690px;
  color:#647a73!important;
  font-size:14px!important;
  line-height:1.55!important;
}
.ec-secure-chip{
  position:absolute;z-index:2;
  right:26px;top:26px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 12px;
  border:1px solid rgba(8,112,94,.13);
  border-radius:14px;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(8px);
  color:#0b6557;
  font-size:10px;
  font-weight:780;
}
.ec-secure-chip svg{width:20px;height:20px}

/* Ocultar hero anterior para que no exista doble cabecera */
body.ec-shell-active .dashboard-welcome,
body.ec-shell-active .hero-banner,
body.ec-shell-active .compact-page-head,
body.ec-shell-active .case-hero,
body.ec-shell-active .gestion-hero,
body.ec-shell-active .fisico-hero{
  display:none!important;
}

/* ---------- TARJETAS / SECCIONES ---------- */
body.ec-shell-active .panel,
body.ec-shell-active .inbox-shell,
body.ec-shell-active .case-section,
body.ec-shell-active .document-viewer-card,
body.ec-shell-active .profile-summary,
body.ec-shell-active .profile-form,
body.ec-shell-active .security-main-card,
body.ec-shell-active .security-side,
body.ec-shell-active .gestion-card,
body.ec-shell-active .gestion-section,
body.ec-shell-active .mpv-form-panel,
body.ec-shell-active .recent-submissions{
  background:#fff!important;
  border:1px solid var(--ec-line)!important;
  border-radius:var(--ec-radius)!important;
  box-shadow:var(--ec-shadow-soft)!important;
}
body.ec-shell-active .panel{padding:20px!important}

/* KPI */
body.ec-shell-active .metric-strip,
body.ec-shell-active .stats-grid,
body.ec-shell-active .fisico-kpis,
body.ec-shell-active .physical-stats{
  gap:14px!important;
}
body.ec-shell-active .metric-item,
body.ec-shell-active .stat-card,
body.ec-shell-active .fisico-kpi,
body.ec-shell-active .physical-stat{
  position:relative!important;
  min-height:118px!important;
  display:grid!important;
  grid-template-columns:54px 1fr!important;
  column-gap:15px!important;
  align-items:center!important;
  padding:18px!important;
  border:1px solid var(--ec-line)!important;
  border-radius:17px!important;
  background:#fff!important;
  box-shadow:var(--ec-shadow-soft)!important;
  overflow:hidden!important;
}
body.ec-shell-active .metric-icon{
  width:50px!important;height:50px!important;
  border-radius:50%!important;
  display:grid!important;place-items:center!important;
  background:#e8f4f0!important;color:#086457!important;
}
body.ec-shell-active .metric-item strong,
body.ec-shell-active .stat-card strong{
  display:block!important;
  margin:0!important;
  color:#0f2c26!important;
  font-size:27px!important;
  line-height:1!important;
  font-weight:850!important;
}
body.ec-shell-active .metric-item span,
body.ec-shell-active .stat-card span{
  display:block!important;
  margin-top:5px!important;
  color:#73847f!important;
  font-size:10px!important;
}

/* ---------- TABLAS / LISTAS ---------- */
body.ec-shell-active .table-wrap{
  overflow:auto!important;
  border:1px solid var(--ec-line)!important;
  border-radius:15px!important;
  background:#fff!important;
}
body.ec-shell-active .data-table{
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
body.ec-shell-active .data-table thead th{
  background:#f5f8f7!important;
  color:#5d716a!important;
  padding:12px 13px!important;
  border-bottom:1px solid #dfe8e5!important;
  font-size:9px!important;
  font-weight:850!important;
  letter-spacing:.05em!important;
  text-transform:uppercase!important;
}
body.ec-shell-active .data-table tbody td{
  padding:13px!important;
  border-bottom:1px solid #edf1ef!important;
  color:#2a403a!important;
  font-size:10.5px!important;
}
body.ec-shell-active .data-table tbody tr:hover td{background:#fbfdfc!important}

/* Bandeja */
body.ec-page-bandeja .inbox-shell{overflow:hidden!important}
body.ec-page-bandeja .inbox-item{
  border:0!important;
  border-bottom:1px solid #eaf0ed!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fff!important;
  padding:14px 17px!important;
}
body.ec-page-bandeja .inbox-item:hover{background:#fbfdfc!important}
body.ec-page-bandeja .inbox-icon{
  width:44px!important;height:44px!important;
  border-radius:50%!important;
  background:#e8f5f1!important;
  color:#096757!important;
}
.ec-inbox-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 15px;
  padding:12px;
  border:1px solid var(--ec-line);
  border-radius:15px;
  background:#fff;
  box-shadow:var(--ec-shadow-soft);
}
.ec-inbox-tabs{display:flex;gap:5px;flex-wrap:wrap}
.ec-inbox-tab{
  border:0;background:transparent;color:#657871;
  padding:9px 13px;border-radius:10px;font-size:10px;font-weight:780;cursor:pointer
}
.ec-inbox-tab.active{background:#eaf5f1;color:#096253}
.ec-inbox-search{
  width:min(430px,42vw);
  height:42px;
  border:1px solid #d4e1dc;
  border-radius:11px;
  padding:0 13px;
  color:#213e37;
  background:#fff;
  font-size:10.5px
}

/* Formularios */
body.ec-shell-active input,
body.ec-shell-active select,
body.ec-shell-active textarea{
  border-color:#cfddd8!important;
  border-radius:11px!important;
}
body.ec-shell-active input:focus,
body.ec-shell-active select:focus,
body.ec-shell-active textarea:focus{
  border-color:#68a99b!important;
  box-shadow:0 0 0 4px rgba(8,112,94,.08)!important;
}
body.ec-shell-active .btn-link.primary,
body.ec-shell-active .compact-action.primary,
body.ec-shell-active .btn-primary-action,
body.ec-shell-active .btn-identificar,
body.ec-shell-active .btn-activar{
  border-radius:10px!important;
  color:#fff!important;
  border-color:#07584f!important;
  background:linear-gradient(135deg,#07584f,#0b7565)!important;
  box-shadow:0 8px 18px rgba(7,88,79,.13)!important;
}

/* Perfil unificado */
.ec-account-panel{
  border:1px solid var(--ec-line);
  border-radius:20px;
  background:#fff;
  box-shadow:var(--ec-shadow-soft);
  overflow:hidden;
}
.ec-account-tabs{
  display:flex;
  border-bottom:1px solid var(--ec-line);
  background:#fbfdfc;
}
.ec-account-tab{
  min-width:190px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:15px 18px;
  border:0;
  border-bottom:2px solid transparent;
  background:transparent;
  color:#61756e;
  font-size:11px;
  font-weight:790;
  cursor:pointer;
}
.ec-account-tab.active{
  color:#086457;
  background:#f2f8f5;
  border-bottom-color:#0a7a67;
}
.ec-account-frame{
  width:100%;
  min-height:860px;
  display:block;
  border:0;
  background:#fff;
}

/* ---------- FOOTER ---------- */
.ec-unified-footer{
  width:min(1600px,calc(100% - 52px));
  margin:4px auto 0;
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  color:#7b8b86;
  font-size:9.5px;
  border-top:1px solid #e2ebe8;
}
.ec-unified-footer strong{color:#41615a}

/* ---------- CONSTANCIA / IMPRESIÓN ---------- */
body.ec-print-document{
  padding:0!important;
  background:#f2f6f4!important;
}
body.ec-print-document .ec-sidebar-unified,
body.ec-print-document .ec-topbar-unified,
body.ec-print-document .ec-unified-footer{
  display:none!important;
}
body.ec-print-document img{
  background:linear-gradient(135deg,#07584f,#0b7565);
  border-radius:14px;
  padding:8px;
}
@media print{
  body.ec-print-document{background:#fff!important}
}

/* ---------- RESPONSIVE ---------- */
@media(max-width:1100px){
  :root{--ec-sidebar:258px}
  .ec-sidebar-brand{grid-template-columns:52px 1fr;padding-left:17px;padding-right:17px}
  .ec-sidebar-brand img{width:50px;height:50px}
  .ec-sidebar-product{padding-left:19px;padding-right:19px}
  .ec-unified-hero h1{font-size:31px!important}
}
@media(max-width:920px){
  body.ec-shell-active{padding-left:0!important}
  .ec-sidebar-unified{transform:translateX(-102%);width:286px;transition:transform .22s ease}
  body.ec-sidebar-open .ec-sidebar-unified{transform:translateX(0)}
  .ec-topbar-unified{left:0;padding:0 16px}
  .ec-mobile-toggle{display:grid}
  .ec-content-root,.ec-unified-footer{width:calc(100% - 28px)}
  body.ec-shell-active .main-content{padding:18px 14px 25px!important}
  .ec-unified-hero{padding:26px 24px}
  .ec-unified-hero:after{opacity:.32;width:54%}
  .ec-secure-chip{display:none}
}
@media(max-width:680px){
  :root{--ec-topbar:66px}
  .ec-topbar-unified{height:66px}
  .ec-user-copy{display:none}
  .ec-user-chip{padding-right:5px}
  .ec-topbar-title{font-size:13px}
  .ec-unified-hero{min-height:170px}
  .ec-unified-hero-copy{padding-right:0}
  .ec-unified-hero h1{font-size:25px!important}
  .ec-unified-hero p{font-size:12px!important}
  .ec-unified-hero:after{display:none}
  .ec-inbox-controls{flex-direction:column;align-items:stretch}
  .ec-inbox-search{width:100%}
  .ec-unified-footer{flex-direction:column;justify-content:center;padding:12px 0;text-align:center}
}


/* PATCH_LOGOUT_COMPACTO_20260904 */

/* PATCH 2026-09-04 · Botón Cerrar sesión compacto */
.ec-sidebar-unified .ec-logout{
  width:auto !important;
  min-height:42px !important;
  height:42px !important;
  max-height:42px !important;
  margin:10px 18px 18px !important;
  padding:0 14px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:9px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:11px !important;
  background:rgba(255,255,255,.035) !important;
  color:#fff !important;
  font-size:11.5px !important;
  line-height:1 !important;
  font-weight:750 !important;
  text-decoration:none !important;
  overflow:hidden !important;
  box-shadow:none !important;
}
.ec-sidebar-unified .ec-logout:hover{
  background:rgba(255,255,255,.085) !important;
  transform:none !important;
}
.ec-sidebar-unified .ec-logout svg{
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  flex:0 0 18px !important;
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  stroke-width:1.9 !important;
}
.ec-sidebar-unified .ec-logout span{
  display:inline !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  font-size:11.5px !important;
  line-height:1 !important;
  white-space:nowrap !important;
}


/* PATCH_MENU_PARPADEO_ECASILLA_20260904 */
/* 1) Sidebar: todos los menús visibles, consistentes y sin opacidad fantasma */
.ec-sidebar-unified,
.ec-sidebar-unified *{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ec-sidebar-unified .ec-nav,
.ec-sidebar-unified .ec-nav-section,
.ec-sidebar-unified .ec-nav-list{
  opacity:1 !important;
  visibility:visible !important;
}

.ec-sidebar-unified .ec-nav-title,
.ec-sidebar-unified .ec-section-title,
.ec-sidebar-unified .ec-menu-title{
  display:block !important;
  margin:18px 18px 8px !important;
  padding:0 !important;
  font-size:11px !important;
  line-height:1.2 !important;
  letter-spacing:.18em !important;
  font-weight:800 !important;
  text-transform:uppercase !important;
  color:rgba(255,230,130,.95) !important;
  opacity:1 !important;
}

.ec-sidebar-unified .ec-nav a,
.ec-sidebar-unified .ec-menu a,
.ec-sidebar-unified .ec-sidebar-link,
.ec-sidebar-unified .menu-item > a,
.ec-sidebar-unified li > a,
.ec-sidebar-unified a.ec-link{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  width:calc(100% - 24px) !important;
  min-height:46px !important;
  margin:5px 12px !important;
  padding:0 14px !important;
  border-radius:14px !important;
  text-decoration:none !important;
  color:rgba(255,255,255,.92) !important;
  background:transparent !important;
  border:1px solid transparent !important;
  opacity:1 !important;
  visibility:visible !important;
  box-shadow:none !important;
  transform:none !important;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease !important;
}

.ec-sidebar-unified .ec-nav a:hover,
.ec-sidebar-unified .ec-menu a:hover,
.ec-sidebar-unified .ec-sidebar-link:hover,
.ec-sidebar-unified .menu-item > a:hover,
.ec-sidebar-unified li > a:hover,
.ec-sidebar-unified a.ec-link:hover{
  background:rgba(255,255,255,.08) !important;
  border-color:rgba(255,255,255,.10) !important;
  color:#ffffff !important;
}

.ec-sidebar-unified .ec-nav .active > a,
.ec-sidebar-unified .ec-nav a.active,
.ec-sidebar-unified .ec-menu a.active,
.ec-sidebar-unified .ec-sidebar-link.active,
.ec-sidebar-unified .menu-item.active > a,
.ec-sidebar-unified li.active > a{
  background:linear-gradient(135deg,rgba(242,198,76,.18),rgba(255,255,255,.06)) !important;
  border-color:rgba(242,198,76,.55) !important;
  color:#fff7d1 !important;
  box-shadow:inset 3px 0 0 #f2c64c !important;
}

.ec-sidebar-unified .ec-nav a svg,
.ec-sidebar-unified .ec-menu a svg,
.ec-sidebar-unified .ec-sidebar-link svg,
.ec-sidebar-unified .menu-item > a svg,
.ec-sidebar-unified li > a svg,
.ec-sidebar-unified a.ec-link svg{
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  flex:0 0 18px !important;
  opacity:.95 !important;
  stroke-width:1.9 !important;
}

.ec-sidebar-unified .ec-nav a .badge,
.ec-sidebar-unified .ec-menu a .badge,
.ec-sidebar-unified .ec-sidebar-link .badge,
.ec-sidebar-unified .menu-item > a .badge,
.ec-sidebar-unified li > a .badge{
  margin-left:auto !important;
  min-width:23px !important;
  height:23px !important;
  padding:0 7px !important;
  border-radius:999px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#1aa38a !important;
  color:#ffffff !important;
  font-size:11px !important;
  font-weight:800 !important;
  line-height:1 !important;
  box-shadow:none !important;
}

.ec-sidebar-unified .ec-nav a span,
.ec-sidebar-unified .ec-menu a span,
.ec-sidebar-unified .ec-sidebar-link span,
.ec-sidebar-unified .menu-item > a span,
.ec-sidebar-unified li > a span,
.ec-sidebar-unified a.ec-link span{
  color:inherit !important;
  opacity:1 !important;
}

/* 2) Área inferior del sidebar */
.ec-sidebar-unified .ec-help-box{
  margin:16px 16px 12px !important;
  padding:16px !important;
  border-radius:16px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  background:rgba(255,255,255,.04) !important;
  color:#ffffff !important;
}

.ec-sidebar-unified .ec-help-box *{
  color:inherit !important;
}

.ec-sidebar-unified .ec-logout{
  width:calc(100% - 24px) !important;
  min-height:44px !important;
  height:44px !important;
  margin:12px 12px 18px !important;
  padding:0 14px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  border:1px solid rgba(255,255,255,.13) !important;
  border-radius:14px !important;
  background:rgba(255,255,255,.035) !important;
  color:#ffffff !important;
  opacity:1 !important;
  box-shadow:none !important;
}

.ec-sidebar-unified .ec-logout:hover{
  background:rgba(255,255,255,.08) !important;
  border-color:rgba(255,255,255,.18) !important;
  transform:none !important;
}

.ec-sidebar-unified .ec-logout svg{
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  flex:0 0 18px !important;
}

.ec-sidebar-unified .ec-logout span{
  white-space:nowrap !important;
  font-size:12px !important;
  font-weight:750 !important;
}

/* 3) Evitar parpadeo / transiciones agresivas en sidebar y layout */
.ec-sidebar-unified,
.ec-sidebar-unified .ec-nav,
.ec-sidebar-unified .ec-nav a,
.ec-sidebar-unified .ec-help-box,
.ec-sidebar-unified .ec-logout,
.ec-topbar,
.ec-main,
.ec-card,
.ec-hero,
.ec-kpi,
.ec-table-card{
  animation:none !important;
}

.ec-sidebar-unified,
.ec-sidebar-unified .ec-nav,
.ec-sidebar-unified .ec-nav a,
.ec-sidebar-unified .ec-help-box,
.ec-sidebar-unified .ec-logout,
.ec-topbar,
.ec-main,
.ec-card,
.ec-hero,
.ec-kpi,
.ec-table-card{
  transition:none !important;
}

body.ecasilla-pro-ready,
html.ecasilla-pro-ready,
body.ecasilla-pro-ready .ec-sidebar-unified,
body.ecasilla-pro-ready .ec-main{
  opacity:1 !important;
  visibility:visible !important;
}

html body .ec-sidebar-unified{
  will-change:auto !important;
  backface-visibility:hidden !important;
}

/* 4) Scroll del sidebar más limpio */
.ec-sidebar-unified{
  overflow:hidden !important;
}

.ec-sidebar-unified .ec-sidebar-scroll,
.ec-sidebar-unified .ec-nav-scroll{
  overflow-y:auto !important;
  overflow-x:hidden !important;
  scrollbar-width:thin !important;
  scrollbar-color:rgba(255,255,255,.25) transparent !important;
}

.ec-sidebar-unified .ec-sidebar-scroll::-webkit-scrollbar,
.ec-sidebar-unified .ec-nav-scroll::-webkit-scrollbar{
  width:8px !important;
}
.ec-sidebar-unified .ec-sidebar-scroll::-webkit-scrollbar-thumb,
.ec-sidebar-unified .ec-nav-scroll::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.18) !important;
  border-radius:999px !important;
}

/* 5) Responsive: menú igual de legible */
@media (max-width: 991px){
  .ec-sidebar-unified .ec-nav a,
  .ec-sidebar-unified .ec-menu a,
  .ec-sidebar-unified .ec-sidebar-link,
  .ec-sidebar-unified .menu-item > a,
  .ec-sidebar-unified li > a{
    min-height:44px !important;
    border-radius:13px !important;
  }
}

