/* ════════════════════════════════════════════════════════════
   TuVende.cl — style.css
   Modernizado con identidad regional. Webpay-safe: clases
   .btn, .alert, input, select, textarea, .form-card intactas.
   ════════════════════════════════════════════════════════════ */

/* ── Google Fonts (Sora + DM Sans, igual que index.php) ──── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --primary:       #1a56db;
  --primary-dark:  #0c2461;
  --primary-light: #eff6ff;
  --sky:           #0ea5e9;
  --dark:          #0b1426;
  --bg:            #f4f7fc;
  --surface:       #ffffff;
  --line:          #e2e8f0;
  --text:          #1e293b;
  --muted:         #64748b;
  --success:       #22c55e;
  --success-bg:    #ecfdf5;
  --success-border:#bbf7d0;
  --success-text:  #166534;
  --error:         #ef4444;
  --error-bg:      #fef2f2;
  --error-border:  #fecaca;
  --error-text:    #991b1b;
  --r-xl:          20px;
  --r-lg:          14px;
  --r-md:          10px;
  --sh-card:       0 2px 12px rgba(11,20,38,.06), 0 6px 24px rgba(11,20,38,.07);
  --sh-hover:      0 8px 24px rgba(11,20,38,.10), 0 16px 40px rgba(11,20,38,.11);
}

/* ── Reset base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ── HEADER ──────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(11,20,38,.06);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 16px;
}

/* Logo */
.logo {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--primary);
}

/* Nav links */
nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

nav a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #334155;
  transition: color .15s;
}

nav a:hover {
  color: var(--primary);
}

/* ── BOTONES — Webpay-safe: mismas clases, mejor look ────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--primary), var(--sky));
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s;
  box-shadow: 0 4px 14px rgba(26,86,219,.28);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(26,86,219,.36);
  opacity: .95;
}

.btn:active {
  transform: translateY(0);
}

.btn-outline {
  background: var(--surface);
  color: var(--dark);
  border: 1.5px solid var(--line);
  box-shadow: 0 1px 4px rgba(11,20,38,.06);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 3px 12px rgba(26,86,219,.12);
}

/* Botón verde (para acciones de vendedor) */
.btn-green {
  background: linear-gradient(135deg, #22c55e, #15803d);
  box-shadow: 0 4px 14px rgba(22,163,74,.28);
}

.btn-green:hover {
  box-shadow: 0 7px 20px rgba(22,163,74,.36);
}

/* ── FORMULARIOS — Webpay-safe ───────────────────────────── */
label {
  display: block;
  margin: 14px 0 7px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--dark);
}

input,
textarea,
select {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--r-lg);
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  color: var(--text);
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}

.full {
  width: 100%;
  margin-top: 18px;
}

/* Form card — usada en registro, login, pago */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--sh-card);
}

.form-card h1 {
  margin-top: 0;
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
}

/* ── ALERTAS — Webpay-safe (mismo HTML, mejor look) ─────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--r-lg);
  margin: 14px 0;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
}

.alert.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.alert.error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--sh-card);
  transition: transform .22s ease, box-shadow .22s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-hover);
}

.card.dark {
  background: #06132b;
  color: #fff;
  border: none;
}

.card.dark h3,
.card.dark li {
  color: #fff;
}

/* ── STATS ───────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.stats div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow: var(--sh-card);
  text-align: center;
}

.stats strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
}

.stats span {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

/* ── PILLS ───────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
}

/* ── HERO (usado en pages secundarias) ───────────────────── */
.hero {
  padding: 56px 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--sky) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 28px;
  align-items: center;
}

.hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  margin: 14px 0 18px;
  color: #fff;
  letter-spacing: -1px;
}

.hero p {
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255,255,255,.80);
  max-width: 600px;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ── SECCIONES ───────────────────────────────────────────── */
.section {
  padding: 56px 0;
}

.section.alt {
  background: #eef5ff;
}

/* ── GRIDS ───────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 18px;
}

.cards-4 {
  grid-template-columns: repeat(4, 1fr);
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.narrow {
  width: min(720px, 92%);
  margin: 0 auto;
}

/* ── CHECKLIST ───────────────────────────────────────────── */
.checklist {
  padding-left: 18px;
  line-height: 2;
}

/* ── TABLA ───────────────────────────────────────────────── */
.table-wrap {
  overflow: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #f8fafc;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #fafbff;
}

/* ── UTILIDADES ──────────────────────────────────────────── */
.muted      { color: var(--muted); }
.top-space  { margin-top: 20px; }
.between    { justify-content: space-between; align-items: center; }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  margin-top: 48px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner a {
  color: var(--muted);
  transition: color .15s;
}

.footer-inner a:hover {
  color: var(--primary);
}

/* Firma Damemo */
.footer-inner strong {
  color: var(--primary);
}

/* ── EFECTO VIDRIO (tv-stat) — sin cambios ───────────────── */
.tv-stat {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── SECCIÓN VENDEDORES — nueva identidad comercial ──────── */
.tv-vendedores-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--r-xl);
  padding: 28px 32px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.tv-vendedores-banner h3 {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.tv-vendedores-banner p {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin: 0;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid,
  .cards-4,
  .cards-3,
  .stats {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .logo {
    font-size: 22px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .tv-vendedores-banner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .form-card {
    padding: 20px 16px;
  }

  .card {
    padding: 18px;
  }

  .btn {
    font-size: 13px;
    padding: 11px 18px;
  }

  .stats strong {
    font-size: 22px;
  }
}