/* ===========================================================
   VORVEX QR Suite · núcleo visual
   Tokens, reset y componentes compartidos por landing, panel y admin.
   La experiencia pública tiene su propia hoja (experience.css).
   =========================================================== */

:root {
  /* Marca */
  --v-ink: #0A0B1A;
  --v-ink-2: #171A33;
  --v-violet: #5B34F5;
  --v-violet-600: #4A26DC;
  --v-violet-100: #EEE9FE;
  --v-mint: #00C9A7;
  --v-amber: #FF8A3D;
  --v-rose: #F0446E;

  /* Superficies */
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --surface-2: #F1F2F8;
  --surface-3: #E7E9F4;
  --border: #E4E7F2;
  --border-strong: #CFD4E6;

  /* Texto */
  --text: #14162B;
  --text-2: #565A78;
  --text-3: #8A8FAB;

  /* Formas */
  --r-sm: 8px;
  --r: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-full: 999px;

  --sh-sm: 0 1px 2px rgba(16, 20, 50, .06), 0 1px 3px rgba(16, 20, 50, .04);
  --sh: 0 4px 14px rgba(16, 20, 50, .07);
  --sh-md: 0 10px 30px rgba(16, 20, 50, .10);
  --sh-lg: 0 24px 60px rgba(16, 20, 50, .16);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --nav-h: 64px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--v-violet) 55%, white);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: 760px; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .6rem; align-items: center; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.wrapline { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--text-2); }
.small { font-size: .85rem; }
.tiny { font-size: .76rem; }
.strong { font-weight: 700; }
.hide { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt1 { margin-top: .5rem; } .mt2 { margin-top: 1rem; } .mt3 { margin-top: 1.6rem; } .mt4 { margin-top: 2.4rem; }

/* ── Botones ───────────────────────────────────────────── */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.15rem;
  border-radius: var(--r-full);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650; font-size: .95rem; line-height: 1;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

.btn-primary { --btn-bg: var(--v-violet); --btn-fg: #fff; --btn-bd: transparent; box-shadow: 0 6px 20px rgba(91, 52, 245, .28); }
.btn-primary:hover { --btn-bg: var(--v-violet-600); box-shadow: 0 10px 26px rgba(91, 52, 245, .34); }
.btn-dark { --btn-bg: var(--v-ink); --btn-fg: #fff; --btn-bd: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-ghost:hover { --btn-bg: var(--surface-2); box-shadow: none; }
.btn-soft { --btn-bg: var(--v-violet-100); --btn-fg: var(--v-violet-600); --btn-bd: transparent; }
.btn-danger { --btn-fg: var(--v-rose); --btn-bd: color-mix(in srgb, var(--v-rose) 30%, white); }
.btn-danger:hover { --btn-bg: color-mix(in srgb, var(--v-rose) 8%, white); }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.02rem; }
.btn-sm { padding: .45rem .8rem; font-size: .84rem; }
.btn-icon { padding: .5rem; width: 36px; height: 36px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

/* ── Formularios ───────────────────────────────────────── */
.field { margin-bottom: 1.05rem; }
.field > label, .label {
  display: block; font-size: .82rem; font-weight: 700; letter-spacing: .01em;
  color: var(--text-2); margin-bottom: .35rem;
}
.input, .select, .textarea {
  width: 100%;
  padding: .72rem .9rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--v-violet);
  box-shadow: 0 0 0 4px rgba(91, 52, 245, .12);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23565A78' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 2.2rem; }
.hint { font-size: .76rem; color: var(--text-3); margin-top: .3rem; }
.field-error { color: var(--v-rose); font-size: .8rem; margin-top: .3rem; }

.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 44px; height: 26px; border-radius: var(--r-full);
  background: var(--surface-3); position: relative; transition: background .18s ease; flex: none;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .18s ease;
}
.switch input:checked + .track { background: var(--v-violet); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(91,52,245,.2); }

.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check input { margin-top: .25rem; accent-color: var(--v-violet); width: 18px; height: 18px; }

/* Subida de imagen */
.upload {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem; border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-md); background: var(--surface-2);
}
.upload:hover { border-color: var(--v-violet); }
.upload .thumb {
  width: 62px; height: 62px; border-radius: var(--r); flex: none;
  background: var(--surface-3) center/cover no-repeat;
  display: grid; place-items: center; color: var(--text-3); overflow: hidden;
}
.upload .thumb img { width: 100%; height: 100%; object-fit: cover; }
/* Un <input type=file> tiene una anchura intrínseca grande: sin min-width:0
   estira su contenedor flex y desborda la página en móvil. */
.upload .grow { min-width: 0; }
.upload input[type=file] { font-size: .82rem; width: 100%; max-width: 100%; }

/* ── Tarjetas ──────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.card-pad { padding: 1.4rem; }
.card-hover { transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--border-strong); }

/* ── Píldoras y estados ────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .68rem; border-radius: var(--r-full);
  font-size: .74rem; font-weight: 750; letter-spacing: .02em;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.pill-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-published { background: rgba(0, 201, 167, .14); color: #06806C; }
.pill-draft { background: var(--surface-3); color: var(--text-2); }
.pill-paused { background: rgba(255, 138, 61, .16); color: #A34E00; }
.pill-suspended { background: rgba(240, 68, 110, .14); color: #B3123E; }
.pill-menu { background: rgba(91, 52, 245, .12); color: var(--v-violet-600); }
.pill-guest { background: rgba(0, 201, 167, .14); color: #06806C; }
.pill-pro { background: var(--v-ink); color: #fff; }

/* ── Avisos ────────────────────────────────────────────── */
.notice {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .9rem 1.1rem; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .92rem;
}
.notice-success { background: rgba(0, 201, 167, .10); border-color: rgba(0, 201, 167, .28); }
.notice-error { background: rgba(240, 68, 110, .08); border-color: rgba(240, 68, 110, .26); }
.notice-info { background: rgba(91, 52, 245, .07); border-color: rgba(91, 52, 245, .2); }
.notice strong { display: block; }

.flash {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 90;
  max-width: min(560px, calc(100vw - 32px));
  box-shadow: var(--sh-lg); background: var(--surface);
  animation: flash-in .3s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes flash-in { from { opacity: 0; transform: translate(-50%, 14px); } }

/* ── Barra de progreso ─────────────────────────────────── */
.progress { height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--v-violet), var(--v-mint)); transition: width .5s cubic-bezier(.4,0,.2,1); }

/* ── Tablas ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
table.data th, table.data td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 750; background: var(--surface-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }

/* ── Teléfono de vista previa ──────────────────────────── */
.phone {
  --phone-w: 320px;
  width: var(--phone-w);
  aspect-ratio: 320 / 660;
  background: #0B0B12;
  border-radius: 42px;
  padding: 10px;
  box-shadow: var(--sh-lg), 0 0 0 1px rgba(255,255,255,.06) inset;
  position: relative;
  flex: none;
}
.phone::before {
  content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 22px; background: #0B0B12; border-radius: var(--r-full); z-index: 2;
}
.phone-screen { width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: #fff; position: relative; }
.phone-screen iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
/* En la landing el teléfono es un escaparate, no un control: se mira, no se toca. */
.hero-stage .phone-screen iframe,
.solution-visual .phone-screen iframe { pointer-events: none; }

/* ── Escalera de secciones (marketing/app) ─────────────── */
.grid { display: grid; gap: 1.2rem; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
  color: var(--v-violet-600);
}

/* ── Accesibilidad ─────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 999;
  background: var(--v-ink); color: #fff; padding: .6rem 1rem; border-radius: var(--r);
}
.skip-link:focus { left: 12px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── Marca VORVEX (compartida por landing, panel y admin) ── */
.logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--v-violet), #8B5CF6 55%, var(--v-mint));
  display: grid; place-items: center; color: #fff; font-size: .82rem; font-weight: 800;
  box-shadow: 0 4px 14px rgba(91, 52, 245, .35);
}
.logo small { font-weight: 600; color: var(--text-3); font-size: .8rem; letter-spacing: 0; }
.checks li { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; color: var(--text-2); }
.checks li::before {
  content: '✓'; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--v-violet-100); color: var(--v-violet-600);
  display: grid; place-items: center; font-size: .7rem; font-weight: 800; margin-top: .15rem;
}
.tagcloud { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.tagcloud span { padding: .32rem .7rem; border-radius: var(--r-full); background: var(--surface-2); font-size: .8rem; font-weight: 600; color: var(--text-2); }
.checks { display: grid; gap: .5rem; }
