/* ============================================================
   Mi Salud SV — UI estilo panel · Marca oficial
   Sidebar · Inter + Plus Jakarta Sans · azul #2563EB + verde #10B981
   ============================================================ */
:root {
  --c-primary: #2563EB;
  --c-primary-light: #1D4ED8;
  --c-accent: #10B981;
  --c-accent-dark: #059669;
  --c-accent-light: #D1FAE5;
  --c-bg: #F8FAFC;
  --c-surface: #FFFFFF;
  --c-text: #0F172A;
  --c-text-soft: #475569;
  --c-text-muted: #94A3B8;
  --c-border: #E2E8F0;
  --c-border-strong: #CBD5E1;
  --c-success: #10B981;  --c-success-bg: #ECFDF5;
  --c-warning: #B45309;  --c-warning-bg: #FFFBEB;
  --c-danger:  #EF4444;  --c-danger-bg:  #FEF2F2;
  --c-info:    #2563EB;  --c-info-bg:    #DBEAFE;
  --c-purple:  #8B5CF6;  --c-purple-bg:  #F3F0FF;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 4px 12px rgba(15,23,42,.07);
  --shadow-lg: 0 8px 24px rgba(15,23,42,.09);

  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;
  --sidebar-w: 248px; --header-h: 64px;
  --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px; line-height: 1.55; color: var(--c-text); background: var(--c-bg);
  overflow-x: hidden;
}
a { color: var(--c-primary); text-decoration: none; transition: .2s; }
a:hover { color: var(--c-accent-dark); }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

h1,h2,h3 { font-family: var(--font-head); color: var(--c-primary); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: 0 0 .6em; }
.muted { color: var(--c-text-muted); }
.small { font-size: .85rem; }
.text-center { text-align: center; }

/* ============================================================
   LAYOUT — App con sidebar (usuarios autenticados)
   ============================================================ */
.app-body { display: flex; min-height: 100vh; }
.sb-check { position: absolute; opacity: 0; pointer-events: none; }

.sidebar {
  width: var(--sidebar-w); background: var(--c-primary); color: rgba(255,255,255,.85);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 50;
  transition: transform .3s ease;
}
.sidebar-header {
  padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-logo { display: flex; align-items: center; gap: 9px; color: #fff;
  font-family: var(--font-head); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.sidebar-logo:hover { color: #fff; }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--c-accent);
  color: var(--c-primary); display: grid; place-items: center; font-weight: 900; font-size: 20px; flex-shrink: 0; }
.sidebar-logo .sv { color: var(--c-accent); font-size: 12px; vertical-align: super; }
.sidebar-close { display: none; color: rgba(255,255,255,.7); font-size: 22px; line-height: 1; cursor: pointer; }

.sidebar-nav { list-style: none; flex: 1; padding: 14px 0; overflow-y: auto; }
.sidebar-section-title { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.4);
  text-transform: uppercase; letter-spacing: .1em; padding: 14px 22px 6px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 22px;
  color: rgba(255,255,255,.78); font-size: 14px; font-weight: 500;
  border-left: 3px solid transparent; transition: .2s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.09); color: #fff; border-left-color: var(--c-accent); }
.sidebar-nav a .ico { font-size: 17px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-nav a .nav-ico { width: 19px; height: 19px; flex-shrink: 0; opacity: .8; }
.sidebar-nav a:hover .nav-ico, .sidebar-nav a.active .nav-ico { opacity: 1; }

.sidebar-footer { padding: 14px 22px; border-top: 1px solid rgba(255,255,255,.08); margin-top: auto; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sidebar-user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--c-accent);
  color: var(--c-primary); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,.5); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.sidebar-logout { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.65); font-size: 13px; }
.sidebar-logout:hover { color: #fff; }
.sidebar-footer .nav-ico { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }

.sb-overlay { display: none; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: var(--header-h); background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  padding: 0 28px; display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 40;
}
.topbar-toggle { display: none; width: 38px; height: 38px; align-items: center; justify-content: center;
  color: var(--c-text); border-radius: var(--radius-md); font-size: 20px; }
.topbar-toggle:hover { background: var(--c-bg); }
.topbar-title { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--c-primary); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.content { padding: 26px 28px; flex: 1; min-width: 0; width: 100%; max-width: 1100px; }

/* ============================================================
   LAYOUT — Público (marketing) y Auth (login)
   ============================================================ */
.site-header { background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; flex-wrap: wrap;
  max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.brand { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--c-primary);
  display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; }
.brand:hover { color: var(--c-primary); }
.brand .sv { color: var(--c-accent); }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--c-text-soft); font-weight: 500; font-size: .94rem; }
.nav-links a:hover { color: var(--c-primary); }
.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.nav-burger span { width: 22px; height: 2px; background: var(--c-primary); border-radius: 2px; transition: .2s; }
.public-main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 64px; }

@media (max-width: 720px) {
  .nav-burger { display: flex; }
  .nav-links { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .nav-links a, .nav-links .btn { padding: 12px 4px; border-top: 1px solid var(--c-border); }
  .nav-toggle:checked ~ .nav-links { max-height: 420px; padding-bottom: 10px; }
}

.auth-body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; background: linear-gradient(135deg, #2563EB 0%, #1E3A8A 100%); position: relative; overflow: hidden; }
.auth-body::before, .auth-body::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.18) 0%, transparent 70%); pointer-events: none; }
.auth-body::before { top: -260px; right: -160px; }
.auth-body::after { bottom: -260px; left: -160px; }
.auth-brand { position: relative; z-index: 1; color: #fff; font-family: var(--font-head); font-weight: 800;
  font-size: 1.5rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.auth-body .card { width: 100%; max-width: 430px; position: relative; z-index: 1;
  box-shadow: 0 24px 48px rgba(0,0,0,.25); border: none; padding: 34px; }
.auth-body .card-narrow { margin: 0; }

/* ============================================================
   PAGE HEADER & STAT CARDS
   ============================================================ */
.page-header { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 14px; }
.page-title { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--c-primary); letter-spacing: -0.02em; margin: 0 0 3px; }
.page-subtitle { color: var(--c-text-soft); font-size: .95rem; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 18px 20px; transition: .2s; display: block; color: inherit; }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; text-decoration: none; }
.stat-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.stat-card-label { font-size: 12px; color: var(--c-text-soft); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.stat-card-icon { width: 38px; height: 38px; border-radius: var(--radius-md); display: grid; place-items: center; font-size: 18px; }
.si-accent  { background: var(--c-accent-light); color: var(--c-accent-dark); }
.si-info    { background: var(--c-info-bg); color: var(--c-info); }
.si-purple  { background: var(--c-purple-bg); color: var(--c-purple); }
.si-warning { background: var(--c-warning-bg); color: var(--c-warning); }
.stat-card-value { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--c-primary); line-height: 1.1; letter-spacing: -0.02em; }
.stat-card-meta { font-size: 12px; color: var(--c-text-muted); margin-top: 4px; }

/* ============================================================
   CARDS
   ============================================================ */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 22px; }
.card + .card { margin-top: 16px; }
/* Dentro de cuadrículas las tarjetas no llevan margen superior (las alinea a la misma altura) */
.grid > .card + .card,
.stat-grid > .card + .card,
.card-grid-2 > .card + .card,
.testi-grid > .card + .card { margin-top: 0; }
.grid > .card, .grid > .stat-card, .stat-grid > .stat-card { height: 100%; }
.card-narrow { max-width: 440px; margin: 36px auto; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--c-border); margin: 18px 0; border: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: .95rem; }
.dl dt { color: var(--c-text-muted); }
.dl dd { margin: 0; }

.grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3,1fr); } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 17px;
  border-radius: var(--radius-md); font-weight: 600; font-size: .9rem; border: 1px solid transparent;
  white-space: nowrap; transition: .2s; cursor: pointer; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-light); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.btn-ghost { background: #fff; color: var(--c-text); border-color: var(--c-border-strong); }
.btn-ghost:hover { background: var(--c-bg); color: var(--c-primary); border-color: var(--c-primary); }
.btn-danger { background: var(--c-danger-bg); color: var(--c-danger); }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 6px 13px; font-size: .83rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--c-accent-dark); font-weight: 600; cursor: pointer; padding: 4px 0; font-size: .9rem; }

/* ============================================================
   FORMS
   ============================================================ */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--c-text); }
.field .hint { font-weight: 400; color: var(--c-text-muted); font-size: .82rem; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=date], input[type=time], input[type=datetime-local], input[type=number],
select, textarea {
  width: 100%; padding: 10px 14px; font-size: 1rem; color: var(--c-text); font-family: inherit;
  background: #fff; border: 1.5px solid var(--c-border); border-radius: var(--radius-md); transition: .2s;
}
input::placeholder, textarea::placeholder { color: #b9c4d2; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(16,185,129,.12); }
textarea { min-height: 88px; resize: vertical; }
input[type=file] { padding: 8px 12px; font-size: .9rem; max-width: 100%; }
/* iOS/Safari rinde fecha/hora como "píldora" nativa: se encoge, cambia de alto y
   centra el valor. Forzamos que el recuadro se vea igual que los demás campos. */
input[type=date], input[type=time], input[type=datetime-local] {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 46px; text-align: left;
}
input[type=date]::-webkit-date-and-time-value,
input[type=time]::-webkit-date-and-time-value,
input[type=datetime-local]::-webkit-date-and-time-value { text-align: left; }
/* mantener visible el ícono del selector en escritorio (Chrome) */
input[type=date]::-webkit-calendar-picker-indicator,
input[type=time]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator { opacity: .6; }
select { appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6B80' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.row { display: grid; gap: 14px; }
.row > * { min-width: 0; }
@media (min-width: 520px) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: 1fr 1fr 1fr; } }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none;
  cursor: pointer; color: var(--c-text-muted); padding: 6px; display: inline-flex; border-radius: var(--radius-sm); }
.pw-toggle:hover { color: var(--c-primary); background: var(--c-bg); }
.pw-toggle svg { width: 18px; height: 18px; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: auto; }
.check label { margin: 0; font-weight: 400; color: var(--c-text-soft); }
/* Chip seleccionable (radio con forma de pastilla) */
.chip-radio { position: relative; cursor: pointer; }
.chip-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-radio span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1.5px solid var(--c-border); border-radius: 999px; font-size: .9rem; font-weight: 600;
  color: var(--c-text-soft); background: #fff; transition: .15s; }
.chip-radio input:checked + span { border-color: var(--c-accent); background: rgba(16,185,129,.08); color: var(--c-accent-dark); }
.chip-radio input:focus-visible + span { box-shadow: 0 0 0 3px rgba(16,185,129,.18); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; }
.alert-error   { background: var(--c-danger-bg); color: #991b1b; border-color: #fecaca; }
.alert-success { background: var(--c-success-bg); color: #166534; border-color: #bbf7d0; }
.alert-info    { background: var(--c-info-bg); color: #1d4ed8; border-color: #bfdbfe; }

/* ============================================================
   BADGES
   ============================================================ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-blue,  .badge-info    { background: var(--c-info-bg);    color: var(--c-info); }
.badge-green, .badge-success { background: var(--c-success-bg); color: var(--c-success); }
.badge-amber, .badge-warning { background: var(--c-warning-bg); color: var(--c-warning); }
.badge-gray,  .badge-muted   { background: var(--c-bg);         color: var(--c-text-soft); }
.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--c-accent-light); color: var(--c-accent-dark); font-size: .76rem; font-weight: 600; }
.tag-soft { background: var(--c-bg); color: var(--c-text-soft); }

/* ============================================================
   MIEMBROS / AVATAR
   ============================================================ */
.member { display: flex; align-items: center; gap: 14px; }
.avatar { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .95rem; color: #fff; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }

/* ============================================================
   CITAS (lista)
   ============================================================ */
.appt { display: flex; gap: 14px; align-items: flex-start; padding: 15px; border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); background: #fff; transition: .2s; color: inherit; }
a.appt:hover { text-decoration: none; border-color: var(--c-border-strong); box-shadow: var(--shadow-md); }
.appt + .appt { margin-top: 12px; }
.appt-date { flex: 0 0 auto; width: 54px; text-align: center; border-radius: var(--radius-md);
  background: var(--c-accent-light); color: var(--c-accent-dark); padding: 8px 0; line-height: 1.1; }
.appt-date .d { font-size: 1.3rem; font-weight: 800; font-family: var(--font-head); }
.appt-date .m { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.appt-date.past { background: var(--c-bg); color: var(--c-text-soft); }
.appt-body { flex: 1; min-width: 0; }
.appt-body strong { font-size: 1rem; color: var(--c-primary); }
.appt-meta { color: var(--c-text-muted); font-size: .88rem; margin-top: 2px; }

/* ============================================================
   MEDICAMENTOS / FOTOS
   ============================================================ */
.meds { display: flex; flex-direction: column; gap: 10px; }
.med { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; padding: 11px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-md); background: #fcfdfe; }
.med .name { font-weight: 600; color: var(--c-primary); }
.med .detail { color: var(--c-text-soft); font-size: .9rem; }
.med-row { display: grid; gap: 10px; grid-template-columns: 1fr; padding: 14px; border: 1px dashed var(--c-border-strong); border-radius: var(--radius-md); margin-bottom: 10px; position: relative; }
@media (min-width: 600px) { .med-row { grid-template-columns: 2fr 1fr; } }
.med-row .remove { position: absolute; top: 8px; right: 10px; color: var(--c-text-muted); cursor: pointer; font-size: 1.1rem; line-height: 1; background: none; border: none; }
.med-row .remove:hover { color: var(--c-danger); }
.med-sched { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.med-mini { display: flex; flex-direction: column; gap: 4px; font-size: .74rem; font-weight: 600; color: var(--c-text-muted); margin: 0; }
.med-mini select, .med-mini input { font-size: .9rem; padding: 8px 10px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; }
.thumb { display: block; width: 120px; }
.thumb img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--c-border-strong); }
.thumb .cap { font-size: .8rem; color: var(--c-text-muted); margin-top: 4px; text-align: center; }

/* ============================================================
   HERO / LANDING
   ============================================================ */
.hero { padding: 48px 0 12px; }
.hero h1 { font-size: 2.1rem; max-width: 15ch; }
.hero p.lead { font-size: 1.1rem; color: var(--c-text-soft); max-width: 56ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
@media (min-width: 760px) { .hero h1 { font-size: 2.8rem; } }
.feature .ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--c-accent-light); font-size: 1.3rem; }
.feature h3 { margin-top: 14px; }
.feature p { color: var(--c-text-soft); font-size: .94rem; margin: 0; }

/* ============================================================
   TABLES / EMPTY / FOOTER
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 12px 16px; background: var(--c-bg); color: var(--c-text-soft);
  font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--c-border); }
.table tr:last-child td { border-bottom: none; }

.empty { text-align: center; padding: 36px 16px; }
.empty .ico { font-size: 2.2rem; }
.empty p { color: var(--c-text-muted); }

.site-footer { background: #fff; border-top: 1px solid var(--c-border); padding: 26px 0; text-align: center; color: var(--c-text-soft); font-size: .9rem; }
.site-footer p { margin: 2px 0; }

/* ============================================================
   UTILIDADES
   ============================================================ */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 26px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }

/* ============================================================
   RESPONSIVE — sidebar fuera de pantalla en móvil/tablet
   ============================================================ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 32px rgba(0,0,0,.3); }
  .sb-check:checked ~ .sidebar { transform: translateX(0); }
  .sb-check:checked ~ .sb-overlay { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 45; }
  .sidebar-close { display: block; }
  .main { margin-left: 0; }
  .topbar-toggle { display: inline-flex; }
  .content { padding: 20px; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   IMPRESIÓN (historial PDF / imprimir)
   ============================================================ */
@media print {
  .sidebar, .topbar, .sb-overlay, .site-header, .site-footer, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; max-width: 100%; }
  body { background: #fff; font-size: 12px; }
  .card { border: 1px solid #ccc; box-shadow: none; }
}

/* ============================================================
   LANDING (index público)
   ============================================================ */
.btn-lg { padding: 13px 24px; font-size: 1rem; }
.center { text-align: center; }
.section-lg { padding: 40px 0; }

.hero-wrap { display: grid; gap: 36px; align-items: center; padding: 28px 0 8px; }
@media (min-width: 900px) { .hero-wrap { grid-template-columns: 1.05fr .95fr; padding: 52px 0 24px; } }
.hero-text h1 { font-size: 2.2rem; line-height: 1.08; margin: 16px 0 14px; }
@media (min-width: 900px) { .hero-text h1 { font-size: 3rem; } }
.hero-text .lead { font-size: 1.12rem; color: var(--c-text-soft); max-width: 52ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.trust { display: flex; gap: 30px; margin-top: 30px; flex-wrap: wrap; }
.trust .num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--c-primary); line-height: 1; }
.trust .lbl { font-size: .82rem; color: var(--c-text-muted); margin-top: 2px; }

.hero-visual { position: relative; }
.preview { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 18px; }
.preview-head { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; color: var(--c-text-muted); font-size: .78rem; }
.preview-head .dot { width: 10px; height: 10px; border-radius: 50%; }

.steps { counter-reset: step; }
.step .n { width: 42px; height: 42px; border-radius: 12px; background: var(--c-primary); color: #fff;
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; }
.step h3 { margin: 14px 0 5px; }
.step p { color: var(--c-text-soft); font-size: .94rem; margin: 0; }
@media (min-width: 760px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.band { background: linear-gradient(135deg, #2563EB, #1E3A8A); color: #fff; border-radius: var(--radius-xl);
  padding: 38px; position: relative; overflow: hidden; }
.band::after { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.18) 0%, transparent 70%); top: -160px; right: -120px; pointer-events: none; }
.band h2 { color: #fff; position: relative; }
.band p { color: rgba(255,255,255,.78); position: relative; }
.band .tag { background: rgba(16,185,129,.2); color: #6EE7B7; }
.band .btn-light { background: #fff; color: var(--c-primary); }
.band .btn-light:hover { background: #eef2f7; color: var(--c-primary); }

.doc-card { display: block; color: inherit; }
.doc-card:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.doc-card .badge { margin-top: 10px; }

/* ===== Navbar público (estilo merka) ===== */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--c-border); }
.nav-wrap { max-width: 1100px; margin: 0 auto; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: var(--c-primary); letter-spacing: -0.02em; }
.logo:hover { color: var(--c-primary); text-decoration: none; }
.logo-sv { color: var(--c-accent); font-size: .8rem; vertical-align: super; }
.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-menu > a { font-size: .92rem; font-weight: 500; color: var(--c-text-soft); }
.nav-menu > a:hover { color: var(--c-primary); }
.nav-cta { display: inline-flex !important; align-items: center; gap: 6px; padding: 10px 18px; background: var(--c-primary); color: #fff !important; border-radius: 999px; font-weight: 600; font-size: .92rem; transition: .2s; }
.nav-cta:hover { background: var(--c-primary-light); transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.nav-cta svg { width: 14px; height: 14px; }
.nav-burger-btn { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; color: var(--c-primary); cursor: pointer; border-radius: var(--radius-md); }
.nav-burger-btn:hover { background: var(--c-bg); }
@media (max-width: 860px) {
  .nav-burger-btn { display: inline-flex; }
  .nav-menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--c-border); padding: 6px 20px 16px; box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; transition: max-height .28s ease; }
  .nav-menu > a { padding: 13px 4px; border-top: 1px solid var(--c-border); }
  .nav-cta { justify-content: center; margin-top: 12px; }
  #nav-toggle:checked ~ .nav-menu { max-height: 460px; }
}

/* ===== Animaciones ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); } 50% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } }
.anim-up { animation: fadeInUp .8s ease-out both; }
.anim-right { animation: fadeInRight 1s ease-out both; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .anim-up, .anim-right, .float-badge-1, .float-badge-2, .hero-badge .dot { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Hero: blobs, badge, tarjetas flotantes ===== */
.hero-wrap { position: relative; overflow: hidden; }
.hero-blob { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.hero-blob-1 { top: -170px; right: -160px; width: 460px; height: 460px; background: radial-gradient(circle, rgba(16,185,129,.16) 0%, transparent 70%); }
.hero-blob-2 { bottom: -230px; left: -230px; width: 520px; height: 520px; background: radial-gradient(circle, rgba(15,23,42,.08) 0%, transparent 70%); }
.hero-text, .hero-visual { position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--c-border);
  border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 600; color: var(--c-primary); box-shadow: var(--shadow-sm); }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); animation: pulseDot 2s infinite; }
.float-badge { position: absolute; background: #fff; padding: 10px 14px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 9px; font-size: .8rem; font-weight: 600; color: var(--c-primary); z-index: 5; }
.float-badge .fi { width: 30px; height: 30px; border-radius: 8px; background: var(--c-accent-light); color: var(--c-accent-dark); display: grid; place-items: center; font-size: 15px; }
.float-badge-1 { top: 18px; left: -18px; animation: floaty 4s ease-in-out infinite; }
.float-badge-2 { bottom: 26px; right: 4px; animation: floaty 4s ease-in-out infinite 1.5s; }
@media (max-width: 560px) { .float-badge { display: none; } }

/* ===== Testimonios ===== */
.testi-grid { display: grid; gap: 18px; }
@media (min-width: 820px) { .testi-grid { grid-template-columns: repeat(3, 1fr); } }
.testi-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.testi-stars { color: #F59E0B; font-size: .95rem; letter-spacing: 1px; }
.testi-quote { color: var(--c-text); margin: 10px 0 16px; font-size: .98rem; line-height: 1.6; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.testi-name { font-weight: 700; color: var(--c-primary); font-size: .92rem; }
.testi-role { color: var(--c-text-muted); font-size: .82rem; }

/* ===== FAQ (acordeón) ===== */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-md); margin-bottom: 12px; }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--c-primary);
  display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--c-accent-dark); }
.faq-icon { flex-shrink: 0; color: var(--c-text-muted); transition: transform .25s ease; }
.faq-item[open] .faq-icon { transform: rotate(180deg); color: var(--c-accent-dark); }
.faq-a { padding: 0 20px 18px; color: var(--c-text-soft); line-height: 1.6; animation: fadeInUp .3s ease-out; }
