/* Design tokens: cambia aquí colores, tamaños y medidas del layout.
   Modo día en :root; modo oscuro en :root[data-theme='dark'] (v13). Los componentes solo usan estas variables. */
:root {
  color-scheme: light;
  --font: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 15px;

  /* Laboratory §3, §5 and §19: named roles preserve their exact values. */
  --fs-caption: 11px;
  --fs-object: 16px;
  --fs-meter: 17px;
  --fs-intro: 19px;
  --fs-metric: 22px;
  --fs-price: 24px;
  --fs-label: 10.5px;
  --fs-meta: 11.5px;
  --fs-compact: 12.5px;
  --radius-tab: 2px;
  --radius-tail: 4px;
  --radius-compact: 5px;
  --radius-segment: 7px;
  --radius-brand: 9px;
  --radius-pop: 10px;
  --radius-tile: 11px;
  --radius-modal: 14px;
  --radius-sheet: 16px;
  --radius-pill: 999px;
  --radius-circle: 50%;
  /* Always white: switch knob, QR and brand tile; mask alpha is theme independent. */
  --c-white: #ffffff;
  --c-logo-bg: #ffffff; /* Brand tile remains white in both themes (§19). */
  --c-mask: #000000;
  /* Existing SVG brand gradient; no decorative gradient is added to controls. */
  --c-logo-start: #0fa3a3;
  --c-logo-end: #3cc25c;
  --shadow-focus: 0 0 0 3px var(--c-focus);
  --shadow-calendar-focus: inset 0 0 0 2px var(--c-accent-border);
  --shadow-avatar: inset 0 0 0 1px color-mix(in srgb, var(--c-text) 4%, transparent);
  --shadow-status-green: 0 0 0 3px color-mix(in srgb, var(--tone-green-solid) 16%, transparent);
  --shadow-status-orange: 0 0 0 3px color-mix(in srgb, var(--tone-orange-solid) 16%, transparent);
  --shadow-primary: 0 1px 2px color-mix(in srgb, var(--c-accent) 30%, transparent), inset 0 1px 0 color-mix(in srgb, var(--c-on-accent) 15%, transparent);
  --shadow-danger: 0 1px 2px color-mix(in srgb, var(--c-danger) 30%, transparent), inset 0 1px 0 color-mix(in srgb, var(--c-on-danger) 15%, transparent);
  --shadow-selection: inset 3px 0 var(--c-accent);
  /* Selected conversation row: 1 px inner ring (laboratory §11.23). */
  --shadow-row-active: inset 0 0 0 1px var(--c-accent-border);

  /* Superficies y líneas */
  --c-bg: #ffffff;
  --c-surface: #f7f8f8;
  --c-surface-hover: #f2f4f4;
  --c-subtle: #fbfcfc;       /* filas al pasar el ratón, fines de semana */
  --c-chrome: #f1f7f5;       /* franja de controles con tinte verde suave */
  --c-glass: rgba(255, 255, 255, .92); /* cabeceras fijas semitransparentes */
  --c-hover: rgba(17, 23, 22, .045);
  --c-border: #eceeed;
  --c-border-strong: #e1e4e3;
  --c-border-hover: #d5d9d8;
  --c-control-border: #788a85;
  --c-control-border-hover: #657a74;
  --c-canvas: #eef2f1;       /* lienzo del recorrido visual */
  --c-canvas-dot: #cbd3d1;
  --c-overlay: rgba(15, 23, 22, .28);
  --c-media-overlay: rgba(0, 0, 0, .66);

  /* Texto */
  --c-text: #111716;
  --c-text-2: #48625d;
  --c-text-3: #526e67;
  --c-icon: #74837f;
  --c-icon-soft: #b7c0be;
  --c-on-accent: #ffffff;
  --c-on-danger: #ffffff;
  --c-read-on-accent: #b8f5ea; /* doble check "leído" sobre la burbuja teal */

  /* Marca */
  --c-accent: #0b7769;
  --c-brand-fallback: #0b7769;
  --c-brand-contrast-fallback: #ffffff;
  --c-accent-strong: #0b7166;
  --c-accent-hover: var(--c-accent-strong);
  --c-accent-soft: #ebf7f5;
  --c-accent-border: #c3e8e1;
  --c-focus: rgba(14, 147, 132, .16);
  --c-focus-outline: var(--c-accent-strong);

  /* Tonos de estado: fondo suave · texto · relleno/acento · texto fuerte · borde */
  --tone-green-bg: #e7f6ee;  --tone-green-fg: #1a7443;  --tone-green-solid: #22a06b;  --tone-green-strong: #17603a;
  --tone-blue-bg: #e9f1fc;   --tone-blue-fg: #1f62ad;   --tone-blue-solid: #2f7bd6;   --tone-blue-strong: #1d4f86;  --tone-blue-border: #d3e3f7;
  --tone-orange-bg: #fdf1e3; --tone-orange-fg: #ad5510; --tone-orange-solid: #e0891b;
  --tone-red-bg: #fdecec;    --tone-red-fg: #bf3232;    --tone-red-solid: #d65151;    --tone-red-strong: #8e2626;   --tone-red-border: #f2c9c9;
  --tone-gray-bg: #f0f2f1;   --tone-gray-fg: #56625f;   --tone-gray-solid: #c5cccb;

  --c-danger: #be3434;
  --c-danger-hover: #c23434;
  --c-danger-soft: #fdeeee;
  --c-warn: #ab7002;
  --c-warn-soft: #fff8e8;
  --c-warn-text: #5c4710;
  --c-warn-border: #f3e2b5;
  --c-star: #e0a526;
  --c-folder: #d9a23a;
  --c-whatsapp: #25a55f;
  --c-messenger: #0a7cff;
  --c-instagram: #d62976;
  --c-disabled-bg: #e3e7e6;
  --c-disabled-fg: #a5aeab;
  --c-scroll: #dde1e0;
  --c-scroll-hover: #c8cecc;
  --c-tooltip-bg: #111716;
  --c-tooltip-fg: #f3f7f6;

  /* Sidebar clara (modo día) */
  --c-side-bg: #f1f7f5;
  --c-side-border: #e2ebe8;
  --c-side-text: #48625d;
  --c-side-text-strong: #111716;
  --c-side-hover: rgba(17, 23, 22, .045);
  --c-side-active: #ffffff;
  --c-side-active-shadow: 0 1px 2px rgba(16, 24, 22, .06), 0 0 0 1px rgba(16, 24, 22, .06);
  --c-side-icon-active: #0e9384;
  --c-side-line: #e2ebe8;
  --c-side-label: #526e67;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 22, .05);
  --shadow-knob: 0 1px 2px rgba(16, 24, 22, .25); /* mando blanco de los interruptores */
  --shadow-sm: 0 1px 3px rgba(16, 24, 22, .06), 0 1px 2px rgba(16, 24, 22, .04);
  --shadow-pop: 0 10px 28px -8px rgba(16, 24, 22, .16), 0 2px 6px rgba(16, 24, 22, .05);
  --shadow-modal: 0 24px 48px -12px rgba(16, 24, 22, .22), 0 0 0 1px rgba(16, 24, 22, .06);

  --sidebar-w: 224px;
  --sidebar-w-collapsed: 60px;
  --list-w: 320px;
  --topbar-h: 52px;
  --rail-w: 48px;
  --aside-w: 288px;
}

/* Modo oscuro (v13). Basado en la sidebar oscura de la v2: tinta verdosa, acento teal más luminoso. */
:root[data-theme='dark'] {
  color-scheme: dark;

  --c-bg: #0e1312;
  --c-surface: #161c1b;
  --c-surface-hover: #1b2221;
  --c-subtle: #121817;
  --c-chrome: #121a18;
  --c-glass: rgba(14, 19, 18, .9);
  --c-hover: rgba(255, 255, 255, .05);
  --c-border: #202827;
  --c-border-strong: #2b3533;
  --c-border-hover: #37423f;
  --c-control-border: #647771;
  --c-control-border-hover: #82958e;
  --c-canvas: #121a18;
  --c-canvas-dot: #26302e;
  --c-overlay: rgba(0, 0, 0, .55);

  --c-text: #e7eeec;
  --c-text-2: #a9b9b5;
  --c-text-3: #7f928e;
  --c-icon: #7f928e;
  --c-icon-soft: #4d5a57;
  --c-on-accent: #071b17;
  --c-on-danger: #0e1312;
  --c-read-on-accent: #102f26;

  --c-accent: #14a693;
  --c-brand-fallback: #14a693;
  --c-brand-contrast-fallback: #071b17;
  --c-accent-strong: #4fd1bd;
  --c-accent-soft: rgba(20, 166, 147, .14);
  --c-accent-border: rgba(20, 166, 147, .38);
  --c-focus: rgba(20, 166, 147, .28);

  --tone-green-bg: rgba(34, 160, 107, .16);  --tone-green-fg: #5fd39c;  --tone-green-solid: #2bb77b;  --tone-green-strong: #8ee3b8;
  --tone-blue-bg: rgba(47, 123, 214, .18);   --tone-blue-fg: #8ab8f0;   --tone-blue-solid: #4a90e2;   --tone-blue-strong: #b3d0f5;  --tone-blue-border: rgba(74, 144, 226, .35);
  --tone-orange-bg: rgba(224, 137, 27, .16); --tone-orange-fg: #f0b066; --tone-orange-solid: #e8962c;
  --tone-red-bg: rgba(214, 81, 81, .16);     --tone-red-fg: #f08a8a;    --tone-red-solid: #e06464;    --tone-red-strong: #f5a9a9;   --tone-red-border: rgba(224, 100, 100, .35);
  --tone-gray-bg: rgba(255, 255, 255, .06);  --tone-gray-fg: #a9b9b5;   --tone-gray-solid: #4d5a57;

  --c-danger: #e06464;
  --c-danger-hover: #ea7b7b;
  --c-danger-soft: rgba(214, 81, 81, .14);
  --c-warn: #e6a817;
  --c-warn-soft: rgba(230, 168, 23, .11);
  --c-warn-text: #f0cf7a;
  --c-warn-border: rgba(230, 168, 23, .28);
  --c-star: #f0b93a;
  --c-folder: #e0b048;
  --c-messenger: #4aa3ff;
  --c-instagram: #f05a9d;
  --c-disabled-bg: #1f2726;
  --c-disabled-fg: #5c6a67;
  --c-scroll: #2b3533;
  --c-scroll-hover: #3a4643;
  --c-tooltip-bg: #e7eeec;
  --c-tooltip-fg: #0e1312;

  --c-side-bg: #0b100f;
  --c-side-border: #1a2120;
  --c-side-text: #a3b0ad;
  --c-side-text-strong: #f3f7f6;
  --c-side-hover: rgba(255, 255, 255, .05);
  --c-side-active: rgba(255, 255, 255, .08);
  --c-side-active-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
  --c-side-icon-active: #4fd1bd;
  --c-side-line: rgba(255, 255, 255, .07);
  --c-side-label: #879995;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-knob: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-pop: 0 12px 32px -8px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .05);
  --shadow-modal: 0 24px 60px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
