/* ── Reset & Variables ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #00142F;
  --orange:  #EE7202;
  --sky:     #05B0FF;
  --cream:   #F5F3EF;
  --bluegrey:#EEF0F5;
  --white:   #FFFFFF;
  --dark:    #111827;
  --mid:     #4B5563;
  --light:   #9CA3AF;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.18);

  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

.mono { font-family: 'Roboto Mono', monospace; }

/* ── Logo ──────────────────────────────────────────────────────────────────── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.logo-sq {
  width: 40px; height: 40px;
  background: var(--orange);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 22px; font-weight: 700;
  flex-shrink: 0;
}
.logo-text {
  font-size: 1.25rem; font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem; font-weight: 600;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary   { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #d96500; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--orange); border: 2px solid var(--orange); }
.btn-secondary:hover { background: var(--orange); color: #fff; }
.btn-white     { background: #fff; color: var(--navy); }
.btn-white:hover { background: var(--cream); transform: translateY(-2px); }
.btn-navy      { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #001f4d; }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

/* ── Form elements ──────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.875rem; font-weight: 600;
  color: var(--mid); margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--dark);
  background: #fff;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(5,176,255,.15);
}
.form-group input.input-error { border-color: #ef4444; }
.form-group input.input-ok    { border-color: #22c55e; }

.field-feedback { font-size: 0.8rem; margin-top: 4px; }
.field-feedback.error { color: #ef4444; }
.field-feedback.ok    { color: #22c55e; }

.form-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.form-check input[type="checkbox"] {
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid #D1D5DB; border-radius: 5px;
  cursor: pointer; margin-top: 2px;
  accent-color: var(--orange);
}
.form-check span { font-size: 0.875rem; color: var(--mid); line-height: 1.5; }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* ── Spinner ─────────────────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toasts ──────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--navy); color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  max-width: 340px;
  animation: slideIn .3s ease;
}
.toast.success { background: #166534; }
.toast.error   { background: #991B1B; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-orange { color: var(--orange); }
.text-sky    { color: var(--sky); }
.text-navy   { color: var(--navy); }
.text-muted  { color: var(--light); }
.fw-700 { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.d-none { display: none !important; }
.d-flex { display: flex; }

/* ── Page layout ─────────────────────────────────────────────────────────────── */
.page-wrapper {
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.page-center {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 480px;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
  .auth-card { padding: 32px 24px; border-radius: var(--radius-lg); }
}

/* ── Pricing cards ───────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.pricing-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  border: 2px solid transparent;
  transition: var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-md); border-color: var(--orange); }
.pricing-card.featured {
  border-color: var(--orange);
  box-shadow: var(--shadow-md);
}
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #fff;
  padding: 4px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 700;
}
.price-amount {
  font-family: 'Roboto Mono', monospace;
  font-size: 2.5rem; font-weight: 700; color: var(--navy);
}
.price-period { font-size: 0.9rem; color: var(--light); }
.price-iva { font-size: 0.8rem; color: var(--light); }
.price-features { list-style: none; margin: 20px 0 24px; }
.price-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--cream);
  font-size: 0.9rem; color: var(--mid);
  display: flex; align-items: center; gap: 8px;
}
.price-features li::before { content: '✓'; color: var(--orange); font-weight: 700; }
