/* Rocola QR · estilos base: variables, reseteo, botones, formularios, avisos */
:root {
  --bg: #08080c;
  --surface: #13131b;
  --surface-2: #1b1b27;
  --border: #2a2a3b;
  --text: #f4f4f9;
  --muted: #9b9bb2;
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --green: #22d3a6;
  --danger: #f43f5e;
  --warn: #f59e0b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(139, 92, 246, .22), transparent 70%),
    radial-gradient(600px 400px at 100% 100%, rgba(34, 211, 166, .08), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
h1, h2, p { margin: 0; }
h1 { font-size: 1.5rem; line-height: 1.2; }
h2 { font-size: 1.05rem; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pad { padding: 2rem; }
.icon { display: inline-flex; vertical-align: middle; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: 999px;
  padding: .7rem 1.2rem; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, background .2s ease, opacity .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #6d4ae0); color: #fff; box-shadow: 0 6px 24px rgba(139, 92, 246, .4); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #9b72f8, #7b5af0); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-big { width: 100%; padding: 1rem 1.2rem; font-size: 1.1rem; }
.btn-sm { padding: .45rem .9rem; font-size: .9rem; }

/* ---------- formularios ---------- */
.input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .7rem .85rem; min-height: 44px;
}
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(139, 92, 246, .3); }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.field > small { color: var(--muted); font-size: .78rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-error { color: var(--danger); min-height: 1.2em; font-size: .9rem; }

/* ---------- componentes comunes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.chip { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .75rem; color: var(--muted); }
.brand-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); margin-right: .5rem; }

.logo-disc {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1rem;
  background: radial-gradient(circle at 50% 50%, var(--bg) 0 9%, transparent 10%),
              repeating-radial-gradient(circle at 50% 50%, #1d1d29 0 3px, #12121a 3px 6px),
              var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 0 28px rgba(139, 92, 246, .5);
  animation: spin 9s linear infinite;
}
.logo-disc.small { width: 60px; height: 60px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- avisos ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(1rem + env(safe-area-inset-bottom, 0)); display: flex; flex-direction: column; align-items: center; gap: .5rem; z-index: 50; pointer-events: none; padding: 0 1rem; }
.toast { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem 1rem; max-width: 460px; box-shadow: var(--shadow); animation: rise .25s ease; word-break: break-word; }
.toast-ok { border-color: var(--green); }
.toast-warn { border-color: var(--warn); }
.toast-bad { border-color: var(--danger); }
.toast.out { opacity: 0; transition: opacity .35s ease; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
