/* Nexora Runtime UI kit v3 — estilos base para apps de la biblioteca.
 *
 * El mismo mundo que nexorabase.es («interfaz espacial» en tema claro): superficies blancas que flotan
 * sobre un espacio perla iluminado con el color de cada cliente, tipografía Geist y movimiento breve.
 *
 * MARCA DEL CLIENTE: /_nx/brand.css redefine las variables --nx-brand* con el color de cada
 * cliente (y --nx-lime/--nx-moss por compatibilidad con modelos v1). Usa siempre las variables,
 * nunca colores fijos, y la app se verá con la marca de quien la usa.
 */
@font-face {
  font-family: "Geist";
  src: url("/_nx/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --nx-ink: #14151f;
  --nx-ink-2: #2b2e3a;
  --nx-muted: #4f5464;
  --nx-faint: #8a8f9c;
  --nx-line: #e4e6ea;
  --nx-line-strong: #cfd3da;
  --nx-mist: #f4f5f7;
  --nx-pearl: #f7f8fa;
  --nx-paper: #ffffff;
  --nx-lime: #84cc16;
  --nx-lime-soft: #ecfccb;
  --nx-moss: #4d7c0f;
  --nx-danger: #b42318;
  --nx-danger-soft: #fef3f2;
  --nx-warn: #93370d;
  --nx-warn-soft: #fffaeb;
  --nx-info: #175cd3;
  --nx-info-soft: #eff8ff;
  /* Marca (por defecto, la de Nexora). */
  --nx-brand: var(--nx-lime);
  --nx-brand-hover: #79bd12;
  --nx-brand-ink: var(--nx-ink);
  --nx-brand-soft: var(--nx-lime-soft);
  --nx-brand-text: var(--nx-moss);
  --nx-radius: 18px;
  --nx-radius-sm: 12px;
  /* Elevación: un solo sistema (anillo fino + sombra suave con desplazamiento). */
  --nx-ring: 0 0 0 1px rgb(20 21 31 / 0.07);
  --nx-shadow: inset 0 1px 0 #fff, var(--nx-ring), 0 14px 34px -24px rgb(20 21 31 / 0.35);
  --nx-shadow-lift: inset 0 1px 0 #fff, 0 0 0 1px rgb(20 21 31 / 0.06), 0 30px 60px -28px rgb(20 21 31 / 0.4);
  --nx-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --nx-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html {
  scrollbar-color: var(--nx-line-strong) transparent;
  accent-color: var(--nx-brand-text);
  /* El cursor de escritura solo donde se escribe. */
  caret-color: transparent;
}
input, textarea, [contenteditable]:not([contenteditable="false"]) { caret-color: var(--nx-brand-text); }
body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  font-family: "Geist", ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--nx-ink);
  background: var(--nx-pearl);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* El espacio: luz del color del cliente detrás de todo (degradados, sin filtros). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(56rem 34rem at 0% -12%, color-mix(in srgb, var(--nx-brand) 16%, transparent), transparent 64%),
    radial-gradient(44rem 30rem at 100% 0%, color-mix(in srgb, var(--nx-brand) 8%, transparent), transparent 62%);
}
::selection { background: color-mix(in srgb, var(--nx-brand) 30%, #fff); color: var(--nx-ink); }
a { color: var(--nx-brand-text); text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--nx-brand-text); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h1 { letter-spacing: -0.035em; }
p { text-wrap: pretty; }
/* Controles: un doble clic no selecciona su texto. */
button, label, summary, [role="button"], [role="tab"], .nx-badge { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.nx-container { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
.nx-card {
  background: var(--nx-paper);
  border-radius: var(--nx-radius);
  padding: 20px;
  box-shadow: var(--nx-shadow);
  min-width: 0;
}
.nx-grid { display: grid; gap: 16px; }
.nx-grid > * { min-width: 0; }
.nx-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nx-spacer { flex: 1; }
.nx-muted { color: var(--nx-muted); }
.nx-num { font-variant-numeric: tabular-nums; }
kbd { font: inherit; font-weight: 600; font-size: .82em; padding: 1px 6px; border-radius: 6px; background: var(--nx-mist); box-shadow: inset 0 -1px 0 var(--nx-line-strong); }
.nx-icon { width: 1.1em; height: 1.1em; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Entrada de la pantalla: los bloques llegan en cascada breve una sola vez, al abrir la app. */
@keyframes nx-rise { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } }
.nx-container > * { animation: nx-rise .5s var(--nx-ease-out) both; }
.nx-container > *:nth-child(2) { animation-delay: 50ms; }
.nx-container > *:nth-child(3) { animation-delay: 100ms; }
.nx-container > *:nth-child(4) { animation-delay: 150ms; }
.nx-container > *:nth-child(n+5) { animation-delay: 200ms; }

/* Botones: píldoras; pulsación con scale(0.97) en 150 ms (respuesta inmediata). */
.nx-btn {
  appearance: none; border: 0; border-radius: 999px; min-height: 40px; padding: 0 18px;
  font: inherit; font-weight: 600; letter-spacing: -0.005em; cursor: pointer; background: var(--nx-ink); color: #fff; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 6px 16px -10px rgb(20 21 31 / .6);
  transition: background-color .15s ease, box-shadow .2s ease, transform .15s var(--nx-ease-out);
}
.nx-btn:hover { background: var(--nx-ink-2); }
.nx-btn:active { transform: scale(.97); }
.nx-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.nx-btn[aria-busy="true"] { cursor: progress; opacity: .75; }
.nx-btn--accent { background: var(--nx-brand); color: var(--nx-brand-ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 8px 20px -12px color-mix(in srgb, var(--nx-brand) 80%, #000); }
.nx-btn--accent:hover { background: var(--nx-brand-hover); }
.nx-btn--ghost { background: var(--nx-paper); color: var(--nx-ink); box-shadow: inset 0 1px 0 #fff, var(--nx-ring), 0 4px 12px -10px rgb(20 21 31 / .4); }
.nx-btn--ghost:hover { background: var(--nx-mist); }
.nx-btn--danger { background: var(--nx-paper); color: var(--nx-danger); box-shadow: 0 0 0 1px #f2c6c2; }
.nx-btn--danger:hover { background: var(--nx-danger-soft); }
.nx-btn--sm { min-height: 32px; padding: 0 13px; font-size: 13px; gap: 5px; }
.nx-btn--icon { padding: 0; width: 40px; min-height: 40px; }
.nx-btn--sm.nx-btn--icon { width: 32px; min-height: 32px; }

/* Campos: anillo fino, sin bordes duros; el foco se ilumina con la marca. */
.nx-input, .nx-select, .nx-textarea {
  width: 100%; min-height: 42px; font: inherit; color: var(--nx-ink); background: var(--nx-paper); border: 0;
  border-radius: var(--nx-radius-sm); padding: 9px 13px; min-width: 0;
  box-shadow: inset 0 0 0 1px var(--nx-line-strong);
  transition: box-shadow .15s ease, background-color .15s ease;
}
.nx-textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.nx-input:hover, .nx-select:hover, .nx-textarea:hover { box-shadow: inset 0 0 0 1px #b9bec8; }
.nx-input:focus, .nx-select:focus, .nx-textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--nx-brand-text), 0 0 0 4px color-mix(in srgb, var(--nx-brand) 24%, transparent);
}
.nx-input::placeholder, .nx-textarea::placeholder { color: var(--nx-faint); }
.nx-input:user-invalid, .nx-select:user-invalid, .nx-textarea:user-invalid { box-shadow: inset 0 0 0 1.5px var(--nx-danger); }
.nx-select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f5464' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
input[type="date"].nx-input, input[type="time"].nx-input, input[type="month"].nx-input { font-variant-numeric: tabular-nums; }
.nx-label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 5px; color: var(--nx-ink-2); }
.nx-hint { display: block; font-size: 12px; color: var(--nx-muted); margin-top: 5px; }
.nx-field { margin-bottom: 14px; min-width: 0; }
.nx-fields { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.nx-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.nx-check input { width: 18px; height: 18px; margin: 0; }

/* Tablas: desplazables en horizontal en pantallas estrechas (envuélvelas en .nx-table-wrap). */
.nx-table-wrap { overflow-x: auto; border-radius: var(--nx-radius); background: var(--nx-paper); box-shadow: var(--nx-shadow); }
.nx-table { width: 100%; border-collapse: collapse; background: transparent; }
.nx-table th, .nx-table td { padding: 11px 14px; border-bottom: 1px solid var(--nx-line); text-align: left; vertical-align: middle; }
.nx-table tr:last-child td { border-bottom: 0; }
.nx-table th { background: var(--nx-pearl); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-muted); white-space: nowrap; }
.nx-table td.nx-num, .nx-table th.nx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nx-table tbody tr { transition: background-color .15s ease; }
.nx-table tbody tr[data-id] { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .nx-table tbody tr[data-id]:hover { background: color-mix(in srgb, var(--nx-brand) 6%, var(--nx-pearl)); } }

/* Etiquetas de estado: con un punto que identifica el estado sin depender solo del color de fondo. */
.nx-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px 3px 9px; font-size: 12px; font-weight: 600; background: var(--nx-mist); color: var(--nx-ink-2); white-space: nowrap; flex-shrink: 0; }
.nx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; }
/* «Correcto» es un estado, no la marca: verde fijo aunque el cliente tenga otro color. */
.nx-badge--ok { background: #ecfccb; color: #3f6212; }
.nx-badge--brand { background: var(--nx-brand-soft); color: var(--nx-brand-text); }
.nx-badge--warn { background: var(--nx-warn-soft); color: var(--nx-warn); }
.nx-badge--danger { background: var(--nx-danger-soft); color: var(--nx-danger); }
.nx-badge--info { background: var(--nx-info-soft); color: var(--nx-info); }
.nx-empty {
  text-align: center; padding: 40px 20px; color: var(--nx-muted); border-radius: var(--nx-radius);
  background: color-mix(in srgb, var(--nx-paper) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--nx-line); list-style: none;
}
.nx-empty strong { display: block; color: var(--nx-ink); font-size: 15px; margin-bottom: 4px; }

/* Carga: bloques que respiran mientras llegan los datos. */
@keyframes nx-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.nx-skel {
  border-radius: var(--nx-radius-sm); min-height: 44px; list-style: none;
  background: linear-gradient(90deg, var(--nx-mist) 25%, #fff 50%, var(--nx-mist) 75%) 0 0 / 200% 100%;
  animation: nx-shimmer 1.4s ease-in-out infinite;
}

/* Indicadores (KPI) */
.nx-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.nx-kpi { background: var(--nx-paper); border-radius: var(--nx-radius); padding: 16px 18px; min-width: 0; box-shadow: var(--nx-shadow); }
.nx-kpi__label { font-size: 13px; color: var(--nx-muted); }
.nx-kpi__value { font-size: 30px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Pestañas: control segmentado de cristal. */
.nx-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 4px; background: rgb(255 255 255 / .7); border-radius: 999px; width: max-content; max-width: 100%; box-shadow: inset 0 1px 0 #fff, var(--nx-ring); scrollbar-width: none; }
.nx-tab { appearance: none; border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--nx-muted); padding: 7px 15px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.nx-tab:hover { color: var(--nx-ink); }
.nx-tab[aria-selected="true"] { background: var(--nx-ink); color: #fff; box-shadow: 0 6px 14px -8px rgb(20 21 31 / .6); }

/* Cabecera de página de la app */
.nx-head { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.nx-head h1 { margin: 0; font-size: 28px; }

/* Diálogos: centrados, llegan desde un poco más atrás y desenfocados. */
.nx-modal {
  border: none; border-radius: 24px; padding: 24px; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  color: var(--nx-ink); background: var(--nx-paper); box-shadow: var(--nx-shadow-lift);
}
.nx-modal[open] { animation: nx-pop .28s var(--nx-ease-out); }
.nx-modal::backdrop { background: rgb(20 21 31 / .32); backdrop-filter: blur(6px); }
.nx-modal[open]::backdrop { animation: nx-fade .2s ease; }
.nx-modal h2 { font-size: 21px; }
.nx-modal--wide { width: min(820px, calc(100vw - 24px)); }
.nx-modal form > .nx-row:last-child, .nx-modal .nx-actions { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--nx-line); }

/* Barra superior común, con la marca del cliente: una píldora de cristal que flota sobre la app.
   El cristal va en el propio elemento fijo (Safari solo desenfoca lo que hay detrás de esa capa). */
#nx-bar {
  position: sticky; top: 10px; z-index: 20; display: flex; align-items: center; gap: 12px;
  margin: 10px auto 0; width: calc(100% - 20px); max-width: 1160px; padding: 6px 8px 6px 16px; min-height: 52px;
  border-radius: 999px; font-size: 14px;
  background: rgb(255 255 255 / .74);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 0 0 1px rgb(20 21 31 / .06), 0 14px 34px -22px rgb(20 21 31 / .4);
  animation: nx-bar-in .5s var(--nx-ease-out) both;
}
@keyframes nx-bar-in { from { opacity: 0; transform: translateY(-8px); } }
.nx-bar__brand { font-weight: 650; display: inline-flex; align-items: center; gap: 10px; min-width: 0; letter-spacing: -0.01em; }
.nx-bar__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-bar__logo { height: 32px; max-width: 140px; object-fit: contain; flex-shrink: 0; }
@keyframes nx-breathe { 0%, 100% { box-shadow: 0 0 0 4px var(--nx-brand-soft); } 50% { box-shadow: 0 0 0 6px var(--nx-brand-soft); } }
.nx-bar__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--nx-brand); box-shadow: 0 0 0 4px var(--nx-brand-soft); flex-shrink: 0; animation: nx-breathe 3.2s ease-in-out infinite; }
.nx-bar__app { color: var(--nx-muted); font-weight: 500; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--nx-line); }
.nx-bar__support { background: var(--nx-warn-soft); color: var(--nx-warn); border-radius: 999px; padding: 3px 10px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.nx-bar__spacer { flex: 1; }
.nx-bar__demo { background: var(--nx-info-soft); color: var(--nx-info); border-radius: 999px; padding: 3px 11px; font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nx-bar__user { color: var(--nx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; margin-right: 4px; }
.nx-bar__btn { border: 0; background: rgb(255 255 255 / .8); color: var(--nx-ink); border-radius: 999px; min-height: 36px; padding: 0 14px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: var(--nx-ring); transition: transform .15s var(--nx-ease-out), background-color .15s ease; }
.nx-bar__btn:hover { background: #fff; }
.nx-bar__btn:active { transform: scale(.97); }
@media (max-width: 640px) { .nx-bar__app, .nx-bar__user { display: none; } #nx-bar { padding: 6px 6px 6px 12px; gap: 6px; } }
/* Móvil: menos margen, cabeceras apiladas y diálogos casi a pantalla completa. */
@media (max-width: 560px) {
  .nx-container { padding: 18px 14px 48px; }
  .nx-head h1 { font-size: 24px; }
  .nx-head > .nx-row, .nx-head > div:last-child { width: 100%; }
  .nx-card { padding: 16px; }
  .nx-modal { width: calc(100vw - 16px); padding: 18px; border-radius: 20px; }
  .nx-kpi__value { font-size: 24px; }
  .nx-bar__demo { font-size: 11px; padding: 3px 8px; flex-shrink: 0; }
  .nx-bar__demo-long { display: none; }
  .nx-bar__btn { padding: 0 11px; }
}

/* Personalización de marca (diálogo del SDK) */
.nx-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--nx-line-strong); cursor: pointer; padding: 0; transition: transform .15s var(--nx-ease-out), box-shadow .15s ease; }
.nx-swatch:hover { transform: scale(1.08); }
.nx-swatch:active { transform: scale(.94); }
.nx-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--nx-ink); }
.nx-logo-preview { width: 100%; height: 96px; border-radius: 14px; display: grid; place-items: center; background: var(--nx-pearl); box-shadow: inset 0 0 0 1px var(--nx-line); overflow: hidden; }
.nx-logo-preview img { max-height: 70px; max-width: 80%; object-fit: contain; }

/* Pantalla de acceso con la marca */
.nx-login-logo { display: block; max-height: 64px; max-width: 220px; object-fit: contain; margin: 0 0 16px; }
.nx-login-name { font-weight: 700; font-size: 15px; margin: 0 0 10px; color: var(--nx-brand-text); }

/* Documentos imprimibles con la marca del cliente (presupuestos, partes, informes…) */
.nx-doc-header { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 3px solid var(--nx-brand); }
.nx-doc-header img { max-height: 56px; max-width: 200px; object-fit: contain; }
.nx-doc-header__name { font-weight: 700; font-size: 18px; }
.nx-doc-header__details { white-space: pre-line; font-size: 12px; color: var(--nx-muted); text-align: right; }

/* Avisos efímeros: píldoras oscuras que entran y salen por el mismo borde (interrumpibles). */
#nx-toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: calc(100vw - 32px); justify-items: end; }
.nx-toast {
  display: inline-flex; align-items: center; gap: 10px; background: rgb(20 21 31 / .92); color: #fff; padding: 10px 16px 10px 12px; border-radius: 999px;
  font-weight: 500; box-shadow: 0 16px 36px -14px rgb(20 21 31 / .6);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: opacity .2s ease, transform .25s var(--nx-ease-out), filter .2s ease;
}
.nx-toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--nx-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nx-brand) 30%, transparent); flex-shrink: 0; }
@starting-style { .nx-toast { opacity: 0; transform: translateY(10px) scale(.96); filter: blur(4px); } }
.nx-toast--error { background: var(--nx-danger); }
.nx-toast--error::before { background: #fff; box-shadow: none; }
.nx-toast--out { opacity: 0; transform: translateY(8px) scale(.98); }

/* Reserva online pública */
.nx-book__head { margin: 8px 0 18px; }
.nx-book__head h1 { font-size: 30px; margin: 6px 0 4px; }
.nx-book__note { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--nx-brand-soft); color: var(--nx-brand-text); font-weight: 500; }
.nx-book__step { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; transition: opacity .2s ease; }
.nx-book__step:disabled { opacity: .45; }
.nx-book__step legend { font-weight: 650; font-size: 15px; margin-bottom: 10px; padding: 0; }
.nx-book__services { display: grid; gap: 8px; }
.nx-book__opt, .nx-book__day, .nx-book__slot {
  appearance: none; border: 0; font: inherit; cursor: pointer; color: var(--nx-ink); background: var(--nx-pearl); border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--nx-line); transition: background-color .15s ease, box-shadow .15s ease, transform .12s var(--nx-ease-out);
}
.nx-book__opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; text-align: left; }
.nx-book__opt span { color: var(--nx-muted); font-size: 14px; white-space: nowrap; }
.nx-book__days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.nx-book__day { flex: 0 0 64px; display: grid; justify-items: center; gap: 1px; padding: 10px 0; scroll-snap-align: start; }
.nx-book__day span { font-size: 12px; color: var(--nx-muted); text-transform: capitalize; }
.nx-book__day strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.nx-book__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.nx-book__slot { padding: 11px 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.nx-book__opt:active, .nx-book__day:active, .nx-book__slot:active { transform: scale(.96); }
.nx-book__opt[aria-pressed="true"], .nx-book__day[aria-selected="true"], .nx-book__slot[aria-pressed="true"] { background: var(--nx-brand); color: var(--nx-brand-ink); box-shadow: none; }
.nx-book__opt[aria-pressed="true"] span, .nx-book__day[aria-selected="true"] span { color: inherit; opacity: .85; }
.nx-book__done { text-align: center; padding: 34px 22px; }
.nx-book__done h2 { margin: 12px 0 4px; }
.nx-book__ok { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--nx-brand); color: var(--nx-brand-ink); animation: nx-pop .4s var(--nx-ease-out); }

/* Panel «Equipo» */
.nx-team__link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 10px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--nx-pearl); box-shadow: inset 0 0 0 1px var(--nx-line); }
.nx-team__link-label { font-size: 12.5px; font-weight: 600; color: var(--nx-muted); }
.nx-team__link code, .nx-team__note code { font: inherit; font-weight: 600; color: var(--nx-ink); overflow-wrap: anywhere; }
.nx-team__link code { flex: 1; min-width: 0; }
.nx-team__add { padding: 16px; margin-bottom: 14px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--nx-line); }
.nx-team__add h3 { font-size: 15px; margin: 0 0 12px; }
.nx-team__modes { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.nx-team__modes legend { margin-bottom: 6px; }
.nx-team__mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1px var(--nx-line-strong); transition: box-shadow .15s ease, background-color .15s ease; }
.nx-team__mode:has(input:checked) { background: var(--nx-brand-soft); box-shadow: inset 0 0 0 1.5px var(--nx-brand-text); }
.nx-team__mode input { margin: 3px 0 0; width: 16px; height: 16px; flex-shrink: 0; }
.nx-team__mode > span { display: grid; gap: 2px; font-size: 14px; }
.nx-team__mode > span .nx-muted { font-size: 13px; line-height: 1.4; }
.nx-team__mode.is-off { opacity: .55; cursor: not-allowed; }
.nx-team__note { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: #f4fbe6; box-shadow: inset 0 0 0 1px #d9f99d; font-size: 14px; line-height: 1.6; }
.nx-team__note--warn { background: var(--nx-warn-soft); box-shadow: inset 0 0 0 1px #f5d7a6; }
.nx-team__emp { width: 96px; min-height: 34px; padding: 5px 9px; font-variant-numeric: tabular-nums; text-transform: uppercase; }

/* Calendario propio (lo añade el SDK a los campos de fecha y de mes): sustituye al del navegador. */
.nx-datefield { position: relative; display: inline-flex; align-items: center; width: 100%; min-width: 0; }
.nx-datefield > .nx-input { padding-right: 42px; }
.nx-datefield__btn {
  position: absolute; right: 5px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border: 0; border-radius: 9px; padding: 0;
  display: grid; place-items: center; background: transparent; color: var(--nx-muted); cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.nx-datefield__btn:hover, .nx-datefield__btn[aria-expanded="true"] { background: var(--nx-brand-soft); color: var(--nx-brand-text); }
.nx-datefield input::-webkit-calendar-picker-indicator { display: none; }
.nx-cal {
  position: fixed; inset: auto; margin: 0; width: 304px; padding: 14px; border: 0; border-radius: 20px; color: var(--nx-ink);
  background: rgb(255 255 255 / .96); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: var(--nx-shadow-lift); font: inherit; font-size: 14px;
}
.nx-cal:popover-open { animation: nx-pop .22s var(--nx-ease-out); }
.nx-cal__head { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.nx-cal__title { flex: 1; font-weight: 650; letter-spacing: -0.01em; padding-left: 6px; }
.nx-cal__nav { width: 32px; height: 32px; border: 0; border-radius: 10px; display: grid; place-items: center; background: transparent; color: var(--nx-ink-2); cursor: pointer; }
.nx-cal__nav:hover { background: var(--nx-mist); }
.nx-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.nx-cal__grid--months { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nx-cal__dow { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--nx-faint); padding: 4px 0 6px; text-transform: uppercase; }
.nx-cal__day {
  position: relative; aspect-ratio: 1; border: 0; border-radius: 11px; background: transparent; color: var(--nx-ink); font: inherit; font-weight: 500;
  font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .12s ease, color .12s ease, transform .12s var(--nx-ease-out);
}
.nx-cal__grid--months .nx-cal__day { aspect-ratio: auto; padding: 12px 0; text-transform: capitalize; }
.nx-cal__day:hover { background: var(--nx-mist); }
.nx-cal__day:active { transform: scale(.92); }
.nx-cal__day[data-out] { color: var(--nx-faint); }
.nx-cal__day[data-weekend]:not([data-out]) { color: var(--nx-muted); }
.nx-cal__day[data-today] { box-shadow: inset 0 0 0 1.5px var(--nx-brand); font-weight: 700; }
.nx-cal__day[aria-selected="true"] { background: var(--nx-brand); color: var(--nx-brand-ink); font-weight: 700; box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--nx-brand) 80%, #000); }
.nx-cal__day:disabled { opacity: .3; cursor: not-allowed; }
.nx-cal__day:focus-visible { outline: 2px solid var(--nx-brand-text); outline-offset: 1px; }
.nx-cal__foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--nx-line); }
.nx-cal__link { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--nx-brand-text); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.nx-cal__link:hover { background: var(--nx-brand-soft); }
.nx-cal__link--muted { color: var(--nx-muted); }
.nx-cal__link--muted:hover { background: var(--nx-mist); }

/* Algo que acaba de llegar (fila nueva, cambio de estado). Úsalo con moderación. */
@keyframes nx-in { from { opacity: 0; transform: translateY(6px); } }
.nx-in { animation: nx-in .32s var(--nx-ease-out) both; }
@keyframes nx-pop { from { opacity: 0; transform: translateY(8px) scale(.97); filter: blur(4px); } }
@keyframes nx-fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .nx-btn, .nx-bar__btn, .nx-swatch { transition: background-color .15s ease !important; transform: none !important; }
  .nx-container > *, #nx-bar, .nx-in { animation: nx-fade .2s ease both !important; }
  .nx-modal[open] { animation: nx-fade .15s ease; }
  .nx-toast { transform: none !important; filter: none !important; }
  .nx-bar__dot, .nx-skel { animation: none; }
  .nx-cal:popover-open { animation: nx-fade .15s ease; }
  .nx-cal__day { transition: none; }
}
@media print {
  #nx-bar, .nx-no-print, #nx-toasts { display: none !important; }
  body { background: #fff; font-size: 12px; }
  body::before { display: none; }
  .nx-container { padding: 0; max-width: none; }
  .nx-container > * { animation: none !important; }
  .nx-card, .nx-table-wrap, .nx-kpi { box-shadow: none; border: 0; padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
