/* Dotik OS — tokens, reset y tipografía */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2-variations"), url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;

  --brand: #1753eb;
  --brand-600: #1146cc;
  --brand-700: #0d38a6;
  --brand-50: #eef3ff;
  --brand-100: #dbe5ff;
  --accent: #7515ff;
  --accent-50: #f3ecff;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef1f7;
  --border: #e3e7ef;
  --border-strong: #cfd6e3;
  --text: #121a2e;
  --text-2: #3d475e;
  --muted: #6b7489;
  --faint: #98a1b3;

  --success: #0f8a5f;
  --success-50: #e7f6ef;
  --warning: #b45309;
  --warning-50: #fff4e0;
  --danger: #d12d2d;
  --danger-50: #fdecec;
  --info: #0b7fbf;
  --info-50: #e6f4fb;
  --violet: #6d28d9;
  --violet-50: #f1ebfe;

  --sidebar-bg: #0b1122;
  --sidebar-bg-2: #121a31;
  --sidebar-text: #c3cbe0;
  --sidebar-muted: #7e88a3;
  --sidebar-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow: 0 4px 12px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 18px 40px -12px rgba(16, 24, 40, 0.22), 0 6px 14px -6px rgba(16, 24, 40, 0.1);
  --ring: 0 0 0 3px rgba(23, 83, 235, 0.22);

  --sidebar-w: 264px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 180ms;
  --dur-slow: 320ms;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0f1d;
  --surface: #111828;
  --surface-2: #151d30;
  --surface-3: #1b2439;
  --border: #233049;
  --border-strong: #31405e;
  --text: #e8ecf6;
  --text-2: #c2c9da;
  --muted: #8d97ad;
  --faint: #66708a;
  --brand-50: rgba(23, 83, 235, 0.16);
  --brand-100: rgba(23, 83, 235, 0.28);
  --accent-50: rgba(117, 21, 255, 0.18);
  --success: #3ccf91;
  --success-50: rgba(60, 207, 145, 0.14);
  --warning: #f5a524;
  --warning-50: rgba(245, 165, 36, 0.14);
  --danger: #ff6b6b;
  --danger-50: rgba(255, 107, 107, 0.14);
  --info: #4cb8f0;
  --info-50: rgba(76, 184, 240, 0.14);
  --violet: #a78bfa;
  --violet-50: rgba(167, 139, 250, 0.16);
  --sidebar-bg: #070b16;
  --sidebar-bg-2: #0d1324;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 22px 48px -12px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 3px rgba(76, 132, 255, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-xs); }
::selection { background: var(--brand-100); }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
code, kbd { font-family: var(--mono); font-size: 0.85em; }
kbd { white-space: nowrap; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); color: var(--muted); }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; }
.icon--xs { width: 13px; height: 13px; }
.icon--sm { width: 15px; height: 15px; }
.icon--lg { width: 22px; height: 22px; }
.icon--xl { width: 28px; height: 28px; }
.icon--spin { animation: spin 0.9s linear infinite; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.text-sm { font-size: 0.86rem; }
.text-xs { font-size: 0.76rem; }
.text-lg { font-size: 1.1rem; }
.strong { font-weight: 650; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grow > .truncate, .grow > .table__sub { display: block; }
.nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-brand { color: var(--brand); }
.row { display: flex; align-items: center; gap: 0.5rem; }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.row--top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.stack--sm { gap: 0.4rem; }
.stack--lg { gap: 1.25rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
[hidden] { display: none !important; }

/* Barras de desplazamiento discretas; las horizontales, invisibles. */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 0; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.x-scroll { overflow-x: auto; scrollbar-width: none; }
.x-scroll::-webkit-scrollbar { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(23, 83, 235, 0.45); } 70% { box-shadow: 0 0 0 12px rgba(23, 83, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(23, 83, 235, 0); } }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .hide-mobile { display: none !important; }
}
@media (min-width: 641px) {
  .only-mobile { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
