/* =========================================================================
   Pinolero Box · Design System
   Brand fonts: Poppins (display) + Open Sans (body) · matches pinolero-box.com
   Primary: #0865ff (brand blue) · Accent: #82c0c7 (teal)
   Warm accents: coral / saffron / kraft (limited, latin warmth)
   ========================================================================= */

:root {
  /* PRIMARY · Pinolero Box's actual brand blue */
  --brand: #0865ff;
  --brand-deep: #0345d0;
  --brand-darker: #022694;
  --brand-soft: rgba(8, 101, 255, 0.08);

  /* SECONDARY · Pinolero Box's teal hover */
  --accent: #82c0c7;
  --accent-deep: #5a999f;
  --accent-soft: rgba(130, 192, 199, 0.16);

  /* DARK CHROME · sidebar, dark hero, sections */
  --ink-blue: #0E2D52;
  --ink-blue-deep: #051630;
  --ink-blue-mid: #1B4076;

  /* WARM ACCENTS · used sparingly to add latin warmth */
  --coral: #F26430;
  --coral-deep: #C84A1E;
  --saffron: #F4B942;
  --saffron-deep: #C28E2A;
  --kraft: #C8956D;
  --kraft-deep: #8B6644;

  /* STATUS */
  --mint: #2D8A6A;
  --mint-deep: #1F6249;
  --carmine: #C8312A;

  /* SURFACES · clean white + soft tints */
  --cream: #FFFFFF;
  --cream-warm: #F6F9FF;
  --cream-soft: #EFF4FF;
  --sand: #FFF7EC;
  --paper: #FAFBFD;

  /* TEXT */
  --ink: #0E1B2E;
  --body: #4A5568;
  --muted: #8492A6;
  --rule: #E0E7F0;
  --rule-soft: #EDF1F5;

  /* TYPE · Pinolero Box's brand pairing */
  --display: "Poppins", "Helvetica Neue", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: "Open Sans", "Helvetica Neue", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Back-compat aliases — older pages reference --serif for display headings */
  --serif: var(--display);

  /* Back-compat color aliases — earlier pages used coral/saffron/ocean as primary tokens */
  --ocean: var(--ink-blue);
  --ocean-deep: var(--ink-blue-deep);
  --ocean-mid: var(--ink-blue-mid);

  /* Back-compat shape · earlier pages reference these */
  --display-soft: normal;
  --display-wonk: normal;

  /* SHAPE · slightly tighter radii, more SaaS-like than editorial */
  --r-xs: 4px; --r-sm: 8px; --r-md: 10px; --r-lg: 16px; --r-xl: 22px; --r-2xl: 999px;
  --shadow-sm: 0 1px 2px rgba(8, 101, 255, 0.04), 0 0 0 1px rgba(224, 231, 240, 0.6);
  --shadow-md: 0 6px 20px rgba(8, 101, 255, 0.06), 0 0 0 1px rgba(224, 231, 240, 0.5);
  --shadow-lg: 0 20px 56px rgba(8, 101, 255, 0.10), 0 0 0 1px rgba(224, 231, 240, 0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ---------- Type primitives ---------- */
.eyebrow {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.20em; color: var(--brand);
}
.eyebrow.muted { color: var(--muted); }
.eyebrow.coral { color: var(--coral); }
.eyebrow.dark { color: var(--ink-blue); }

.display { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; }
.display.thin { font-weight: 500; }
.serif { font-family: var(--display); }
em { font-style: italic; color: var(--brand); font-weight: inherit; }
.num-tab { font-variant-numeric: tabular-nums lining-nums; }
.mono { font-family: var(--mono); letter-spacing: -0.01em; }

/* ---------- Layout primitives ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); position: relative; z-index: 2; }
.wrap-narrow { max-width: 920px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); position: relative; z-index: 2; }
.stack > * + * { margin-top: var(--space, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.wrap-y { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .wrap, .wrap-narrow { padding: 0 22px; }
}

/* ---------- Demo strip (top of every page) ---------- */
.demo-strip {
  background: var(--ink-blue); color: var(--cream);
  font-size: 12px; padding: 11px 0; letter-spacing: 0.02em;
  position: relative; z-index: 5;
}
.demo-strip-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between;
}
.demo-back em { color: var(--accent); font-style: italic; }
.demo-meta em { color: var(--accent); font-style: italic; }
.demo-contact { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.demo-contact .sep { color: rgba(255, 255, 255, 0.30); }
.demo-tel, .demo-mail { color: var(--cream); border-bottom: 1px dashed rgba(255, 255, 255, 0.4); padding-bottom: 1px; }
.demo-tel:hover, .demo-mail:hover { color: var(--accent); border-color: var(--accent); }
.demo-credit em { color: var(--accent); font-style: italic; font-weight: 600; }
.lang-link { color: rgba(255, 255, 255, 0.7); font-size: 11px; padding: 2px 8px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--r-2xl); }
.lang-link:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) {
  .demo-strip-inner { gap: 8px; }
  .demo-contact { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-2xl);
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  font-family: var(--display);
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-primary, .btn-brand { background: var(--brand); color: var(--cream); }
.btn-primary:hover, .btn-brand:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(8, 101, 255, 0.30); }
.btn-coral { background: var(--coral); color: var(--cream); }
.btn-coral:hover { background: var(--coral-deep); transform: translateY(-1px); }
.btn-saffron { background: var(--saffron); color: var(--ink-blue); }
.btn-saffron:hover { background: var(--saffron-deep); color: var(--cream); transform: translateY(-1px); }
.btn-dark { background: var(--ink-blue); color: var(--cream); }
.btn-dark:hover { background: var(--ink-blue-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn-ghost:hover { background: var(--cream-warm); border-color: var(--brand); color: var(--brand); }
.btn-ghost.dark { color: var(--cream); border-color: rgba(255, 255, 255, 0.3); }
.btn-ghost.dark:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--accent); color: var(--accent); }
.btn-soft { background: var(--cream-soft); color: var(--brand-deep); }
.btn-soft:hover { background: var(--brand-soft); }
.btn-lg { padding: 14px 28px; font-size: 14px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn .arrow { font-weight: 500; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Tags / chips / status ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-2xl);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  background: var(--cream-warm); color: var(--ink);
  border: 1px solid var(--rule-soft);
  font-family: var(--sans);
}
.tag.brand     { background: var(--brand-soft); color: var(--brand-deep); border-color: rgba(8, 101, 255, 0.22); }
.tag.accent    { background: var(--accent-soft); color: var(--accent-deep); border-color: rgba(130, 192, 199, 0.40); }
.tag.coral     { background: rgba(242, 100, 48, 0.10); color: var(--coral-deep); border-color: rgba(242, 100, 48, 0.22); }
.tag.saffron   { background: rgba(244, 185, 66, 0.16); color: #7a5a14; border-color: rgba(244, 185, 66, 0.30); }
.tag.dark      { background: rgba(14, 45, 82, 0.08); color: var(--ink-blue); border-color: rgba(14, 45, 82, 0.18); }
.tag.kraft     { background: rgba(200, 149, 109, 0.16); color: var(--kraft-deep); border-color: rgba(200, 149, 109, 0.32); }
.tag.mint      { background: rgba(45, 138, 106, 0.10); color: var(--mint-deep); border-color: rgba(45, 138, 106, 0.22); }
.tag.carmine   { background: rgba(200, 49, 42, 0.10); color: var(--carmine); border-color: rgba(200, 49, 42, 0.22); }
.tag.ghost     { background: transparent; }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }

/* Status pills (paquete lifecycle) */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: var(--r-2xl);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  font-family: var(--sans);
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill.pre-alert { background: rgba(126, 143, 160, 0.12); color: var(--muted); border: 1px solid rgba(126, 143, 160, 0.25); }
.status-pill.in-mia    { background: rgba(244, 185, 66, 0.20); color: #7a5a14; border: 1px solid rgba(244, 185, 66, 0.40); }
.status-pill.consol    { background: rgba(200, 149, 109, 0.20); color: var(--kraft-deep); border: 1px solid rgba(200, 149, 109, 0.42); }
.status-pill.transit   { background: var(--brand-soft); color: var(--brand-deep); border: 1px solid rgba(8, 101, 255, 0.30); }
.status-pill.in-ni     { background: rgba(242, 100, 48, 0.14); color: var(--coral-deep); border: 1px solid rgba(242, 100, 48, 0.32); }
.status-pill.delivered { background: rgba(45, 138, 106, 0.14); color: var(--mint-deep); border: 1px solid rgba(45, 138, 106, 0.30); }
.status-pill.alert     { background: rgba(200, 49, 42, 0.10); color: var(--carmine); border: 1px solid rgba(200, 49, 42, 0.28); }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
}
.card.warm { background: var(--cream-warm); }
.card.soft { background: var(--cream-soft); }
.card.dark { background: var(--ink-blue); color: var(--cream); border-color: var(--ink-blue-deep); }
.card.dark .muted, .card.dark .card-sub { color: rgba(255, 255, 255, 0.65); }
.card.brand-edge {
  position: relative;
  border-color: rgba(8, 101, 255, 0.22);
}
.card.brand-edge::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 0;
  height: 3px; border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0.85;
}
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.card-title {
  font-family: var(--display); font-size: 22px; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.15;
}
.card-title em { color: var(--brand); }
.card-sub { color: var(--muted); font-size: 13px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-md); }
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 100%; }
@media (max-width: 720px) {
  .table { font-size: 12px; min-width: 540px; }
  .table th, .table td { padding: 10px 12px; }
}
.table th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--rule);
  background: var(--cream-warm);
}
.table td {
  padding: 14px; border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
}
.table tr:hover td { background: rgba(8, 101, 255, 0.025); }
.table tr.selected td { background: rgba(8, 101, 255, 0.06); }
.table .name {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; color: var(--ink);
}
.table .name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.table-compact th, .table-compact td { padding: 8px 12px; }
.table .pbe { font-family: var(--mono); font-size: 12px; color: var(--brand-deep); font-weight: 500; }

/* ---------- Avatars ---------- */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 14px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--cream);
  background: linear-gradient(135deg, var(--brand), var(--accent-deep));
  flex-shrink: 0;
}
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.avatar.dark { background: linear-gradient(135deg, var(--ink-blue), var(--ink-blue-mid)); }
.avatar.coral { background: linear-gradient(135deg, var(--coral), var(--saffron)); }
.avatar.mint { background: linear-gradient(135deg, var(--mint), var(--accent)); }
.avatar.cream { background: linear-gradient(135deg, var(--cream-warm), var(--accent-soft)); color: var(--brand); }

/* ---------- Form ---------- */
.field { display: block; }
.field + .field { margin-top: 18px; }
.field label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin-bottom: 6px;
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink);
  font-family: var(--sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(8, 101, 255, 0.15);
}
.textarea { resize: vertical; min-height: 96px; }
.search {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: var(--cream);
  border: 1px solid var(--rule); border-radius: var(--r-2xl);
}
.search input { border: 0; background: none; flex: 1; font-size: 13px; outline: 0; }
.search svg { color: var(--muted); flex-shrink: 0; }

/* ---------- KPIs ---------- */
.kpi { display: flex; flex-direction: column; gap: 10px; }
.kpi-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.kpi-num {
  font-family: var(--display); font-size: 40px; line-height: 1; font-weight: 700;
  letter-spacing: -0.025em;
}
.kpi-num em { color: var(--brand); font-size: 26px; vertical-align: super; }
.kpi-delta {
  font-size: 12px; color: var(--mint); font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
}
.kpi-delta.down { color: var(--carmine); }
.kpi-delta.flat { color: var(--muted); }

/* ---------- Sparklines / charts ---------- */
.spark { width: 100%; height: 48px; display: block; }
.spark path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .area { fill: rgba(8, 101, 255, 0.10); stroke: none; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 96px; }
.bar-chart .bar {
  flex: 1; background: linear-gradient(to top, var(--brand), var(--accent));
  border-radius: 3px 3px 0 0; min-height: 4px;
}
.bar-chart .bar.muted { background: var(--rule); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.7, 0, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* =========================================================================
   LEAFLET MAP STYLES (override default Leaflet look)
   ========================================================================= */
.leaflet-host {
  width: 100%; height: 100%;
  border-radius: var(--r-md);
  background: var(--cream-warm);
}
.leaflet-host.tile-tinted .leaflet-tile-pane { filter: saturate(0.65) hue-rotate(-5deg) brightness(1.02); }
.leaflet-popup-content-wrapper {
  border-radius: var(--r-md) !important;
  font-family: var(--sans) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 4px !important;
}
.leaflet-popup-content { font-size: 13px !important; line-height: 1.5 !important; margin: 12px 14px !important; }
.leaflet-popup-content strong { font-family: var(--display); font-weight: 700; }
.leaflet-popup-content em { color: var(--brand); font-style: italic; }
.leaflet-control-attribution { font-size: 9px !important; opacity: 0.55; }

/* Custom markers (divIcon) */
.pkg-marker {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); border: 3px solid var(--cream);
  box-shadow: 0 0 0 4px rgba(8, 101, 255, 0.28), 0 4px 10px rgba(8, 101, 255, 0.30);
  display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-size: 14px;
  animation: pulse-marker 1.8s ease-in-out infinite;
}
.pkg-marker.coral { background: var(--coral); box-shadow: 0 0 0 4px rgba(242, 100, 48, 0.28), 0 4px 10px rgba(242, 100, 48, 0.30); }
.pkg-marker.saffron { background: var(--saffron); color: var(--ink-blue); box-shadow: 0 0 0 4px rgba(244, 185, 66, 0.28), 0 4px 10px rgba(244, 185, 66, 0.30); }
.pkg-marker.mint { background: var(--mint); box-shadow: 0 0 0 4px rgba(45, 138, 106, 0.28), 0 4px 10px rgba(45, 138, 106, 0.30); }
.pkg-marker.dark { background: var(--ink-blue); box-shadow: 0 0 0 4px rgba(14, 45, 82, 0.22), 0 4px 10px rgba(14, 45, 82, 0.30); }
@keyframes pulse-marker {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.10); }
}
.branch-marker {
  width: 36px; height: 36px; border-radius: var(--r-sm) var(--r-sm) var(--r-sm) 0;
  background: var(--cream); border: 2px solid var(--brand);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-size: 16px; font-family: var(--display); font-weight: 700;
  transform: rotate(-45deg) translate(-2px, -2px);
}
.branch-marker > * { transform: rotate(45deg); }

/* ---------- Footer ---------- */
.footer { padding: 40px 0 60px; color: var(--muted); font-size: 13px; position: relative; z-index: 2; }
.footer .row { justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer em { color: var(--brand); font-style: italic; }

/* ---------- Mobile preview chrome (Fase 2 page) ---------- */
.phone-frame {
  width: 320px; height: 660px; border-radius: 42px;
  background: var(--ink-blue-deep);
  padding: 14px; box-shadow: var(--shadow-lg), 0 0 0 4px rgba(15, 27, 38, 0.04);
  position: relative; flex-shrink: 0;
}
.phone-frame::before {
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; border-radius: var(--r-2xl); background: #000;
  z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 30px; background: var(--cream);
  overflow: hidden; position: relative;
}

/* ---------- Utility ---------- */
.muted { color: var(--muted); }
.center { text-align: center; }
@media (max-width: 720px) {
  .hidden-mobile { display: none !important; }
}
@media (min-width: 721px) {
  .show-mobile { display: none !important; }
}
.divider { height: 1px; background: var(--rule); margin: 24px 0; border: 0; }
.dotted-divider { border-top: 1px dashed var(--rule); margin: 24px 0; }

/* === Global mobile compaction · runs across ALL pages === */
@media (max-width: 720px) {
  /* Cards: scale interior padding */
  .card { padding: 18px; }
  .card-head { gap: 10px; margin-bottom: 14px; }
  .card-title { font-size: 18px; }

  /* KPIs: smaller hero numbers */
  .kpi-num { font-size: 30px; }
  .kpi-num em { font-size: 18px; }

  /* Hero offer (hub) */
  body .offer { padding: 32px 22px !important; }

  /* Buttons: larger tap targets, full-width-ish in stack contexts */
  .btn-lg { padding: 14px 24px; font-size: 14px; }
  .btn { padding: 11px 18px; }

  /* Reduce huge decorative section padding */
  .section { padding: 56px 0 !important; }

  /* Demo strip — tighter */
  .demo-strip { padding: 9px 0; font-size: 11px; }
  .demo-strip-inner { padding: 0 18px; }

  /* Bot widget — smaller, doesn't overlap content */
  .bot-toggle { width: 56px; height: 56px; font-size: 24px; right: 18px; bottom: 18px; }
  .bot-panel { right: 12px; left: 12px; width: auto; bottom: 86px; height: 70vh; }

  /* Phone frames — scale down so 320px+padding fits 375px viewport */
  .phone-frame { width: 280px; height: 580px; }
  .phone-frame::before { width: 90px; height: 18px; top: 18px; }

  /* Generic safety: any inline-styled grid with fixed columns
     should fall back to single column. Authors override per-page. */
  .pkg-form, .field-row, .pkg-form, .form-grid { grid-template-columns: 1fr !important; }

  /* Topbar stacking + buttons */
  .row.between { flex-wrap: wrap; }

  /* Footer compaction */
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr !important; }
  .site-footer { padding: 36px 0 !important; }

  /* Banner: stack icon + text */
  .banner { padding: 12px 14px; }

  /* Tabs scroll if too wide */
  .tabs { overflow-x: auto; max-width: 100%; }

  /* Sidebar text size in drawer */
  .sidebar .nav-item { padding: 11px 12px; font-size: 14px; }

  /* Customer portal nav (dashboard, paquete, pre-alerta) — links scroll horizontally; avatar shrinks */
  .portal-nav-inner { padding: 12px 16px !important; gap: 12px !important; }
  .portal-nav .links {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex: 1; min-width: 0;
    scrollbar-width: none; gap: 16px !important; font-size: 12px !important;
  }
  .portal-nav .links::-webkit-scrollbar { display: none; }
  .portal-nav .links a { white-space: nowrap; flex-shrink: 0; }
  .me .name, .me .pbe { display: none; }
  .me { gap: 0 !important; }

  /* Pkg-list rows: stack right side under main content */
  .pkg-item .meta { font-size: 11px; gap: 8px; }
  .pkg-item .title { font-size: 16px; }

  /* Section padding compaction */
  .section { padding: 48px 0 !important; }
  .section-eyebrow h2 { font-size: clamp(26px, 6vw, 36px); }
  .section-eyebrow { margin-bottom: 32px; }

  /* Greeting (dashboard) */
  .greeting h1 { font-size: 32px; }

  /* Current package callout (dashboard) */
  .current-pkg { padding: 22px; }
  .current-pkg h2 { font-size: 22px; }
  .progress-strip-labels { font-size: 9px; gap: 4px; }

  /* Cards inside pages: tighten the kraft-edge accent so it doesn't cut off */
  .card.kraft-edge::before, .card.brand-edge::before { left: 16px; right: 16px; }

  /* Hub cards */
  .hub-card { padding: 22px; }
  .hub-card.feature { padding: 26px 22px; }
  .hub-card h3 { font-size: 22px !important; }
  .hub-card.feature h3 { font-size: 26px !important; }

  /* Meta row (hub bottom) — wrap stats in 2 columns */
  .meta-row { padding: 18px 16px; gap: 12px; }
  .meta-row > div { flex: 1 1 calc(50% - 12px); min-width: 130px; }
  .meta-row .meta-stat { font-size: 20px; }

  /* Pain section */
  .pain h3 { font-size: 22px; }
  .pain .stat .num { font-size: 22px; }

  /* Filter row (dashboard, etc.) */
  .filter-row { gap: 10px; }
  .filter-row .search { min-width: 0; max-width: 100%; flex: 1 1 100%; }
  .filter-row .select { flex: 1 1 calc(50% - 6px); max-width: 100% !important; }
  .filter-row .btn { flex: 1 1 100%; justify-content: center; }

  /* Sec-head with tabs */
  .sec-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sec-head .tabs { width: 100%; overflow-x: auto; }

  /* Trust hero stats compress to 2 columns */
  .hero .trust { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Hero (cliente landing) card */
  .hero-card .pbe { font-size: 11px; }
  .hero-card .copy-row { flex-direction: column; }
  .hero-card .copy-row .btn { width: 100%; justify-content: center; }

  /* Auth & registro · stack OTP smaller */
  .otp-row .input { font-size: 18px !important; padding: 12px 0 !important; }

  /* Recepción Miami: photo grid */
  .photo-grid { grid-template-columns: 1fr 1fr 1fr !important; gap: 8px !important; }
  .pkg-form { grid-template-columns: 1fr !important; }

  /* Ms-card (roadmap) */
  .ms-card { grid-template-columns: 1fr !important; padding: 20px 18px !important; gap: 12px !important; }
  .ms-card .num { font-size: 38px !important; }

  /* Diag (arquitectura) */
  .diag { padding: 20px !important; }
  .diag-block { padding: 14px !important; }

  /* Phones row (movil) wraps */
  .phones-row { gap: 18px !important; }
  .phones-showcase { padding: 36px 16px !important; border-radius: 18px !important; }
  .deeplink { padding: 36px 22px !important; border-radius: 18px !important; }
  .deeplink h2 { font-size: 28px !important; }
  .stack-cta { padding: 32px 22px !important; border-radius: 18px !important; }
  .why { padding: 56px 0 !important; }
  .tech-stack { padding: 56px 0 !important; }
  .reviews { padding: 56px 0 !important; }
}

/* Numbered eyebrow (used in proposal sections) */
.num-eyebrow {
  font-family: var(--display); font-size: 13px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}

/* Pill (decorative — used in hero) */
.pill {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: var(--r-2xl);
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--brand-soft);
  border: 1px solid rgba(8, 101, 255, 0.30);
  color: var(--brand-deep);
  white-space: nowrap;
  font-family: var(--display);
}
.pill.alt { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.22); color: var(--cream); }
.pill.coral { background: rgba(242, 100, 48, 0.12); border-color: rgba(242, 100, 48, 0.36); color: var(--coral-deep); }
.pill.saffron { background: rgba(244, 185, 66, 0.16); border-color: rgba(244, 185, 66, 0.42); color: #7a5a14; }
.pill.mint { background: rgba(45, 138, 106, 0.10); border-color: rgba(45, 138, 106, 0.28); color: var(--mint-deep); }
.pill.accent { background: var(--accent-soft); border-color: rgba(130, 192, 199, 0.42); color: var(--accent-deep); }

/* =========================================================================
   ADMIN APP CHROME (sidebar + topbar layout)
   ========================================================================= */

body.app { background: var(--paper); }
.app-shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; position: relative; z-index: 2; }

/* === Mobile drawer (admin sidebar) === */
.app-mobile-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  cursor: pointer; border: 1px solid rgba(8, 101, 255, 0.20);
}
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55);
  z-index: 99; opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}
.sidebar-backdrop.show { display: block; opacity: 1; pointer-events: auto; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr !important; z-index: auto !important; }
  .sidebar {
    display: flex !important;
    position: fixed !important;
    top: 0 !important; left: 0 !important; bottom: 0 !important;
    width: 280px !important; max-width: 82vw !important;
    height: 100vh !important;
    transform: translateX(-100%) !important;
    transition: transform 0.24s cubic-bezier(0.2, 0.7, 0, 1) !important;
    z-index: 100 !important;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.30);
  }
  .sidebar.open { transform: translateX(0) !important; }
  .app-mobile-toggle { display: inline-flex; }
  .app-topbar { padding: 14px 18px; gap: 12px; }
  .app-topbar h1 { font-size: 18px; }
  .app-topbar .search,
  .app-topbar .icon-btn:not(.app-mobile-toggle) { display: none; }
  .app-topbar .crumb { font-size: 11px; margin-bottom: 2px; }
  .app-content { padding: 20px 18px; }
  .section-head h2 { font-size: 24px; }
}

.sidebar {
  background: var(--ink-blue);
  color: var(--cream);
  padding: 22px 18px 28px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--ink-blue-deep);
}
.sidebar .brand {
  display: flex; align-items: baseline; gap: 6px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  margin-bottom: 18px;
}
.sidebar .brand-mark {
  font-family: var(--display); font-size: 22px; font-weight: 700;
  color: var(--cream); letter-spacing: -0.02em;
}
.sidebar .brand-mark em { color: var(--accent); font-style: italic; }
.sidebar .brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); transform: translateY(-2px); }
.sidebar .brand small { font-size: 10px; letter-spacing: 0.16em; color: rgba(255, 255, 255, 0.55); text-transform: uppercase; margin-left: 8px; font-weight: 600; }

.nav-group { margin-bottom: 18px; }
.nav-group-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.40);
  padding: 0 10px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.08); color: var(--cream); }
.nav-item.active { background: var(--brand); color: var(--cream); }
.nav-item.active .nav-icon { color: var(--cream); }
.nav-item .nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
.nav-item .nav-badge {
  margin-left: auto; font-size: 10px; padding: 2px 7px;
  background: rgba(255, 255, 255, 0.12); border-radius: var(--r-2xl); font-weight: 600;
}
.nav-item.active .nav-badge { background: rgba(0, 0, 0, 0.20); }

.sidebar-footer {
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-footer .name { font-size: 13px; color: var(--cream); font-weight: 600; }
.sidebar-footer .role { font-size: 11px; color: rgba(255, 255, 255, 0.55); }

/* Main content */
.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 32px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 20;
}
.app-topbar h1 {
  font-family: var(--display); font-size: 22px; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1;
}
.app-topbar h1 em { color: var(--brand); }
.app-topbar .crumb { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.app-topbar .crumb a:hover { color: var(--brand); }
.app-topbar .icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); background: var(--cream); color: var(--body);
  transition: background 0.15s, border-color 0.15s;
}
.app-topbar .icon-btn:hover { background: var(--cream-warm); border-color: var(--brand); }

.app-content { padding: 32px; flex: 1; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px; margin-bottom: 24px; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--display); font-size: 28px; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.1;
}
.section-head h2 em { color: var(--brand); }
.section-head .lede { color: var(--muted); font-size: 14px; max-width: 520px; }

/* ---------- Banner / inline alert ---------- */
.banner {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px; border-radius: var(--r-md);
  background: var(--cream-warm); border: 1px solid var(--rule);
  font-size: 13px;
}
.banner.brand { background: var(--brand-soft); border-color: rgba(8, 101, 255, 0.22); }
.banner.coral { background: rgba(242, 100, 48, 0.06); border-color: rgba(242, 100, 48, 0.22); }
.banner.saffron { background: rgba(244, 185, 66, 0.10); border-color: rgba(244, 185, 66, 0.32); }
.banner.mint { background: rgba(45, 138, 106, 0.06); border-color: rgba(45, 138, 106, 0.20); }
.banner-icon {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--cream); display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.banner strong { display: block; font-weight: 700; color: var(--ink); margin-bottom: 2px; font-size: 13px; font-family: var(--display); }
.banner span { color: var(--body); }

/* ---------- Pill nav (tabs) ---------- */
.tabs {
  display: inline-flex; padding: 4px;
  background: var(--cream-warm); border-radius: var(--r-2xl);
  border: 1px solid var(--rule);
}
.tabs a {
  padding: 7px 16px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--body); border-radius: var(--r-2xl);
  transition: background 0.15s, color 0.15s;
  font-family: var(--display);
}
.tabs a.active { background: var(--brand); color: var(--cream); }
.tabs a:hover:not(.active) { color: var(--brand); }

/* =========================================================================
   FAQ BOT WIDGET (chat bubble bottom-right)
   ========================================================================= */
.bot-toggle {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 12px 30px rgba(8, 101, 255, 0.40), 0 0 0 6px rgba(8, 101, 255, 0.10);
  cursor: pointer;
  transition: transform 0.2s;
}
.bot-toggle:hover { transform: scale(1.06); }
.bot-toggle .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--coral); color: var(--cream);
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  border: 2px solid var(--cream);
}
.bot-panel {
  position: fixed; right: 24px; bottom: 100px; z-index: 51;
  width: 360px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 140px);
  background: var(--cream); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(8, 101, 255, 0.25), 0 0 0 1px rgba(224, 231, 240, 0.6);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: scale(0.92) translateY(20px); opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}
.bot-panel.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; }
.bot-head {
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: var(--cream);
  display: flex; gap: 12px; align-items: center;
}
.bot-head .av { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.bot-head .info { flex: 1; }
.bot-head .name { font-family: var(--display); font-weight: 700; font-size: 14px; }
.bot-head .status { font-size: 11px; opacity: 0.85; display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.bot-head .status .ld { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; }
.bot-head .close { background: rgba(255, 255, 255, 0.15); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bot-body { flex: 1; padding: 18px; overflow-y: auto; background: var(--cream-warm); display: flex; flex-direction: column; gap: 12px; }
.bot-msg { padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; max-width: 85%; }
.bot-msg.bot { align-self: flex-start; background: var(--cream); border: 1px solid var(--rule); border-bottom-left-radius: 4px; }
.bot-msg.user { align-self: flex-end; background: var(--brand); color: var(--cream); border-bottom-right-radius: 4px; }
.bot-msg em { font-style: italic; color: var(--brand); font-weight: 600; }
.bot-msg.user em { color: var(--accent); }
.bot-msg .ts { font-size: 10px; opacity: 0.65; margin-top: 4px; font-family: var(--mono); }
.bot-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.bot-quick button {
  padding: 6px 12px; background: var(--cream); border: 1px solid var(--brand);
  border-radius: var(--r-2xl); font-size: 11px; color: var(--brand-deep); font-weight: 600;
  font-family: var(--display); cursor: pointer; transition: background 0.15s;
}
.bot-quick button:hover { background: var(--brand-soft); }
.bot-input {
  padding: 12px 14px; border-top: 1px solid var(--rule);
  display: flex; gap: 8px; align-items: center; background: var(--cream);
}
.bot-input input { flex: 1; padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--r-2xl); font-size: 13px; }
.bot-input input:focus { outline: 0; border-color: var(--brand); }
.bot-input button { background: var(--brand); color: var(--cream); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.bot-foot { padding: 8px 14px; background: var(--cream-soft); border-top: 1px solid var(--rule); font-size: 10px; color: var(--muted); text-align: center; letter-spacing: 0.04em; }
.bot-foot strong { color: var(--brand); }

/* ---------- Timeline / tracking ---------- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--rule); }
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -28px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--rule);
  box-shadow: 0 0 0 3px var(--cream);
}
.timeline-item.done::before { background: var(--mint); border-color: var(--mint); }
.timeline-item.now::before  { background: var(--brand); border-color: var(--brand); animation: pulse 1.6s ease-in-out infinite; }
.timeline-item.next::before { background: var(--cream); border-color: var(--brand); }
.timeline-item .ts { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; font-family: var(--mono); }
.timeline-item .head { font-family: var(--display); font-size: 17px; font-weight: 600; line-height: 1.25; margin-bottom: 4px; }
.timeline-item .head em { color: var(--brand); }
.timeline-item .body-text { color: var(--body); font-size: 13px; line-height: 1.55; }
.timeline-item .body-text + .body-text { margin-top: 6px; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--cream), 0 0 0 0 rgba(8, 101, 255, 0.45); }
  50%      { box-shadow: 0 0 0 3px var(--cream), 0 0 0 8px rgba(8, 101, 255, 0); }
}
