:root {
  --color-bg: #0f1115;
  --color-surface: #161a22;
  --color-surface-alt: #1e2330;
  --color-border: #2a2f3d;
  --color-text: #f2f3f5;
  --color-text-muted: #a3a9b7;
  --color-primary: #6c5ce7;
  --color-primary-hover: #7d6ff2;
  --color-accent: #00d1b2;
  --color-danger: #ff6b6b;
  --radius: 10px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand span { color: var(--color-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links a.nav-link {
  color: var(--color-text-muted);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-weight: 500;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    opacity 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.96); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 0 rgba(108, 92, 231, 0);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 6px 16px rgba(108, 92, 231, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.wa-btn:hover { box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4); }

.btn-block { width: 100%; }

.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

.btn-disabled {
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
.btn-disabled:hover { transform: none; box-shadow: none; }

.btn-loading {
  cursor: wait;
  opacity: 0.85;
  transform: none !important;
}
.btn-loading:hover { transform: none; box-shadow: none; }

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  flex-shrink: 0;
}

.btn-outline .btn-spinner {
  border: 2px solid rgba(242, 243, 245, 0.3);
  border-top-color: var(--color-text);
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Hero / Landing ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(10,11,15,0.55) 0%, rgba(10,11,15,0.85) 100%),
    url("https://images.unsplash.com/photo-1521737604893-d14cc237f11d?w=1600&q=80") center/cover no-repeat;
}

.hero-content { max-width: 640px; }

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 16px;
  font-weight: 800;
}

.hero h1 .highlight { color: var(--color-accent); }

.hero p {
  color: #dcdfe6;
  font-size: 1.15rem;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Hero del panel: fondo oscuro liso + formas flotantes animadas ---------- */
.hero-dashboard {
  background: var(--color-bg);
  overflow: hidden;
}

.hero-dashboard .hero-content { position: relative; z-index: 1; }

.hero-dashboard .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.hero-dashboard .blob-1 {
  width: 320px;
  height: 320px;
  background: var(--color-primary);
  top: -100px;
  left: -60px;
  animation: blob-float-1 16s ease-in-out infinite alternate;
}

.hero-dashboard .blob-2 {
  width: 280px;
  height: 280px;
  background: var(--color-accent);
  bottom: -120px;
  right: -40px;
  animation: blob-float-2 20s ease-in-out infinite alternate;
}

.hero-dashboard .blob-3 {
  width: 200px;
  height: 200px;
  background: var(--color-primary-hover);
  top: 30%;
  right: 18%;
  animation: blob-float-3 12s ease-in-out infinite alternate;
}

@keyframes blob-float-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(70px, 50px) scale(1.15); }
}

@keyframes blob-float-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, -40px) scale(1.1); }
}

@keyframes blob-float-3 {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-50px, 35px) rotate(45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-dashboard .blob { animation: none; }
}

.features {
  padding: 80px 0;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.feature-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.feature-card h3 { margin: 0 0 8px; }
.feature-card p { color: var(--color-text-muted); margin: 0; }

/* ---------- Auth forms ---------- */
.auth-wrapper {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px;
}

.auth-card h1 { margin-top: 0; font-size: 1.6rem; }
.auth-card .subtitle { color: var(--color-text-muted); margin-bottom: 24px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: var(--color-text-muted); }

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row > div:first-child { flex: 0 0 150px; }
.form-row > div:last-child { flex: 1; }

.form-error {
  background: rgba(255, 107, 107, 0.12);
  color: var(--color-danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: none;
}

.auth-switch { margin-top: 20px; text-align: center; color: var(--color-text-muted); font-size: 0.9rem; }
.auth-switch a { color: var(--color-primary); font-weight: 600; }

.notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 20px;
}
.notice-warning { background: rgba(255, 193, 7, 0.12); color: #ffc107; }
.notice-danger { background: rgba(255, 107, 107, 0.12); color: var(--color-danger); }

/* ---------- Cartel superior (aviso de compatibilidad) ---------- */
.top-banner {
  background: rgba(255, 193, 7, 0.1);
  border-bottom: 1px solid rgba(255, 193, 7, 0.25);
}
.top-banner .container {
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: #ffc107;
}

/* ---------- Dashboard ---------- */
.dashboard-hero {
  padding: 40px 0 8px;
}

.welcome-block {
  background: var(--color-surface);
  border: 1px dashed var(--color-primary);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.welcome-block h1 { margin: 0 0 10px; font-size: 1.6rem; }
.welcome-block p { color: var(--color-text-muted); margin: 0; }

.category-block { margin-bottom: 48px; }
.category-block h2 { font-size: 1.4rem; margin-bottom: 4px; }
.category-block .cat-desc { color: var(--color-text-muted); margin: 0 0 20px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.product-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-body h3 { margin: 0; font-size: 1.05rem; }
.product-body p { margin: 0; color: var(--color-text-muted); font-size: 0.88rem; flex: 1; }

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-price { font-weight: 700; font-size: 1.05rem; color: var(--color-accent); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 60px 0;
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
}

.contact-card .icon { font-size: 2.4rem; margin-bottom: 12px; }
.contact-card h2 { margin: 0 0 10px; }
.contact-card p { color: var(--color-text-muted); margin-bottom: 24px; }

.contact-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.contact-card.web { border-color: #4f8cff55; }

.badge {
  display: inline-block;
  background: rgba(0, 209, 178, 0.12);
  color: var(--color-accent);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}
.check-list li {
  padding: 4px 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.check-list li::before {
  content: "✓ ";
  color: var(--color-accent);
  font-weight: 700;
}

.wa-btn {
  background: #25d366;
  color: #06301b;
}
.wa-btn:hover { background: #2ee477; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Responsive (celulares) ---------- */
@media (max-width: 720px) {
  .container { padding: 0 16px; }

  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    row-gap: 8px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    justify-content: flex-start;
  }
  .nav-links a.nav-link { padding: 6px 8px; font-size: 0.82rem; }

  .auth-wrapper { min-height: auto; padding: 32px 16px; }
  .auth-card { padding: 24px; }

  .hero { min-height: 70vh; }
  .hero-content { max-width: 100%; }

  .features { padding: 56px 0; }
  .features h2 { font-size: 1.6rem; margin-bottom: 32px; }

  .feature-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; padding: 40px 0; }
  .contact-card { padding: 24px; }

  .welcome-block { padding: 18px 20px; }

  table { font-size: 0.82rem; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 1.8rem; }
  .brand { font-size: 1.1rem; }
}
