@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/dmsans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/dmsans-latin.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;
}

:root {
  --magenta: #d81b7a;
  --magenta-dark: #b01464;
  --magenta-soft: #fae6f0;
  --magenta-mid: #f3b6d3;
  --bg: #f6f0f2;
  --card: #ffffff;
  --text: #1c1418;
  --muted: #6d5b63;
  --line: #efe4e9;
  --ok: #157a4b;
  --warn: #9a4d0c;
  --shadow: 0 10px 40px rgba(80, 16, 48, 0.08);
  --radius: 22px;
  --font: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 50% -10%, #fdeef5 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px 24px;
  border: 1px solid rgba(216, 27, 122, 0.06);
}

.card-simple { text-align: left; }
.card-simple h1 { font-size: 1.4rem; margin: 14px 0 8px; }

.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 170px;
}

.card-head h1 {
  margin: 18px 0 4px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.badge-ejemplo {
  display: inline-block;
  margin: 10px 0 0;
  background: var(--magenta-soft);
  color: var(--magenta-dark);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 999px;
}

.total-info {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 12px;
  background: #fbf7f8;
  border-radius: 12px;
}
.total-etiqueta {
  color: var(--muted);
  font-size: 0.86rem;
}
.total-info strong {
  color: var(--text);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.lineas { margin-top: 8px; }
.linea {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.linea-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.linea-nombre {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.linea-nombre .codigo {
  color: var(--magenta);
  font-weight: 700;
}
.linea-evidencia {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.linea-sub {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fbf7f8;
  border-radius: 12px;
}
.linea-sub .linea-top {
  align-items: center;
}
.sub-titulo {
  font-size: 0.8rem;
  font-weight: 650;
  color: #4a3b43;
  line-height: 1.3;
}
.linea-sub .linea-evidencia {
  margin-top: 2px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}
.stepper button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--magenta);
  background: #fff;
  color: var(--magenta);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.stepper button:hover { background: var(--magenta-soft); }
.stepper button:active { background: var(--magenta); color: #fff; }
.stepper button:disabled {
  opacity: 0.35;
  cursor: default;
  background: #fff;
  color: var(--magenta);
}
.stepper .horas {
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 0.95rem;
}

.bloque { margin-top: 22px; }
.bloque h2 {
  font-size: 0.95rem;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.ayuda {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.anadir { display: flex; gap: 8px; }
.anadir input {
  flex: 1;
  border: 1px solid var(--line);
  background: #fbf7f8;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.9rem;
}
.anadir input:focus {
  outline: 2px solid var(--magenta-mid);
  border-color: var(--magenta);
  background: #fff;
}
.btn-secundario {
  border: none;
  background: var(--magenta-soft);
  color: var(--magenta-dark);
  font: inherit;
  font-weight: 650;
  font-size: 0.88rem;
  border-radius: 12px;
  padding: 0 14px;
  cursor: pointer;
}
.btn-secundario:hover { background: #f6d0e3; }

.sugeridos {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.sugeridos li button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.sugeridos li:last-child button { border-bottom: none; }
.sugeridos li button:hover { background: var(--magenta-soft); }
.sugeridos .vacio {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.checks { display: flex; flex-direction: column; gap: 8px; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fff;
}
.check:hover { border-color: var(--magenta-mid); }
.check.activa {
  border-color: var(--magenta);
  background: var(--magenta-soft);
}
.check input { accent-color: var(--magenta); width: 16px; height: 16px; }
.check .titulo { font-weight: 600; font-size: 0.9rem; flex: 1; }
.check .mins { color: var(--muted); font-size: 0.8rem; }

#coord-texto {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 64px;
  background: #fbf7f8;
}
#coord-texto:focus {
  outline: 2px solid var(--magenta-mid);
  border-color: var(--magenta);
  background: #fff;
}
.coord-resumen {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 550;
}
.reparto {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.reparto li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
}

.aviso {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.35;
  background: #fff5e8;
  color: var(--warn);
}
.aviso.error { background: #fdecec; color: #9b1c2c; }
.aviso.ok { background: #e8f7ef; color: var(--ok); }

.card-foot { margin-top: 20px; }
.btn-enviar {
  width: 100%;
  border: none;
  background: var(--magenta);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(216, 27, 122, 0.25);
}
.btn-enviar:hover { background: var(--magenta-dark); }
.btn-enviar:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

.confirmacion {
  margin-top: 8px;
  padding: 16px 4px 4px;
  text-align: center;
}
.confirmacion h2 { margin: 0 0 6px; font-size: 1.15rem; }
.confirmacion p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.linea.bloqueada .stepper button { display: none; }
body.enviada .anadir,
body.enviada #bloque-anadir,
body.enviada .btn-enviar { display: none; }
body.enviada .check { pointer-events: none; }

.muted { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
