/* ─────────────────────────────────────────────────────────────
   Registro Anestésico Digital — Tokens de diseño
   Equivalente estático de app/globals.css (Tailwind v4 + shadcn)
   Los valores oklch originales se expresan aquí en hex para
   máxima compatibilidad de navegadores.
   ───────────────────────────────────────────────────────────── */

:root {
  --background: #f7f8fb;
  --foreground: #131a25;
  --card: #ffffff;
  --card-foreground: #131a25;
  --popover: #ffffff;
  --popover-foreground: #131a25;
  --primary: #1c50a3;
  --primary-foreground: #fcfcfd;
  --secondary: #eef1f6;
  --secondary-foreground: #24303f;
  --muted: #e9edf3;
  --muted-foreground: #5c6675;
  --accent: #0e8a63;
  --accent-foreground: #fcfcfd;
  --destructive: #cf3527;
  --destructive-foreground: #fcfcfd;
  --border: #d5dae2;
  --input: #e2e6ed;
  --ring: #1c50a3;

  --chart-1: #cf3527;
  --chart-2: #1c50a3;
  --chart-3: #0e8a63;
  --chart-4: #ad7f14;
  --chart-5: #7a4aa6;

  --warning: #d5a02a;
  --warning-foreground: #3a2f10;
  --success: #0e8a63;
  --success-foreground: #fcfcfd;

  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

/* ── Reset básico ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

a:hover {
  text-decoration: underline;
}

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

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

/* ── Escala tipográfica (equivalente a Tailwind) ──────────── */
.text-\[10px\] { font-size: 10px; line-height: 1.3; }
.text-xs   { font-size: 12px; line-height: 1.35; }
.text-sm   { font-size: 14px; line-height: 1.45; }
.text-base { font-size: 16px; line-height: 1.5; }
.text-lg   { font-size: 18px; line-height: 1.4; }

.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.italic        { font-style: italic; }
.uppercase     { text-transform: uppercase; letter-spacing: 0.04em; }
.tabular       { font-variant-numeric: tabular-nums; }
.mono          { font-family: var(--font-mono); }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.text-center      { text-align: center; }
.text-muted       { color: var(--muted-foreground); }
.text-warning     { color: #eab308; }
.text-foreground  { color: var(--foreground); }
.text-primary     { color: var(--primary); }
.text-destructive { color: var(--destructive); }
.text-success     { color: var(--success); }

/* ── Utilidades de layout ─────────────────────────────────── */
.flex      { display: flex; }
.inline-flex { display: inline-flex; }
.grid      { display: grid; }
.hidden    { display: none !important; }
.block     { display: block; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-col  { flex-direction: column; }
.flex-1    { flex: 1 1 0%; }
.shrink-0  { flex-shrink: 0; }
.w-full    { width: 100%; }
.relative  { position: relative; }
.absolute  { position: absolute; }

.gap-05 { gap: 2px; }
.gap-1  { gap: 4px; }
.gap-15 { gap: 6px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.pt-1 { padding-top: 4px; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 12px; }
.pt-4 { padding-top: 16px; }

.stack > * + *      { margin-top: 16px; }
.stack-sm > * + *   { margin-top: 8px; }
.stack-xs > * + *   { margin-top: 4px; }
.stack-lg > * + *   { margin-top: 24px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

.border-t { border-top: 1px solid var(--border); }
.divider  { border-top: 1px solid var(--border); padding-top: 16px; }

/* ── Colores de puntos / marcadores ───────────────────────── */
.dot { display: inline-block; height: 8px; width: 8px; border-radius: 999px; flex-shrink: 0; }
.dot-lg { height: 10px; width: 10px; }

.bg-blue-500   { background: #3b82f6; }
.bg-indigo-500 { background: #6366f1; }
.bg-cyan-500   { background: #06b6d4; }
.bg-lime-500   { background: #84cc16; }
.bg-amber-500  { background: #f59e0b; }
.bg-sky-400    { background: #38bdf8; }
.bg-orange-400 { background: #fb923c; }
.bg-green-500  { background: #22c55e; }
.bg-violet-500 { background: #8b5cf6; }
.bg-teal-500   { background: #14b8a6; }
.bg-pink-400   { background: #f472b6; }
.bg-gray-400   { background: #9ca3af; }
.bg-yellow-500 { background: #eab308; }
.bg-red-500    { background: #ef4444; }
.bg-red-600    { background: #dc2626; }
.bg-red-800    { background: #991b1b; }
.bg-primary    { background: var(--primary); }
.bg-chart-1 { background: var(--chart-1); }
.bg-chart-2 { background: var(--chart-2); }
.bg-chart-3 { background: var(--chart-3); }
.bg-chart-4 { background: var(--chart-4); }
.bg-chart-5 { background: var(--chart-5); }
