/* Base visual de la app (mismo lenguaje que DOOM 18-11: papel, tinta, azul, Geist + Instrument Serif).
   Todas las pantallas cargan este archivo. Los colores y medidas salen de estas variables. */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --surface: #ffffff;
  --ink: #151412;
  --ink-soft: #57534c;
  --ink-mute: #8b867c;
  --line: #e4e0d6;
  --line-2: #d6d1c4;
  --brand: #2a3fd8;
  --brand-ink: #ffffff;
  --brand-tint: #eaedfd;
  --red: #e5484d;
  --red-tint: #fdecec;
  --orange: #f76b15;
  --orange-tint: #feefe3;
  --green: #22a55a;
  --green-tint: #e5f6ec;
  --yellow: #d4a106;
  --yellow-tint: #fbf4dc;
  --violet: #7c5cff;

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow-card: 0 1px 0 rgba(21, 20, 18, .04), 0 1px 2px rgba(21, 20, 18, .06);
  --shadow-pop: 0 18px 50px -18px rgba(21, 20, 18, .35), 0 2px 6px rgba(21, 20, 18, .06);
  --gutter: 16px;
}

/* Estados de un video. Emi (19-11): grandes y claros por color: amarillo revisar, rojo, verde, gris. */
.st-sin_estado { --st: #6f6a60; --st-bg: #ece9e2; --st-solid: #8b867c; }
.st-revisar { --st: #8a6400; --st-bg: #fdf1c7; --st-solid: #f2b705; }
.st-hacer_de_nuevo { --st: #c4281c; --st-bg: #fde4e1; --st-solid: #e5484d; }
.st-rechazado { --st: #8f1d2c; --st-bg: #f7dfe2; --st-solid: #9f1239; }
.st-aprobado { --st: #157a3e; --st-bg: #dcf3e5; --st-solid: #22a55a; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Marca: la palabra del producto, siempre visible y grande */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font: 600 26px/1 var(--sans);
  letter-spacing: -.045em;
  color: var(--brand);
  text-decoration: none;
}
.wordmark .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); transform: translateY(-1px); }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-mute); }
.soft { color: var(--ink-soft); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font: 500 14.5px/1 var(--sans);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { border-color: var(--line-2); background: #fbfaf7; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ink:hover { background: #2a2825; border-color: #2a2825; }
.btn-brand { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-brand:hover { background: #2234c4; border-color: #2234c4; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(21, 20, 18, .05); border-color: transparent; }
.btn-danger { color: var(--red); }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

/* Campos */
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 500; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-soft); }
.input, select.input, textarea.input {
  width: 100%; height: 44px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; min-height: 90px; padding: 11px 13px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(42, 63, 216, .12); }

/* Tarjetas y piezas sueltas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px; border-radius: 99px;
  font: 500 12px/1 var(--sans);
  background: var(--st-bg, var(--paper-2)); color: var(--st, var(--ink-soft));
}
.pill .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tc { font: 500 12px/1 var(--mono); color: var(--green); background: var(--green-tint); padding: 4px 7px; border-radius: 6px; white-space: nowrap; }
.kbd { font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 600 12px/1 var(--sans); color: #fff; background: var(--green); flex: none; }

/* Aviso que aparece abajo (copiado, guardado, error) */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: var(--paper);
  font: 500 14px/1.3 var(--sans);
  box-shadow: var(--shadow-pop);
  transition: opacity .18s, transform .18s; pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }

/* Ventana encima de todo */
.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(21, 20, 18, .38); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); padding: 26px; }
.modal h2 { margin: 0 0 6px; font: 600 21px/1.25 var(--sans); letter-spacing: -.02em; }

/* "Hecho con …": sello de la marca en los links públicos */
.made-with {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px 0 12px; border-radius: 99px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font: 500 13px/1 var(--sans); box-shadow: var(--shadow-pop);
}
.made-with b { font-weight: 700; letter-spacing: -.03em; color: #fff; }

.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .modal { padding: 22px 18px; border-radius: 20px; }
}
