/* ═══════════════════════════════════════════════════════════
   MLC Consorcios — Design System v2
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  --bg:         #f0f4f9;
  --surface:    #ffffff;
  --text:       #0d1f3c;
  --muted:      #64748b;
  --line:       #e2e8f0;
  --blue:       #1268ff;
  --blue-lt:    #eff4ff;
  --navy:       #0d1f3c;
  --navy2:      #162d52;
  --green:      #10b981;
  --red:        #ef4444;
  --amber:      #f59e0b;
  --purple:     #7c3aed;
  --cyan:       #06b6d4;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 20px rgba(13,31,60,.09);
  --shadow-lg:  0 12px 48px rgba(13,31,60,.14);
  --shadow-blue:0 4px 16px rgba(18,104,255,.28);
  --radius:     16px;
  --radius-sm:  10px;
  --sidebar-w:  256px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-size: 15px;
}
a   { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── Utilities ───────────────────────────────────────────── */
.muted     { color: var(--muted); }
.text-blue { color: var(--blue); }
.small     { font-size: 12px; }
.full      { width: 100%; }

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px;
  border: 0; border-radius: var(--radius-sm);
  background: var(--blue); color: #fff;
  font: 600 13.5px/1 inherit;
  cursor: pointer; white-space: nowrap;
  transition: background .14s, transform .12s, box-shadow .14s;
  box-shadow: 0 1px 3px rgba(18,104,255,.22);
}
.btn:hover, button:hover {
  background: #0c54d4;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(18,104,255,.28);
}
.btn.secondary {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.btn.secondary:hover { background: #f8fafc; box-shadow: var(--shadow-sm); }
.btn.green  { background: var(--green);  box-shadow: 0 1px 3px rgba(16,185,129,.22); }
.btn.green:hover  { background: #059669; box-shadow: 0 5px 14px rgba(16,185,129,.28); }
.btn.danger { background: var(--red);    box-shadow: 0 1px 3px rgba(239,68,68,.22); }
.btn.danger:hover { background: #dc2626; box-shadow: 0 5px 14px rgba(239,68,68,.28); }

/* ════════════════════════════════════════════════════════════
   ALERTS & BADGES
   ════════════════════════════════════════════════════════════ */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500;
  margin: 0 0 20px; border: 1px solid transparent;
}
.alert.ok    { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font: 600 11.5px/1.4 inherit;
  background: var(--blue-lt); color: var(--blue);
  white-space: nowrap;
}
.badge.ok     { background: #d1fae5; color: #065f46; }
.badge.warn   { background: #fef3c7; color: #92400e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.purple { background: #ede9fe; color: #5b21b6; }

/* ════════════════════════════════════════════════════════════
   APP SHELL — SIDEBAR + CONTENT
   ════════════════════════════════════════════════════════════ */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: rgba(255,255,255,.7);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.06) transparent;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sidebar-logo {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), #05c46b);
  display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: -.02em;
}
.sidebar-brand-name { font-size: 13.5px; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar-brand-sub  { font-size: 10.5px; color: rgba(255,255,255,.38); }

.sidebar-nav { flex: 1; padding: 14px 10px; }
.nav-section { margin-bottom: 22px; }
.nav-label {
  display: block;
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.22); padding: 0 10px; margin-bottom: 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  color: rgba(255,255,255,.58); font-size: 13px; font-weight: 500;
  margin-bottom: 1px; transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.nav-item.active {
  background: rgba(18,104,255,.28); color: #fff; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--blue);
}
.nav-ico { width: 17px; height: 17px; opacity: .65; flex-shrink: 0; }
.nav-item:hover .nav-ico, .nav-item.active .nav-ico { opacity: 1; }

.sidebar-footer {
  padding: 12px 12px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #1268ff, #7c3aed);
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 700; letter-spacing: -.02em;
}
.user-name { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; }
.user-role { font-size: 10.5px; color: rgba(255,255,255,.38); text-transform: capitalize; }
.btn-logout {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 9px 12px; border-radius: 9px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.6); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .12s, color .12s;
  text-decoration: none;
}
.btn-logout:hover { background: rgba(255,255,255,.12); color: #fff; transform: none; box-shadow: none; }

/* ── Main content ────────────────────────────────────────── */
.content { flex: 1; min-width: 0; padding: 28px 30px; }

/* ── Page header ─────────────────────────────────────────── */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 24px;
}
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 4px;
}
.h1, h1 {
  font-size: 26px; line-height: 1.1; margin: 0 0 4px;
  font-weight: 800; letter-spacing: -.035em; color: var(--text);
}
.page-head p.muted { font-size: 13.5px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ════════════════════════════════════════════════════════════
   CARDS & GRID
   ════════════════════════════════════════════════════════════ */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.card > h2 {
  font-size: 15px; font-weight: 700;
  letter-spacing: -.02em; margin-bottom: 18px;
  color: var(--text);
}

/* Grid column helpers */
.kpi   { grid-column: span 3; }
.half  { grid-column: span 6; }
.third { grid-column: span 4; }
.panel { grid-column: span 12; }

/* KPI cards — colored top accent per position */
.kpi {
  border-top: 3px solid var(--blue);
  position: relative; overflow: hidden;
}
.kpi:nth-child(2) { border-top-color: var(--amber); }
.kpi:nth-child(3) { border-top-color: var(--green); }
.kpi:nth-child(4) { border-top-color: var(--purple); }
.kpi:nth-child(5) { border-top-color: var(--cyan); }
.kpi:nth-child(6) { border-top-color: var(--red); }

.kpi::after {
  content: "";
  position: absolute; width: 90px; height: 90px; border-radius: 50%;
  right: -30px; top: -30px;
  background: rgba(18,104,255,.05);
  pointer-events: none;
}
.kpi:nth-child(2)::after { background: rgba(245,158,11,.06); }
.kpi:nth-child(3)::after { background: rgba(16,185,129,.06); }
.kpi:nth-child(4)::after { background: rgba(124,58,237,.06); }
.kpi:nth-child(5)::after { background: rgba(6,182,212,.06); }
.kpi:nth-child(6)::after { background: rgba(239,68,68,.06); }

.kpi .n {
  font-size: 27px; font-weight: 800;
  letter-spacing: -.045em; line-height: 1; margin-bottom: 5px;
}
.kpi .l {
  font-size: 11px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}

/* ════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════ */
.form { display: grid; grid-template-columns: repeat(12,1fr); gap: 14px; }
.field      { grid-column: span 6; }
.field.full { grid-column: span 12; }

label {
  display: block; font-size: 12px; font-weight: 600;
  margin-bottom: 6px; color: #334155;
}
input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font: inherit; font-size: 14px;
  background: #fff; color: var(--text);
  outline: none;
  transition: border-color .14s, box-shadow .14s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18,104,255,.12);
}
textarea { min-height: 100px; resize: vertical; }
input[type=file]     { padding: 7px 10px; background: #f8fafc; cursor: pointer; }
input[type=checkbox] { width: auto; accent-color: var(--blue); cursor: pointer; }

/* ════════════════════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════════════════════ */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
table { width: 100%; border-collapse: collapse; }
th {
  padding: 10px 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
  background: #f8fafc; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap; vertical-align: middle;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover   { background: #f8fafc; }
td .actions, .actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ════════════════════════════════════════════════════════════
   LANDING PAGE (público)
   ════════════════════════════════════════════════════════════ */
.public-nav {
  height: 72px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 6vw;
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.public-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--blue), #05c46b);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 13px;
}
.public-links { display: flex; gap: 24px; color: #344054; font-weight: 600; font-size: 14px; }
.public-links a:hover { color: var(--blue); }

.hero {
  min-height: calc(100vh - 72px); display: grid;
  grid-template-columns: 1fr 1fr; align-items: center;
  gap: 60px; padding: 70px 6vw 90px;
  background: radial-gradient(ellipse 60% 50% at 80% 40%, rgba(18,104,255,.10), transparent), #fff;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(40px, 4.8vw, 72px);
  line-height: .96; letter-spacing: -.065em; margin: 0 0 20px; font-weight: 900;
}
.hero p { font-size: 18px; line-height: 1.6; margin: 0 0 28px; color: #334155; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.trust-pill {
  background: #f0f6ff; border: 1px solid #c7deff;
  border-radius: 999px; padding: 8px 13px;
  font-size: 13px; font-weight: 600; color: #1e3a6e;
}
.hero-visual { position: relative; min-height: 520px; }
.photo-card {
  position: absolute; right: 0; top: 30px;
  width: min(580px, 100%); height: 400px; border-radius: 36px;
  background: linear-gradient(135deg, #dbeafe, #fff);
  box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line);
}
.photo-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.5), transparent),
    url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1200&q=80');
  background-size: cover; background-position: center;
}
.shape { position: absolute; border-radius: 22px; background: var(--blue); opacity: .95; }
.shape.s1 { width: 90px;  height: 200px; right: 56px; top: 0;    background: #05c46b; }
.shape.s2 { width: 100px; height: 190px; right: 0;    top: 100px; }
.shape.s3 { width: 100px; height: 160px; right: 64px; top: 248px; background: #7c3aed; }
.shape.s4 { width: 100px; height: 155px; right: 0;    top: 308px; background: #e83e8c; opacity: .88; }
.wa-pop {
  position: absolute; left: 24px; right: 80px; bottom: 60px;
  background: #fff; border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,.14);
  padding: 16px 18px; display: flex; gap: 14px; align-items: center;
}
.wa-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: #05c46b; color: #fff;
  display: grid; place-items: center; font-size: 22px; flex-shrink: 0;
}
.wa-pop b   { font-size: 14.5px; display: block; margin-bottom: 2px; }
.wa-pop span { font-size: 13px; }

.section     { padding: 80px 6vw; }
.section.alt { background: #f0f4f9; }
.section h2  {
  font-size: clamp(30px, 3.2vw, 52px); line-height: 1.05;
  letter-spacing: -.055em; margin: 0 0 14px; font-weight: 900;
}
.section-lead { font-size: 17px; color: #334155; max-width: 760px; line-height: 1.6; }

.feature-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 18px; margin-top: 32px;
}
.feature-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .16s, box-shadow .16s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue-lt); display: grid; place-items: center;
  font-size: 22px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; margin: 0 0 8px; font-weight: 700; }

/* Stats strip */
.stats-strip {
  display: flex;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: #fff;
}
.stat-item {
  flex: 1; padding: 24px 20px; text-align: center;
  border-right: 1px solid var(--line);
}
.stat-item:last-child { border-right: 0; }
.stat-n { font-size: 32px; font-weight: 900; letter-spacing: -.05em; color: var(--blue); line-height: 1; }
.stat-l { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }

/* How/Steps */
.how-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 0;
  border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); margin-top: 32px;
}
.how-step { padding: 28px 26px; border-right: 1px solid var(--line); }
.how-step:last-child { border-right: 0; }
.step-num {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--blue); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; margin-bottom: 14px;
}
.how-step h3 { font-size: 17px; margin: 0 0 8px; font-weight: 700; }

/* Testimonials */
.testimonial-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 18px; margin-top: 32px;
}
.tcard {
  background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm);
}
.tcard-stars { color: #f59e0b; margin-bottom: 10px; letter-spacing: 2px; font-size: 13px; }
.tcard p     { font-size: 14px; line-height: 1.6; color: #334155; margin: 0 0 14px; }
.tcard-author { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), #05c46b);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
}
.tcard-name { font-weight: 700; font-size: 13px; }
.tcard-role { font-size: 11px; color: var(--muted); }

/* Dark CTA */
.dark-cta {
  background: linear-gradient(135deg, #0d1f3c, #1a3a6e);
  color: #fff; padding: 90px 6vw;
}
.dark-cta h2 {
  font-size: clamp(34px, 3.8vw, 58px); letter-spacing: -.06em;
  line-height: 1; margin: 0 0 16px; font-weight: 900;
}
.dark-cta p { color: #cbd5e1; font-size: 18px; margin-bottom: 28px; }

.cta-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: center; text-align: left;
  max-width: 1060px; margin: 0 auto;
}
.cta-right { display: flex; flex-direction: column; gap: 14px; }
.cta-feature { display: flex; align-items: flex-start; gap: 14px; }
.cta-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  display: grid; place-items: center; font-size: 18px; flex-shrink: 0;
}
.cta-feature p { color: #94a3b8; font-size: 13px; margin: 4px 0 0; }

/* Pricing */
.pricing-section { background: var(--bg); }
.pricing-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 20px; margin-top: 36px; align-items: start;
}
.pricing-card {
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 20px; padding: 28px 24px; box-shadow: var(--shadow-sm);
  transition: transform .16s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pricing-card.featured {
  border-color: var(--blue);
  background: linear-gradient(160deg, #f0f6ff, #fff);
}
.featured-badge {
  display: inline-block; background: var(--blue); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.plan-icon { font-size: 32px; margin-bottom: 12px; display: block; }
.pricing-card h3 { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.plan-price {
  font-size: 40px; font-weight: 900; letter-spacing: -.06em;
  line-height: 1; margin: 14px 0 4px;
}
.plan-price span { font-size: 15px; font-weight: 500; color: var(--muted); vertical-align: middle; }
.plan-desc { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 9px; }
.plan-features li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; }
.plan-features li::before {
  content: "✓"; width: 20px; height: 20px; border-radius: 6px;
  background: #d1fae5; color: #065f46;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.pricing-card.featured .plan-features li::before { background: #dbeafe; color: var(--blue); }
.plan-cta {
  display: block; text-align: center; padding: 12px;
  border-radius: 11px; font-weight: 700; font-size: 14px;
  background: #f1f5f9; color: var(--text); transition: background .14s;
}
.plan-cta:hover { background: #e2e8f0; }
.pricing-card.featured .plan-cta {
  background: var(--blue); color: #fff;
  box-shadow: 0 4px 14px rgba(18,104,255,.3);
}
.pricing-card.featured .plan-cta:hover { background: #0c54d4; }

/* Divider accent */
.divider {
  width: 48px; height: 4px;
  background: linear-gradient(90deg, var(--blue), #05c46b);
  border-radius: 99px; margin: 16px 0 22px;
}

/* Site footer */
.site-footer { background: var(--navy); color: #64748b; padding: 40px 6vw 28px; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 24px; font-size: 13px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }

/* ════════════════════════════════════════════════════════════
   LOGIN / AUTH
   ════════════════════════════════════════════════════════════ */
.login-body  { min-height: 100vh; background: #f0f4f9; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }

.login-visual {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(18,104,255,.5), transparent 50%),
    linear-gradient(135deg, #0d1f3c, #1a3a6e);
  color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 8vw;
}
.login-visual h1 {
  font-size: clamp(36px, 5vw, 62px); line-height: .95;
  letter-spacing: -.07em; margin: 16px 0; font-weight: 900;
}
.login-visual p { font-size: 17px; color: #93c5fd; line-height: 1.6; }

.logo {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), #05c46b);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 14px;
}
.logo.big { width: 52px; height: 52px; border-radius: 16px; font-size: 16px; margin-bottom: 8px; }

.hero-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-pills span {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 600;
}

.login-panel { display: flex; align-items: center; justify-content: center; padding: 36px; }
.auth-card {
  width: min(430px, 100%); background: #fff;
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 32px;
}
.auth-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.03em; }
.auth-card > .muted { font-size: 14px; margin-bottom: 20px; display: block; }
.auth-card label { margin-top: 14px; }
.auth-card input  { margin-top: 5px; }
.auth-card button { width: 100%; margin-top: 18px; padding: 12px; font-size: 15px; font-weight: 700; }

.auth-links {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 16px; font-size: 13px; color: var(--muted);
}
.auth-links a:hover { color: var(--blue); }
.input { margin-bottom: 14px; }

/* ════════════════════════════════════════════════════════════
   PORTAL DEL VECINO
   ════════════════════════════════════════════════════════════ */
.portal-body { background: #f0f4f9; }
.portal-shell { min-height: 100vh; }
.portal-nav {
  height: 64px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; padding: 0 6vw;
}
.portal-content { padding: 28px 6vw; }
.portal-hero {
  background: linear-gradient(135deg, #0d1f3c, #1a3a6e);
  color: #fff; border-radius: 20px; padding: 28px;
  margin-bottom: 22px; box-shadow: var(--shadow);
}
.portal-hero .muted { color: #93c5fd; }
.audit-detail { max-width: 480px; white-space: normal; }
.price { font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.plan-card { position: relative; overflow: hidden; }

/* ════════════════════════════════════════════════════════════
   MOBILE TOPBAR (visible solo en mobile)
   ════════════════════════════════════════════════════════════ */
.mobile-topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  height: 56px;
  background: var(--navy);
  align-items: center; justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hamburger {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  color: rgba(255,255,255,.85);
  transition: background .14s;
  box-shadow: none;
}
.hamburger:hover { background: rgba(255,255,255,.15); transform: none; }
.mobile-brand {
  display: flex; align-items: center; gap: 9px;
  color: #fff; font-size: 14px; font-weight: 700;
}
.mobile-brand .sidebar-logo { width: 30px; height: 30px; font-size: 10px; border-radius: 9px; }
.mobile-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
  flex-shrink: 0; text-decoration: none;
  transition: opacity .14s;
}
.mobile-avatar:hover { opacity: .85; transform: none; }

/* ── Sidebar overlay (drawer backdrop) ─────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 180;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s;
}
.sidebar-overlay.show { opacity: 1; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

/* ── Tablet (1100px) — sidebar colapsa a íconos ─────────────── */
@media (max-width: 1100px) {
  :root { --sidebar-w: 68px; }

  .sidebar-brand-name, .sidebar-brand-sub,
  .nav-item > span:last-child,
  .nav-label,
  .user-name, .user-role { display: none; }

  .sidebar-brand   { justify-content: center; padding: 18px 0; }
  .nav-item        { justify-content: center; padding: 11px; box-shadow: none; }
  .nav-item.active { box-shadow: none; border-left: 3px solid var(--blue); border-radius: 0; }
  .sidebar-user    { justify-content: center; }
  .sidebar-footer  { padding: 10px 6px; }
  .btn-logout span { display: none; }
  .btn-logout      { padding: 9px; justify-content: center; }

  .hero, .login-shell { grid-template-columns: 1fr; }
  .hero-visual   { min-height: 460px; }
  .feature-grid  { grid-template-columns: 1fr 1fr; }
  .public-links  { display: none; }
  .kpi           { grid-column: span 6; }
  .half, .third  { grid-column: span 12; }
  .field         { grid-column: span 12; }
  .pricing-grid, .testimonial-grid, .cta-grid { grid-template-columns: 1fr; }
  .stats-strip   { flex-wrap: wrap; }
  .stat-item     { flex: 1 1 50%; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ── Mobile (<680px) — drawer + hamburger ──────────────────── */
@media (max-width: 680px) {
  /* Mostrar topbar mobile y ocultar el sidebar normal del layout */
  .mobile-topbar  { display: flex; }
  .sidebar-overlay { display: block; pointer-events: none; }
  .sidebar-overlay.show { pointer-events: auto; }

  /* El layout ya no empuja el sidebar — es un drawer flotante */
  .layout  { display: block; padding-top: 56px; min-height: 100vh; }

  /* Sidebar como drawer lateral */
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 280px; height: 100vh; z-index: 190;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4,0,.2,1);
    /* Restaurar texto que se ocultó en 1100px */
  }
  .sidebar.open { transform: translateX(0); }

  /* Restaurar todo lo que se ocultó en 1100px */
  .sidebar-brand-name, .sidebar-brand-sub,
  .nav-item > span:last-child,
  .nav-label,
  .user-name, .user-role { display: block; }

  .sidebar-brand  { justify-content: flex-start; padding: 22px 18px 18px; }
  .nav-item       { justify-content: flex-start; padding: 10px 10px; box-shadow: none; }
  .nav-item.active { border-left: 0; border-radius: 9px; }
  .sidebar-user   { justify-content: flex-start; }
  .sidebar-footer { padding: 12px 12px 16px; display: block; }
  .btn-logout     { padding: 9px 12px; }
  .btn-logout span { display: inline; }

  /* Contenido */
  .content  { padding: 18px 16px; }

  /* KPIs en 2 columnas en mobile */
  .kpi    { grid-column: span 6; }
  .half, .third { grid-column: span 12; }

  /* Touch targets más grandes */
  .btn, button { min-height: 40px; }
  .nav-item    { min-height: 44px; }
  td, th       { padding: 11px 12px; }

  /* Landing */
  .hero          { padding: 40px 18px; grid-template-columns: 1fr; }
  .section       { padding: 52px 18px; }
  .feature-grid  { grid-template-columns: 1fr; }
  .photo-card    { height: 300px; }
  .wa-pop        { left: 10px; right: 10px; bottom: 60px; }
  .public-nav    { padding: 0 16px; }
  .how-grid      { grid-template-columns: 1fr; }
  .how-step      { border-right: 0; border-bottom: 1px solid var(--line); }
  .how-step:last-child { border-bottom: 0; }
  .hero-visual   { min-height: 380px; }

  /* Auth */
  .login-shell   { grid-template-columns: 1fr; }
  .login-visual  { padding: 40px 22px; }
  .auth-card     { padding: 24px 20px; }

  /* Portal */
  .portal-nav     { padding: 0 16px; }
  .portal-content { padding: 20px 16px; }
}
