/* Los Autómatas: blanco, negro y magenta (mismos tokens que automatasperu.com) */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #515154;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --soft: #f5f5f7;
  --accent: #d10a70;
  --accent-hover: #a8055a;
  --accent-light: #ff5cad;
  --accent-soft: #fdeaf3;
  --danger: #b3261e;
  --ok: #1f8a4c;
  --radius: 28px;
  --display: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { letter-spacing: -0.03em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
::selection { background: var(--accent-light); color: var(--ink); }
[hidden] { display: none !important; }

.shell { max-width: 1080px; margin: 0 auto; padding: 28px 16px 56px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .3);
}

/* Marca */
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.mark {
  display: inline-block; width: 1.5em; height: 1.5em; background: currentColor; flex: none;
  -webkit-mask: url(/logo-mark.png) center / contain no-repeat; mask: url(/logo-mark.png) center / contain no-repeat;
}

/* Botones y campos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; border: 1px solid var(--accent); background: var(--accent); color: #fff;
  border-radius: 999px; padding: 10px 24px; font-weight: 500; font-size: 15px; text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, opacity .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.btn.danger { background: #fff; color: var(--danger); border-color: #ecc9c6; }
.btn.danger:hover { background: #fdf1f0; }
.btn.small { min-height: 36px; padding: 6px 16px; font-size: 13.5px; }

.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; }
.link-btn:hover { text-decoration: underline; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink); }
.field label .req { color: var(--accent); }
.field label .opt { font-weight: 400; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 92px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(209, 10, 112, .14);
}

.note { font-size: 13px; color: var(--muted); }
.error-box { background: #fdf1f0; color: var(--danger); border: 1px solid #f1d3d0; border-radius: 14px; padding: 11px 14px; font-size: 14px; margin-bottom: 16px; }
.ok-box { background: #edf7f1; color: var(--ok); border: 1px solid #cfe7d8; border-radius: 14px; padding: 11px 14px; font-size: 14px; margin-bottom: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); z-index: 50; max-width: calc(100% - 32px);
  animation: toast-in .35s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-soft); border-top-color: var(--accent);
  animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.enter { animation: enter .45s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

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