/* PanBot — CSS mobile-first · Paleta Arena */
:root {
  --verde: #25D366;
  --verde-dark: #128C7E;
  --naranja: #D97706;
  --naranja-light: #F59E0B;
  --naranja-hover: #B45309;
  --bg: #FFFBF0;
  --bg-card: #FFFFFF;
  --bg-card-2: #FFF8E8;
  --bg-sidebar: #FEF3C7;
  --text: #1C1000;
  --text-2: #3D2600;
  --text-muted: #78550A;
  --text-dim: #A07820;
  --border: #FDE68A;
  --border-soft: #FEF3C7;
  --radius: 12px;
  --t: 200ms ease;
  --shadow-card: 0 2px 16px rgba(139,85,10,.10);
  --shadow-hover: 0 12px 40px rgba(139,85,10,.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4 { font-family: 'Sora', sans-serif; font-weight: 700; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── Utilidades ── */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 50px; font-weight: 600; font-size: 15px; cursor: pointer; border: none; transition: all var(--t); }
.btn-verde { background: var(--verde); color: #fff; }
.btn-verde:hover { background: var(--verde-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,.30); }
.btn-naranja { background: var(--naranja); color: #fff; }
.btn-naranja:hover { background: var(--naranja-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(217,119,6,.35); }
.btn-outline { background: transparent; color: var(--text-2); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--naranja); color: var(--naranja); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 600; }
.badge-verde { background: rgba(37,211,102,.12); color: #0D7A3A; }
.badge-naranja { background: rgba(217,119,6,.12); color: var(--naranja-hover); }

/* ── Navbar ── */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(255,251,240,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.navbar-logo { display: flex; align-items: center; gap: 10px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; color: var(--text); }
.logo-icon { width: 32px; height: 32px; background: var(--naranja); border-radius: 8px; display: grid; place-items: center; font-size: 16px; }
.navbar-links { display: none; gap: 32px; }
.navbar-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color var(--t); }
.navbar-links a:hover { color: var(--text); }
.navbar-cta { display: flex; gap: 10px; align-items: center; }

@media (min-width: 768px) {
  .navbar-links { display: flex; }
}

/* ── Hero ── */
.hero { padding: 120px 0 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(217,119,6,.14), transparent 60%); pointer-events: none; }
.hero-badge { margin-bottom: 20px; }
.hero h1 { font-size: clamp(32px, 6vw, 60px); line-height: 1.1; margin-bottom: 24px; color: var(--text); }
.hero h1 span { color: var(--naranja); }
.hero p { font-size: clamp(16px, 2.5vw, 20px); color: var(--text-muted); max-width: 600px; margin: 0 auto 40px; line-height: 1.6; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; justify-content: center; margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); }
.hero-stat { text-align: center; }
.hero-stat .num { font-family: 'Sora', sans-serif; font-size: 32px; font-weight: 700; color: var(--naranja); }
.hero-stat .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Secciones ── */
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 56px; }
.section-title h2 { font-size: clamp(26px, 4vw, 42px); margin-bottom: 16px; color: var(--text); }
.section-title p { color: var(--text-muted); font-size: 17px; max-width: 560px; margin: 0 auto; }

/* ── Problemas ── */
.problems-grid { display: grid; gap: 20px; }
.problem-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; gap: 16px; align-items: flex-start; box-shadow: var(--shadow-card); }
.problem-icon { font-size: 28px; flex-shrink: 0; }
.problem-card h3 { font-size: 16px; margin-bottom: 6px; color: var(--text-2); }
.problem-card p { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

@media (min-width: 768px) {
  .problems-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .problems-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Solución / Features ── */
.features-grid { display: grid; gap: 24px; }
.feature-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; transition: all var(--t); box-shadow: var(--shadow-card); }
.feature-card:hover { border-color: var(--naranja); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--text-2); }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

@media (min-width: 768px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── ROI Calculator ── */
.roi-section { background: var(--bg-card-2); border: 1px solid var(--border); border-radius: 20px; padding: 48px; box-shadow: var(--shadow-card); }
.roi-grid { display: grid; gap: 40px; align-items: center; }
.roi-form { display: flex; flex-direction: column; gap: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.form-group input[type=range] { width: 100%; accent-color: var(--naranja); }
.range-value { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 700; color: var(--naranja); }
.roi-result { background: rgba(37,211,102,.07); border: 1px solid rgba(37,211,102,.25); border-radius: var(--radius); padding: 32px; text-align: center; }
.roi-result .roi-num { font-family: 'Sora', sans-serif; font-size: 48px; font-weight: 700; color: var(--verde-dark); }
.roi-result .roi-label { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.roi-breakdown { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.roi-item { display: flex; justify-content: space-between; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text-2); }
.roi-item:last-child { border: none; font-weight: 600; color: var(--text); }

@media (min-width: 768px) {
  .roi-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Pricing ── */
.pricing-card { background: var(--bg-card); border: 2px solid var(--naranja); border-radius: 20px; padding: 48px; max-width: 480px; margin: 0 auto; text-align: center; box-shadow: 0 8px 40px rgba(217,119,6,.15); }
.pricing-price { font-family: 'Sora', sans-serif; font-size: 56px; font-weight: 700; color: var(--naranja); margin: 24px 0 8px; }
.pricing-price span { font-size: 20px; color: var(--text-muted); }
.pricing-features { text-align: left; margin: 32px 0; display: flex; flex-direction: column; gap: 14px; }
.pricing-feature { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-2); }
.pricing-feature::before { content: '✓'; color: var(--verde-dark); font-weight: 700; flex-shrink: 0; }

/* ── CTA Final ── */
.cta-section { text-align: center; padding: 100px 0; }
.cta-section h2 { font-size: clamp(28px, 5vw, 48px); margin-bottom: 20px; color: var(--text); }
.cta-section p { color: var(--text-muted); font-size: 18px; margin-bottom: 40px; }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 32px 0; text-align: center; color: var(--text-muted); font-size: 13px; background: var(--bg-card-2); }

/* ── Dashboard (Jinja2) ── */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar { width: 240px; background: var(--bg-sidebar); border-right: 1px solid var(--border); padding: 24px 16px; flex-shrink: 0; display: none; flex-direction: column; gap: 4px; }
.dash-sidebar .logo { padding: 8px 12px 24px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); margin-bottom: 12px; color: var(--text); }
.dash-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all var(--t); }
.dash-nav-item:hover { background: rgba(217,119,6,.08); color: var(--text); }
.dash-nav-item.active { background: rgba(217,119,6,.12); color: var(--naranja); border-left: 3px solid var(--naranja); }
.dash-main { flex: 1; overflow-auto; }
.dash-topbar { height: 64px; background: rgba(255,251,240,.92); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.dash-content { padding: 32px 24px; }
.dash-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.dash-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

.kpi-grid { display: grid; gap: 16px; margin-bottom: 32px; }
.kpi-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.kpi-value { font-family: 'Sora', sans-serif; font-size: 32px; font-weight: 700; color: var(--text); }
.kpi-delta { font-size: 13px; margin-top: 4px; }
.kpi-delta.up { color: #0D7A3A; }
.kpi-delta.neutral { color: var(--text-muted); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border-soft); color: var(--text-2); }
.data-table tr:hover td { background: rgba(217,119,6,.04); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.verde { background: var(--verde); }
.status-dot.rojo { background: #EF4444; }
.status-dot.amarillo { background: var(--naranja-light); }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 20px; color: var(--text); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 48px; width: 100%; max-width: 400px; text-align: center; box-shadow: var(--shadow-hover); }
.login-card h1 { font-size: 24px; margin-bottom: 8px; color: var(--text); }
.login-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
.form-input { width: 100%; background: var(--bg-card-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; color: var(--text); font-size: 15px; font-family: inherit; outline: none; transition: border-color var(--t); margin-bottom: 14px; }
.form-input:focus { border-color: var(--naranja); box-shadow: 0 0 0 3px rgba(217,119,6,.12); }
.form-input::placeholder { color: var(--text-dim); }
.error-msg { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.25); border-radius: 8px; padding: 12px; color: #DC2626; font-size: 14px; margin-bottom: 16px; }

@media (min-width: 768px) {
  .dash-sidebar { display: flex; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
