/* WÖRTH portal: header fijo + panel tarjeta que acompaña al scroll (2026-10-16, v4) */
:root{ --ws-brand:#0F3B2E; --ws-brand-2:#1B5E48; --ws-gold:#C5A880; --ws-header-h:74px; --ws-line:#e3ebe6; }

/* Header fijo */
#ws-wordpress-header-host{
  position:fixed !important; top:0 !important; left:0 !important; right:0 !important;
  z-index:1000 !important; background:#fff !important; box-shadow:0 1px 0 rgba(15,59,46,.10);
}
body.ws-has-fixed-header{ padding-top:var(--ws-header-h) !important; }
#ws-wordpress-footer-host{ position:relative !important; z-index:5 !important; }

/* Layout: panel + contenido se mueven juntos */
body.ws-has-fixed-header #wsPortalWorkspace{
  display:grid !important; grid-template-columns:280px minmax(0,1fr) !important; gap:28px !important;
  align-items:start !important; max-width:1440px !important; margin:0 auto !important;
  padding:28px 24px 56px !important; box-sizing:border-box !important;
}
body.ws-has-fixed-header .sidebar{
  grid-column:1 !important; position:relative !important; top:auto !important; left:auto !important;
  bottom:auto !important; height:auto !important; max-height:none !important; width:auto !important;
  overflow:hidden !important; z-index:auto !important; transform:none !important;
  background:#fff !important; border:1px solid var(--ws-line) !important; border-radius:16px !important;
  box-shadow:0 8px 24px rgba(15,59,46,.06) !important; padding-bottom:8px !important;
}
body.ws-has-fixed-header .sidebar-head{ border-radius:0 !important; margin:0 !important; }
body.ws-has-fixed-header .main{
  grid-column:2 !important; margin:0 !important; padding:0 !important;
  width:auto !important; max-width:none !important; min-width:0 !important;
}

/* Tablet y celular */
@media (max-width:1024px){
  body.ws-has-fixed-header #wsPortalWorkspace{
    grid-template-columns:minmax(0,1fr) !important; gap:20px !important; padding:16px 16px 40px !important;
  }
  body.ws-has-fixed-header .sidebar, body.ws-has-fixed-header .main{ grid-column:1 !important; }
  body.ws-has-fixed-header .sidebar .menu{
    display:flex !important; flex-wrap:nowrap !important; gap:8px !important;
    overflow-x:auto !important; padding:12px !important; scrollbar-width:none;
  }
  body.ws-has-fixed-header .sidebar .menu::-webkit-scrollbar{ display:none; }
  body.ws-has-fixed-header .sidebar .menu-group{ display:contents !important; }
  body.ws-has-fixed-header .sidebar .menu-title{ display:none !important; }
  body.ws-has-fixed-header .sidebar .menu-group > *:not(.menu-title),
  body.ws-has-fixed-header .ws-sidebar-logout{
    flex:0 0 auto !important; white-space:nowrap !important; width:auto !important; margin:0 !important;
    border:1px solid var(--ws-line) !important; border-radius:999px !important;
  }
}

/* Números 1 y 0 normales */
.main, .main *{ font-variant-numeric:lining-nums !important; font-feature-settings:"lnum" 1 !important; }

/* Cerrar sesión */
.ws-sidebar-logout{
  display:flex; align-items:center; gap:14px; width:calc(100% - 24px); margin:16px 12px 8px;
  padding:14px; border:0; border-top:1px solid var(--ws-line); border-radius:10px; background:transparent;
  color:var(--ws-brand); font:500 16px Barlow,"Helvetica Neue",Arial,sans-serif; text-align:left; cursor:pointer;
}
.ws-sidebar-logout:hover{ background:#edf4f0; }
.ws-sidebar-logout svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* === Cerrar sesión: estados claros (v5) === */
body .sidebar .ws-sidebar-logout,
body .sidebar .ws-sidebar-logout:focus,
body .sidebar .ws-sidebar-logout:active,
body .sidebar .ws-sidebar-logout:disabled{
  display:flex !important; align-items:center !important; justify-content:center !important; gap:10px !important;
  width:calc(100% - 32px) !important; margin:16px !important; min-height:48px !important; padding:0 18px !important;
  border:1.5px solid var(--ws-brand) !important; border-radius:999px !important;
  background:#fff !important; color:var(--ws-brand) !important; opacity:1 !important; box-shadow:none !important;
  font:600 15px Barlow,"Helvetica Neue",Arial,sans-serif !important; transform:none !important;
}
body .sidebar .ws-sidebar-logout:hover{ background:#edf4f0 !important; }
body .sidebar .ws-sidebar-logout:active{ background:#dcebe3 !important; }
body .sidebar .ws-sidebar-logout:focus-visible{ outline:3px solid rgba(197,168,128,.6) !important; outline-offset:2px !important; }
body .sidebar .ws-sidebar-logout:disabled{ cursor:progress !important; opacity:.75 !important; }

/* === Tipografía estándar del portal (v5) === */
.main, .sidebar{ font-family:Barlow,"Helvetica Neue",Arial,sans-serif !important; color:#24332e; }
.main h1{ font-family:"Barlow Semi Condensed","Arial Narrow",Arial,sans-serif !important; font-weight:600 !important; font-size:clamp(30px,3vw,40px) !important; line-height:1.15 !important; color:var(--ws-brand) !important; }
.main h2, .main h3, .main .panel-header h2, .main .panel-header h3{
  font-family:"Barlow Semi Condensed","Arial Narrow",Arial,sans-serif !important; font-weight:600 !important;
  font-size:22px !important; line-height:1.2 !important; color:var(--ws-brand) !important; letter-spacing:0 !important;
}
.main p, .main li, .main .item-meta, .main .empty, .main .metric-label{ font-size:14px !important; line-height:1.5 !important; }
.main .item-title{ font-size:15px !important; font-weight:600 !important; }
.main small, .main .item-meta{ font-size:13px !important; color:#5b6b65 !important; }
.main .metric-value{ font-family:"Barlow Semi Condensed","Arial Narrow",Arial,sans-serif !important; font-size:40px !important; font-weight:600 !important; }
.sidebar .menu-title{ font-size:12px !important; font-weight:600 !important; letter-spacing:.08em !important; text-transform:uppercase !important; color:var(--ws-brand-2) !important; }
.sidebar .menu-group > *:not(.menu-title){ font-size:15px !important; }
.sidebar-head{ font-family:Barlow,"Helvetica Neue",Arial,sans-serif !important; font-size:16px !important; font-weight:600 !important; }

/* === Tipografía limpia: todo Inter salvo el saludo (v7) === */
.main *:not(h1):not(i):not([class*="icon"]),
.sidebar *:not(i):not([class*="icon"]){
  font-family:Barlow,"Helvetica Neue",Arial,sans-serif !important; font-variant-numeric:lining-nums tabular-nums !important;
}
.main h1{ font-size:clamp(28px,2.6vw,36px) !important; }
.main h2, .main h3, .main .panel-header h2, .main .panel-header h3{
  font-size:18px !important; font-weight:600 !important; letter-spacing:-.01em !important; line-height:1.3 !important;
}
.main .metric-value{ font-family:Barlow,"Helvetica Neue",Arial,sans-serif !important; font-size:30px !important; font-weight:600 !important; letter-spacing:-.02em !important; }
.main p{ font-size:14px !important; color:#4a5a54 !important; }

/* === Tipografía más fina (v8) === */
.main, .sidebar{ -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; text-rendering:optimizeLegibility; }
.main h2, .main h3, .main .panel-header h2, .main .panel-header h3{ font-size:17px !important; font-weight:500 !important; }
.main .metric-value{ font-weight:500 !important; font-size:28px !important; }
.main .item-title, .main strong, .main b{ font-weight:500 !important; }
.main p, .main li{ font-weight:400 !important; }
.sidebar .menu-group > *:not(.menu-title){ font-weight:400 !important; color:#2f3f39 !important; }
.sidebar .menu-group > .active, .sidebar .menu-group > [aria-current], .sidebar .menu-group > *.is-active{ font-weight:500 !important; color:var(--ws-brand) !important; }
.sidebar .menu-title{ font-weight:500 !important; font-size:11.5px !important; }
.sidebar-head{ font-weight:500 !important; }

/* === Header sin borde oscuro (v8) === */
html, body{ border:0 !important; }
#ws-wordpress-header-host{ border:0 !important; outline:0 !important; }
