/*
 * Tokens visuales canónicos.
 * Los componentes consumen estos nombres semánticos; los valores de marca
 * y tema no deben repetirse fuera de este archivo.
 */
:root {
  --app-color-action: #2563eb;
  --app-color-action-hover: #1d4ed8;
  --app-color-action-active: #1e40af;
  --app-color-action-contrast: #fff;
  --app-color-view: #7c3aed;
  --app-color-view-rgb: 124, 58, 237;
  --app-color-view-hover: #6d28d9;
  --app-color-view-active: #5b21b6;
  --app-color-view-contrast: #fff;
  --app-bg: #f4f7fb;
  --app-border-color: #dce3ec;
  --app-placeholder-color: #697586;

  --app-radius-control: .9rem;
  --app-radius-card: 1rem;
  --app-radius-overlay: 1.25rem;
  --app-radius-compact: .55rem;

  --app-shadow-control: 0 1px 4px rgb(16 24 40 / 10%);
  --app-shadow-control-hover: 0 2px 7px rgb(16 24 40 / 14%);
  --app-shadow-card: 0 1px 2px rgb(16 24 40 / 4%);
  --app-shadow-overlay: 0 .5rem 1.5rem rgb(16 24 40 / 16%);
  --app-shadow-modal: 0 1.5rem 3.75rem rgb(16 24 40 / 24%);

  --app-control-height: 40px;
  --app-touch-target: 44px;
  --app-sidebar-width: 260px;

  --bs-primary: var(--app-color-action);
  --bs-primary-rgb: 37, 99, 235;
  --bs-link-color: var(--app-color-action);
  --bs-link-color-rgb: 37, 99, 235;
  --bs-link-hover-color: var(--app-color-action-hover);
  --bs-link-hover-color-rgb: 29, 78, 216;
  --bs-border-color: var(--app-border-color);
  --bs-border-radius: var(--app-radius-compact);
  --bs-border-radius-sm: .45rem;
  --bs-border-radius-lg: var(--app-radius-control);
  --bs-border-radius-xl: var(--app-radius-card);
  --bs-border-radius-xxl: var(--app-radius-overlay);
  --bs-focus-ring-color: rgb(var(--bs-primary-rgb) / 25%);
  --bs-primary-bg-subtle: #eff6ff;
  --bs-primary-border-subtle: #bfdbfe;
  --bs-primary-text-emphasis: #1e40af;
  /* Paleta semántica: acciones, estados y superficies suaves. */
  --bs-success: #15803d;
  --bs-success-rgb: 21, 128, 61;
  --app-success-hover: #166534;
  --app-success-active: #14532d;
  --app-success-contrast: #ffffff;
  --bs-success-bg-subtle: #dcfce7;
  --bs-success-border-subtle: #86efac;
  --bs-success-text-emphasis: #166534;
  --bs-danger: #dc2626;
  --bs-danger-rgb: 220, 38, 38;
  --app-danger-hover: #b91c1c;
  --app-danger-active: #991b1b;
  --app-danger-contrast: #ffffff;
  --bs-danger-bg-subtle: #fee2e2;
  --bs-danger-border-subtle: #fca5a5;
  --bs-danger-text-emphasis: #991b1b;
  --bs-warning: #f59e0b;
  --bs-warning-rgb: 245, 158, 11;
  --app-warning-hover: #eab308;
  --app-warning-active: #d97706;
  --app-warning-contrast: #211600;
  --bs-warning-bg-subtle: #fef3c7;
  --bs-warning-border-subtle: #fcd34d;
  --bs-warning-text-emphasis: #92400e;
  --bs-info: #0e7490;
  --bs-info-rgb: 14, 116, 144;
  --app-info-hover: #155e75;
  --app-info-active: #164e63;
  --app-info-contrast: #ffffff;
  --bs-info-bg-subtle: #cffafe;
  --bs-info-border-subtle: #67e8f9;
  --bs-info-text-emphasis: #155e75;
}

[data-bs-theme="dark"] {
  --app-color-action: #60a5fa;
  --app-color-action-hover: #93c5fd;
  --app-color-action-active: #bfdbfe;
  --app-color-action-contrast: #112036;
  --app-color-view: #a78bfa;
  --app-color-view-rgb: 167, 139, 250;
  --app-color-view-hover: #c4b5fd;
  --app-color-view-active: #ddd6fe;
  --app-color-view-contrast: #21143d;
  --app-bg: #111923;
  --app-border-color: #344152;
  --app-placeholder-color: #98a6b8;

  --bs-primary: var(--app-color-action);
  --bs-primary-rgb: 96, 165, 250;
  --bs-link-color: var(--app-color-action);
  --bs-link-color-rgb: 96, 165, 250;
  --bs-link-hover-color: var(--app-color-action-hover);
  --bs-link-hover-color-rgb: 147, 197, 253;
  --bs-border-color: var(--app-border-color);
  --bs-primary-bg-subtle: #172554;
  --bs-primary-border-subtle: #1e40af;
  --bs-primary-text-emphasis: #bfdbfe;

  /* Paleta semántica: acciones, estados y superficies suaves. */
  --bs-success: #4ade80;
  --bs-success-rgb: 74, 222, 128;
  --app-success-hover: #86efac;
  --app-success-active: #bbf7d0;
  --app-success-contrast: #10251b;
  --bs-success-bg-subtle: #052e16;
  --bs-success-border-subtle: #166534;
  --bs-success-text-emphasis: #86efac;
  --bs-danger: #f87171;
  --bs-danger-rgb: 248, 113, 113;
  --app-danger-hover: #fca5a5;
  --app-danger-active: #fecaca;
  --app-danger-contrast: #320c12;
  --bs-danger-bg-subtle: #450a0a;
  --bs-danger-border-subtle: #991b1b;
  --bs-danger-text-emphasis: #fca5a5;
  --bs-warning: #fbbf24;
  --bs-warning-rgb: 251, 191, 36;
  --app-warning-hover: #fcd34d;
  --app-warning-active: #fde68a;
  --app-warning-contrast: #211600;
  --bs-warning-bg-subtle: #451a03;
  --bs-warning-border-subtle: #92400e;
  --bs-warning-text-emphasis: #fcd34d;
  --bs-info: #22d3ee;
  --bs-info-rgb: 34, 211, 238;
  --app-info-hover: #67e8f9;
  --app-info-active: #a5f3fc;
  --app-info-contrast: #082f49;
  --bs-info-bg-subtle: #083344;
  --bs-info-border-subtle: #155e75;
  --bs-info-text-emphasis: #67e8f9;
}
