/* ProPymes · ajustes finales de marca (se carga después de styles.css) */
:root{--pp-navy:#07213d;--pp-tan:#d2b48c;--pp-cream:#f4ede5}
/* El logo ya viene en blanco y arena: no forzar a blanco puro */
.brand img{filter:none!important}
/* Barra lateral cerrada: isotipo PP en lugar del de Molinero */
@media(min-width:761px){
  body:not(.client-preview-mode) .sidebar:not(:hover) .brand::before{
    background-image:url("/mark-pp-light.png?v=pp9")!important;
    background-size:44px auto!important;
    background-position:center!important;
    filter:none!important;
  }
}

/* =====================================================================
   Tema PP "barra arena": barra lateral arena, cabecera marino,
   botones e iconos destacados en arena. `:not(#pp):not(#pp)` solo sube
   la especificidad para imponerse a las reglas !important de styles.css.
   ===================================================================== */
html body:not(#pp):not(#pp){background-color:#f4ede5}
html body:not(#pp):not(#pp) main{background-color:#f4ede5}

/* Barra lateral arena (el fondo real lo pintan ::before/::after) */
html body:not(#pp):not(#pp) #sidebar,
html body:not(#pp):not(#pp) #sidebar:hover{background:linear-gradient(180deg,#e2ccaa 0%,#c9a574 100%)!important}
html body:not(#pp):not(#pp) #sidebar.s2-listo::before,
html body:not(#pp):not(#pp) #sidebar.s2-listo::after{background:linear-gradient(180deg,#e2ccaa 0%,#c9a574 100%)!important}
html body:not(#pp):not(#pp) #sidebar nav button,
html body:not(#pp):not(#pp) #sidebar nav button *,
html body:not(#pp):not(#pp) #sidebar .sidebar-footer *{color:#07213d!important}
html body:not(#pp):not(#pp) #sidebar nav .nav-icon{background:transparent!important;border-color:transparent!important;box-shadow:none!important;opacity:1!important}
html body:not(#pp):not(#pp) #sidebar nav .nav-icon::before,
html body:not(#pp):not(#pp) #sidebar nav .nav-icon::after{background:transparent!important;box-shadow:none!important;border-color:transparent!important}
html body:not(#pp):not(#pp) #sidebar .sidebar-footer .profile > span:first-child{background:#07213d!important;color:#fff!important}

/* Logos de la barra: P blanca para contrastar con la arena */
html body:not(#pp):not(#pp) #sidebar .brand img{content:url("/logo-pp-sand.png?v=pp9");filter:none!important}
@media(min-width:761px){
  html body:not(#pp):not(#pp) #sidebar:not(:hover) .brand img{display:none!important}
  html body:not(#pp):not(#pp) #sidebar:not(:hover) .brand::before{
    content:""!important;display:block!important;
    background:url("/mark-pp-sand.png?v=pp9") center/46px auto no-repeat!important;filter:none!important}
  html body:not(#pp):not(#pp) #sidebar:not(:hover) .brand::after{display:none!important}
}

/* Cabecera marino limpia */
html body:not(#pp):not(#pp) .e2-cab,
html body:not(#pp):not(#pp) .m2-hero{background:linear-gradient(135deg,#07213d 0%,#0b2a4c 100%)!important}

/* Iconos de tarjetas y botones destacados en arena */
html body:not(#pp):not(#pp) .metric-icon,
html body:not(#pp):not(#pp) .home-activity-icon{background:#d2b48c!important}
html body:not(#pp):not(#pp) .metric-icon *,
html body:not(#pp):not(#pp) .home-activity-icon *{color:#07213d!important}
html body:not(#pp):not(#pp) #chatLauncher,
html body:not(#pp):not(#pp) .m2-mas,
html body:not(#pp):not(#pp) #homeNewTask{background:#d2b48c!important;color:#07213d!important}
html body:not(#pp):not(#pp) #chatLauncher *,
html body:not(#pp):not(#pp) .m2-mas *,
html body:not(#pp):not(#pp) #homeNewTask *{color:#07213d!important}
@media(max-width:760px){html body:not(#pp):not(#pp) #sidebar .s2-grupo{color:rgba(7,33,61,.55)!important}}
@media(min-width:761px){html body:not(#pp):not(#pp) #sidebar:hover .s2-grupo{color:rgba(7,33,61,.55)!important}}
html body:not(#pp):not(#pp) #sidebar .s2-yo-txt b{color:#07213d!important}
html body:not(#pp):not(#pp) #sidebar .s2-yo-txt small{color:rgba(7,33,61,.65)!important}
html body:not(#pp):not(#pp) #sidebar nav .holded-mark,
html body:not(#pp):not(#pp) #sidebar nav .holded-mark::before,
html body:not(#pp):not(#pp) #sidebar nav .holded-mark::after{background:transparent!important;box-shadow:none!important;border-color:transparent!important}

/* Logo de la cabecera de Inicio algo más grande */
html body:not(#pp):not(#pp) .e2-logo{height:clamp(110px,9vw,160px)}
@media (min-width:761px) and (max-width:1500px){html body:not(#pp):not(#pp) .e2-logo{top:50px;height:70px}}
@media (max-width:760px){html body:not(#pp):not(#pp) .m2-hero-logo{height:58px}}

/* Logo del área de cliente (escritorio) algo más grande */
html body:not(#pp):not(#pp) .cd2 .cd2-sello.cd2-sello-logo img{height:clamp(86px,7vw,124px)}

/* =====================================================================
   Área de cliente en ARENA (en Molinero es marino): cabeceras arena,
   textos marino y logo con la P dorada en blanco. El marino queda como acento.
   ===================================================================== */
html body:not(#pp):not(#pp) .cd2-cab,
html body:not(#pp):not(#pp) .client-portal-header,
html body:not(#pp):not(#pp) .client-fiscal-header,
html body:not(#pp):not(#pp) .client-chat-view>header,
html body:not(#pp):not(#pp) .client-documents-view>header{
  background:radial-gradient(90% 140% at 85% -10%,rgba(255,255,255,.35) 0%,rgba(255,255,255,0) 55%),linear-gradient(135deg,#e4cfae 0%,#d2b48c 55%,#c4a06e 100%)!important;
  color:#07213d!important}
html body:not(#pp):not(#pp) .cd2-cab *,
html body:not(#pp):not(#pp) .client-portal-header *,
html body:not(#pp):not(#pp) .client-fiscal-header *,
html body:not(#pp):not(#pp) .client-chat-view>header *,
html body:not(#pp):not(#pp) .client-documents-view>header *{color:#07213d!important;text-shadow:none!important}
html body:not(#pp):not(#pp) .cd2-cab::before,html body:not(#pp):not(#pp) .cd2-cab::after,
html body:not(#pp):not(#pp) .client-fiscal-header::before,html body:not(#pp):not(#pp) .client-fiscal-header::after{border-color:rgba(7,33,61,.12)!important;opacity:.6}
/* logos */
html body:not(#pp):not(#pp) .cd2-sello img,
html body:not(#pp):not(#pp) .client-portal-header>img{content:url("/logo-pp-sand-v.png?v=pp9");filter:none!important}
/* esquina superior izquierda: logo horizontal oficial */
html body:not(#pp):not(#pp) .cd2-barra>img,
html body:not(#pp):not(#pp) .client-fiscal-brand img{content:url("/logo-pp-sand.png?v=pp12");filter:none!important;height:40px!important;width:auto!important;max-width:none!important;object-fit:contain}
/* textos secundarios */
html body:not(#pp):not(#pp) .cd2-saludo small,html body:not(#pp):not(#pp) .client-fiscal-header small{color:#6b4f2a!important}
html body:not(#pp):not(#pp) .cd2-saludo p,html body:not(#pp):not(#pp) .client-portal-header p{color:rgba(7,33,61,.78)!important}
html body:not(#pp):not(#pp) .cd2-lema,html body:not(#pp):not(#pp) .client-fiscal-brand>span{border-color:rgba(7,33,61,.25)!important}
/* menú, perfil y botones de la cabecera */
html body:not(#pp):not(#pp) .cd2-menu,
html body:not(#pp):not(#pp) .cd2-perfil,
html body:not(#pp):not(#pp) .cd2-salir,
html body:not(#pp):not(#pp) .client-portal-header .profile,
html body:not(#pp):not(#pp) .client-fiscal-header button,
html body:not(#pp):not(#pp) .client-chat-view>header button,
html body:not(#pp):not(#pp) .client-documents-view>header button{background:rgba(255,255,255,.32)!important;border-color:rgba(7,33,61,.16)!important;box-shadow:none!important}
html body:not(#pp):not(#pp) .cd2-menu button.on{background:#07213d!important}
html body:not(#pp):not(#pp) .cd2-menu button.on,html body:not(#pp):not(#pp) .cd2-menu button.on *{color:#fff!important}
html body:not(#pp):not(#pp) .cd2-perfil i,
html body:not(#pp):not(#pp) .client-portal-header .profile>span:first-child,
html body:not(#pp):not(#pp) .client-fiscal-header .profile>span:first-child{background:#07213d!important;color:#fff!important}
html body:not(#pp):not(#pp) .cd2-cab::before,
html body:not(#pp):not(#pp) .client-portal-header::before,
html body:not(#pp):not(#pp) .client-fiscal-header::before{background:radial-gradient(circle,rgba(255,255,255,.28),transparent 65%)!important}
html body:not(#pp):not(#pp) .client-fiscal-header *{opacity:1!important}
html body:not(#pp):not(#pp) .client-fiscal-header::before,html body:not(#pp):not(#pp) .client-fiscal-header::after,
html body:not(#pp):not(#pp) .client-fiscal-header *::before,html body:not(#pp):not(#pp) .client-fiscal-header *::after{color:#6b4f2a!important}
html body:not(#pp):not(#pp) .client-fiscal-back{background:rgba(255,255,255,.32)!important;border-color:rgba(7,33,61,.16)!important}
html body:not(#pp):not(#pp) .client-fiscal-back,html body:not(#pp):not(#pp) .client-fiscal-back *{color:#07213d!important}

/* Cabecera de Documentos (área fiscal) con el menú y el logo del inicio (ver pp-cliente.js) */
.pp-fiscal-bar,.pp-fiscal-sello{display:none}
@media(min-width:761px){
  html body:not(#pp):not(#pp) .client-fiscal-header .pp-fiscal-bar{display:flex!important;align-items:center;gap:24px;position:absolute;top:22px;right:34px;z-index:2;min-height:0!important;background:none!important}
  html body:not(#pp):not(#pp) .client-fiscal-header .pp-fiscal-bar .cd2-menu{margin-left:0}
  html body:not(#pp):not(#pp) .client-fiscal-header .pp-fiscal-sello{display:block!important;position:absolute;right:34px;bottom:50px;height:clamp(80px,6.5vw,112px);width:auto;z-index:1;content:url("/logo-pp-sand-v.png?v=pp10");filter:none!important}
  html body:not(#pp):not(#pp) .client-fiscal-header:has(.pp-fiscal-bar) .client-fiscal-profile{display:none!important}
}

/* =====================================================================
   Área de cliente · móvil: barra inferior siempre visible y cabecera arena
   igual que la de Inicio en Mis documentos y Mensajes (ver pp-cliente.js).
   ===================================================================== */
.pp-m-head{display:none}
@media(max-width:760px){
  html body:not(#pp):not(#pp).client-preview-mode > .c2-nav{z-index:3100!important}
  html body:not(#pp):not(#pp) .client-fiscal-overlay,
  html body:not(#pp):not(#pp) .client-documents-overlay{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important}
  html body:not(#pp):not(#pp) .client-chat-overlay .client-chat-view{box-sizing:border-box!important;height:100dvh!important;padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))!important;display:flex!important;flex-direction:column!important}
  html body:not(#pp):not(#pp) .client-chat-view .client-chat-content{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;display:flex;flex-direction:column}
  html body:not(#pp):not(#pp) .client-chat-view .client-chat-messages{flex:1 1 auto;min-height:0;overflow:auto}
  /* cabecera arena */
  html body:not(#pp):not(#pp) .pp-m-head{display:block;flex:0 0 auto;padding:calc(env(safe-area-inset-top,0px) + 22px) 20px 26px;border-radius:0 0 28px 28px;
    background:radial-gradient(90% 140% at 85% -10%,rgba(255,255,255,.35) 0%,rgba(255,255,255,0) 55%),linear-gradient(135deg,#e4cfae 0%,#d2b48c 55%,#c4a06e 100%);color:#07213d;box-shadow:0 10px 24px rgba(196,160,110,.25)}
  html body:not(#pp):not(#pp) .pp-m-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
  html body:not(#pp):not(#pp) .pp-m-top img{height:44px;width:auto;content:url("/logo-pp-sand-v.png?v=pp11")}
  html body:not(#pp):not(#pp) .pp-m-top .profile{display:flex;align-items:center;gap:8px;padding:4px 14px 4px 4px;border-radius:24px;border:1px solid rgba(7,33,61,.16);background:rgba(255,255,255,.32);color:#07213d}
  html body:not(#pp):not(#pp) .pp-m-top .profile>span:first-child{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#07213d;color:#fff;font-weight:700;font-size:12px}
  html body:not(#pp):not(#pp) .pp-m-top .profile{padding:4px!important}
  html body:not(#pp):not(#pp) .pp-m-top .profile .profile-copy{display:none!important}
  html body:not(#pp):not(#pp) .pp-m-head .pp-m-eyebrow{display:block;margin:0;font-size:12px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:#6b4f2a}
  html body:not(#pp):not(#pp) .pp-m-head .pp-m-title{margin:6px 0 0;font-size:30px;line-height:1.1;font-weight:800;color:#07213d;letter-spacing:-.02em}
  html body:not(#pp):not(#pp):has(.client-chat-overlay) .pp-demo-ribbon{display:none!important}
  /* se ocultan las cabeceras recortadas originales */
  html body:not(#pp):not(#pp) .client-fiscal-overlay .client-fiscal-header,
  html body:not(#pp):not(#pp) .client-chat-view>header{display:none!important}
  html body:not(#pp):not(#pp) .client-fiscal-overlay .client-fiscal-back{display:none!important}
  html body:not(#pp):not(#pp) .client-fiscal-overlay .client-fiscal-page{padding-top:14px!important}
  html body:not(#pp):not(#pp) .client-chat-view .client-chat-intro{padding-top:20px}
  /* etiqueta DEMO encima de la barra */
  html body:not(#pp):not(#pp) .pp-demo-ribbon{z-index:3150!important;bottom:calc(env(safe-area-inset-bottom,0px) + 92px)!important}
}

/* Inicio del área de cliente (escritorio): misma cabecera que Documentos, en tarjeta redondeada */
@media(min-width:761px){
  html body:not(#pp):not(#pp) .cd2-cab{margin:14px 14px 0!important;border-radius:30px!important;overflow:hidden}
  html body:not(#pp):not(#pp) .cd2-cab .cd2-barra>img{margin-top:6px}
}

/* Área de cliente: iconos de carpeta en línea (no rellenos) y logos oficiales de PDF/Word/Excel */
html body:not(#pp):not(#pp) .client-fiscal-overlay .client-ui-icon svg{fill:none!important;stroke:currentColor!important;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body:not(#pp):not(#pp) .client-fiscal-folders button>span:first-child,
html body:not(#pp):not(#pp) .client-fiscal-year-folders button>span:first-child,
html body:not(#pp):not(#pp) .client-fiscal-quarter-folders button>span:first-child{display:grid!important;place-items:center;width:44px;height:44px;border-radius:14px;background:#f4ede5!important;color:#8a6a3e!important;flex:0 0 auto}
html body:not(#pp):not(#pp) .client-fiscal-folders .client-ui-icon svg,
html body:not(#pp):not(#pp) .client-fiscal-year-folders .client-ui-icon svg,
html body:not(#pp):not(#pp) .client-fiscal-quarter-folders .client-ui-icon svg{width:22px!important;height:22px!important}
html body:not(#pp):not(#pp) .pp-file-icon{display:grid;place-items:center;width:40px;height:40px;flex:0 0 auto}
html body:not(#pp):not(#pp) .pp-file-icon img{width:30px;height:auto;display:block}

/* Inicio del área de cliente (móvil): mismo logo que Documentos e iconos de línea como las carpetas */
html body:not(#pp):not(#pp) .client-portal-header img{content:url("/logo-pp-sand-v.png?v=pp14");filter:none!important;opacity:1!important}
html body:not(#pp):not(#pp) .client-portal-shell .c2-ic svg{fill:none!important;stroke:currentColor!important;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body:not(#pp):not(#pp) .client-portal-shell .client-service-card:not(.contracted) .c2-ic{background:#f4ede5!important;color:#8a6a3e!important}
