/* tuclientefiel — sistema compartido (landing + app) */
:root {
  --verde: #0b6e4f; --verde-h: #085a40; --verde-t: #e3f1ea; --verde-tt: #f1f7f4;
  --tinta: #0f1d18; --tinta-2: #3f5048; --tinta-3: #5f6f68;
  --linea: #d9e3de; --fondo: #ffffff; --fondo-2: #f2f6f4;
  --oro: #f5b700; --oro-t: #fff2c2; --oro-tinta: #4d3800;   /* oro = solo premio */
  --rojo: #b42318; --rojo-t: #fdecea;
  --r: 20px; --r-m: 14px; --r-s: 10px;
  --sombra: 0 1px 2px rgb(15 29 24 / .06), 0 14px 34px -14px rgb(15 29 24 / .25);
  --sombra-s: 0 1px 2px rgb(15 29 24 / .08), 0 4px 12px -6px rgb(15 29 24 / .18);
  --display: "Gabarito", ui-sans-serif, system-ui, sans-serif;
  --texto: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --ancho: 1160px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #b6c6be transparent; }
body { margin: 0; font: 400 1rem/1.55 var(--texto); color: var(--tinta); background: var(--fondo); caret-color: var(--verde); -webkit-font-smoothing: antialiased; }
::selection { background: var(--verde); color: #fff; }
:focus-visible { outline: 3px solid var(--verde); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.06; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--verde); text-underline-offset: .22em; text-decoration-thickness: 1.5px; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.envoltura { width: min(100% - 32px, var(--ancho)); margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---- marca ---- */
.marca { display: inline-flex; align-items: center; gap: .55rem; font: 700 1.3rem/1 var(--display); color: var(--tinta); text-decoration: none; letter-spacing: -.025em; }
.marca img { width: 32px; height: 32px; }
.marca b { color: var(--verde); font-weight: 700; }

/* ---- botones ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: 0 1.25rem; border: 0; border-radius: var(--r-m); background: var(--verde); color: #fff; font: 600 1rem/1.1 var(--texto); text-decoration: none; cursor: pointer; transition: background-color .15s, box-shadow .15s, transform .1s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--verde-h); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.sec { background: var(--fondo); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linea); }
.btn.sec:hover { background: var(--fondo-2); }
.btn.oro { background: var(--oro); color: var(--oro-tinta); }
.btn.oro:hover { background: #e6ab00; }
.btn.peligro { background: var(--fondo); color: var(--rojo); box-shadow: inset 0 0 0 1.5px #efc3be; }
.btn.peligro:hover { background: var(--rojo-t); }
.btn.fantasma { background: transparent; color: var(--tinta-2); }
.btn.fantasma:hover { background: var(--fondo-2); }
.btn.chico { min-height: 38px; padding: 0 .85rem; font-size: .92rem; border-radius: var(--r-s); }
.btn.grande { min-height: 56px; padding: 0 1.6rem; font-size: 1.06rem; }
.btn.ancho { width: 100%; }
.btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #fff; border-right-color: transparent; animation: girar .7s linear infinite; }
.btn.sec[aria-busy="true"]::after { border-color: var(--verde); border-right-color: transparent; }
@keyframes girar { to { transform: rotate(1turn); } }

/* ---- formularios ---- */
.campo { display: grid; gap: .4rem; }
.campo > label, .etq { font-weight: 600; font-size: .93rem; }
input:is([type=text],[type=tel],[type=email],[type=password],[type=number],[type=date],[type=search]), select, textarea {
  width: 100%; min-height: 50px; padding: .7rem .95rem; border: 1.5px solid var(--linea); border-radius: var(--r-s);
  background: #fff; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 4px var(--verde-t); }
input::placeholder { color: #869790; }
input[aria-invalid="true"] { border-color: var(--rojo); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .93rem; color: var(--tinta-2); line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--verde); flex: none; }
.ayuda { font-size: .86rem; color: var(--tinta-3); }
.error { color: var(--rojo); font-size: .93rem; font-weight: 600; }
.error:empty { display: none; }
.nota { padding: .9rem 1rem; border-radius: var(--r-m); background: var(--fondo-2); color: var(--tinta-2); font-size: .94rem; }
.nota.ok { background: var(--verde-t); color: var(--verde-h); }
.nota.mal { background: var(--rojo-t); color: var(--rojo); }

/* ---- desplegables: chevron dibujado, no el triángulo del navegador ---- */
details > summary { list-style: none; display: flex; align-items: center; gap: .6rem; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; width: 8px; height: 8px; flex: none; border-right: 2.5px solid var(--tinta-2); border-bottom: 2.5px solid var(--tinta-2); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }

/* ---- insignias ---- */
.insignia { display: inline-flex; align-items: center; gap: .3em; padding: .22rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1.2; background: var(--fondo-2); color: var(--tinta-2); white-space: nowrap; }
.insignia.verde { background: var(--verde-t); color: var(--verde-h); }
.insignia.alerta { background: #ffeedd; color: #8a4300; }
.insignia.premio { background: var(--oro-t); color: var(--oro-tinta); }
.insignia.mal { background: var(--rojo-t); color: var(--rojo); }

/* ---- tarjeta de sellos del cliente ---- */
.tc { --c: var(--verde); --ct: #fff; width: 100%; max-width: 380px; background: #fff; border-radius: 24px; box-shadow: var(--sombra); overflow: hidden; }
.tc-cab { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.15rem; background: var(--c); color: var(--ct); }
.tc-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; background: rgb(255 255 255 / .22); display: grid; place-items: center; font: 700 1.05rem/1 var(--display); }
.tc-cab strong { display: block; font: 700 1.12rem/1.15 var(--display); }
.tc-cab span { font-size: .86rem; opacity: .88; }
.tc-cuerpo { padding: 1.1rem 1.15rem 1.2rem; }
.tc-cuenta { display: flex; align-items: baseline; gap: .4rem; font-family: var(--display); font-variant-numeric: tabular-nums; }
.tc-cuenta b { font-size: 3.1rem; line-height: .9; font-weight: 800; letter-spacing: -.03em; }
.tc-cuenta span { color: var(--tinta-3); font-weight: 600; font-size: 1.05rem; }
.tc-huecos { list-style: none; margin: 1rem 0 .95rem; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .55rem; }
.hueco { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #c9d6cf; display: grid; place-items: center; color: transparent; }
.hueco svg { width: 54%; height: 54%; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hueco.lleno { border: 0; background: var(--c); color: var(--ct); }
.hueco.premio { border-color: var(--oro); color: #c99700; }
.hueco.premio.lleno { background: var(--oro); color: var(--oro-tinta); }
.hueco.recien { animation: sellar .6s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes sellar { 0% { transform: scale(1.9) rotate(-14deg); opacity: 0; } 55% { transform: scale(.9) rotate(4deg); opacity: 1; } 100% { transform: none; } }
.tc-premio { font-size: .95rem; color: var(--tinta-2); }
.tc-premio b { color: var(--tinta); }
.tc.completa .tc-premio { padding: .7rem .85rem; border-radius: var(--r-s); background: var(--oro-t); color: var(--oro-tinta); }
.tc.completa .tc-premio b { color: var(--oro-tinta); }

/* ---- utilidades de app ---- */
.pila { display: grid; gap: 1rem; }
.fila { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.caja { background: #fff; border: 1.5px solid var(--linea); border-radius: var(--r); padding: 1.25rem; }
.vacio { padding: 2rem 1rem; text-align: center; color: var(--tinta-3); }
.vacio strong { display: block; color: var(--tinta); font: 700 1.1rem/1.3 var(--display); margin-bottom: .25rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--tinta); color: #fff; padding: .8rem 1.1rem; border-radius: var(--r-m); font-weight: 600; box-shadow: var(--sombra); transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1); z-index: 50; max-width: calc(100% - 32px); pointer-events: none; }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
