/* Yolia · Dashboards v23 — capa final de diseño limpio para agricultor, cooperativa, gobierno y laboratorio.
   Se carga después de todo lo demás. Sin manchas de vidrio, links claros, rejilla pareja, responsive. */
:root{--d23-ink:#1f2d1f;--d23-dim:#5b6b5a;--d23-line:#e3e8dc;--d23-soft:#f6f8f1;--d23-olive:#3f5f36;--d23-olive2:#e7efdb;--d23-terra:#d9723f;--d23-warn:#a8541f;--d23-card:#fff}

/* 1 · Quitar el "vidrio" que el runtime pega a cualquier clase que contenga "card" */
html body [class*="-card__"],
html body .yolia-personal-card :where(strong,p,div,span,header,details,summary),
html body .yolia-cooperative-card :where(strong,p,div,span,header,details),
html body .yolia-government-card :where(strong,p,div,span,header,details),
html body .yolia-laboratory-card :where(strong,p,div,span,header,details){
  background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;border:0}

/* 2 · Títulos de sección */
html body .ydsec{margin:2rem 0 .9rem;padding-inline-start:.9rem;border-inline-start:.22rem solid var(--d23-olive)}
html body .ydsec__title{font-family:'Fraunces',Georgia,serif;font-size:1.3rem;font-weight:700;color:var(--d23-ink);letter-spacing:-.005em}
html body .ydsec__hint{font-size:.88rem;color:var(--d23-dim);max-width:52rem}
html body .ydash-attn__head h2,html body .ydw__head h2,html body .ydw__title,
html body [class*="-dashboard__hero"] h2{font-family:'Fraunces',Georgia,serif;font-weight:700;color:var(--d23-ink)}
html body .ydash-attn__head h2{font-size:1.1rem}

/* 3 · Tarjetas de área: rejilla pareja */
html body [class$="-dashboard__grid"],html body [class*="-dashboard__grid "]{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,17.5rem),1fr));gap:1rem;align-items:stretch}
html body .yolia-personal-card,html body .yolia-cooperative-card,html body .yolia-government-card,html body .yolia-laboratory-card{
  display:flex;flex-direction:column;gap:.5rem;padding:1.1rem 1.15rem 1rem;background:var(--d23-card);border:1px solid var(--d23-line);border-inline-start:4px solid var(--d23-olive);border-radius:.9rem;box-shadow:0 1px 2px rgba(31,45,31,.04);min-width:0;transition:box-shadow .18s,transform .18s}
html body .yolia-personal-card:hover,html body .yolia-cooperative-card:hover,html body .yolia-government-card:hover,html body .yolia-laboratory-card:hover{box-shadow:0 6px 18px rgba(31,45,31,.09);transform:translateY(-1px)}
html body [class*="-card"][data-yolia-state="required"],html body [class*="-card"][data-yolia-state="estimated"]{border-inline-start-color:#d4a24a;border-style:solid;background:var(--d23-card)}
html body [class*="-card"][data-yolia-state="calculated"]{border-inline-start-color:#6a8f8a}
html body [class*="-card__heading"]{font-size:.74rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--d23-dim);display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}
html body [class*="-card__value"]{font-family:'Fraunces',Georgia,serif;font-size:1.2rem;line-height:1.25;font-weight:700;color:var(--d23-ink);overflow-wrap:anywhere}
html body [class*="-card__explanation"]{font-size:.88rem;line-height:1.5;color:var(--d23-dim);margin:0}
html body [class*="-card__meta"]{display:flex;flex-wrap:wrap;gap:.35rem}
html body [class*="-card__meta"] span{padding:.2rem .55rem;border-radius:99rem;background:var(--d23-olive2);color:var(--d23-olive);font-size:.7rem;font-weight:700}

/* detalle técnico: discreto */
html body .yolia-card-tech{margin-top:auto;padding-top:.3rem}
html body .yolia-card-tech>summary{font-size:.74rem;font-weight:700;color:var(--d23-dim);cursor:pointer}
html body .yolia-card-tech[open]{background:var(--d23-soft);border-radius:.6rem;padding:.55rem .7rem}
html body .yolia-card-tech[open]>summary{margin-bottom:.35rem}

/* "Siguiente acción": línea con botón fantasma, no link azul subrayado */
html body [class*="-card"]>p:last-child{margin:.2rem 0 0;padding-top:.65rem;border-top:1px solid var(--d23-line);display:flex;align-items:center;flex-wrap:wrap;gap:.35rem .6rem;font-size:.8rem;color:var(--d23-dim)}
html body [class*="-card"]>p:last-child b{font-weight:700}
html body [class*="-card"]>p:last-child a:not(.yll5-trigger){display:inline-flex;align-items:center;gap:.3rem;padding:.38rem .8rem;border:1.5px solid var(--d23-olive);border-radius:.6rem;background:#fff;color:var(--d23-olive);font-weight:800;text-decoration:none;font-size:.82rem;line-height:1.2}
html body [class*="-card"]>p:last-child a:not(.yll5-trigger)::after{content:"→";font-weight:800}
html body [class*="-card"]>p:last-child a:not(.yll5-trigger):hover{background:var(--d23-olive);color:#fff}

/* 4 · Links de texto plano dentro de los paneles: sin azul subrayado */
html body [data-yolia-paid-surface^="dashboard"] a:not([class]),
html body .ydw a:not([class]),html body .ydash-attn a:not([class]),
html body .yolia-dashboard-case-actions a:not([class]),html body .yolia-cases a:not([class]){color:var(--d23-olive);font-weight:700;text-decoration:none;border-bottom:1.5px solid rgba(63,95,54,.3)}
html body [data-yolia-paid-surface^="dashboard"] a:not([class]):hover,html body .ydw a:not([class]):hover,html body .yolia-cases a:not([class]):hover{border-bottom-color:var(--d23-olive)}

/* 5 · Barra de capacidad / avance */
html body [class*="-dashboard__capacity"],html body [class*="-dashboard__progress"]{background:var(--d23-card);border:1px solid var(--d23-line);border-radius:.9rem;padding:1rem 1.15rem}
html body progress{accent-color:var(--d23-olive);height:.6rem}
html body [class*="-dashboard__hero"]{background:var(--d23-card);border:1px solid var(--d23-line);border-radius:.9rem}
html body [class*="-dashboard__kicker"]{color:var(--d23-olive)}
html body [class*="-dashboard__badges"] span{background:var(--d23-olive2);color:var(--d23-olive)}

/* 6 · Clima: estado de error sereno */
html body .ydw{background:var(--d23-card);border:1px solid var(--d23-line);border-radius:.9rem}
html body .ydw__note{font-size:.78rem;color:var(--d23-dim)}

/* 7 · Mis cultivos / fórmulas / pagos */
html body .yolia-cases .yolia-card,html body .yolia-case-card{border:1px solid var(--d23-line);border-radius:.9rem;background:var(--d23-card);box-shadow:0 1px 2px rgba(31,45,31,.04)}
html body .yolia-section-title h3{font-family:'Fraunces',Georgia,serif;font-size:1.3rem;font-weight:700;color:var(--d23-ink);display:flex;align-items:center;gap:.5rem}
html body .yolia-table-wrap{border:1px solid var(--d23-line);border-radius:.9rem;background:#fff;overflow:auto}
html body .yolia-table-wrap table{width:100%;border-collapse:collapse}
html body .yolia-table-wrap th{font-size:.72rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--d23-dim);background:var(--d23-soft);padding:.65rem .9rem;text-align:start}
html body .yolia-table-wrap td{padding:.7rem .9rem;border-top:1px solid var(--d23-line);font-size:.92rem}
html body .yolia-table-wrap a.yolia-dashboard-table-link{color:var(--d23-olive);font-weight:800;text-decoration:none}

/* 8 · Móvil / tablet */
@media (max-width:900px){html body [class$="-dashboard__grid"]{grid-template-columns:repeat(auto-fill,minmax(min(100%,15rem),1fr))}}
@media (max-width:600px){
  html body [class*="-dashboard__capacity"]{grid-template-columns:1fr!important}
  html body .ydsec{margin-top:1.5rem}
  html body .ydsec__title,html body .yolia-section-title h3{font-size:1.15rem}
  html body .yolia-table-wrap table{font-size:.85rem}
}
@media (prefers-reduced-motion:reduce){html body [class*="-card"]{transition:none!important}html body [class*="-card"]:hover{transform:none}}

/* 9 · El contenedor de texto enriquecido del builder fuerza h1-h6 a "inherit !important": los títulos del panel lo reafirman */
html body .ydsec__title,html body .ydash-attn__head h2,html body .ydw__head h2,html body .ydw__title,html body .yolia-section-title h3,
html body [class*="-dashboard__hero"] h2{font-family:'Fraunces',Georgia,serif!important;font-weight:700!important;color:var(--d23-ink)!important}
html body .ydsec__title{font-size:1.3rem!important;line-height:1.25!important}
html body .ydash-attn__head h2,html body .ydw__head h2,html body .ydw__title{font-size:1.1rem!important}
html body [class*="-dashboard__hero"] h2{font-size:clamp(1.1rem,2vw,1.35rem)!important;margin:.1rem 0 .3rem!important}
html body [class*="-card"]>p:last-child{font-size:.82rem!important}

/* 10 · Mis cultivos y mis fórmulas (agricultor / laboratorio) */
html body .yd23-cases{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,19rem),1fr));gap:1rem}
html body .yd23-case,html body .yd23-formula{background:#fff;border:1px solid var(--d23-line);border-radius:.9rem;padding:1.1rem 1.15rem;display:flex;flex-direction:column;gap:.8rem;box-shadow:0 1px 2px rgba(31,45,31,.04)}
html body .yd23-case__head{display:flex;gap:.8rem;align-items:center}
html body .yd23-case__icon{flex:none;display:grid;place-items:center;width:2.6rem;height:2.6rem;border-radius:.8rem;background:var(--d23-olive2);color:var(--d23-olive)}
html body .yd23-case__icon svg{width:1.4rem;height:1.4rem}
html body .yd23-case__title h4,html body .yd23-formula__main h4{margin:0!important;font-family:'Fraunces',Georgia,serif!important;font-weight:700!important;font-size:1.1rem!important;color:var(--d23-ink)!important;line-height:1.25!important}
html body .yd23-case__title p,html body .yd23-formula__main p{margin:.15rem 0 0;color:var(--d23-dim);font-size:.85rem}
html body .yd23-case__chips{display:flex;flex-wrap:wrap;gap:.4rem}
html body .yd23-chip{padding:.2rem .6rem;border-radius:99rem;background:var(--d23-olive2);color:var(--d23-olive);font-size:.72rem;font-weight:700}
html body .yd23-chip--warn{background:#fff4e0;color:var(--d23-warn)}
html body .yd23-case__actions,html body .yd23-formula__actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:auto}
html body .yd23-btn{display:inline-flex;align-items:center;padding:.5rem .9rem;border:1.5px solid var(--d23-olive);border-radius:.65rem;background:#fff;color:var(--d23-olive)!important;font-weight:800;font-size:.84rem;line-height:1.2;text-decoration:none!important;border-bottom-width:1.5px}
html body .yd23-btn:hover{background:var(--d23-olive2)}
html body .yd23-btn--main{background:var(--d23-olive);color:#fff!important}
html body .yd23-btn--main:hover{filter:brightness(1.08);background:var(--d23-olive)}
html body .yd23-formulas{display:flex;flex-direction:column;gap:.8rem}
html body .yd23-formula{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap}
html body .yd23-formula__actions{margin-top:0}
html body .yd23-case__title p,html body .yd23-formula__main p{font-size:.85rem!important;line-height:1.4!important;color:var(--d23-dim)!important}
html body .yd23-case__title h4,html body .yd23-formula__main h4{font-size:1.1rem!important}
html body .yd23-cases{grid-template-columns:repeat(auto-fill,minmax(min(100%,22rem),1fr))}
html body .yd23-btn{font-size:.82rem!important;padding:.45rem .8rem!important}
html body .yd23-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));gap:.5rem;margin:0}
html body .yd23-stats>div{background:var(--d23-soft);border-radius:.7rem;padding:.5rem .7rem;min-width:0}
html body .yd23-stats dt{font-size:.68rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--d23-dim)}
html body .yd23-stats dd{margin:.1rem 0 0;font-size:1rem;font-weight:800;color:var(--d23-ink)}

/* v24: botones "i" y sus ventanas de ayuda más grandes y legibles */
html body .ydk__info summary{inline-size:2rem;block-size:2rem;font-size:1rem;border-width:.1rem;border-color:#3f5f36;color:#3f5f36;background:#fff}
html body .ydk__info{top:.55rem;inset-inline-end:.55rem}
html body .ydk__pop{inline-size:min(25rem,calc(100vw - 2rem));padding:1.05rem 1.15rem;font-size:1rem;line-height:1.55}
html body .ydk__pop b{font-size:1.15rem;margin-bottom:.45rem}
html body .yolia-app .ydk__pop p,html body .ydk__pop p{font-size:1rem;line-height:1.55;margin:.45rem 0 0}
html body .ydk__pop em{font-size:.95rem}
@media (max-width:600px){html body .ydk__pop{position:fixed;inset-inline:.75rem;inset-block-end:.75rem;inset-block-start:auto;inline-size:auto;max-block-size:65vh;overflow:auto;z-index:100000;font-size:1.05rem}}
