/* Letra de toda la web: Inter (moderna y muy legible en el móvil), guardada en la propia web para que funcione sin cobertura */
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:100 900;src:url(inter-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:100 900;src:url(inter-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
body,button,input,select,textarea,table,th,td,label,h1,h2,h3,h4,p,span,b,strong,small,div,a,li,dt,dd,summary,option{font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif!important}
body{font-feature-settings:'cv11','ss01','tnum';letter-spacing:-.005em}
h1,h2,h3{letter-spacing:-.02em}
code,pre,kbd,.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important}

/* Fondo muy suave de arbolado de cítricos dentro de cada aplicación */
body{background-image:linear-gradient(color-mix(in srgb,var(--bg,#f3f2ec) 90%,transparent),color-mix(in srgb,var(--bg,#f3f2ec) 90%,transparent)),url(../img/fondo-arbol.jpg)!important;background-size:cover!important;background-position:center!important;background-attachment:fixed!important}
@media print{body{background:#fff!important}}

/* Misma escala de letra en todas las aplicaciones (la clase la pone js/iconos.js) */
html.cap h1{font-size:1.6rem!important;font-weight:800!important;letter-spacing:-.025em!important;line-height:1.15!important}
html.cap h2{font-size:1.25rem!important;font-weight:750!important;letter-spacing:-.02em!important;line-height:1.2!important}
html.cap h3{font-size:1.05rem!important;font-weight:700!important;letter-spacing:-.01em!important}
html.cap button,html.cap .btn,html.cap label.btn{font-weight:600}
html.cap .ico{stroke-width:2}
/* Dentro de la app el logo ya está en Inicio: las cabeceras quedan todas iguales, solo con el título */
html.cap.emb .hd .logo,html.cap.emb header>img[alt^="Campanar"]{display:none!important}
html.cap.emb .hd>div>.sub:first-child,html.cap.emb .brand>small{display:none!important}

/* ===== Una sola estética en todas las aplicaciones (la de Gestión): mismos colores, tarjetas, botones y pestañas ===== */
html.cap{--bg:#f3f2ec!important;--surface:#fff!important;--card:#fff!important;--sf:#fff!important;--ink:#1f2a1f!important;--fg:#1f2a1f!important;--tx:#1f2a1f!important;
 --muted:#6b756b!important;--mu:#6b756b!important;--line:#e3e1d8!important;--bd:#e3e1d8!important;--ln:#e3e1d8!important;--orange:#e8780c!important;--accent:#e8780c!important;--ac:#e8780c!important;--accent-ink:#fff!important;
 --leaf:#2f5d43!important;--gr:#2f5d43!important;--leaf-soft:#eef3ec!important;--surface-2:#eef3ec!important;--in:#faf9f5!important;--uni-sh:0 1px 2px rgba(20,40,25,.05),0 6px 18px rgba(20,40,25,.05)}
@media (prefers-color-scheme:dark){html.cap:not([data-theme="light"]){--bg:#121712!important;--surface:#1c231c!important;--card:#1c231c!important;--sf:#1c231c!important;--ink:#eef1ea!important;--fg:#eef1ea!important;--tx:#eef1ea!important;
 --muted:#9aa59a!important;--mu:#9aa59a!important;--line:#2f382f!important;--bd:#2f382f!important;--ln:#2f382f!important;--orange:#f59a3c!important;--accent:#f59a3c!important;--ac:#f59a3c!important;--accent-ink:#1a1206!important;
 --leaf:#8cc7a1!important;--gr:#8cc7a1!important;--leaf-soft:#1f2a22!important;--surface-2:#1f2a22!important;--in:#182018!important;--uni-sh:none}}
html.cap h1,html.cap h2{color:var(--ink)!important}
/* tarjetas iguales */
html.cap .card{border-radius:16px!important;border:1px solid var(--line)!important;box-shadow:var(--uni-sh)}
/* botones: mismo redondeo; el principal en naranja */
html.cap .btn{border-radius:12px}
html.cap .btn.primary,html.cap button.p,html.cap button.ac{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important}
/* lo que está elegido (pestañas, chips, años…) siempre igual: naranja con letra blanca */
html.cap nav button[aria-selected="true"],html.cap .tabs button[aria-pressed="true"],html.cap .seg button[aria-pressed="true"],html.cap .chips button.on,html.cap .envs button.on,html.cap .rcamp button.on,html.cap .rvar button.on,html.cap .periodo .chips button.on{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important}
/* Calibres: pestañas en píldora como el resto y etiquetas sin mayúsculas */
html.cap header nav{gap:6px!important;padding:6px 0 2px}
html.cap header nav button{border:1px solid var(--line)!important;border-radius:999px!important;background:var(--surface)!important;padding:7px 14px!important;opacity:1!important;font-weight:600!important;font-size:.92rem!important}
html.cap label{text-transform:none!important;letter-spacing:0!important}
/* Muestreo: barra de pestañas igual que las demás */
html.cap .tabs{background:transparent!important;padding:0!important;gap:6px!important}
html.cap .tabs button{border:1px solid var(--line)!important;background:var(--surface)!important;border-radius:999px!important}
html.cap .tabs button[aria-pressed="true"],html.cap .tabs button.on{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important}
/* Precios: chips y título como el resto */
html.cap .chips button,html.cap .envs button{border-radius:999px!important}
html.cap h2,html.cap h3{text-transform:none!important}
html.cap header nav button[aria-selected="true"]{color:#fff!important}

/* ===== Fluidez tipo iPhone ===== */
html.cap{-webkit-tap-highlight-color:transparent;scroll-behavior:smooth}
html.cap body{overscroll-behavior-y:none}
/* al tocar, el botón se hunde un poco, como en iOS */
html.cap button,html.cap .btn,html.cap a.btn,html.cap .fi.nu,html.cap tr.nu,html.cap [data-pv]{transition:transform .12s ease,background-color .2s ease,box-shadow .2s ease,opacity .2s ease}
html.cap button:active:not(:disabled),html.cap .btn:active,html.cap .fi.nu:active{transform:scale(.97)}
/* ventanas: entran con suavidad y el fondo se difumina */
html.cap .ov{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);animation:uniFondo .2s ease both;overscroll-behavior:contain}
html.cap .ov>.card{animation:uniSube .32s cubic-bezier(.2,.9,.25,1) both}
@keyframes uniFondo{from{background-color:rgba(0,0,0,0)}}
@keyframes uniSube{from{transform:translateY(28px);opacity:0}}
/* en el móvil, las ventanas son hojas que suben desde abajo (como en el iPhone) */
@media (max-width:640px){
 html.cap .ov{align-items:flex-end!important;padding:0!important}
 html.cap .ov>.card{width:100%!important;max-width:none!important;max-height:94vh;overflow:auto;-webkit-overflow-scrolling:touch;border-radius:22px 22px 0 0!important;margin:0!important;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))!important}
 html.cap .ov>.card::before{content:'';display:block;width:38px;height:5px;border-radius:3px;background:var(--line,#ddd);margin:-6px auto 10px}
 @keyframes uniSube{from{transform:translateY(100%)}}
}
@media (prefers-reduced-motion:reduce){html.cap *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
