/* ==========================================================================
   BacanoCore — Superpanel de administración
   base.css · tokens, reset y tipografía
   Paleta: blanco y negro. Sin color.
   ========================================================================== */

:root {
  /* ---- Escala de grises (única paleta) ---- */
  --ink-900: #000000;
  --ink-800: #111111;
  --ink-700: #2b2b2b;
  --ink-600: #4d4d4d;
  --ink-500: #666666;
  --ink-400: #7a7a7a;
  --ink-300: #a6a6a6;
  --ink-200: #d0d0d0;
  --ink-100: #e8e8e8;

  --paper: #ffffff;
  --paper-2: #f7f7f7;
  --paper-3: #efefef;
  --bg: #e6e6e6;

  /* ---- Semántica monocroma ----
     El énfasis se da por peso, no por color:
     relleno negro = urgente · relleno gris = atención · contorno = normal  */
  --solid-bg: var(--ink-900);
  --solid-fg: #ffffff;
  --soft-bg: var(--ink-100);
  --soft-fg: var(--ink-700);

  /* ---- Radios ---- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-full: 999px;

  /* ---- Sombras ---- */
  --sh-xs: 0 1px 2px rgba(0, 0, 0, .06);
  --sh-sm: 0 2px 8px rgba(0, 0, 0, .07);
  --sh-md: 0 8px 24px rgba(0, 0, 0, .09);
  --sh-lg: 0 24px 60px rgba(0, 0, 0, .16);

  /* ---- Espaciado ---- */
  --gap: 18px;
  --pad-card: 22px;

  /* ---- Layout ---- */
  --rail-w: 78px;

  /* ---- Tipografía ---- */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-800);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; width: 100%; }

::selection { background: var(--ink-900); color: #fff; }

/* ---- Scrollbars ---- */
* { scrollbar-width: thin; scrollbar-color: var(--ink-200) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--ink-200);
  border-radius: var(--r-full);
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--ink-300); background-clip: content-box; }

/* ---- Tipografía utilitaria ---- */
.display {
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
}
.display--muted { color: var(--ink-300); font-weight: 600; }

.h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.h2 { font-size: 19px; font-weight: 650; letter-spacing: -.015em; }
.h3 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }

.num {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.num--sm { font-size: 24px; }
.num--lg { font-size: 44px; }
.num .unit {
  font-size: .42em;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: super;
  color: var(--ink-400);
}

.muted { color: var(--ink-400); }
.dim { color: var(--ink-300); }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.strong { font-weight: 650; }
.mono { font-family: var(--mono); font-size: 12px; }
.up { text-transform: uppercase; letter-spacing: .09em; font-size: 10px; font-weight: 650; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }

/* ---- Helpers de layout ---- */
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.row--top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }
.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;
}

/* ---- Animaciones ---- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}
@keyframes spin { to { transform: rotate(360deg); } }

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