/* ════════════════════════════════════════════════════════════
   BROQUER — Design System
   Apple-pristine + warm-professional. Token-driven.

   Esta hoja es la única fuente de verdad visual de Broquer.
   Define: tokens (color, tipografía, espaciado, radios, sombras,
   z-index, foco) y componentes globales reutilizables (botón,
   input, textarea, select, check, switch, card, modal, tabs,
   dropdown, tabla, badge, page/section header, empty, skeleton,
   error, toast, property-card, lead-card).

   Regla: ninguna pantalla debe inventar botón, input, card,
   modal, badge, tabla, loader, empty o error si existe aquí el
   componente equivalente. Nada de colores ni radios a mano:
   siempre tokens.

   La paleta principal NO cambia. Los alias "legacy" se conservan
   1:1 para que el markup existente siga funcionando.
   ════════════════════════════════════════════════════════════ */

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

:root {
  /* ── Surfaces ───────────────────────────── */
  --paper:   #F7F5EE;     /* warm ivory background */
  --paper-2: #F1EEE3;     /* subtle inset surface */
  --bone:    #FFFFFF;     /* card surface */
  --shell:   #FBFAF5;     /* mid surface */

  /* ── Ink ─────────────────────────────────── */
  --ink:     #0A0A0A;
  --ink-2:   #1F1F1B;
  --ink-3:   #3A3A33;
  --mute:    #6B6B66;
  --mute-2:  #9A9A92;
  --mute-3:  #C5C2B5;

  /* ── Hairlines ──────────────────────────── */
  --line:     rgba(10,10,10,0.07);
  --line-2:   rgba(10,10,10,0.12);
  --line-3:   rgba(10,10,10,0.20);

  /* ── Accents ────────────────────────────── */
  --forest:   #2F4A3A;
  --forest-2: #3D5C49;
  --forest-soft: #E5EBE3;

  --warn:     #B5601C;
  --warn-soft:#F6E8D6;
  --danger:   #B84B3F;
  --danger-soft:#F5DCD7;
  --success:  #1F6B4A;
  --success-soft:#DDEBE0;
  --info:     #2D5A88;
  --info-soft:#DCE6F0;

  /* ── Geometry (radios) ──────────────────── */
  --r-xs: 6px;
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* ── Espaciado (escala base 4px) ────────── */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 28px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* ── Sombras (tinte cálido coherente) ───── */
  --shadow-xs: 0 1px 2px rgba(31,28,22,.04);
  --shadow-sm: 0 1px 3px rgba(31,28,22,.06), 0 1px 2px rgba(31,28,22,.04);
  --shadow:    0 4px 12px rgba(31,28,22,.08), 0 1px 3px rgba(31,28,22,.05);
  --shadow-md: 0 8px 24px rgba(31,28,22,.10), 0 2px 6px rgba(31,28,22,.06);
  --shadow-lg: 0 14px 36px rgba(31,28,22,.14), 0 4px 10px rgba(31,28,22,.07);
  --shadow-xl: 0 24px 64px rgba(31,28,22,.18), 0 8px 16px rgba(31,28,22,.08);

  /* ── Alturas de control ─────────────────── */
  --h-sm:  36px;
  --h:     44px;
  --h-lg:  48px;
  --touch-min: 44px;

  /* ── Anillo de foco ─────────────────────── */
  --focus:        0 0 0 3px rgba(10,10,10,0.10);
  --focus-forest: 0 0 0 3px rgba(47,74,58,0.18);
  --focus-danger: 0 0 0 3px rgba(184,75,63,0.18);

  /* ── Z-index (alineado con app-shell.js) ── */
  --z-base:    1;
  --z-nav:     60;
  --z-fab:     80;
  --z-popover: 100;
  --z-overlay: 200;
  --z-drawer:  201;
  --z-modal:   240;
  --z-toast:   320;

  /* ── Tipografía ─────────────────────────── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --font-display: 'Inter Tight', 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-display: 44px;
  --fs-h1: 32px;
  --fs-h2: 24px;
  --fs-h3: 18px;
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-xs: 11px;
  --fs-caption: 10px;

  --lh-tight: 1.05;
  --lh-snug:  1.3;
  --lh:       1.5;
  --lh-loose: 1.65;

  /* ── Motion ─────────────────────────────── */
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur: .22s;
  --dur-fast: .14s;

  /* ── Legacy aliases (NO TOCAR: el markup existente depende de
        estos. Mapean nombres viejos a los tokens actuales) ──── */
  --navy: var(--ink);
  --navy-mid: var(--ink-2);
  --navy-light: var(--ink-3);
  --teal: var(--forest);
  --teal2: var(--forest-2);
  --teal-dark: var(--forest);
  --teal-glow: rgba(47,74,58,0.10);
  --white: var(--bone);
  --gray-100: var(--paper-2);
  --gray-200: var(--line);
  --gray-400: var(--mute-2);
  --gray-600: var(--mute);
  --text: var(--ink);
  --screen-bg: var(--paper);
  --bg: var(--paper);
  --bg2: var(--bone);
  --bg3: var(--paper-2);
  --sf: var(--bone);
  --sf2: var(--paper-2);
  --bd: var(--line);
  --bd2: var(--line-2);
  --txt: var(--ink);
  --mut: var(--mute);
  --mut2: var(--mute-2);
  --r-old: 16px;
  --r2: 12px;
  --r3: 10px;
  --amber: #B5601C; --amber2:#C77D3F;
  --rose:  #B84B3F; --rose2: #C8665B;
  --violet:#5B4D8A; --violet2:#7D6FAF;
  --emerald:#2F4A3A; --emerald2:#3D5C49;
  --sky:   #2D5A88; --sky2:   #3F71A0;
  --fs-base: var(--fs-body);
  --fs-label: var(--fs-xs);
  --fs-title: var(--fs-h3);
  --warn-bg: var(--warn-soft);
  --danger-bd: var(--danger);
}

/* ════════════════════════════════════════════════════════════
   RESET / BASE
   ════════════════════════════════════════════════════════════ */
*,*::before,*::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-feature-settings: "ss01", "cv11";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ink); color: var(--paper); }

h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--ink);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.018em; }

p { line-height: var(--lh); color: var(--ink-2); }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--forest); }

input, select, textarea, button {
  font-family: inherit;
  font-size: var(--fs-body);
  letter-spacing: inherit;
}

/* Foco visible accesible y consistente para todo componente del sistema */
.bk-btn:focus-visible,
.bk-input:focus-visible,
.bk-textarea:focus-visible,
.bk-select:focus-visible,
.bk-icon-btn:focus-visible,
.bk-tab:focus-visible,
.bk-seg__btn:focus-visible,
.bk-menu__item:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* Respeta a quien reduce movimiento — quality floor */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* iOS input zoom guard */
@media (max-width: 768px) {
  input, select, textarea { font-size: max(16px, var(--fs-body)) !important; }
}

/* ════════════════════════════════════════════════════════════
   PRIMITIVAS DE SUPERFICIE
   ════════════════════════════════════════════════════════════ */
.bk-paper { background: var(--paper); }
.bk-bone  { background: var(--bone); }
.bk-hairline { border: 1px solid var(--line); }
.bk-divider { height: 1px; background: var(--line); border: 0; margin: var(--sp-5) 0; }

.bk-card {
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.bk-card--pad   { padding: var(--sp-6); }
.bk-card--pad-sm{ padding: var(--sp-4); }
.bk-card--raise { box-shadow: var(--shadow-sm); }
.bk-card--hover { transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.bk-card--hover:hover { box-shadow: var(--shadow); border-color: var(--line-2); }

/* ════════════════════════════════════════════════════════════
   BOTÓN
   ════════════════════════════════════════════════════════════ */
.bk-btn {
  appearance: none;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--bone);
  height: var(--h);
  padding: 0 var(--sp-5);
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: -0.005em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.bk-btn:hover  { background: var(--ink-2); }
.bk-btn:active { transform: scale(.98); }
.bk-btn:disabled,
.bk-btn[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; transform: none; pointer-events: none;
}
.bk-btn svg { flex-shrink: 0; }

.bk-btn--forest { background: var(--forest); }
.bk-btn--forest:hover { background: var(--forest-2); }

.bk-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.bk-btn--ghost:hover { background: var(--paper-2); border-color: var(--line-3); }

.bk-btn--quiet { background: transparent; color: var(--ink-2); border-color: transparent; }
.bk-btn--quiet:hover { background: var(--paper-2); }

.bk-btn--danger { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.bk-btn--danger:hover { background: var(--danger-soft); }

.bk-btn--sm  { height: var(--h-sm); padding: 0 var(--sp-3); font-size: var(--fs-xs); }
.bk-btn--lg  { height: var(--h-lg); padding: 0 var(--sp-6); font-size: var(--fs-body); }
.bk-btn--block { width: 100%; }

/* Botón en estado cargando */
.bk-btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.bk-btn.is-loading::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--bone);
  animation: bk-spin .7s linear infinite;
}
.bk-btn--ghost.is-loading::after,
.bk-btn--quiet.is-loading::after { color: var(--ink); }

@keyframes bk-spin { to { transform: rotate(360deg); } }

/* Botón circular de icono */
.bk-icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bone);
  border: 1px solid var(--line-2);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  position: relative;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.bk-icon-btn:hover { background: var(--paper-2); }
.bk-icon-btn--sm { width: 32px; height: 32px; }

/* ════════════════════════════════════════════════════════════
   FORMULARIO — campo, input, textarea, select, check, switch
   ════════════════════════════════════════════════════════════ */
.bk-field { display: flex; flex-direction: column; gap: var(--sp-1); margin-bottom: var(--sp-4); }
.bk-field:last-child { margin-bottom: 0; }
.bk-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.bk-field-row.is-one  { grid-template-columns: 1fr; }
.bk-field-row.is-three{ grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 600px) { .bk-field-row, .bk-field-row.is-three { grid-template-columns: 1fr; } }

.bk-label {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--mute);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
  display: block;
}
.bk-hint { font-size: var(--fs-xs); color: var(--mute); margin-top: var(--sp-1); }

.bk-input,
.bk-textarea,
.bk-select {
  width: 100%;
  background: var(--bone);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  color: var(--ink);
  font-size: var(--fs-body);
  font-family: inherit;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.bk-input  { height: var(--h-lg); padding: 0 var(--sp-4); }
.bk-textarea { padding: var(--sp-3) var(--sp-4); min-height: 96px; line-height: var(--lh); resize: vertical; }
.bk-select {
  height: var(--h-lg); padding: 0 var(--sp-8) 0 var(--sp-4);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
  cursor: pointer;
}
.bk-input:focus,
.bk-textarea:focus,
.bk-select:focus { border-color: var(--ink); box-shadow: var(--focus); }
.bk-input::placeholder,
.bk-textarea::placeholder { color: var(--mute-2); }
.bk-input:disabled,
.bk-textarea:disabled,
.bk-select:disabled { background: var(--paper-2); color: var(--mute); cursor: not-allowed; }
.bk-input.is-error,
.bk-textarea.is-error,
.bk-select.is-error { border-color: var(--danger); }
.bk-input.is-error:focus,
.bk-textarea.is-error:focus { box-shadow: var(--focus-danger); }

/* Input con prefijo/sufijo (ej. $) */
.bk-input-affix { position: relative; }
.bk-input-affix__prefix,
.bk-input-affix__suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: var(--fs-body); color: var(--mute); pointer-events: none;
}
.bk-input-affix__prefix { left: var(--sp-4); }
.bk-input-affix__suffix { right: var(--sp-4); }
.bk-input-affix__prefix ~ .bk-input { padding-left: calc(var(--sp-4) + 14px); }

/* Checkbox */
.bk-check { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-sm); color: var(--ink-2); }
.bk-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.bk-check__box {
  width: 18px; height: 18px; border-radius: var(--r-xs);
  border: 1px solid var(--line-3); background: var(--bone);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.bk-check__box svg { opacity: 0; color: var(--bone); transition: opacity var(--dur-fast) var(--ease); }
.bk-check input:checked + .bk-check__box { background: var(--ink); border-color: var(--ink); }
.bk-check input:checked + .bk-check__box svg { opacity: 1; }
.bk-check input:focus-visible + .bk-check__box { box-shadow: var(--focus); }

/* Switch */
.bk-switch { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; }
.bk-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.bk-switch__track {
  width: 40px; height: 24px; border-radius: var(--r-pill);
  background: var(--mute-3); position: relative; flex-shrink: 0;
  transition: background var(--dur) var(--ease);
}
.bk-switch__track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--bone);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease);
}
.bk-switch input:checked + .bk-switch__track { background: var(--forest); }
.bk-switch input:checked + .bk-switch__track::after { transform: translateX(16px); }
.bk-switch input:focus-visible + .bk-switch__track { box-shadow: var(--focus); }

/* ════════════════════════════════════════════════════════════
   CHIP / BADGE
   chip = filtro / selección (interactivo)   badge = estado (estático)
   ════════════════════════════════════════════════════════════ */
.bk-chip {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  height: 26px; padding: 0 var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--paper-2); color: var(--ink-2);
  border: 1px solid var(--line);
  font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: -0.005em;
}
.bk-chip--forest { background: var(--forest-soft); color: var(--forest); border-color: transparent; }
.bk-chip--warn   { background: var(--warn-soft);   color: var(--warn);   border-color: transparent; }
.bk-chip--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.bk-chip--success{ background: var(--success-soft);color: var(--success);border-color: transparent; }
.bk-chip--info   { background: var(--info-soft);   color: var(--info);   border-color: transparent; }

.bk-badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 2px var(--sp-2);
  border-radius: var(--r-pill);
  font-size: var(--fs-caption); font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--paper-2); color: var(--mute);
}
.bk-badge--forest { background: var(--forest-soft); color: var(--forest); }
.bk-badge--warn   { background: var(--warn-soft);   color: var(--warn); }
.bk-badge--danger { background: var(--danger-soft); color: var(--danger); }
.bk-badge--success{ background: var(--success-soft);color: var(--success); }
.bk-badge--info   { background: var(--info-soft);   color: var(--info); }
.bk-badge--dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ════════════════════════════════════════════════════════════
   EYEBROW / ETIQUETAS MONO / NÚMEROS
   ════════════════════════════════════════════════════════════ */
.bk-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.bk-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.bk-mono { font-family: var(--font-mono); }
.bk-muted { color: var(--mute); }

/* ════════════════════════════════════════════════════════════
   PAGE HEADER / SECTION HEADER
   ════════════════════════════════════════════════════════════ */
.bk-page-header { margin-bottom: var(--sp-6); }
.bk-page-header__eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mute); margin-bottom: var(--sp-2);
}
.bk-page-header__title { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.03em; line-height: var(--lh-tight); }
.bk-page-header__sub { font-size: var(--fs-sm); color: var(--mute); margin-top: var(--sp-2); line-height: var(--lh); max-width: 60ch; }

.bk-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-4);
}
.bk-section-header h2 { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.025em; }
.bk-section-header a { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; display: inline-flex; align-items: center; gap: var(--sp-1); }
.bk-section-header a:hover { color: var(--forest); }

/* ════════════════════════════════════════════════════════════
   TABS (subrayado)  /  SEGMENTED CONTROL (cápsula)
   ════════════════════════════════════════════════════════════ */
.bk-tabs { display: flex; gap: var(--sp-5); border-bottom: 1px solid var(--line); }
.bk-tab {
  appearance: none; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: var(--fs-sm); font-weight: 500; color: var(--mute);
  padding: 0 0 var(--sp-3); margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.bk-tab:hover { color: var(--ink-2); }
.bk-tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.bk-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-pill); }
.bk-seg__btn {
  appearance: none; border: none; cursor: pointer; font-family: inherit;
  font-size: var(--fs-sm); font-weight: 500; color: var(--mute);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill); background: transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.bk-seg__btn:hover { color: var(--ink-2); }
.bk-seg__btn.is-active { background: var(--bone); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ════════════════════════════════════════════════════════════
   DROPDOWN / MENU
   ════════════════════════════════════════════════════════════ */
.bk-menu {
  background: var(--bone); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: var(--sp-1); min-width: 200px;
  z-index: var(--z-popover);
}
.bk-menu__item {
  display: flex; align-items: center; gap: var(--sp-2);
  width: 100%; text-align: left;
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: var(--ink-2);
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: background var(--dur-fast) var(--ease);
}
.bk-menu__item:hover { background: var(--paper-2); color: var(--ink); }
.bk-menu__item--danger { color: var(--danger); }
.bk-menu__item--danger:hover { background: var(--danger-soft); }
.bk-menu__sep { height: 1px; background: var(--line); margin: var(--sp-1) 0; }

/* ════════════════════════════════════════════════════════════
   TABLA
   ════════════════════════════════════════════════════════════ */
.bk-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.bk-table th {
  text-align: left; font-family: var(--font-mono);
  font-size: var(--fs-caption); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mute); padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.bk-table td { padding: var(--sp-3); border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.bk-table tr:last-child td { border-bottom: none; }
.bk-table tbody tr { transition: background var(--dur-fast) var(--ease); }
.bk-table tbody tr:hover { background: var(--paper-2); }
.bk-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ════════════════════════════════════════════════════════════
   MODAL / DIALOG
   ════════════════════════════════════════════════════════════ */
.bk-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: rgba(10,10,10,0.28);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.bk-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.bk-modal {
  z-index: var(--z-modal);
  width: min(520px, 100%);
  max-height: calc(100dvh - 2 * var(--sp-8));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(12px) scale(.98); opacity: 0;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.bk-overlay.is-open .bk-modal { transform: none; opacity: 1; }
.bk-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.bk-modal__title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; }
.bk-modal__body { padding: var(--sp-6); overflow-y: auto; }
.bk-modal__foot {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--line); flex-shrink: 0;
}
/* Variante hoja inferior (mobile sheet) */
@media (max-width: 600px) {
  .bk-overlay--sheet { align-items: flex-end; padding: 0; }
  .bk-overlay--sheet .bk-modal { width: 100%; max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; transform: translateY(100%); }
  .bk-overlay--sheet.is-open .bk-modal { transform: none; }
}

/* ════════════════════════════════════════════════════════════
   EMPTY STATE
   ════════════════════════════════════════════════════════════ */
.bk-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--sp-12) var(--sp-6); gap: var(--sp-3);
}
.bk-empty__icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--paper-2); color: var(--mute);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-1);
}
.bk-empty__title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; color: var(--ink); }
.bk-empty__text { font-size: var(--fs-sm); color: var(--mute); max-width: 36ch; line-height: var(--lh); }
.bk-empty__action { margin-top: var(--sp-3); }

/* ════════════════════════════════════════════════════════════
   ALERT / FEEDBACK INLINE
   ════════════════════════════════════════════════════════════ */
.bk-alert {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r);
  font-size: var(--fs-sm); line-height: var(--lh);
}
.bk-alert svg { flex-shrink: 0; margin-top: 1px; }
.bk-alert--error   { background: var(--danger-soft);  color: var(--danger); }
.bk-alert--warn    { background: var(--warn-soft);    color: var(--warn); }
.bk-alert--success { background: var(--success-soft); color: var(--success); }
.bk-alert--info    { background: var(--info-soft);    color: var(--info); }

/* ════════════════════════════════════════════════════════════
   TOAST
   ════════════════════════════════════════════════════════════ */
.bk-toast-stack {
  position: fixed; bottom: var(--sp-6); left: 50%; transform: translateX(-50%);
  z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--sp-2);
  align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 2 * var(--sp-4));
}
.bk-toast {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper);
  font-size: var(--fs-sm); font-weight: 500;
  box-shadow: var(--shadow-lg); pointer-events: auto;
  animation: bk-toast-in var(--dur) var(--ease-out);
}
.bk-toast--success { background: var(--success); }
.bk-toast--error   { background: var(--danger); }
@keyframes bk-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ════════════════════════════════════════════════════════════
   SKELETON / SPINNER
   ════════════════════════════════════════════════════════════ */
.bk-skeleton {
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--line) 37%, var(--paper-2) 63%);
  background-size: 400% 100%;
  border-radius: var(--r-sm);
  animation: bk-shimmer 1.4s ease infinite;
}
.bk-skeleton--text { height: 12px; margin: 6px 0; }
.bk-skeleton--title { height: 22px; width: 40%; }
.bk-skeleton--line { height: 12px; }
@keyframes bk-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.bk-spinner {
  width: 16px; height: 16px; flex-shrink: 0;
  border: 2px solid var(--line-2); border-top-color: var(--ink);
  border-radius: 50%; animation: bk-spin .7s linear infinite;
}
.bk-spinner--forest { border-top-color: var(--forest); }
.bk-loading-row { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--mute); font-size: var(--fs-sm); }

/* ════════════════════════════════════════════════════════════
   PROPERTY CARD / LEAD CARD
   ════════════════════════════════════════════════════════════ */
.bk-prop-card {
  background: var(--bone); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.bk-prop-card:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.bk-prop-card__media { aspect-ratio: 4 / 3; background: var(--paper-2); position: relative; overflow: hidden; }
.bk-prop-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-prop-card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-1); }
.bk-prop-card__price { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.bk-prop-card__title { font-size: var(--fs-sm); color: var(--ink-2); }
.bk-prop-card__meta  { font-size: var(--fs-xs); color: var(--mute); display: flex; gap: var(--sp-3); margin-top: var(--sp-1); }

.bk-lead-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bone); border: 1px solid var(--line); border-radius: var(--r);
  transition: background var(--dur-fast) var(--ease);
}
.bk-lead-card:hover { background: var(--paper-2); }
.bk-lead-card__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--forest-soft); color: var(--forest);
  font-weight: 600; font-size: var(--fs-sm); letter-spacing: -0.01em;
}
.bk-lead-card__info { flex: 1; min-width: 0; }
.bk-lead-card__name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-lead-card__sub  { font-size: var(--fs-xs); color: var(--mute); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════
   UTILIDADES DE SCROLL / LAYOUT
   ════════════════════════════════════════════════════════════ */
.bk-scroll::-webkit-scrollbar { display: none; }
.bk-scroll { scrollbar-width: none; }
.bk-stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.bk-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }

/* ════════════════════════════════════════════════════════════
   BROQUER SHARK LOADER — aleta + ola minimalista
   Uso:
     <div class="bk-shark-loader" role="status" aria-label="Cargando">
       <svg viewBox="0 0 100 40" xmlns="http://www.w3.org/2000/svg">
         <path class="bk-wave" d="M0,30 Q12,22 25,30 T50,30 T75,30 T100,30"/>
         <path class="bk-fin"  d="M0,28 C2,12 12,18 14,28 C10,24 5,26 0,28 Z"/>
       </svg>
     </div>
   ──────────────────────────────────────────────────────────── */
.bk-shark-loader {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
  width: 140px; height: 48px; margin: 0 auto;
}
.bk-shark-loader svg { width: 100%; height: 100%; overflow: visible; }
.bk-shark-loader .bk-wave {
  fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; opacity: 0.32;
}
.bk-shark-loader .bk-fin {
  fill: currentColor;
  transform-origin: 8px 28px;
  animation: bk-shark-swim 2.4s ease-in-out infinite;
}
@keyframes bk-shark-swim {
  0%   { transform: translateX(0)   translateY(0)  rotate(0deg); }
  25%  { transform: translateX(28px) translateY(-3px) rotate(-4deg); }
  50%  { transform: translateX(56px) translateY(0)  rotate(0deg); }
  75%  { transform: translateX(28px) translateY(-3px) rotate(4deg); }
  100% { transform: translateX(0)   translateY(0)  rotate(0deg); }
}
.bk-shark-loader__text {
  display: block; margin-top: 6px;
  font-size: 12px; color: var(--mute);
  font-family: var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase; text-align: center;
}
.bk-shark-loader--col { flex-direction: column; height: auto; }
