/* Dotly — base: fuentes, tokens de diseño, reset y tipografía. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 300 500;
  font-display: block;
  src: url("../fonts/material-symbols-rounded.woff2?v=3534778e1a") format("woff2");
}

:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --hover: #f1f4f3;
  --active: #e3f1eb;
  --line: #e4e9e7;
  --line-strong: #d3dad7;
  --text: #0f1a17;
  --muted: #5f6e69;
  --faint: #8a9793;
  --accent: #0a9d73;
  --accent-strong: #08865f;
  --accent-text: #ffffff;
  --accent-soft: rgba(10, 157, 115, 0.1);
  --field: #f3f6f5;
  --warn: #9a6200;
  --warn-soft: rgba(230, 150, 20, 0.12);
  --danger: #c4322f;
  --danger-soft: rgba(196, 50, 47, 0.09);
  --info: #2f6fb3;
  --info-soft: rgba(47, 111, 179, 0.1);
  /* Rosa: mejorar la redacción y el agente Copiloto. */
  --pink: #c2255c;
  --pink-strong: #a61e4d;
  --pink-soft: rgba(214, 51, 108, 0.1);
  --chat-bg: #eef2ef;
  --bubble-in: #ffffff;
  --bubble-out: #d8f6e9;
  --shadow-sm: 0 1px 2px rgba(16, 40, 32, 0.06);
  --shadow: 0 12px 36px rgba(16, 40, 32, 0.12), 0 2px 6px rgba(16, 40, 32, 0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --font: "Montserrat", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1312;
    --surface: #131817;
    --surface-2: #151a19;
    --hover: #1b2220;
    --active: #222a28;
    --line: #232b29;
    --line-strong: #2e3836;
    --text: #e7edeb;
    --muted: #8b9994;
    --faint: #6b7975;
    --accent: #2ad3a1;
    --accent-strong: #4be0b3;
    --accent-text: #03140e;
    --accent-soft: rgba(42, 211, 161, 0.13);
    --field: #1b2220;
    --warn: #f2b54a;
    --warn-soft: rgba(242, 181, 74, 0.13);
    --danger: #f2716b;
    --danger-soft: rgba(242, 113, 107, 0.12);
    --info: #7fb2ec;
    --info-soft: rgba(127, 178, 236, 0.12);
    --pink: #f783ac;
    --pink-strong: #faa2c1;
    --pink-soft: rgba(247, 131, 172, 0.14);
    --chat-bg: #0b0f0e;
    --bubble-in: #1c2321;
    --bubble-out: #0f4a3c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1312;
  --surface: #131817;
  --surface-2: #151a19;
  --hover: #1b2220;
  --active: #222a28;
  --line: #232b29;
  --line-strong: #2e3836;
  --text: #e7edeb;
  --muted: #8b9994;
  --faint: #6b7975;
  --accent: #2ad3a1;
  --accent-strong: #4be0b3;
  --accent-text: #03140e;
  --accent-soft: rgba(42, 211, 161, 0.13);
  --field: #1b2220;
  --warn: #f2b54a;
  --warn-soft: rgba(242, 181, 74, 0.13);
  --danger: #f2716b;
  --danger-soft: rgba(242, 113, 107, 0.12);
  --info: #7fb2ec;
  --info-soft: rgba(127, 178, 236, 0.12);
  --pink: #f783ac;
  --pink-strong: #faa2c1;
  --pink-soft: rgba(247, 131, 172, 0.14);
  --chat-bg: #0b0f0e;
  --bubble-in: #1c2321;
  --bubble-out: #0f4a3c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }

p {
  margin: 0;
}

input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent-soft);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
/* Barras de desplazamiento horizontales: invisibles (el contenido se sigue desplazando). */
::-webkit-scrollbar:horizontal { height: 0; display: none; }
.table-wrap, .board, .heatmap, .chips, .tabs, .filters, [data-scroll-x] { scrollbar-width: none; }

/* Sin el destello gris/azul al tocar en celulares. */
*, *::before, *::after { -webkit-tap-highlight-color: transparent; }

.icon {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none;
  flex: 0 0 auto;
}

.icon--fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.icon--sm { font-size: 16px; }
.icon--lg { font-size: 24px; }
.icon--xl { font-size: 32px; }

/* Utilidades mínimas */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.danger-text { color: var(--danger); }
.warn-text { color: var(--warn); }
.success-text { color: var(--accent-strong); }
.accent-text { color: var(--accent); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.center { text-align: center; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) { .hide-sm { display: none; } }
.right { text-align: right; }
.hidden, [hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--sm { gap: 8px; }
.stack--lg { gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row--sm { gap: 6px; }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }

/* Logos: versión oscura sobre fondo claro y viceversa */
.logo-dark { display: block; }
.logo-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-dark { display: none; }
  :root:not([data-theme="light"]) .logo-light { display: block; }
}
:root[data-theme="dark"] .logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: block; }
