:root {
  --ink: #1a1414;
  --bg: #faf7f6;
  --card: #ffffff;
  --accent: #D72638;
  --accent-dark: #b81e2e;
  --accent-bright: #FD3535;
  --muted: #837878;
  --border: #ede4e3;
  --grad-1: #FB4D2A;
  --grad-2: #F72218;
  --grad-3: #F85C7B;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--ink);
  color: white;
}
.topbar .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.topbar .brand img { height: 26px; display: block; }
.topbar nav a {
  color: white;
  text-decoration: none;
  margin-left: 16px;
  opacity: 0.85;
}
.topbar nav a:hover { opacity: 1; }
.muted { color: var(--muted); font-size: 0.9rem; }
main { max-width: 720px; margin: 0 auto; padding: 40px 20px; }
.hero {
  text-align: left;
  padding: 90px 60px;
  border-radius: 20px;
  background: #fff url('/img/hero-illustration.svg') no-repeat center right;
  background-size: cover;
  border: 1px solid var(--border);
  color: var(--ink);
}
.hero img.hero-logo { height: 30px; margin-bottom: 28px; }
.hero h1 { font-size: 3rem; margin: 0 0 12px; max-width: 480px; }
.hero p { color: var(--muted); max-width: 420px; font-size: 1.05rem; }
.hero .btn-outline { color: var(--ink); border-color: var(--border); }
@media (max-width: 640px) {
  .hero { text-align: center; padding: 50px 24px; background-position: center bottom; }
  .hero h1, .hero p { max-width: none; }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.product h3 { margin-top: 0; }
label { display: block; margin-bottom: 16px; font-weight: 600; font-size: 0.9rem; }
input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 400;
}
input:focus { outline: 2px solid var(--accent-bright); border-color: transparent; }
code {
  background: #f6efee;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  word-break: break-all;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--accent-dark); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  margin-left: 8px;
}
.error { color: #c0392b; font-weight: 600; }
.pwd-row { display: flex; gap: 8px; align-items: stretch; }
.pwd-row input { flex: 1; margin-top: 0; }
.pwd-toggle {
  flex-shrink: 0;
  background: #f6efee;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.pwd-toggle:hover { background: var(--border); }
.small { font-size: 0.78rem; }
.admin-link { opacity: 0.55; font-size: 0.85rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 0.9rem;
}
.admin-row-form { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-row-form input {
  width: auto;
  flex: 1 1 140px;
  margin-top: 0;
  padding: 6px 8px;
  font-size: 0.85rem;
}
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.tips-list { margin: 0; padding-left: 22px; }
.tips-list li { margin-bottom: 12px; line-height: 1.5; }
.tips-list li::marker { color: var(--accent); font-weight: 700; }
.tips-list a { color: var(--accent); font-weight: 600; }

/* ---- Landing / home: ancho completo, sin topbar, degradado edge-to-edge ---- */
body:has(.landing-hero) { margin: 0; }
.landing-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
}
.landing-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px circle at 8% 15%, rgba(251,77,42,0.08), transparent 58%),
    radial-gradient(700px circle at 0% 65%, rgba(248,92,123,0.07), transparent 55%),
    radial-gradient(600px circle at 30% 100%, rgba(215,38,56,0.04), transparent 60%);
}
.landing-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 60px 70px;
  display: flex;
  align-items: center;
  gap: 70px;
}
.landing-logo { display: inline-block; margin-bottom: 40px; }
.landing-logo img { height: 24px; display: block; }
.landing-text { flex: 1 1 400px; }
.landing-text h1 {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--ink);
}
.landing-text p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 460px;
  margin: 0 0 34px;
  line-height: 1.55;
}
.landing-visual { flex: 1 1 480px; display: flex; justify-content: center; position: relative; }
.landing-visual-blob {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-1), var(--grad-3));
  opacity: 0.25;
  filter: blur(10px);
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.landing-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(215,38,56,0.18);
}

/* ---- formas decorativas flotantes ---- */
.deco { position: absolute; pointer-events: none; z-index: 1; }
.deco-sparkle-1 { width: 26px; height: 26px; top: 14%; left: 46%; fill: var(--accent-bright); opacity: 0.8; }
.deco-sparkle-2 { width: 16px; height: 16px; top: 68%; left: 40%; fill: var(--grad-3); opacity: 0.7; }
.deco-dot-1 { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); top: 22%; left: 38%; opacity: 0.6; }
.deco-dot-2 { width: 8px; height: 8px; border-radius: 50%; background: var(--grad-1); top: 78%; right: 4%; opacity: 0.7; }
.deco-ring { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--accent); top: 10%; right: 8%; opacity: 0.35; }

@media (max-width: 900px) {
  .deco { display: none; }
}

.btn-pill {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  background: var(--accent);
  color: white;
  margin-right: 14px;
}
.btn-pill:hover { background: var(--accent-dark); }
.btn-pill-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}

@media (max-width: 900px) {
  .landing-hero-inner { flex-direction: column-reverse; text-align: center; gap: 36px; padding: 32px 24px 48px; }
  .landing-logo { margin-bottom: 24px; }
  .landing-text h1 { font-size: 2.5rem; }
  .landing-text p { margin-left: auto; margin-right: auto; }
  .landing-visual img { max-width: 320px; }
}

/* ---- Seccion de caracteristicas debajo del hero ---- */
.features {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 40px 80px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  border-top: 1px solid var(--border);
  padding-top: 56px;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FDEDEA;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.feature h3 { font-size: 1.1rem; margin: 0 0 8px; }
.feature p { color: var(--muted); font-size: 0.95rem; line-height: 1.55; margin: 0; }

@media (max-width: 760px) {
  .features { padding: 10px 22px 56px; }
  .features-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .feature-icon { margin-left: auto; margin-right: auto; }
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 40px 20px 56px;
  border-top: 1px solid var(--border);
}
.footer-logo { height: 20px; margin-bottom: 12px; opacity: 0.85; }
.site-footer p { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---- Tips + Social + Soporte, arriba del footer final ---- */
.footer-info {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px 20px;
}
.footer-info-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.footer-info h3 { font-size: 1rem; margin: 0 0 16px; }
.footer-info-side h3:not(:first-child) { margin-top: 28px; }
.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.social-links a:hover { border-color: var(--accent); color: var(--accent); }
.social-links svg { width: 17px; height: 17px; }
.footer-info-side p a { color: var(--accent); font-weight: 600; text-decoration: none; }

@media (max-width: 760px) {
  .footer-info { padding: 0 22px 10px; }
  .footer-info-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---- Pantallas de login / registro estilo split ---- */
.auth-wrap { display: flex; min-height: 100vh; }
.auth-side {
  flex: 1 1 46%;
  background: url('/img/auth-lines.svg') no-repeat center / cover,
              linear-gradient(160deg, var(--grad-1), var(--grad-2) 55%, var(--grad-3));
  color: white;
  padding: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}
.auth-logo { height: 26px; width: auto; }
.auth-side-text { margin-top: 32px; }
.auth-hello { font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; }
.auth-side h1 {
  font-size: 2.1rem;
  margin: 0 0 18px;
  line-height: 1.25;
}
.auth-side h1 .auth-tts { opacity: 0.75; font-size: 0.65em; }
.auth-desc { max-width: 360px; font-size: 0.95rem; color: rgba(255,255,255,0.88); line-height: 1.5; }
.auth-copyright { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin: 0; }

.auth-main {
  flex: 1 1 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 40px 32px;
}
.auth-main-inner { width: 100%; max-width: 380px; }
.auth-main-logo { height: 22px; margin-bottom: 44px; display: block; }
.auth-main-inner h2 { font-size: 1.7rem; margin: 0 0 10px; }
.auth-sub { color: var(--muted); margin: 0 0 28px; font-size: 0.92rem; }
.auth-sub a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-main-inner .btn { width: 100%; text-align: center; margin-top: 4px; }

@media (max-width: 760px) {
  .auth-wrap { flex-direction: column; }
  .auth-side { flex: none; padding: 32px 24px; }
  .auth-desc { max-width: none; }
  .auth-main { padding: 36px 20px; }
  .auth-main-logo { margin-bottom: 28px; }
}
