*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --purple-border: #ddd6fe;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --bg: #f9fafb;
  --surface: #ffffff;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.12);
  --green-bg: #EAF3DE;
  --green-text: #3B6D11;
  --green-border: #C0DD97;
  --amber-bg: #FAEEDA;
  --amber-text: #854F0B;
  --amber-border: #FAC775;
  --radius-md: 8px;
  --radius-lg: 12px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* NAV */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 15px;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  transition: background 0.15s;
  display: inline-block;
}

.btn-outline:hover {
  background: var(--bg);
}

.btn-pill {
  background: var(--purple);
  color: white !important;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-block;
}

.btn-pill:hover {
  background: #6d28d9;
}

/* HERO */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--purple-light);
  color: var(--purple);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--purple-border);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  display: inline-block;
}

.hero h1 {
  font-size: clamp(1.75rem, 6vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 1rem 0;
}

.hero h1 strong {
  font-weight: 500;
  color: var(--purple);
}

.hero p {
  font-size: clamp(0.95rem, 2vw, 1rem);
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.5rem;
}

.btn-lg {
  padding: 10px 24px;
  font-size: 14px;
}

/* PREVIEW MOCKUP */
.preview-wrap {
  max-width: 100%;
  width: clamp(300px, 90vw, 620px);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.preview-titlebar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.wb-r {
  background: #f09595;
}

.wb-y {
  background: #EF9F27;
}

.wb-g {
  background: #97C459;
}

.preview-titlebar .title-text {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-left: auto;
}

.preview-body {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
}

.table-chip {
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  border: 1px solid transparent;
}

.table-chip .tnum {
  font-size: 18px;
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.table-chip .tlabel {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.t-libre {
  background: var(--green-bg);
  color: var(--green-text);
  border-color: var(--green-border);
}

.t-ocupada {
  background: var(--purple-light);
  color: var(--purple);
  border-color: var(--purple-border);
}

.t-reservada {
  background: var(--amber-bg);
  color: var(--amber-text);
  border-color: var(--amber-border);
}

.t-inactiva {
  background: var(--bg);
  color: var(--text-tertiary);
  border-color: var(--border);
}

/* METRICS */
.metrics-row {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}

.metrics-inner {
  max-width: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.metric {
  padding: 1.5rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.metric:last-child {
  border-right: none;
}

.metric-val {
  font-size: clamp(1.5rem, 4vw, 1.75rem);
  font-weight: 500;
  color: var(--purple);
}

.metric-lbl {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* FEATURES */
.features-section {
  padding: 3.5rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.section-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-heading {
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.features-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-row {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.feature-row:last-child {
  border-bottom: none;
}

.feature-row:hover {
  background: var(--bg);
}

.feat-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--purple-light);
  border: 1px solid var(--purple-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feat-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--purple);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feat-text h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 3px;
}

.feat-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* PAYMENTS */
.payments-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem;
}

.payments-inner {
  max-width: 720px;
  margin: 0 auto;
}

.pay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
}

.pay-chip {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
}

.pay-chip.active {
  background: var(--purple-light);
  color: var(--purple);
  border-color: var(--purple-border);
}

/* CTA */
.cta-section {
  padding: 3rem 1.5rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: clamp(1.5rem, 5vw, 1.75rem);
  font-weight: 400;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.cta-section p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.cta-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* FOOTER */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-tertiary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* AUTH PAGES */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 2rem;
  background: var(--surface);
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.auth-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-form {
  width: 100%;
  margin: 1.5rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--surface);
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 1.25rem 0 1.75rem;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--purple);
}

.form-checkbox label {
  cursor: pointer;
}

.btn-block {
  width: 100%;
  display: block;
}

.alert {
  padding: 1rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
}

.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-error .alert-icon {
  stroke: #991b1b;
  fill: none;
}

.alert-success {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid var(--green-border);
}

.alert-success .alert-icon {
  stroke: var(--green-text);
  fill: none;
}

.auth-divider {
  position: relative;
  margin: 1.5rem 0;
  text-align: center;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  position: relative;
  background: var(--surface);
  padding: 0 12px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.auth-footer {
  text-align: center;
  font-size: 14px;
  margin-top: 1.5rem;
}

.auth-footer p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

.link-primary {
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.link-primary:hover {
  color: #6d28d9;
}

.link-secondary {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s;
}

.link-secondary:hover {
  color: var(--text-secondary);
}

.auth-side {
  display: none;
}

.auth-side-content {
  display: none;
}

.auth-side h2 {
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.auth-features {
  list-style: none;
  padding: 0;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1rem;
  font-size: 14px;
  line-height: 1.5;
}

.feature-check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: white;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* RESPONSIVE TABLET */
@media (max-width: 1024px) {
  nav {
    padding: 0 1rem;
  }

  .metrics-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric:nth-child(2) {
    border-right: none;
  }

  .metric:nth-child(3) {
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  .metric:nth-child(4) {
    border-top: 1px solid var(--border);
  }

  .auth-container {
    min-height: auto;
  }

  .auth-box {
    padding: 2rem 1.5rem;
  }
}

/* RESPONSIVE MÓVIL */
@media (max-width: 768px) {
  nav {
    padding: 0 1rem;
    height: 56px;
  }

  .nav-links {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.75rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 0;
  }

  .nav-links.active {
    max-height: 300px;
  }

  .nav-links a {
    padding: 0.75rem 0;
    display: block;
    font-size: 14px;
  }

  .hero {
    padding: 2.5rem 1rem;
  }

  .preview-body {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-ctas,
  .cta-btns {
    flex-direction: column;
    gap: 8px;
  }

  .btn-lg {
    width: 100%;
  }

  .features-list {
    border: none;
    border-top: 1px solid var(--border);
  }

  .feature-row {
    padding: 1rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .metrics-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .auth-container {
    padding: 1.5rem 1rem;
  }

  .auth-box {
    padding: 1.75rem 1.25rem;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }
}

/* RESPONSIVE PEQUEÑO */
@media (max-width: 480px) {
  nav {
    padding: 0 0.75rem;
  }

  .logo-text {
    display: none;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
    margin: 0.75rem 0;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .section-heading {
    font-size: 1.25rem;
  }

  .preview-titlebar .title-text {
    display: none;
  }

  .table-chip .tnum {
    font-size: 16px;
  }

  .table-chip .tlabel {
    font-size: 9px;
  }

  .cta-section {
    padding: 2rem 1rem;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }

  .features-section {
    padding: 2.5rem 1rem;
  }

  .pay-chips {
    gap: 6px;
  }

  .pay-chip {
    font-size: 12px;
    padding: 5px 12px;
  }

  footer {
    padding: 1rem;
  }

  .footer-copy {
    width: 100%;
  }
}