:root{
  --ega-primary:#68A5DE;
  --ega-support:#FF5EA8;
  --ega-motivation:#FFD931;

  --ega-bg:#F7F9FC;
  --ega-ink:#1F2937;
  --ega-muted:rgba(31,41,55,.62);

  --ega-panel:#ffffff;
  --ega-panel-2:rgba(255,255,255,.76);
  --ega-border:rgba(31,41,55,.10);

  --ega-radius-2xl:30px;
  --ega-radius-xl:24px;
  --ega-radius-lg:18px;
  --ega-radius-md:14px;
  --ega-radius-sm:12px;

  --ega-shadow-xl:0 22px 60px rgba(31,41,55,.14);
  --ega-shadow-lg:0 18px 40px rgba(31,41,55,.12);
  --ega-shadow-md:0 12px 26px rgba(31,41,55,.10);
  --ega-shadow-sm:0 8px 18px rgba(31,41,55,.08);

  --ega-sidebar-w:196px;
  --ega-sidebar-w-collapsed:88px;
  --ega-topbar-h:72px;

  --ega-font:"Poppins",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,"Noto Sans";
  --ega-on-primary:#ffffff;
}

*{ box-sizing:border-box; }

html,body{ height:100%; }

html{
  -webkit-text-size-adjust:100%;
}

body.ega-app{
  margin:0;
  font-family:var(--ega-font);
  color:var(--ega-ink);
  background:
    radial-gradient(900px 620px at 10% 0%, color-mix(in srgb, var(--ega-support) 16%, transparent), transparent 58%),
    radial-gradient(900px 620px at 100% 0%, color-mix(in srgb, var(--ega-primary) 18%, transparent), transparent 58%),
    linear-gradient(180deg,#f9fbff 0%, var(--ega-bg) 100%);
  background-attachment:fixed;
  background-repeat:no-repeat;
}

img{
  max-width:100%;
  height:auto;
}

a{
  color:var(--ega-ink);
  text-decoration-color:color-mix(in srgb, var(--ega-primary) 56%, transparent);
  text-underline-offset:3px;
}

a:hover{
  text-decoration-color:var(--ega-primary);
}

:focus-visible{
  outline:3px solid color-mix(in srgb, var(--ega-primary) 34%, white 0%);
  outline-offset:2px;
}

/* =========================================================
   Botones globales
   ========================================================= */

button:not(.ega-swatch),
input[type="button"],
input[type="submit"],
input[type="reset"],
.button,
.btn,
.wp-element-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button{
  appearance:none;
  border:1px solid color-mix(in srgb, var(--ega-primary) 70%, #000 0%);
  background:linear-gradient(180deg,
    color-mix(in srgb, var(--ega-primary) 92%, white 8%),
    color-mix(in srgb, var(--ega-primary) 100%, #000 0%)
  );
  color:var(--ega-on-primary);
  border-radius:14px;
  box-shadow:var(--ega-shadow-sm);
  cursor:pointer;
  transition:transform .14s ease, box-shadow .14s ease, filter .14s ease, opacity .14s ease;
}

button:not(.ega-swatch):hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
.button:hover,
.btn:hover,
.wp-element-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 22px color-mix(in srgb, var(--ega-primary) 28%, transparent);
  filter:saturate(1.03) brightness(1.02);
}

button:not(.ega-swatch):disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled{
  opacity:.65;
  cursor:not-allowed;
}

button:not(.ega-swatch) *,
.button *,
.btn *{
  color:inherit;
}

/* =========================================================
   Shell
   ========================================================= */

.ega-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:var(--ega-sidebar-w) minmax(0,1fr);
  gap:12px;
  padding:10px;
}

@media (min-width:981px){
  body.ega-sidebar-collapsed .ega-shell{
    grid-template-columns:var(--ega-sidebar-w-collapsed) minmax(0,1fr);
  }
}

/* =========================================================
   Sidebar
   ========================================================= */

.ega-sidebar{
  position:sticky;
  top:10px;
  height:calc(100vh - 20px);
  border-radius:28px;
  overflow:hidden;
  z-index:220;
  box-shadow:var(--ega-shadow-lg);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--ega-primary) 92%, white 2%) 0%,
      color-mix(in srgb, var(--ega-primary) 82%, #172554 0%) 100%
    );
}

.ega-sidebar__inner{
  height:100%;
  display:flex;
  flex-direction:column;
  padding:12px 10px 10px;
  gap:12px;
}

.ega-brand{
  margin:0;
}

.ega-brand__link{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  min-height:118px;
  padding:12px 10px 14px;
  border-radius:22px;
  text-decoration:none;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 14px 28px rgba(0,0,0,.10);
  overflow:hidden;
}

.ega-brand__link::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.24) 0%, rgba(255,255,255,0) 40%);
  pointer-events:none;
}

.ega-brand__badge,
.ega-brand__title,
.ega-brand__subtitle,
.ega-brand__text,
.ega-brand__logo{
  position:relative;
  z-index:1;
}

.ega-brand__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.22);
  color:rgba(255,255,255,.96);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ega-brand__logo{
  width:56px;
  height:56px;
  object-fit:contain;
  display:block;
}

.ega-brand__text{
  color:#fff;
  font-size:14px;
  font-weight:800;
  text-align:center;
  line-height:1.1;
}

.ega-brand__title{
  display:block;
  color:#fff;
  text-align:center;
  font-size:15px;
  font-weight:800;
  line-height:1.1;
}

.ega-brand__subtitle{
  display:block;
  color:rgba(255,255,255,.82);
  text-align:center;
  font-size:11px;
  font-weight:600;
}

.ega-sidebar-card{
  border-radius:20px;
  padding:12px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.18);
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:10px;
  align-items:center;
}

.ega-sidebar-card__avatar{
  width:48px;
  height:48px;
  border-radius:999px;
  overflow:hidden;
  box-shadow:0 10px 20px rgba(0,0,0,.14);
}

.ega-sidebar-card__img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.ega-sidebar-card__meta{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.ega-sidebar-card__name{
  color:#fff;
  font-size:14px;
  font-weight:800;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ega-sidebar-card__role{
  color:rgba(255,255,255,.78);
  font-size:12px;
  font-weight:600;
}

.ega-sidebar-card__cta{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:10px 12px;
  border-radius:14px;
  text-decoration:none;
  font-size:13px;
  font-weight:800;
  color:var(--ega-primary);
  background:#fff;
}

.ega-nav{
  min-width:0;
}

.ega-nav__menu,
.ega-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
}

.ega-nav a{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:10px 12px;
  border-radius:16px;
  text-decoration:none;
  color:rgba(255,255,255,.94);
  background:transparent;
  font-size:14px;
  font-weight:600;
  line-height:1.2;
  opacity:.96;
}

.ega-nav a:hover{
  background:rgba(255,255,255,.16);
  color:#fff;
  text-decoration:none;
  transform:translateY(-1px);
}

.ega-nav .current-menu-item > a,
.ega-nav .current_page_item > a,
.ega-nav .current-menu-ancestor > a{
  background:rgba(255,255,255,.22);
  box-shadow:0 10px 24px rgba(0,0,0,.12);
  color:#fff;
  font-weight:800;
}

.ega-nav--secondary{
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.18);
}

.ega-mi__icon{
  width:20px;
  min-width:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
}

.ega-mi__icon--dot{
  width:10px;
  min-width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.86);
  box-shadow:0 6px 14px rgba(0,0,0,.18);
}

.ega-mi__text{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ega-sidebar-footer{
  margin-top:2px;
  padding:10px 4px 2px;
  text-align:center;
}

.ega-sidebar-footer__subject{
  color:#fff;
  font-size:12px;
  font-weight:800;
  line-height:1.1;
}

.ega-sidebar-footer__copy{
  margin-top:3px;
  color:rgba(255,255,255,.72);
  font-size:11px;
  font-weight:600;
}

@media (min-width:981px){
  body.ega-sidebar-collapsed .ega-brand__badge,
  body.ega-sidebar-collapsed .ega-brand__title,
  body.ega-sidebar-collapsed .ega-brand__subtitle,
  body.ega-sidebar-collapsed .ega-sidebar-card,
  body.ega-sidebar-collapsed .ega-sidebar-footer{
    display:none;
  }

  body.ega-sidebar-collapsed .ega-brand__link{
    min-height:auto;
    padding:10px 8px;
  }

  body.ega-sidebar-collapsed .ega-brand__logo{
    width:42px;
    height:42px;
  }

  body.ega-sidebar-collapsed .ega-nav a{
    justify-content:center;
    gap:0;
    padding:10px 8px;
  }

  body.ega-sidebar-collapsed .ega-mi__text{
    display:none;
  }
}

/* =========================================================
   Main / topbar
   ========================================================= */

.ega-main{
  min-width:0;
  border-radius:32px;
  background:var(--ega-panel-2);
  border:1px solid rgba(255,255,255,.64);
  box-shadow:var(--ega-shadow-xl);
  backdrop-filter:blur(12px);
  overflow:visible;
}

.ega-topbar{
  position:sticky;
  top:0;
  z-index:120;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:var(--ega-topbar-h);
  padding:12px 16px 8px;
  background:linear-gradient(180deg, rgba(255,255,255,.82) 0%, rgba(255,255,255,.56) 100%);
  border-bottom:1px solid rgba(31,41,55,.08);
  border-top-left-radius:32px;
  border-top-right-radius:32px;
  backdrop-filter:blur(10px);
}

.ega-topbar__left,
.ega-topbar__right{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.ega-topbar__left{
  flex:1 1 auto;
}

.ega-topbar__right{
  flex:0 0 auto;
}

.ega-burger{
  width:42px;
  height:42px;
  border-radius:14px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.ega-burger .dashicons{
  font-size:20px;
  width:20px;
  height:20px;
}

.ega-topbar__brand{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
  text-decoration:none;
}

.ega-topbar__eyebrow{
  display:inline-block;
  color:color-mix(in srgb, var(--ega-primary) 80%, #1d4ed8 0%);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ega-topbar__title{
  display:block;
  color:var(--ega-ink);
  font-size:20px;
  font-weight:800;
  line-height:1.05;
  letter-spacing:-.02em;
}

.ega-topbar__subtitle{
  display:block;
  color:var(--ega-muted);
  font-size:13px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ega-topnav{
  display:flex;
  align-items:center;
}

.ega-topnav__menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap:8px;
}

.ega-topnav__menu li{
  margin:0;
}

.ega-topnav__menu a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:9px 12px;
  border-radius:12px;
  text-decoration:none;
  color:var(--ega-ink);
  font-size:13px;
  font-weight:700;
}

.ega-topnav__menu a:hover,
.ega-topnav__menu .current-menu-item > a{
  background:color-mix(in srgb, var(--ega-primary) 11%, transparent);
  color:color-mix(in srgb, var(--ega-primary) 84%, #0f172a 0%);
}

/* =========================================================
   User menu
   ========================================================= */

.ega-userwrap{
  position:relative;
  z-index:180;
}

.ega-userbtn{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:4px 8px 4px 4px;
  border-radius:999px;
}

.ega-user__avatar{
  width:38px;
  height:38px;
  border-radius:999px;
  overflow:hidden;
  flex:0 0 38px;
  box-shadow:0 10px 18px rgba(31,41,55,.12);
}

.ega-user__img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.ega-user__meta{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1.1;
}

.ega-user__name{
  font-size:13px;
  font-weight:800;
  color:var(--ega-on-primary);
}

.ega-user__sub{
  margin-top:2px;
  font-size:11px;
  font-weight:600;
  color:color-mix(in srgb, var(--ega-on-primary) 78%, transparent);
}

.ega-usermenu{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  width:236px;
  border-radius:18px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(31,41,55,.10);
  box-shadow:0 24px 60px rgba(31,41,55,.18);
  overflow:hidden;
  z-index:9999;
}

.ega-usermenu__palette{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  background:rgba(255,255,255,.72);
  border-bottom:1px solid rgba(31,41,55,.08);
}

.ega-swatch{
  width:16px;
  height:16px;
  border-radius:999px;
  border:2px solid rgba(31,41,55,.18);
  cursor:pointer;
  padding:0;
  appearance:none;
  box-shadow:none;
}

.ega-swatch:hover{
  transform:translateY(-1px);
}

.ega-swatch:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px color-mix(in srgb, var(--ega-primary) 20%, transparent);
}

.ega-swatch[aria-pressed="true"]{
  border-color:rgba(31,41,55,.52);
  box-shadow:0 0 0 4px color-mix(in srgb, var(--ega-primary) 18%, transparent);
}

.ega-usermenu__item{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:12px 14px;
  text-decoration:none;
  color:var(--ega-ink);
  font-size:14px;
  font-weight:700;
}

.ega-usermenu__item:hover{
  background:color-mix(in srgb, var(--ega-primary) 10%, transparent);
}

.ega-usermenu__item--danger{
  color:#8a1d14;
}

.ega-usermenu__item--danger:hover{
  background:rgba(255,80,60,.11);
}

/* =========================================================
   Content / cards
   ========================================================= */

.ega-content{
  min-width:0;
  padding:8px 16px 18px;
}

.ega-card{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(31,41,55,.08);
  border-radius:var(--ega-radius-xl);
  box-shadow:var(--ega-shadow-sm);
  padding:18px;
}

.ega-card--accent{
  border:2px solid color-mix(in srgb, var(--ega-primary) 36%, transparent);
  box-shadow:0 18px 44px color-mix(in srgb, var(--ega-primary) 16%, transparent);
}

.ega-nav:empty,
.ega-topnav:empty{
  display:none;
}

/* =========================================================
   Tooltip desktop collapsed
   ========================================================= */

@media (min-width:981px){
  body.ega-sidebar-collapsed .ega-nav a[data-tip]{
    position:relative;
    z-index:300;
  }

  body.ega-sidebar-collapsed .ega-nav a[data-tip]::after{
    content:attr(data-tip);
    position:absolute;
    left:calc(100% + 12px);
    top:50%;
    transform:translateY(-50%);
    white-space:nowrap;
    padding:10px 12px;
    border-radius:12px;
    background:rgba(255,255,255,.97);
    border:1px solid rgba(31,41,55,.10);
    box-shadow:0 16px 38px rgba(31,41,55,.16);
    color:var(--ega-ink);
    font-size:13px;
    font-weight:700;
    opacity:0;
    pointer-events:none;
    transition:opacity .12s ease, transform .12s ease;
    z-index:999999;
  }

  body.ega-sidebar-collapsed .ega-nav a[data-tip]::before{
    content:"";
    position:absolute;
    left:calc(100% + 7px);
    top:50%;
    transform:translateY(-50%) rotate(-45deg);
    width:10px;
    height:10px;
    background:rgba(255,255,255,.97);
    border-left:1px solid rgba(31,41,55,.10);
    border-top:1px solid rgba(31,41,55,.10);
    opacity:0;
    pointer-events:none;
    transition:opacity .12s ease;
    z-index:999999;
  }

  body.ega-sidebar-collapsed .ega-nav a[data-tip]:hover::after,
  body.ega-sidebar-collapsed .ega-nav a[data-tip]:focus-visible::after{
    opacity:1;
    transform:translateY(-50%) translateX(2px);
  }

  body.ega-sidebar-collapsed .ega-nav a[data-tip]:hover::before,
  body.ega-sidebar-collapsed .ega-nav a[data-tip]:focus-visible::before{
    opacity:1;
  }
}



/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    animation:none !important;
    transition:none !important;
    scroll-behavior:auto !important;
  }
}
.ega-brand__logo--banner{
  width: 100%;
  max-width: 148px;
  height: auto;
  max-height: 82px;
  object-fit: contain;
  display: block;
  border-radius: 14px;
}

@media (min-width: 981px){
  body.ega-sidebar-collapsed .ega-brand__logo--banner{
    max-width: 42px;
    max-height: 42px;
    border-radius: 10px;
  }
}
.ega-login-notice{
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff4d6;
  border: 1px solid rgba(245, 158, 11, .28);
  color: #7a4b00;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(122, 75, 0, .08);
}
.ega-footer-note{
  position: fixed;
  right: 12px;
  bottom: 10px;
  z-index: 9998;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: min(320px, calc(100vw - 24px));
  padding: 7px 12px;
  border-radius: 999px;

  background: rgba(255,255,255,.88);
  border: 1px solid rgba(31,41,55,.10);
  box-shadow: 0 10px 24px rgba(31,41,55,.10);
  backdrop-filter: blur(10px);

  pointer-events: none;
}

.ega-footer-note__text{
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  color: var(--ega-muted);
  white-space: nowrap;
}

@media (max-width: 980px){
  .ega-footer-note{
    left: 50%;
    right: auto;
    bottom: 8px;
    transform: translateX(-50%);
    max-width: calc(100vw - 16px);
    padding: 6px 10px;
  }

  .ega-footer-note__text{
    font-size: 10px;
  }
}
/* =========================================================
   Avatar topbar refinado
   ========================================================= */

.ega-userbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:48px;
  padding:4px 8px 4px 4px;
  border-radius:999px;
}

.ega-userbtn--avatar-only{
  width:48px;
  min-width:48px;
  height:48px;
  padding:4px;
  border-radius:999px;
  justify-content:center;
}

.ega-user__avatar{
  width:40px;
  height:40px;
  border-radius:999px;
  overflow:hidden;
  flex:0 0 40px;
  background:#fff;
  border:2px solid rgba(255,255,255,.92);
  box-shadow:
    0 10px 18px rgba(31,41,55,.12),
    0 0 0 1px rgba(31,41,55,.06);
}

.ega-user__img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.ega-userbtn--avatar-only .ega-user__avatar{
  width:40px;
  height:40px;
  flex:0 0 40px;
}

.ega-userbtn--avatar-only .ega-user__meta{
  display:none !important;
}

.ega-userbtn:hover .ega-user__avatar{
  transform:scale(1.02);
}

.ega-userbtn .ega-user__avatar{
  transition:transform .14s ease, box-shadow .14s ease;
}

@media (max-width:980px){
  .ega-shell{
    grid-template-columns:1fr;
    gap:10px;
    padding:8px;
  }

  .ega-sidebar{
    position:fixed;
    top:8px;
    left:8px;
    width:min(280px, 88vw);
    height:calc(100vh - 16px);
    transform:translateX(-110%);
    transition:transform .20s ease;
    z-index:9999;
  }

  body.ega-sidebar-open .ega-sidebar{
    transform:translateX(0);
  }

  .ega-main{
    border-radius:24px;
  }

  .ega-topbar{
    gap:10px;
    padding:10px 12px 8px;
    min-height:72px;
    border-top-left-radius:24px;
    border-top-right-radius:24px;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:space-between;
  }

  .ega-topbar__left{
    width:auto;
    min-width:0;
    flex:1 1 auto;
    display:flex;
    align-items:center;
    gap:12px;
  }

  .ega-topbar__right{
    width:auto;
    min-width:0;
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:flex-end;
  }

  .ega-topbar__brand{
    min-width:0;
    flex:1 1 auto;
  }

  .ega-topbar__title{
    font-size:18px;
  }

  .ega-topbar__subtitle{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .ega-topnav{
    flex:1 1 auto;
    min-width:0;
  }

  .ega-topnav__menu{
    flex-wrap:wrap;
  }

  .ega-userwrap{
    display:flex;
    align-items:center;
    justify-content:flex-end;
  }

  .ega-userbtn{
    min-height:42px;
    padding:2px;
  }

  .ega-userbtn--avatar-only{
    width:42px;
    min-width:42px;
    height:42px;
    padding:2px;
    border-radius:999px;
    justify-content:center;
  }

  .ega-user__avatar,
  .ega-userbtn--avatar-only .ega-user__avatar{
    width:38px;
    height:38px;
    flex:0 0 38px;
  }

  .ega-content{
    padding:8px 12px 14px;
  }

  .ega-usermenu{
    right:0;
    width:min(236px, calc(100vw - 36px));
  }

  .ega-footer-note{
    left:50%;
    right:auto;
    bottom:8px;
    transform:translateX(-50%);
    max-width:calc(100vw - 16px);
    padding:6px 10px;
  }

  .ega-footer-note__text{
    font-size:10px;
  }
}
