/* Base común de la página de marcación y del panel: marca, colores, letras, botones, campos y avisos.
   La marca de la empresa (color, logo y nombre) está aparte, en la carpeta /marca/. */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
:root {
  /* marca: sale de --marca (/marca/marca.css); solo para la acción principal.
     Sin color-mix (celulares viejos) los tonos derivados caen en valores neutros que se leen bien. */
  --acento: var(--marca);
  --acento-texto: var(--marca-texto);  /* letra sobre el color principal */
  --acento-2: var(--marca);            /* al pasar el mouse */
  --acento-suave: #EFF0EC;
  --acento-tinta: var(--tinta);        /* letra sobre el fondo suave */

  /* neutros */
  --papel: #F3F4F1;
  --papel-2: #E9EBE7;
  --superficie: #FFFFFF;
  --linea: #E2E5E0;
  --linea-2: #CDD2CC;
  --tinta: #161A1E;
  --tinta-2: #2A3036;
  --gris: #5B636A;
  --gris-2: #8A9196;

  /* grafito: el panel oscuro de la marcación */
  --grafito: #161A1E;
  --grafito-2: #20252A;
  --grafito-linea: rgba(255, 255, 255, .09);
  --grafito-texto: #F4F5F3;
  --grafito-gris: #979FA5;

  /* estados */
  --ok: #157347;
  --ok-suave: #E2F1E8;
  --alerta: #B42318;
  --alerta-suave: #FCEAE8;

  --sombra-1: 0 1px 2px rgba(22, 26, 30, .05);
  --sombra-2: 0 1px 2px rgba(22, 26, 30, .04), 0 8px 24px -6px rgba(22, 26, 30, .10);
  --sombra-3: 0 24px 64px -12px rgba(22, 26, 30, .32);
  --r-1: 8px;     /* controles chicos */
  --r-2: 12px;    /* campos y botones */
  --r-3: 16px;    /* tarjetas */
  --r-4: 24px;    /* hojas y diálogos */
  --letra: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --suave-in: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --acento-2: color-mix(in srgb, var(--marca), white 15%);
    --acento-suave: color-mix(in srgb, var(--marca) 22%, white);
    --acento-tinta: color-mix(in srgb, var(--marca), black 55%);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--papel);
  color: var(--tinta);
  font: 450 15px/1.55 var(--letra);
  font-feature-settings: "calt";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; }
b, strong { font-weight: 700; }
:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }
img { max-width: 100%; }
::selection { background: var(--acento-suave); }

/* íconos del archivo /img/iconos.svg */
.ico {
  width: 1.2em; height: 1.2em; flex: none; vertical-align: -.22em;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* logo de la empresa (/marca/logo.svg): alto fijo, ancho según el dibujo, para que sirva cuadrado o alargado */
.logo { height: 36px; width: auto; max-width: 160px; object-fit: contain; border-radius: 10px; flex: none; display: block; }

/* ---------- campos ---------- */
label { display: block; font-weight: 600; font-size: 13.5px; margin: 18px 0 7px; color: var(--tinta); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=search], select {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--linea-2); border-radius: var(--r-2); background: var(--superficie);
  font-weight: 500; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
input[type=date] { font-variant-numeric: tabular-nums; }
input::placeholder { color: var(--gris-2); font-weight: 450; }
input:hover, select:hover { border-color: #B5BCB4; }
input:focus, select:focus { outline: none; border-color: var(--tinta); box-shadow: 0 0 0 4px rgba(22, 26, 30, .08); }
select {
  appearance: none; padding-right: 42px; cursor: pointer; text-overflow: ellipsis;
  background: var(--superficie) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B636A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 13px center / 18px;
}
.check { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 0; font-weight: 500; cursor: pointer; line-height: 1.45; }
.check input {
  appearance: none; width: 20px; height: 20px; margin: 1px 0 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--linea-2); border-radius: 6px; background: var(--superficie); display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.check input:hover { border-color: var(--gris-2); }
.check input::after {
  content: ""; width: 12px; height: 12px; transform: scale(.4); opacity: 0; transition: transform .15s var(--suave-in), opacity .1s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.check input:checked { background: var(--tinta); border-color: var(--tinta); }
.check input:checked::after { transform: scale(1); opacity: 1; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border: 0; border-radius: var(--r-2); cursor: pointer;
  font-weight: 650; font-size: 14.5px; white-space: nowrap; text-decoration: none;
  background: var(--tinta); color: #fff;
  transition: transform .1s, background .15s, box-shadow .15s, opacity .15s, color .15s;
  touch-action: manipulation;
}
.btn:hover { background: var(--tinta-2); }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .4; cursor: default; transform: none; }
.btn .ico { width: 18px; height: 18px; }
.btn.amarillo { background: var(--acento); color: var(--acento-texto); }
.btn.amarillo:hover { background: var(--acento-2); }
.btn.borde { background: var(--superficie); color: var(--tinta); box-shadow: inset 0 0 0 1px var(--linea-2); }
.btn.borde:hover { background: var(--papel); box-shadow: inset 0 0 0 1px #B5BCB4; }
.btn.peligro { background: var(--superficie); color: var(--alerta); box-shadow: inset 0 0 0 1px #EBC3BE; }
.btn.peligro:hover { background: var(--alerta-suave); }
.btn.rojo { background: var(--alerta); color: #fff; }
.btn.rojo:hover { background: #971C13; }
.btn.chico { min-height: 32px; padding: 5px 11px; font-size: 13px; border-radius: var(--r-1); gap: 6px; }
.btn.chico .ico { width: 15px; height: 15px; }
.btn.ancho { width: 100%; }
.enlace {
  background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; color: var(--tinta);
  text-decoration: underline; text-decoration-color: var(--linea-2); text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  transition: text-decoration-color .15s;
}
.enlace:hover { text-decoration-color: currentColor; }

/* ---------- mensajes ---------- */
.error {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--alerta-suave); color: var(--alerta); border-radius: var(--r-2);
  padding: 12px 14px; margin-top: 16px; font-weight: 600; font-size: 14px; line-height: 1.45;
}
.error::before {
  content: ""; width: 18px; height: 18px; flex: none; margin-top: 1px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nota { color: var(--gris); font-size: 13px; }

/* ---------- indicador de carga ---------- */
.cargando {
  display: inline-block; width: 1em; height: 1em; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: gira .7s linear infinite; vertical-align: -.15em; opacity: .8;
}
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
