  /* ── Sistema de diseño: design tokens ───────────────────────────── */
  :root {
    /* Colores */
    --color-primary: #1e90ff;
    --color-primary-700: #1278d4;
    --color-primary-900: #1f4e79;
    --color-danger: #c0392b;
    --color-danger-700: #a82d20;
    --color-success: #1a9850;
    --color-success-700: #157a3f;
    --color-recording: #d73027;
    --color-warning: #b54708;

    --color-bg: #ffffff;
    --color-bg-translucent: rgba(255, 255, 255, 0.94);
    --color-surface-1: #f9fafb;
    --color-surface-2: #f0f4f8;
    --color-border: #e5e7eb;
    --color-border-strong: #d1d5db;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-text-faint: #9ca3af;

    /* Espacios */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;

    /* Radios */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 999px;

    /* Layout */
    --topbar-h: 56px;
    --bottombar-h: 56px;
    --drawer-w: 320px;
    --drawer-w-desktop: 300px;
    --layers-w-desktop: 300px;
    /* Ancho del panel lateral de la Ficha de Prefactibilidad. Fluido al ~40%
       del viewport con piso/techo para que el formulario respire en pantallas
       medianas sin acaparar monitores grandes. */
    --prefact-panel-w: clamp(480px, 40vw, 760px);

    /* Touch targets */
    --tap-min: 44px;

    /* Safe areas iOS */
    --sa-top: env(safe-area-inset-top, 0px);
    --sa-bottom: env(safe-area-inset-bottom, 0px);
    --sa-left: env(safe-area-inset-left, 0px);
    --sa-right: env(safe-area-inset-right, 0px);

    /* Z-index stack */
    --z-map: 0;
    --z-overlay: 5;
    --z-bottombar: 20;
    --z-topbar: 25;
    --z-drawer-backdrop: 29;
    --z-drawer: 30;
    --z-toast: 50;
    --z-modal: 9999;

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.10);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.25);

    /* Transiciones */
    --t-fast: 0.12s ease;
    --t-base: 0.2s ease;
    --t-drawer: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
