/* ==========================================================================
   Selia Marketing · componentes visuales (CSS + marcado, sin JS)
   Acciones · Superficies · Datos · Formularios · Avisos y estados · Navegación
   Solo variables de tokens.css; ningún color literal.
   ========================================================================== */

[class*="sm-"],
[class*="sm-"]::before,
[class*="sm-"]::after { box-sizing: border-box; }

.sm-sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@keyframes sm-spin { to { transform: rotate(360deg); } }
@keyframes sm-shimmer { to { transform: translateX(100%); } }
@keyframes sm-pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Button · Acciones
   ========================================================================== */

.sm-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2); min-height: var(--control-height); padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink);
  font-family: var(--font-sans); font-size: 14px; font-weight: 700; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.sm-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-btn svg { width: 18px; height: 18px; flex: none; }

.sm-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sm-btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.sm-btn--primary:active { background: var(--accent-pressed); border-color: var(--accent-pressed); }

.sm-btn--secondary { background: var(--surface-card); border-color: var(--border-strong); color: var(--ink-secondary); }
.sm-btn--secondary:hover { background: var(--surface-hover); color: var(--ink); }
.sm-btn--secondary:active { background: var(--surface-muted); color: var(--ink); }

.sm-btn--ghost { background: transparent; color: var(--ink-secondary); }
.sm-btn--ghost:hover { background: var(--surface-hover); color: var(--ink); }
.sm-btn--ghost:active { background: var(--surface-muted); color: var(--ink); }

.sm-btn--danger { background: var(--surface-card); border-color: var(--danger-ink); color: var(--danger-ink); }
.sm-btn--danger:hover { background: var(--danger-soft); }
.sm-btn--danger:active { background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger-ink); }

.sm-btn--sm { min-height: var(--control-height-sm); padding: 0 14px; font-size: 13px; gap: 6px; }
.sm-btn--sm svg { width: 16px; height: 16px; }
.sm-btn--icon { width: var(--control-height); padding: 0; }
.sm-btn--icon.sm-btn--sm { width: var(--control-height-sm); }
.sm-btn--block { display: flex; width: 100%; }

.sm-btn--loading, .sm-btn[aria-busy="true"] { cursor: progress; pointer-events: none; }
.sm-btn__spinner {
  flex: none; width: 16px; height: 16px; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: sm-spin .7s linear infinite;
}

.sm-btn:disabled, .sm-btn[aria-disabled="true"] {
  background: var(--surface-muted); border-color: var(--border); color: var(--ink-muted);
  cursor: not-allowed; box-shadow: none; pointer-events: auto;
}
.sm-btn--ghost:disabled, .sm-btn--ghost[aria-disabled="true"] { background: transparent; border-color: transparent; }

.sm-btn-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.sm-btn-group--end { justify-content: flex-end; }

.sm-link {
  display: inline; padding: 0 2px; min-height: 0; border: 0; border-radius: 4px; background: none;
  color: var(--accent-strong); font-family: var(--font-sans); font-size: inherit; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  transition: color .14s ease;
}
.sm-link:hover { color: var(--accent-pressed); }
.sm-link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-link:disabled, .sm-link[aria-disabled="true"] { color: var(--ink-muted); cursor: not-allowed; text-decoration: none; }

@media (max-width: 760px) {
  .sm-btn--sm { min-height: var(--control-height); }
  .sm-btn--icon.sm-btn--sm { width: var(--control-height); }
  .sm-btn--block-mobile { display: flex; width: 100%; }
  .sm-btn-group--stack-mobile { flex-direction: column; align-items: stretch; }
  .sm-btn-group--stack-mobile > .sm-btn { width: 100%; }
  button.sm-link { padding: 6px 2px; }
}

/* ==========================================================================
   Card · Superficies
   ========================================================================== */

.sm-card {
  position: relative; min-width: 0; padding: var(--space-5);
  background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--ink); font-family: var(--font-sans);
  transition: background-color .14s ease, border-color .14s ease;
}
.sm-card--sm { padding: var(--space-4); border-radius: var(--radius-md); }
.sm-card--flush { padding: 0; overflow: hidden; }

.sm-card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3) var(--space-4); }
.sm-card__heading { flex: 1 1 220px; min-width: 0; }
.sm-card__title { margin: 0; color: var(--ink); }
.sm-card__sub { margin: 4px 0 0; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--ink-muted); }
.sm-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.sm-card__head + .sm-card__body { margin-top: var(--space-4); }
.sm-card__body { min-width: 0; }
.sm-card__foot { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--surface-muted); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: 13px; line-height: 1.4; color: var(--ink-muted); }

.sm-card--interactive { cursor: pointer; }
.sm-card--interactive:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.sm-card__link { color: inherit; text-decoration: none; border-radius: var(--radius-xs); }
.sm-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sm-card__link:focus-visible { outline: none; }
.sm-card__link:focus-visible::after { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-card--interactive:hover .sm-card__link { color: var(--accent-strong); }
.sm-card__chevron { flex: none; width: 20px; height: 20px; color: var(--ink-muted); transition: transform .14s ease, color .14s ease; }
.sm-card--interactive:hover .sm-card__chevron { color: var(--accent-strong); transform: translateX(2px); }

@media (max-width: 760px) {
  .sm-card { padding: 18px; }
  .sm-card--sm { padding: var(--space-4); }
  .sm-card--flush { padding: 0; }
}

/* ==========================================================================
   Chip · Datos
   ========================================================================== */

.sm-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px;
  border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--ink-secondary);
  font-family: var(--font-sans); font-size: 13px; font-weight: 700; line-height: 1.4;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.sm-chip--sm { padding: 2px 9px; font-size: 12px; gap: 5px; }
.sm-chip--positive { background: var(--positive-soft); color: var(--positive-ink); }
.sm-chip--caution { background: var(--caution-soft); color: var(--caution-ink); }
.sm-chip--info { background: var(--info-soft); color: var(--info-ink); }
.sm-chip--danger { background: var(--danger-soft); color: var(--danger-ink); }
.sm-chip--accent { background: var(--accent-soft); color: var(--accent-strong); }
.sm-chip--neutral { background: var(--surface-muted); color: var(--ink-secondary); }
.sm-chip__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sm-chip svg { flex: none; width: 14px; height: 14px; }
.sm-chip--sm svg { width: 12px; height: 12px; }

.sm-chip--removable { min-height: var(--control-height-sm); padding: 0 4px 0 14px; gap: 4px; background: var(--accent-soft); color: var(--accent-strong); }
.sm-chip__remove {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
  transition: background-color .14s ease;
}
.sm-chip__remove:hover { background: var(--surface-card); }
.sm-chip__remove:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-chip__remove svg { width: 14px; height: 14px; }
.sm-chip-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

@media (max-width: 760px) {
  .sm-chip--removable { min-height: var(--control-height); }
  .sm-chip__remove { width: 36px; height: 36px; }
}

/* ==========================================================================
   KpiTile · Datos
   ========================================================================== */

.sm-kpi {
  min-width: 0; padding: var(--space-5);
  background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--ink); font-family: var(--font-sans);
}
.sm-kpi__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.sm-kpi__label { margin: 0; color: var(--ink-secondary); }
.sm-kpi__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-icon); background: var(--accent-soft); color: var(--accent-strong); }
.sm-kpi__icon svg { width: 20px; height: 20px; }
.sm-kpi__icon--info { background: var(--info-soft); color: var(--info-ink); }
.sm-kpi__icon--positive { background: var(--positive-soft); color: var(--positive-ink); }
.sm-kpi__icon--caution { background: var(--caution-soft); color: var(--caution-ink); }
.sm-kpi .sm-kpi__value { margin: 14px 0 0; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sm-kpi .sm-kpi__value--unknown { color: var(--ink-muted); }
.sm-kpi__delta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: var(--space-3); }
.sm-kpi__vs { font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); }
.sm-kpi__note { margin: 14px 0 0; padding-top: var(--space-3); border-top: 1px solid var(--surface-muted); font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); }

.sm-kpi--sm { padding: 14px 18px; border-radius: var(--radius-md); }
.sm-kpi--sm .sm-kpi__label { color: var(--ink-secondary); }
.sm-kpi--sm .sm-kpi__value { margin-top: 6px; }
.sm-kpi--sm .sm-kpi__delta { margin-top: var(--space-2); gap: 4px 8px; }
.sm-kpi--sm .sm-kpi__vs { font-size: 12px; }

.sm-skeleton-hint { margin: 0; }

.sm-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.sm-kpi-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm-kpi-grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sm-kpi-grid--sm { gap: var(--space-3); }
@media (max-width: 1180px) {
  .sm-kpi-grid, .sm-kpi-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm-kpi-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .sm-kpi-grid:not(.sm-kpi-grid--sm), .sm-kpi-grid:not(.sm-kpi-grid--sm):has(> :nth-child(3):last-child), .sm-kpi-grid:not(.sm-kpi-grid--sm):has(> :nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); }
  .sm-kpi-grid:not(.sm-kpi-grid--sm) > :last-child:nth-child(odd) { grid-column: auto; }
}
@media (max-width: 760px) {
  .sm-kpi { padding: 18px; }
  .sm-kpi--sm { padding: 14px; }
  .sm-kpi .sm-kpi__value:not(.figure-lg) { font-size: 32px; }
}

/* ==========================================================================
   Table · Datos
   ========================================================================== */

.sm-table-wrap {
  overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
  border-radius: var(--radius-xs);
}
.sm-table-wrap:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.sm-table {
  width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--ink);
}
.sm-table th, .sm-table td { padding: var(--space-3); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--surface-muted); }
.sm-table thead th {
  padding-top: 0; padding-bottom: 0; background: var(--surface-sunken); border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--ink-secondary); white-space: nowrap;
}
.sm-table thead th:first-child { border-top-left-radius: var(--radius-sm); }
.sm-table thead th:last-child { border-top-right-radius: var(--radius-sm); }
.sm-table th[aria-sort="ascending"], .sm-table th[aria-sort="descending"] { color: var(--accent-strong); }
.sm-table .sm-table__num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.sm-table .sm-table__na { font-weight: 500; color: var(--ink-muted); }
.sm-table .sm-table__select { width: 1%; padding-right: 0; }

.sm-table__head-label { display: inline-flex; align-items: center; min-height: var(--control-height); }
.sm-table__sort {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-height); margin: 0 -4px; padding: 0 4px;
  border: 0; border-radius: var(--radius-xs); background: transparent; color: inherit;
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: color .14s ease;
}
.sm-table .sm-table__num .sm-table__sort { flex-direction: row-reverse; margin-right: 0; }
.sm-table__sort:hover { color: var(--ink); }
th[aria-sort="ascending"] .sm-table__sort:hover, th[aria-sort="descending"] .sm-table__sort:hover { color: var(--accent-pressed); }
.sm-table__sort:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 0; }
.sm-table__arrow { flex: none; width: 14px; height: 14px; opacity: .55; }
.sm-table__arrow-up, .sm-table__arrow-down { display: inline; }
th[aria-sort="ascending"] .sm-table__arrow, th[aria-sort="descending"] .sm-table__arrow { opacity: 1; }
th[aria-sort="ascending"] .sm-table__arrow-down { display: none; }
th[aria-sort="descending"] .sm-table__arrow-up { display: none; }

.sm-table tbody tr, .sm-table tfoot tr { transition: background-color .14s ease; }
.sm-table tbody tr:hover > td { background: var(--surface-hover); }
.sm-table tbody tr:hover > td:first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.sm-table tbody tr:hover > td:last-child { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.sm-table tbody tr.sm-table__row--selected > td { background: var(--accent-soft); }
.sm-table tbody tr.sm-table__row--selected > td:first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.sm-table tbody tr.sm-table__row--selected > td:last-child { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.sm-table tbody tr:last-child > td { border-bottom-color: transparent; }

.sm-table__name { min-width: 200px; }
.sm-table__name b { display: block; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.sm-table__name small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); }
.sm-table__who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }

.sm-table tfoot td { padding-top: var(--space-3); padding-bottom: var(--space-3); background: var(--surface-sunken); border-top: 1px solid var(--border); border-bottom: 0; font-weight: 800; }
.sm-table tfoot td:first-child { border-bottom-left-radius: var(--radius-sm); }
.sm-table tfoot td:last-child { border-bottom-right-radius: var(--radius-sm); }
.sm-table tfoot .sm-table__na { font-weight: 500; }

.sm-table .sm-table__empty-cell { padding: 0; border-bottom: 0; }
.sm-table tbody tr.sm-table__empty:hover > td { background: transparent; }

.sm-table--empty { min-width: 0; }
.sm-table--compact th, .sm-table--compact td { padding-top: 6px; padding-bottom: 6px; }
.sm-table--compact thead th { padding-top: 0; padding-bottom: 0; }
.sm-table--compact .sm-table__sort, .sm-table--compact .sm-table__head-label { min-height: var(--control-height-sm); }
.sm-table--compact .sm-table__name small { display: none; }
.sm-table--compact .sm-checkbox--bare { min-height: var(--control-height-sm); }

.sm-pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
  margin-top: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--surface-muted);
  font-family: var(--font-sans);
}
.sm-pager__info { font-size: 13px; font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-pager__nav { display: flex; align-items: center; gap: var(--space-2); }

@media (max-width: 760px) {
  .sm-table--compact th, .sm-table--compact td { padding-top: var(--space-3); padding-bottom: var(--space-3); }
  .sm-table--compact .sm-table__sort, .sm-table--compact .sm-table__head-label { min-height: var(--control-height); }
  .sm-table--compact .sm-table__name small { display: block; }
  .sm-table--compact .sm-checkbox--bare { min-height: var(--control-height); }
  .sm-pager { flex-direction: column; align-items: stretch; }
  .sm-pager__info { text-align: center; }
  .sm-pager__nav > .sm-btn { flex: 1 1 0; }
}

/* ==========================================================================
   Avatar · Datos
   ========================================================================== */

.sm-avatar {
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong);
  font-family: var(--font-sans); font-size: 15px; font-weight: 800; line-height: 1; letter-spacing: 0; text-transform: uppercase;
  user-select: none;
}
.sm-avatar--24 { width: 24px; height: 24px; font-size: 10px; }
.sm-avatar--32 { width: 32px; height: 32px; font-size: 12px; }
.sm-avatar--40 { width: 40px; height: 40px; font-size: 15px; }
.sm-avatar--square { border-radius: var(--radius-icon); }
.sm-avatar--square.sm-avatar--32 { border-radius: var(--radius-sm); }
.sm-avatar--square.sm-avatar--24 { border-radius: 7px; }
.sm-avatar--accent { background: var(--accent-soft); color: var(--accent-strong); }
.sm-avatar--info { background: var(--info-soft); color: var(--info-ink); }
.sm-avatar--positive { background: var(--positive-soft); color: var(--positive-ink); }
.sm-avatar--caution { background: var(--caution-soft); color: var(--caution-ink); }
.sm-avatar--neutral { background: var(--surface-muted); color: var(--ink-secondary); }

.sm-avatar-group { display: inline-flex; align-items: center; }
.sm-avatar-group > .sm-avatar { border: 2px solid var(--surface-card); }
.sm-avatar-group > .sm-avatar + .sm-avatar { margin-left: -8px; }
.sm-avatar-group > .sm-avatar--24 + .sm-avatar { margin-left: -6px; }
.sm-avatar-group > .sm-avatar--24 { font-size: 9px; }

/* ==========================================================================
   ShareBar · Datos
   ========================================================================== */

.sm-share-list { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.sm-share { min-width: 0; font-family: var(--font-sans); color: var(--ink); }
.sm-share__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.sm-share__label { min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.sm-share__value { flex: none; font-size: 14px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; }
.sm-share__value--unknown { font-weight: 500; color: var(--ink-muted); }
.sm-share__track { height: 8px; margin-top: 6px; border-radius: var(--radius-pill); background: var(--surface-muted); overflow: hidden; }
.sm-share__fill { display: block; height: 100%; width: calc(var(--v, 0) * 1%); min-width: 6px; border-radius: var(--radius-pill); background: var(--accent); transition: width .16s ease; }
.sm-share__fill--muted { background: var(--accent-muted); }
.sm-share__fill--positive { background: var(--positive-ink); }
.sm-share__fill--caution { background: var(--caution-ink); }
.sm-share__fill--info { background: var(--info-ink); }
.sm-share__note { margin-top: 4px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-share--sm .sm-share__track { height: 6px; }

/* ==========================================================================
   BarChart · Datos
   ========================================================================== */

.sm-chart-sum { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-7); margin: 20px 0 24px; font-family: var(--font-sans); }
.sm-chart-sum__label { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink-muted); }
.sm-chart-sum__value { margin-top: 2px; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -.015em; font-variant-numeric: tabular-nums; color: var(--ink); }
.sm-chart-sum__note { font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); }

.sm-chart { --sm-chart-h: 260px; display: flex; gap: 10px; height: var(--sm-chart-h); margin-top: var(--space-4); font-family: var(--font-sans); color: var(--ink); }
.sm-chart:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; border-radius: var(--radius-xs); }
.sm-chart__y { position: relative; flex: 0 0 62px; width: 62px; }
.sm-chart__tick { position: absolute; right: 0; bottom: calc(var(--v, 0) * 1%); transform: translateY(50%); font-size: 12px; font-weight: 500; line-height: 1; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sm-chart__plot { position: relative; flex: 1 1 0; min-width: 0; }
.sm-chart__grid { position: absolute; left: 0; right: 0; bottom: calc(var(--v, 0) * 1%); height: 0; border-top: 1px solid var(--border); }
.sm-chart__grid--base { border-top-color: var(--border-strong); }
.sm-chart__cols { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.sm-chart__col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; padding: 0 1px; border-radius: 3px 3px 0 0; }
.sm-chart--s .sm-chart__col { padding: 0 22px; }
.sm-chart--m .sm-chart__col { padding: 0 3px; }
.sm-chart__bar { width: 100%; height: calc(var(--v, 0) * 1%); border-radius: 3px 3px 0 0; background: var(--accent); transition: background-color .12s ease; }
.sm-chart__bar--zero { height: 2px; background: var(--border-strong); }
.sm-chart__bar--unknown { height: 0; border-top: 3px dotted var(--ink-muted); background: transparent; border-radius: 0; }
.sm-chart--has-active .sm-chart__bar { background: var(--accent-muted); }
.sm-chart--has-active .sm-chart__bar--zero { background: var(--border-strong); }
.sm-chart--has-active .sm-chart__bar--unknown { background: transparent; }
.sm-chart--has-active .sm-chart__col--on .sm-chart__bar { background: var(--accent); }
.sm-chart__col--on, .sm-chart__col:hover { background: var(--surface-hover); }
.sm-chart__col:hover .sm-chart__bar { background: var(--accent); }
.sm-chart__col:hover .sm-chart__bar--zero { background: var(--border-strong); }
.sm-chart__col:hover .sm-chart__bar--unknown { background: transparent; }

.sm-chart__tip {
  position: absolute; z-index: var(--z-popover); bottom: calc(var(--v, 0) * 1% + 10px); left: 50%; transform: translateX(-50%);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--ink); color: var(--surface-card);
  box-shadow: var(--shadow-pop); line-height: 1.35; white-space: nowrap; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .14s ease, visibility 0s linear .14s;
}
.sm-chart__col:first-child .sm-chart__tip { left: 0; transform: none; }
.sm-chart__col:last-child .sm-chart__tip { left: auto; right: 0; transform: none; }
.sm-chart__col:hover .sm-chart__tip, .sm-chart__col--on .sm-chart__tip { opacity: 1; visibility: visible; transition-delay: 0s; }
.sm-chart__tip-date { display: block; font-size: 12px; font-weight: 600; opacity: .85; }
.sm-chart__tip-value { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sm-chart__x { display: flex; justify-content: space-between; gap: var(--space-2); padding-left: 72px; margin-top: 10px; font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-chart__x--cols { gap: 0; }
.sm-chart__x--cols > span { flex: 1 1 0; text-align: center; }
.sm-chart__legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-3); padding-left: 72px; font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--ink-muted); }

@media (max-width: 760px) {
  .sm-chart { --sm-chart-h: 220px; }
  .sm-chart__y { flex-basis: 52px; width: 52px; }
  .sm-chart__x, .sm-chart__x--cols { gap: 0; }
.sm-chart__x--cols > span { flex: 1 1 0; text-align: center; }
.sm-chart__legend { padding-left: 62px; }
  .sm-chart-sum { gap: var(--space-3) var(--space-6); }
  .sm-chart--s .sm-chart__col { padding: 0 8px; }
}

/* ==========================================================================
   TextField · Formularios
   ========================================================================== */

.sm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-family: var(--font-sans); color: var(--ink); }
.sm-field__label { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.sm-field__opt { font-weight: 500; color: var(--ink-muted); }
.sm-field__control {
  display: flex; align-items: center; min-height: var(--control-height);
  background: var(--surface-sunken); border: 1px solid var(--border-control); border-radius: var(--radius-sm);
  transition: border-color .14s ease, background-color .14s ease;
}
.sm-field__control:hover { border-color: var(--ink-muted); }
.sm-field__control:has(.sm-input:focus-visible) {
  border-color: var(--accent); background: var(--surface-card);
  outline: 3px solid var(--focus-ring); outline-offset: 2px;
}
.sm-input {
  flex: 1 1 auto; min-width: 0; width: 100%; height: calc(var(--control-height) - 2px); padding: 0 14px;
  border: 0; border-radius: inherit; background: transparent; color: var(--ink); outline: 0; appearance: none;
  font-family: var(--font-sans); font-size: 15px; font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums;
}
.sm-input::placeholder { color: var(--ink-muted); opacity: 1; }
.sm-input::-webkit-search-cancel-button, .sm-input::-webkit-search-decoration { appearance: none; display: none; }
.sm-input[type="number"] { -moz-appearance: textfield; }
.sm-input[type="number"]::-webkit-outer-spin-button, .sm-input[type="number"]::-webkit-inner-spin-button { appearance: none; margin: 0; }
.sm-input--area { height: auto; min-height: 112px; padding: var(--space-3) 14px; line-height: 1.5; resize: vertical; }
.sm-field__control--area { align-items: stretch; }

.sm-field__affix { flex: none; display: flex; align-items: center; font-size: 15px; font-weight: 600; color: var(--ink-muted); }
.sm-field__affix--start { padding-left: 14px; }
.sm-field__affix--end { padding-right: 14px; }
.sm-field__control:has(.sm-field__affix--start) .sm-input { padding-left: 8px; }
.sm-field__control:has(.sm-field__affix--end) .sm-input { padding-right: 8px; }
.sm-field__icon { flex: none; width: 18px; height: 18px; margin-left: 14px; color: var(--ink-muted); }
.sm-field__icon + .sm-input { padding-left: 10px; }
.sm-field__clear {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-right: 1px; padding: 0;
  border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink-muted); cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.sm-field__clear:hover { background: var(--surface-hover); color: var(--ink); }
.sm-field__clear:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 0; }
.sm-field__clear svg { width: 16px; height: 16px; }
.sm-input:placeholder-shown ~ .sm-field__clear { display: none; }

.sm-field__foot { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.sm-field__hint { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); }
.sm-field__counter { margin-left: auto; flex: none; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-field__counter--over { color: var(--danger-ink); }
.sm-field__error { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--danger-ink); }
.sm-field__error svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }

.sm-field--error .sm-field__control, .sm-field--error .sm-field__control:hover { border-color: var(--danger-ink); }
.sm-field--error .sm-field__control:has(.sm-input:focus-visible) { border-color: var(--danger-ink); }

.sm-field--disabled .sm-field__label { color: var(--ink-muted); }
.sm-field--disabled .sm-field__control, .sm-field__control:has(.sm-input:disabled) { background: var(--surface-muted); border-color: var(--border); cursor: not-allowed; }
.sm-input:disabled { color: var(--ink-muted); -webkit-text-fill-color: var(--ink-muted); cursor: not-allowed; }

@media (max-width: 760px) { .sm-input { font-size: 16px; } }

/* ==========================================================================
   Checkbox · Radio · Switch · Formularios
   ========================================================================== */

.sm-checkbox, .sm-radio, .sm-switch {
  position: relative; display: flex; align-items: flex-start; gap: var(--space-3);
  min-height: var(--control-height); padding: var(--space-3) 0;
  font-family: var(--font-sans); color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sm-checkbox__input, .sm-radio__input, .sm-switch__input {
  position: absolute; top: var(--space-3); left: 0; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: inherit;
}
.sm-switch__input { width: 44px; height: 24px; top: 10px; }
.sm-checkbox__text, .sm-radio__text, .sm-switch__text { min-width: 0; flex: 1 1 auto; }
.sm-checkbox__label, .sm-radio__label, .sm-switch__label { display: block; font-size: 14px; font-weight: 600; line-height: 20px; }
.sm-checkbox__desc, .sm-radio__desc, .sm-switch__desc { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); }
.sm-checkbox__error { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--danger-ink); }
.sm-checkbox__error svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }

.sm-checkbox__box, .sm-radio__box {
  flex: none; display: grid; place-items: center; width: 20px; height: 20px;
  border: 2px solid var(--border-control); background: var(--surface-card); color: var(--on-accent);
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.sm-checkbox__box { border-radius: 6px; }
.sm-radio__box { border-radius: 50%; }
.sm-checkbox__box svg { grid-area: 1 / 1; width: 14px; height: 14px; stroke-width: 2.4; opacity: 0; transition: opacity .12s ease; }
.sm-radio__box::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; transform: scale(0); transition: transform .12s ease; }

.sm-checkbox:hover .sm-checkbox__input:enabled + .sm-checkbox__box,
.sm-radio:hover .sm-radio__input:enabled + .sm-radio__box { border-color: var(--accent); }

.sm-checkbox__input:checked + .sm-checkbox__box,
.sm-checkbox__input:indeterminate + .sm-checkbox__box,
.sm-radio__input:checked + .sm-radio__box { background: var(--accent); border-color: var(--accent); }
.sm-checkbox:hover .sm-checkbox__input:checked:enabled + .sm-checkbox__box,
.sm-checkbox:hover .sm-checkbox__input:indeterminate:enabled + .sm-checkbox__box,
.sm-radio:hover .sm-radio__input:checked:enabled + .sm-radio__box { background: var(--accent-strong); border-color: var(--accent-strong); }
.sm-checkbox__input:checked + .sm-checkbox__box .sm-checkbox__mark--on { opacity: 1; }
.sm-checkbox__input:indeterminate + .sm-checkbox__box .sm-checkbox__mark--on { opacity: 0; }
.sm-checkbox__input:indeterminate + .sm-checkbox__box .sm-checkbox__mark--mixed { opacity: 1; }
.sm-radio__input:checked + .sm-radio__box::after { transform: scale(1); }

.sm-checkbox__input:focus-visible + .sm-checkbox__box,
.sm-radio__input:focus-visible + .sm-radio__box,
.sm-switch__input:focus-visible + .sm-switch__track { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.sm-checkbox--error .sm-checkbox__box, .sm-radio--error .sm-radio__box, .sm-checkbox--error:hover .sm-checkbox__input:enabled + .sm-checkbox__box, .sm-radio--error:hover .sm-radio__input:enabled + .sm-radio__box { border-color: var(--danger-ink); }
.sm-checkbox--error .sm-checkbox__input:checked + .sm-checkbox__box, .sm-radio--error .sm-radio__input:checked + .sm-radio__box { background: var(--danger-ink); }

.sm-checkbox:has(:disabled), .sm-radio:has(:disabled), .sm-switch:has(:disabled) { cursor: not-allowed; }
.sm-checkbox__input:disabled ~ .sm-checkbox__text, .sm-radio__input:disabled ~ .sm-radio__text, .sm-switch__input:disabled ~ .sm-switch__text { color: var(--ink-muted); }
.sm-checkbox__input:disabled + .sm-checkbox__box, .sm-radio__input:disabled + .sm-radio__box { background: var(--surface-muted); border-color: var(--border-strong); color: var(--ink-muted); }

.sm-checkbox--bare { justify-content: center; align-items: center; width: var(--control-height); padding: 0; }
.sm-checkbox--bare .sm-checkbox__input { top: 50%; left: 50%; margin: -10px 0 0 -10px; }

.sm-choice-group { margin: 0; padding: 0; border: 0; min-width: 0; font-family: var(--font-sans); }
.sm-choice-group__legend { padding: 0; margin-bottom: 2px; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.sm-choice-group--inline .sm-choice-group__items { display: flex; flex-wrap: wrap; column-gap: var(--space-6); }

.sm-switch__track {
  position: relative; flex: none; width: 44px; height: 24px; margin-top: -2px; border-radius: var(--radius-pill);
  border: 2px solid var(--border-control); background: var(--surface-card);
  transition: background-color .14s ease, border-color .14s ease;
}
.sm-switch__thumb {
  position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink-muted); transition: transform .14s ease, background-color .14s ease;
}
.sm-switch:hover .sm-switch__input:enabled + .sm-switch__track { border-color: var(--accent); }
.sm-switch:hover .sm-switch__input:enabled:not(:checked) + .sm-switch__track .sm-switch__thumb { background: var(--accent); }
.sm-switch__input:checked + .sm-switch__track { background: var(--accent); border-color: var(--accent); }
.sm-switch__input:checked + .sm-switch__track .sm-switch__thumb { background: var(--on-accent); transform: translateX(20px); }
.sm-switch:hover .sm-switch__input:checked:enabled + .sm-switch__track { background: var(--accent-strong); border-color: var(--accent-strong); }
.sm-switch__input:disabled + .sm-switch__track { background: var(--surface-muted); border-color: var(--border-strong); }
.sm-switch__input:disabled + .sm-switch__track .sm-switch__thumb { background: var(--ink-muted); }
.sm-switch__input:disabled:checked + .sm-switch__track .sm-switch__thumb { transform: translateX(20px); }
.sm-switch--reverse { flex-direction: row-reverse; justify-content: space-between; }
.sm-switch--reverse .sm-switch__input { left: auto; right: 0; }

/* ==========================================================================
   FileDrop · Formularios
   ========================================================================== */

.sm-filedrop { position: relative; font-family: var(--font-sans); color: var(--ink); }
.sm-filedrop__input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.sm-filedrop__zone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px var(--space-5);
  border: 2px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-sunken);
  text-align: center; cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease;
}
.sm-filedrop__zone:hover { border-color: var(--accent); background: var(--surface-hover); }
.sm-filedrop__input:focus-visible + .sm-filedrop__zone { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-color: var(--accent); }
.sm-filedrop__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); transition: background-color .14s ease, color .14s ease; }
.sm-filedrop__icon svg { width: 22px; height: 22px; }
.sm-filedrop__title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.sm-filedrop__hint { font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--ink-secondary); }
.sm-filedrop__browse { font-weight: 700; color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.sm-filedrop__limits { margin-top: 2px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); }
.sm-filedrop--dragging .sm-filedrop__zone { border-color: var(--accent); background: var(--accent-soft); }
.sm-filedrop--dragging .sm-filedrop__icon { background: var(--accent); color: var(--on-accent); }
.sm-filedrop--error .sm-filedrop__zone { border-color: var(--danger-ink); }
.sm-filedrop--disabled .sm-filedrop__zone { cursor: not-allowed; background: var(--surface-muted); border-color: var(--border); }
.sm-filedrop--disabled .sm-filedrop__zone * { color: var(--ink-muted); }
.sm-filedrop--disabled .sm-filedrop__icon { background: var(--surface-card); }

.sm-filelist-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: var(--space-4) 0 var(--space-2); font-family: var(--font-sans); }
.sm-filelist-head__title { font-size: 14px; font-weight: 700; color: var(--ink); }
.sm-filelist-head__count { font-size: 13px; font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-filelist { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; font-family: var(--font-sans); }
.sm-filedrop > .sm-filelist { margin-top: var(--space-3); }
.sm-file {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
  padding: 10px var(--space-2) 10px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-card);
}
.sm-file__thumb { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-sm); overflow: hidden; background: var(--accent-soft); color: var(--accent-strong); }
.sm-file__thumb svg { width: 22px; height: 22px; }
.sm-file__thumb--image { background: var(--info-soft); color: var(--info-ink); }
.sm-file__thumb--video { background: var(--caution-soft); color: var(--caution-ink); }
.sm-file__thumb--preview { padding: 0; }
.sm-file__thumb--preview svg { width: 100%; height: 100%; }
.sm-file__body { min-width: 0; }
.sm-file__name { display: block; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-file__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-2); margin-top: 1px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-file__meta svg { width: 14px; height: 14px; flex: none; }
.sm-file__meta--done { color: var(--positive-ink); font-weight: 600; }
.sm-file__bar { height: 6px; margin-top: 6px; border-radius: var(--radius-pill); background: var(--surface-muted); overflow: hidden; }
.sm-file__bar-fill { display: block; height: 100%; width: calc(var(--v, 0) * 1%); border-radius: var(--radius-pill); background: var(--accent); }
.sm-file__error { display: flex; align-items: flex-start; gap: 6px; margin-top: 2px; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--danger-ink); }
.sm-file__error svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.sm-file--error { border-color: var(--danger-ink); background: var(--danger-soft); }
.sm-file--error .sm-file__thumb { background: var(--surface-card); color: var(--danger-ink); }
.sm-file__actions { display: flex; align-items: center; }

/* ==========================================================================
   Notice · Avisos y estados
   ========================================================================== */

.sm-notice {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px var(--space-4);
  border-radius: var(--radius-md); background: var(--caution-soft); color: var(--caution-ink);
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1.45;
}
.sm-notice__icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.sm-notice__text { flex: 1 1 200px; min-width: 0; margin: 0; }
.sm-notice__title { display: block; font-weight: 800; }
.sm-notice__title + * { display: block; margin-top: 2px; font-weight: 500; }
.sm-notice__action {
  flex: none; align-self: center; display: inline-flex; align-items: center; min-height: var(--control-height-sm); margin: -6px 0 -6px auto; padding: 0 4px;
  border: 0; border-radius: var(--radius-xs); background: transparent; color: inherit;
  font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; cursor: pointer;
}
.sm-notice__action:hover { text-decoration-thickness: 2px; }
.sm-notice__action:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-notice--info { background: var(--info-soft); color: var(--info-ink); }
.sm-notice--positive { background: var(--positive-soft); color: var(--positive-ink); }
.sm-notice--danger { background: var(--danger-soft); color: var(--danger-ink); }
.sm-notice--caution { background: var(--caution-soft); color: var(--caution-ink); }

@media (max-width: 560px) {
  .sm-notice { flex-wrap: wrap; }
  .sm-notice__action { align-self: flex-start; margin: 0 0 -6px 30px; min-height: var(--control-height); }
}

/* ==========================================================================
   EmptyState · Avisos y estados
   ========================================================================== */

.sm-empty { display: flex; flex-direction: column; align-items: center; padding: 48px var(--space-5); text-align: center; font-family: var(--font-sans); color: var(--ink); }
.sm-empty__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); }
.sm-empty__icon svg { width: 26px; height: 26px; }
.sm-empty__title { margin: var(--space-4) 0 0; color: var(--ink); }
.sm-empty__text { max-width: 460px; margin: var(--space-2) 0 0; font-size: 15px; font-weight: 500; line-height: 1.55; color: var(--ink-muted); }
.sm-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-5); }
.sm-empty--info .sm-empty__icon { background: var(--info-soft); color: var(--info-ink); }
.sm-empty--caution .sm-empty__icon { background: var(--caution-soft); color: var(--caution-ink); }
.sm-empty--danger .sm-empty__icon { background: var(--danger-soft); color: var(--danger-ink); }
.sm-empty--compact { padding: var(--space-6) var(--space-4); }
.sm-empty--compact .sm-empty__icon { width: 44px; height: 44px; }
.sm-empty--compact .sm-empty__icon svg { width: 22px; height: 22px; }
.sm-empty--compact .sm-empty__title { margin-top: var(--space-3); font-size: 16px; }
.sm-empty--compact .sm-empty__text { font-size: 14px; }
.sm-empty--compact .sm-empty__actions { margin-top: var(--space-4); }

@media (max-width: 760px) { .sm-empty { padding: var(--space-7) var(--space-4); } }

/* ==========================================================================
   Skeleton · Avisos y estados
   ========================================================================== */

.sm-skeleton {
  --sm-shine: var(--skeleton-shine);
  position: relative; display: block; overflow: hidden; border-radius: var(--radius-xs); background: var(--surface-muted);
}

.sm-skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--sm-shine), transparent); opacity: .7;
  animation: sm-shimmer 1.4s ease-in-out infinite;
}
.sm-skeleton--line { height: 14px; width: 100%; }
.sm-skeleton--w-30 { width: 30%; } .sm-skeleton--w-40 { width: 40%; } .sm-skeleton--w-60 { width: 60%; } .sm-skeleton--w-80 { width: 80%; }
.sm-skeleton--title { height: 20px; width: 40%; }
.sm-skeleton--figure { height: 38px; width: 60%; }
.sm-skeleton--chip { height: 24px; width: 72px; border-radius: var(--radius-pill); }
.sm-skeleton--icon { width: 40px; height: 40px; border-radius: 12px; }
.sm-skeleton--circle { width: 40px; height: 40px; border-radius: 50%; }
.sm-skeleton--block { height: 120px; border-radius: var(--radius-md); }
.sm-skeleton-stack { display: grid; gap: var(--space-2); }
.sm-skeleton-row { display: flex; align-items: center; gap: var(--space-3); }
.sm-skeleton-row > .sm-skeleton-stack { flex: 1 1 0; min-width: 0; }
.sm-table .sm-skeleton--line { height: 12px; }

/* ==========================================================================
   SidebarNav · Navegación
   ========================================================================== */

.sm-sidebar {
  display: flex; flex-direction: column; width: var(--sidebar-width); max-width: 100%; height: 100%; min-height: 100%;
  padding: 24px var(--space-4) var(--space-5); background: var(--surface-card); border-right: 1px solid var(--border);
  font-family: var(--font-sans); color: var(--ink);
}
.sm-sidebar__brand { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-3); margin-bottom: var(--space-6); }
.sm-sidebar__symbol { flex: none; width: 30px; height: 30px; object-fit: contain; }
.sm-sidebar__space { margin-left: var(--space-1); }
.sm-sidebar__logo { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.05em; color: var(--ink); }
.sm-sidebar__logo b { font-weight: 700; color: var(--accent); }
.sm-sidebar__space { font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--ink-muted); }
.sm-sidebar__nav { flex: 1 1 auto; min-height: 0; margin: -4px; padding: 4px; overflow-y: auto; scrollbar-width: none; }
.sm-sidebar__nav::-webkit-scrollbar { display: none; }
.sm-sidebar__group + .sm-sidebar__group { margin-top: var(--space-5); }
.sm-sidebar__eyebrow { margin: 0 var(--space-3) var(--space-2); color: var(--ink-muted); text-transform: uppercase; }
.sm-sidebar__list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }

.sm-nav-item {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: var(--control-height); padding: 0 var(--space-3);
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-secondary);
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1.3; text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.sm-nav-item svg { flex: none; width: 20px; height: 20px; }
.sm-nav-item__label { flex: 1 1 auto; min-width: 0; }
.sm-nav-item:hover { background: var(--surface-hover); color: var(--ink); }
.sm-nav-item:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.sm-nav-item[aria-current="page"]:hover { background: var(--accent-soft); color: var(--accent-pressed); }
.sm-nav-item__badge {
  flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums;
}

.sm-sidebar__profile {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; margin-top: var(--space-4); padding: var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-sunken); color: inherit;
  font-family: var(--font-sans); text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease;
}
.sm-sidebar__profile:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.sm-sidebar__profile:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-sidebar__who { min-width: 0; }
.sm-sidebar__name { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-sidebar__role { display: block; font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--ink-muted); }

/* Móvil: barra superior compacta + la misma barra lateral como cajón. */
.sm-appbar {
  display: flex; align-items: center; gap: var(--space-3); min-height: 60px; padding: var(--space-2) var(--space-4);
  background: var(--surface-card); border-bottom: 1px solid var(--border); font-family: var(--font-sans); color: var(--ink);
}
.sm-appbar .sm-sidebar__brand { padding: 0; margin: 0; flex: 1 1 auto; }
.sm-appbar .sm-sidebar__logo { font-size: 26px; }
.sm-sidebar-scrim {
  position: fixed; inset: 0; z-index: var(--z-modal); background: var(--scrim);
  opacity: 0; visibility: hidden; transition: opacity .14s ease, visibility 0s linear .14s;
}
.sm-sidebar-scrim--open { opacity: 1; visibility: visible; transition-delay: 0s; }
.sm-sidebar--drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: var(--z-modal); width: min(86vw, var(--sidebar-width)); height: auto; min-height: 0;
  box-shadow: var(--shadow-modal); transform: translateX(-100%); visibility: hidden;
  transition: transform .14s ease, visibility 0s linear .14s;
}
.sm-sidebar--drawer.sm-sidebar--open { transform: none; visibility: visible; transition-delay: 0s; }
@media (min-width: 821px) { .sm-appbar--responsive { display: none; } }
@media (max-width: 820px) {
  .sm-sidebar--responsive {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: var(--z-modal); width: min(86vw, var(--sidebar-width)); height: auto; min-height: 0;
    box-shadow: var(--shadow-modal); transform: translateX(-100%); visibility: hidden;
    transition: transform .14s ease, visibility 0s linear .14s;
  }
  .sm-sidebar--responsive.sm-sidebar--open { transform: none; visibility: visible; transition-delay: 0s; }
}

/* ==========================================================================
   PageHeader · Navegación
   ========================================================================== */

.sm-page-head { margin-bottom: var(--space-6); font-family: var(--font-sans); color: var(--ink); }
.sm-crumbs { margin-bottom: var(--space-2); }
.sm-crumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-2); margin: 0; padding: 0; list-style: none; font-size: 13px; font-weight: 600; line-height: 1.4; }
.sm-crumbs__item { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); }
.sm-crumbs__item + .sm-crumbs__item::before {
  content: ""; flex: none; width: 6px; height: 6px; margin-right: 2px; border-top: 1.8px solid currentColor; border-right: 1.8px solid currentColor; transform: rotate(45deg);
}
.sm-crumbs__link { color: inherit; text-decoration: none; border-radius: 4px; padding: 2px 0; transition: color .14s ease; }
.sm-crumbs__link:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.sm-crumbs__link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-crumbs__item[aria-current="page"] { color: var(--ink); font-weight: 700; }
.sm-page-head__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) 24px; }
.sm-page-head__main { flex: 1 1 320px; min-width: 0; }
.sm-page-head__title { margin: 0; color: var(--ink); }
.sm-page-head__title-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) 14px; }
.sm-page-head__source { margin: var(--space-2) 0 0; font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }

@media (max-width: 760px) {
  .sm-page-head { margin-bottom: 22px; }
  .sm-page-head .sm-page-head__title { font-size: 30px; }
  .sm-page-head__actions { width: 100%; }
  .sm-page-head__actions > .sm-btn { flex: 1 1 auto; }
}

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  [class*="sm-"], [class*="sm-"]::before, [class*="sm-"]::after { transition-duration: 0s !important; transition-delay: 0s !important; }
  .sm-skeleton::after { animation: none; opacity: 0; }
  .sm-btn__spinner { animation: none; }
}

/* Marca «Pulso» en la barra lateral y la barra móvil */
.sm-sidebar__wordmark { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.sm-sidebar__kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.sm-sidebar__app { font-size: 20px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.sm-sidebar__symbol--dark { display: none; }
[data-theme="dark"] .sm-sidebar__symbol--light { display: none; }
[data-theme="dark"] .sm-sidebar__symbol--dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sm-sidebar__symbol--light { display: none; } :root:not([data-theme="light"]) .sm-sidebar__symbol--dark { display: block; } }


/* ==========================================================================
   Selia Marketing · componentes interactivos
   Select, MultiSelect, DatePicker, DateRangePicker, Segmented, Tabs, Menu,
   Tooltip, Modal, Toast. Solo tokens (var(--…)); sin colores literales.
   ========================================================================== */

/* ---------- base compartida -------------------------------------------- */
.sm-select, .sm-select *, .sm-date, .sm-date *, .sm-range, .sm-range *, .sm-ui-pop, .sm-ui-pop *,
.sm-seg, .sm-seg *, .sm-tabs, .sm-tabs *, .sm-menu, .sm-menu *, .sm-tooltip, .sm-tooltip *,
.sm-modal, .sm-modal *, .sm-toasts, .sm-toasts * { box-sizing: border-box; }
.sm-select, .sm-date, .sm-range, .sm-ui-pop, .sm-seg, .sm-tabs, .sm-menu, .sm-tooltip, .sm-modal, .sm-toasts { font-family: var(--font-sans); }
.sm-ui-pop [hidden], .sm-select__list[hidden], .sm-select__empty[hidden], .sm-cal__nav[hidden], .sm-tooltip[hidden], .sm-note[hidden] { display: none !important; }

.sm-ui-ico { display: inline-flex; flex: none; line-height: 0; }
.sm-ui-ico svg { display: block; }

.sm-ui-label { display: block; margin: 0 0 6px; font-size: 15px; line-height: 1.35; font-weight: 700; color: var(--ink); }
.sm-ui-msgs { display: block; }
.sm-ui-msgs:empty { display: none; }
.sm-ui-msg { display: flex; align-items: flex-start; gap: 6px; margin: 6px 0 0; font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--ink-muted); }
.sm-ui-msg .sm-ui-ico { margin-top: 1px; }
.sm-ui-msg--error { color: var(--danger-ink); font-weight: 600; }

.sm-ui-tile { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-xs); background: var(--accent-soft); color: var(--accent-strong); line-height: 0; }
.sm-ui-tile svg { display: block; }
.sm-ui-tile--text { font-size: 12px; line-height: 1; font-weight: 700; letter-spacing: 0; }

/* Superficie flotante */
.sm-ui-pop { position: fixed; z-index: var(--z-popover); background: var(--surface-card); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); font-size: 14px; line-height: 1.45; animation: sm-pop-in 140ms ease-out both; }
.sm-ui-pop[data-side="top"] { animation-name: sm-pop-in-top; }
@keyframes sm-pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes sm-pop-in-top { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes sm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sm-fade-out { from { opacity: 1; } to { opacity: 0; } }

/* Disparadores: Select / MultiSelect / DateRangePicker */
.sm-select { display: block; position: relative; min-width: 0; }
.sm-select__control { position: relative; }
.sm-select__trigger, .sm-range__trigger {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: var(--control-height);
  margin: 0; padding: 0 var(--space-3) 0 14px;
  border: 1px solid var(--border-control); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink);
  font: inherit; font-size: 15px; line-height: 1.4; font-weight: 500; text-align: left; cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.sm-select__trigger:hover:not(:disabled), .sm-range__trigger:hover:not(:disabled) { border-color: var(--ink-muted); }
.sm-select__trigger:focus-visible, .sm-range__trigger:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-select--open .sm-select__trigger, .sm-range--open .sm-range__trigger { border-color: var(--accent); background: var(--surface-card); }
.sm-select.has-error .sm-select__trigger, .sm-range.has-error .sm-range__trigger, .sm-date.has-error .sm-date__field { border-color: var(--danger-ink); }
.sm-select.is-disabled .sm-select__trigger, .sm-range.is-disabled .sm-range__trigger, .sm-select__trigger:disabled, .sm-range__trigger:disabled {
  background: var(--surface-muted); border-color: var(--border); color: var(--ink-muted); cursor: not-allowed;
}
.sm-select__value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-select__value.is-placeholder { color: var(--ink-muted); }
.sm-select__value.has-chips { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: clip; }
.sm-select__chip { flex: none; display: inline-flex; align-items: center; max-width: 100%; padding: 3px 11px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; line-height: 1.4; font-weight: 700; white-space: nowrap; }
.sm-select__chev, .sm-range__chev { flex: none; color: var(--ink-muted); transition: transform 160ms ease; }
.sm-select--open .sm-select__chev, .sm-range--open .sm-range__chev { transform: rotate(180deg); }
.sm-select__trigger > .sm-select__lead { margin-left: -4px; }

/* Panel del desplegable */
.sm-select__panel { display: flex; flex-direction: column; width: max-content; max-width: min(420px, calc(100vw - 16px)); padding: var(--space-1); overflow: hidden; }
.sm-select__search { display: flex; align-items: center; gap: var(--space-2); flex: none; min-height: 40px; margin: 0 0 var(--space-1); padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-sunken); color: var(--ink-muted); }
.sm-select__search:focus-within { border-color: var(--accent); outline: 3px solid var(--focus-ring); outline-offset: -1px; }
.sm-select__input { flex: 1 1 auto; min-width: 0; height: 38px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; }
.sm-select__input::placeholder { color: var(--ink-muted); opacity: 1; }
.sm-select__list { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sm-select__group + .sm-select__group { margin-top: var(--space-1); padding-top: var(--space-1); border-top: 1px solid var(--surface-muted); }
.sm-select__list > .sm-select__option + .sm-select__group { margin-top: var(--space-1); padding-top: var(--space-1); border-top: 1px solid var(--surface-muted); }
.sm-select__heading { padding: var(--space-3) var(--space-3) var(--space-1); font-size: 11px; line-height: 1.3; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.sm-select__option { display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-height); padding: 6px var(--space-3); border-radius: var(--radius-xs); color: var(--ink); font-size: 15px; line-height: 1.35; font-weight: 600; cursor: pointer; transition: background-color 120ms ease; }
.sm-select__option[data-active] { background: var(--surface-hover); }
.sm-select__option[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.sm-select__option[aria-selected="true"][data-active] { box-shadow: inset 0 0 0 1px var(--accent-muted); }
.sm-pop--kbd .sm-select__option[data-active] { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.sm-select__option[aria-disabled="true"] { color: var(--ink-muted); background: transparent; box-shadow: none; cursor: not-allowed; font-weight: 500; }
.sm-select__text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.sm-select__label { overflow-wrap: anywhere; }
.sm-select__desc { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--ink-muted); }
.sm-select__option[aria-selected="true"] .sm-select__desc { color: var(--ink-secondary); }
.sm-select__tick { flex: none; margin-left: auto; color: var(--accent-strong); opacity: 0; }
.sm-select__option[aria-selected="true"] .sm-select__tick { opacity: 1; }
.sm-select__empty { padding: var(--space-5) var(--space-4); text-align: center; font-size: 14px; font-weight: 500; color: var(--ink-muted); }

/* MultiSelect */
.sm-check { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1.5px solid var(--border-control); border-radius: 6px; background: var(--surface-card); color: var(--on-accent); transition: background-color 120ms ease, border-color 120ms ease; }
.sm-check svg { display: block; opacity: 0; }
.sm-select__option[aria-selected="true"] .sm-check { background: var(--accent); border-color: var(--accent); }
.sm-select__option[aria-selected="true"] .sm-check svg { opacity: 1; }
.sm-select__panel--multi .sm-select__option[aria-selected="true"] { background: transparent; color: var(--ink); }
.sm-select__panel--multi .sm-select__option[aria-selected="true"][data-active] { background: var(--surface-hover); box-shadow: none; }
.sm-select__panel--multi .sm-select__option[aria-selected="true"] .sm-select__desc { color: var(--ink-muted); }
.sm-pop--kbd .sm-select__panel--multi .sm-select__option[data-active] { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.sm-select__bar { display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--control-height); margin-bottom: var(--space-1); padding: 0 var(--space-1) 0 var(--space-3); border-bottom: 1px solid var(--surface-muted); }
.sm-select__count { font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-select__actions { display: flex; align-items: center; }
.sm-select__link { min-height: var(--control-height); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--accent-strong); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color 120ms ease; }
.sm-select__link:hover:not(:disabled) { background: var(--surface-hover); color: var(--accent-pressed); }
.sm-select__link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
.sm-select__link:disabled { color: var(--ink-muted); cursor: not-allowed; }

/* Control nativo oculto (mejora progresiva) */
.sm-native--hidden { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; overflow: hidden; }
.sm-native-host { position: relative; display: block; min-width: 0; }
.sm-date { position: relative; }

/* ---------- DatePicker: campo ------------------------------------------ */
.sm-date { display: block; min-width: 0; }
.sm-date__field { display: flex; align-items: center; min-height: var(--control-height); border: 1px solid var(--border-control); border-radius: var(--radius-sm); background: var(--surface-sunken); transition: border-color 140ms ease, background-color 140ms ease; }
.sm-date__field:hover { border-color: var(--ink-muted); }
.sm-date__field:has(.sm-date__input:focus-visible) { border-color: var(--accent); background: var(--surface-card); outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-date--open .sm-date__field { border-color: var(--accent); background: var(--surface-card); }
.sm-date.is-disabled .sm-date__field { background: var(--surface-muted); border-color: var(--border); cursor: not-allowed; }
.sm-date.is-disabled .sm-date__field, .sm-date.is-disabled .sm-date__field:hover { border-color: var(--border); }
.sm-date__input { flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 14px; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sm-date__input::placeholder { color: var(--ink-muted); opacity: 1; }
.sm-date__input:disabled { color: var(--ink-muted); cursor: not-allowed; }
.sm-date__btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--control-height); height: 42px; margin: 0; padding: 0; border: 0; border-radius: 0 calc(var(--radius-sm) - 1px) calc(var(--radius-sm) - 1px) 0; background: transparent; color: var(--ink-muted); cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.sm-date__btn:hover:not(:disabled) { background: var(--surface-hover); color: var(--ink); }
.sm-date__btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
.sm-date__btn:disabled { color: var(--ink-muted); cursor: not-allowed; opacity: 0.6; }

/* ---------- Calendario (compartido) ------------------------------------ */
.sm-cal { padding: var(--space-4); }
.sm-cal--single { width: 340px; max-width: calc(100vw - 16px); }
.sm-cal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.sm-cal__nav { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--control-height); height: var(--control-height); margin: 0; padding: 0; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink-secondary); cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.sm-cal__nav:hover:not(:disabled) { background: var(--surface-hover); color: var(--ink); }
.sm-cal__nav:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-cal__nav:disabled { color: var(--ink-muted); opacity: 0.45; cursor: not-allowed; }
.sm-cal__title { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--control-height); margin: 0; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.3; font-weight: 700; cursor: pointer; transition: background-color 120ms ease; }
.sm-cal__title:hover { background: var(--surface-hover); }
.sm-cal__title:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-cal__title.is-static, .sm-cal__title.is-static:hover { background: transparent; cursor: default; }
.sm-cal__title .sm-ui-ico { color: var(--ink-muted); }
.sm-cal__grid { width: 100%; border-collapse: collapse; border-spacing: 0; table-layout: fixed; }
.sm-cal__dow { height: 32px; padding: 0; font-size: 13px; line-height: 1; font-weight: 700; color: var(--ink-muted); text-align: center; }
.sm-cal__cell { position: relative; width: 14.2857%; height: 44px; padding: 0; text-align: center; }
.sm-cal__day { position: relative; z-index: 1; display: block; width: 40px; height: 40px; margin: 2px auto; padding: 0; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink); font: inherit; font-size: 14px; line-height: 40px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.sm-cal__day:hover:not(:disabled):not(.is-selected):not(.is-limit) { background: var(--surface-hover); }
.sm-cal__day.is-other { color: var(--ink-muted); font-weight: 500; }
.sm-cal__day.is-today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.sm-cal__day.is-selected { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.sm-cal__day.is-selected:hover { background: var(--accent-strong); }
.sm-cal__day:focus-visible { z-index: 2; outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-cal__day:disabled { color: var(--ink-muted); opacity: 0.4; cursor: not-allowed; }
.sm-cal__day.is-limit { color: var(--ink-muted); opacity: 0.55; cursor: not-allowed; }
.sm-cal__cell.is-mid::before, .sm-cal__cell.is-start::before, .sm-cal__cell.is-end::before { content: ""; position: absolute; top: 2px; bottom: 2px; background: var(--accent-soft); }
.sm-cal__cell.is-mid::before { left: 0; right: 0; }
.sm-cal__cell.is-start::before { left: 50%; right: 0; }
.sm-cal__cell.is-end::before { left: 0; right: 50%; }
.sm-cal__cell.is-mid.is-rowstart::before, .sm-cal__cell.is-end.is-rowstart::before { left: 2px; border-radius: var(--radius-xs) 0 0 var(--radius-xs); }
.sm-cal__cell.is-mid.is-rowend::before, .sm-cal__cell.is-start.is-rowend::before { right: 2px; border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.sm-cal__cell.is-mid .sm-cal__day:hover:not(:disabled) { background: var(--accent-muted); }
.sm-cal__body { min-height: 296px; }
.sm-cal__picks { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); gap: var(--space-2); min-height: 296px; }
.sm-cal__pick { margin: 0; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.sm-cal__pick:hover:not(:disabled):not(.is-selected) { background: var(--surface-hover); }
.sm-cal__pick.is-today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.sm-cal__pick.is-selected { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.sm-cal__pick:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-cal__pick:disabled { color: var(--ink-muted); opacity: 0.4; cursor: not-allowed; }
.sm-cal__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--surface-muted); }
.sm-cal__action { min-height: var(--control-height); margin: 0; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--accent-strong); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color 120ms ease; }
.sm-cal__action:hover:not(:disabled) { background: var(--surface-hover); color: var(--accent-pressed); }
.sm-cal__action:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-cal__action:disabled { color: var(--ink-muted); cursor: not-allowed; opacity: 0.6; }

/* ---------- DateRangePicker --------------------------------------------- */
.sm-range { display: inline-block; max-width: 100%; vertical-align: top; position: relative; }
.sm-range__trigger { min-width: 300px; }
.sm-range__ico { flex: none; color: var(--ink-muted); }
.sm-range__text { flex: 1 1 auto; display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; overflow: hidden; white-space: nowrap; }
.sm-range__label { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.sm-range__label.is-placeholder { color: var(--ink-muted); font-weight: 500; }
.sm-range__dates { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 500; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-range__panel { display: flex; flex-direction: column; width: max-content; max-width: calc(100vw - 16px); overflow: hidden; }
.sm-range__sheethead { display: none; }
.sm-range__body { display: flex; min-height: 0; }
.sm-range__presets { flex: none; display: flex; flex-direction: column; gap: 2px; width: 208px; padding: var(--space-3); border-right: 1px solid var(--surface-muted); overflow-y: auto; }
.sm-range__preset { display: flex; align-items: center; flex: none; min-height: var(--control-height); margin: 0; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink-secondary); font: inherit; font-size: 14px; line-height: 1.3; font-weight: 600; text-align: left; white-space: nowrap; cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.sm-range__preset:hover:not(:disabled):not(.is-on) { background: var(--surface-hover); color: var(--ink); }
.sm-range__preset.is-on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.sm-range__preset:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
.sm-range__preset:disabled { color: var(--ink-muted); opacity: 0.55; cursor: not-allowed; }
.sm-range__main { flex: 1 1 auto; min-width: 0; padding: var(--space-4) var(--space-4) var(--space-3); }
.sm-range__months { display: flex; gap: var(--space-6); }
.sm-range__months .sm-cal__month { width: 308px; flex: none; }
.sm-range__min { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-3) 0 0; font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--ink-muted); }
.sm-range__min .sm-ui-ico { color: var(--ink-muted); }
.sm-range__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); background: var(--surface-sunken); }
.sm-range__summary { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sm-range__sub { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--ink-muted); }
.sm-range__sum { font-size: 14px; line-height: 1.4; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.sm-range__warn { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--caution-ink); }
.sm-range__warn .sm-ui-ico { margin-top: 1px; }
.sm-range__actions { display: flex; flex: none; gap: var(--space-2); }
.sm-range__close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--control-height); height: var(--control-height); margin: -8px -8px -8px 0; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-secondary); cursor: pointer; }
.sm-range__close:hover { background: var(--surface-hover); }
.sm-range__close:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

@media (max-width: 919.98px) {
  .sm-range__months { gap: 0; }
}

/* Hoja a pantalla completa en móvil */
.sm-pop--sheet { inset: 0; width: auto; max-width: none; min-width: 0; height: auto; max-height: none; border: 0; border-radius: 0; box-shadow: none; animation: sm-fade 140ms ease-out both; }
.sm-pop--sheet.sm-range__panel { display: flex; flex-direction: column; width: auto; }
.sm-pop--sheet .sm-range__sheethead { display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4); border-bottom: 1px solid var(--surface-muted); color: var(--ink); }
.sm-pop--sheet .sm-range__body { flex: 1 1 auto; flex-direction: column; overflow-y: auto; }
.sm-pop--sheet .sm-range__presets { flex-direction: row; width: auto; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-right: 0; border-bottom: 1px solid var(--surface-muted); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.sm-pop--sheet .sm-range__presets::-webkit-scrollbar { display: none; }
.sm-pop--sheet .sm-range__preset { padding: 0 var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface-card); }
.sm-pop--sheet .sm-range__preset.is-on { border-color: var(--accent-soft); background: var(--accent-soft); }
.sm-pop--sheet .sm-range__preset:focus-visible { outline-offset: 2px; }
.sm-pop--sheet .sm-range__main { flex: none; padding: var(--space-4); }
.sm-pop--sheet .sm-range__months { display: block; }
.sm-pop--sheet .sm-range__months .sm-cal__month { width: 100%; max-width: 380px; margin: 0 auto; }
.sm-pop--sheet .sm-range__foot { flex: none; flex-direction: column; align-items: stretch; gap: var(--space-3); padding: var(--space-3) var(--space-4) max(var(--space-4), env(safe-area-inset-bottom)); }
.sm-pop--sheet .sm-range__actions .sm-btn { flex: 1 1 0; }

@media (max-width: 559.98px) {
  .sm-range { display: block; }
  .sm-range__trigger { min-width: 0; }
  .sm-range__dates { display: none; }
}

/* ---------- Segmented --------------------------------------------------- */
.sm-seg { display: inline-flex; gap: var(--space-1); padding: var(--space-1); background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.sm-seg--soft { background: var(--surface-page); }
.sm-seg__btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control-height); margin: 0; padding: 0 18px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-secondary); font: inherit; font-size: 14px; line-height: 1.3; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.sm-seg__btn:hover:not(.is-on):not(:disabled) { background: var(--surface-hover); color: var(--ink); }
.sm-seg__btn.is-on { background: var(--accent); color: var(--on-accent); }
.sm-seg__btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-seg__btn:disabled { color: var(--ink-muted); opacity: 0.55; cursor: not-allowed; }
.sm-seg__btn .sm-ui-tile { width: 20px; height: 20px; background: transparent; color: inherit; }
.sm-seg--sm .sm-seg__btn { min-height: var(--control-height-sm); padding: 0 14px; font-size: 13px; }
.sm-seg--block { display: flex; width: 100%; }
.sm-seg--block .sm-seg__btn { flex: 1 1 0; }
@media (max-width: 559.98px) {
  .sm-seg { display: flex; width: 100%; }
  .sm-seg__btn { flex: 1 1 0; min-width: 0; padding: 0 8px; }
  .sm-seg--sm .sm-seg__btn { min-height: var(--control-height); }
}

/* ---------- Tabs -------------------------------------------------------- */
.sm-tabs { display: block; border-bottom: 1px solid var(--border); }
.sm-tabs__list { display: flex; gap: var(--space-1); margin-bottom: -1px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.sm-tabs__list::-webkit-scrollbar { display: none; }
.sm-tabs__tab { position: relative; flex: none; display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-height); margin: 0; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-xs) var(--radius-xs) 0 0; background: transparent; color: var(--ink-secondary); font: inherit; font-size: 14px; line-height: 1.3; font-weight: 700; white-space: nowrap; cursor: pointer; scroll-snap-align: start; transition: background-color 120ms ease, color 120ms ease; }
.sm-tabs__tab::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: transparent; transition: background-color 120ms ease; }
.sm-tabs__tab:hover:not(.is-on):not(:disabled) { background: var(--surface-hover); color: var(--ink); }
.sm-tabs__tab.is-on { color: var(--ink); }
.sm-tabs__tab.is-on::after { background: var(--accent); }
.sm-tabs__tab:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
.sm-tabs__tab:disabled { color: var(--ink-muted); opacity: 0.55; cursor: not-allowed; }
.sm-tabs__count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--ink-secondary); font-size: 12px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; transition: background-color 120ms ease, color 120ms ease; }
.sm-tabs__tab.is-on .sm-tabs__count { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- Menu -------------------------------------------------------- */
.sm-menu { display: inline-block; position: relative; vertical-align: top; }
.sm-menu__trigger { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height); height: var(--control-height); margin: 0; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink-secondary); cursor: pointer; transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
.sm-menu__trigger:hover, .sm-menu__trigger[aria-expanded="true"] { background: var(--surface-hover); color: var(--ink); }
.sm-menu__trigger:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-menu__panel { min-width: 220px; padding: var(--space-1); overflow-y: auto; }
.sm-menu__item { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: var(--control-height); margin: 0; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.3; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; transition: background-color 120ms ease; }
.sm-menu__item:hover, .sm-menu__item:focus { background: var(--surface-hover); outline: 0; }
.sm-menu__item:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
.sm-menu__ico { color: var(--ink-muted); }
.sm-menu__label { flex: 1 1 auto; min-width: 0; }
.sm-menu__kbd { margin-left: auto; padding-left: var(--space-4); font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sm-menu__item.is-danger, .sm-menu__item.is-danger .sm-menu__ico { color: var(--danger-ink); }
.sm-menu__item.is-danger:hover, .sm-menu__item.is-danger:focus { background: var(--danger-soft); }
.sm-menu__item[aria-disabled="true"] { color: var(--ink-muted); background: transparent; cursor: not-allowed; }
.sm-menu__sep { height: 1px; margin: var(--space-1) var(--space-2); background: var(--surface-muted); }
.sm-menu__heading { padding: var(--space-3) var(--space-3) var(--space-1); font-size: 11px; line-height: 1.3; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }

/* ---------- Tooltip ----------------------------------------------------- */
.sm-tooltip { position: fixed; z-index: var(--z-popover); max-width: 260px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--ink); color: var(--surface-card); box-shadow: var(--shadow-pop); font-size: 13px; line-height: 1.4; font-weight: 600; animation: sm-tip-in 120ms ease-out both; }
.sm-tooltip__text { display: block; overflow-wrap: anywhere; }
.sm-tooltip__arrow { position: absolute; width: 10px; height: 10px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }
.sm-tooltip[data-side="top"] .sm-tooltip__arrow { bottom: -4px; left: calc(var(--sm-arrow, 50%) - 5px); }
.sm-tooltip[data-side="bottom"] .sm-tooltip__arrow { top: -4px; left: calc(var(--sm-arrow, 50%) - 5px); }
.sm-tooltip[data-side="left"] .sm-tooltip__arrow { right: -4px; top: calc(var(--sm-arrow, 50%) - 5px); }
.sm-tooltip[data-side="right"] .sm-tooltip__arrow { left: -4px; top: calc(var(--sm-arrow, 50%) - 5px); }
@keyframes sm-tip-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Modal ------------------------------------------------------- */
.sm-scroll-lock { overflow: hidden; }
.sm-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: var(--space-4); background: var(--scrim); animation: sm-fade 140ms ease-out both; }
.sm-modal.is-out { animation: sm-fade-out 140ms ease-in both; }
.sm-modal__card { position: relative; display: flex; flex-direction: column; width: 100%; max-height: 100%; background: var(--surface-card); color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); outline: 0; animation: sm-modal-in 160ms ease-out both; }
.sm-modal__card--sm { max-width: 440px; }
.sm-modal__card--md { max-width: 560px; }
.sm-modal__card--lg { max-width: 720px; }
.sm-modal__head { display: flex; align-items: flex-start; gap: var(--space-3); flex: none; padding: var(--space-5) var(--space-5) 0; }
.sm-modal__badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--danger-soft); color: var(--danger-ink); }
.sm-modal__titles { flex: 1 1 auto; min-width: 0; padding-top: 2px; }
.sm-modal__title { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.sm-modal__desc { margin: var(--space-2) 0 0; font-size: 14px; line-height: 1.55; font-weight: 500; color: var(--ink-secondary); }
.sm-modal__close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--control-height); height: var(--control-height); margin: -8px -10px 0 0; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-secondary); cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.sm-modal__close:hover { background: var(--surface-hover); color: var(--ink); }
.sm-modal__close:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-modal__body { flex: 1 1 auto; min-height: 0; padding: var(--space-4) var(--space-5); overflow-y: auto; font-size: 14px; line-height: 1.55; font-weight: 500; color: var(--ink); }
.sm-modal__body:empty { display: none; }
.sm-modal__body:empty + .sm-modal__foot { margin-top: var(--space-4); }
.sm-modal__foot { display: flex; flex: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-3); padding: var(--space-3) var(--space-5) var(--space-5); }
.sm-modal__head + .sm-modal__foot { margin-top: var(--space-4); }
@keyframes sm-modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sm-sheet-up { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 559.98px) {
  .sm-modal { align-items: flex-end; padding: 0; }
  .sm-modal__card, .sm-modal__card--sm, .sm-modal__card--md, .sm-modal__card--lg { max-width: none; max-height: 92vh; max-height: 92dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; animation-name: sm-sheet-up; animation-duration: 200ms; }
  .sm-modal__head { padding: var(--space-4) var(--space-4) 0; }
  .sm-modal__body { padding: var(--space-4); }
  .sm-modal__foot { flex-direction: column-reverse; align-items: stretch; padding: var(--space-3) var(--space-4) max(var(--space-4), env(safe-area-inset-bottom)); }
  .sm-modal__foot .sm-btn { width: 100%; }
}

/* ---------- Toast ------------------------------------------------------- */
.sm-toasts { position: fixed; z-index: var(--z-toast); right: var(--space-4); bottom: var(--space-4); display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-3); width: min(400px, calc(100vw - 2 * var(--space-4))); pointer-events: none; }
.sm-toast { position: relative; display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; padding: var(--space-3) var(--space-2) var(--space-3) var(--space-4); background: var(--surface-card); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); pointer-events: auto; animation: sm-toast-in 160ms ease-out both; }
.sm-toast.is-out { animation: sm-toast-out 140ms ease-in both; }
.sm-toast__icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--info-soft); color: var(--info-ink); line-height: 0; }
.sm-toast--success .sm-toast__icon { background: var(--positive-soft); color: var(--positive-ink); }
.sm-toast--warning .sm-toast__icon { background: var(--caution-soft); color: var(--caution-ink); }
.sm-toast--error .sm-toast__icon { background: var(--danger-soft); color: var(--danger-ink); }
.sm-toast__content { flex: 1 1 auto; min-width: 0; padding: 4px 0; }
.sm-toast__content > p { margin: 0; }
.sm-toast__tone { font-size: 13px; line-height: 1.4; font-weight: 700; color: var(--info-ink); }
.sm-toast--success .sm-toast__tone { color: var(--positive-ink); }
.sm-toast--warning .sm-toast__tone { color: var(--caution-ink); }
.sm-toast--error .sm-toast__tone { color: var(--danger-ink); }
.sm-toast__title { font-size: 14px; line-height: 1.45; font-weight: 700; color: var(--ink); }
.sm-toast__msg { font-size: 14px; line-height: 1.45; font-weight: 500; color: var(--ink-secondary); overflow-wrap: anywhere; }
.sm-toast__action { display: inline-flex; align-items: center; min-height: var(--control-height); margin: 0 0 -8px -8px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--accent-strong); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sm-toast__action:hover { color: var(--accent-pressed); background: var(--surface-hover); }
.sm-toast__action:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sm-toast__close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--control-height); height: var(--control-height); margin: -2px 0 -2px 0; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.sm-toast__close:hover { background: var(--surface-hover); color: var(--ink); }
.sm-toast__close:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
@keyframes sm-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sm-toast-out { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 559.98px) {
  .sm-toasts { right: auto; left: 50%; align-items: center; bottom: max(var(--space-4), env(safe-area-inset-bottom)); transform: translateX(-50%); }
}

/* ---------- movimiento reducido ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .sm-ui-pop, .sm-tooltip, .sm-modal, .sm-modal__card, .sm-toast, .sm-pop--sheet { animation: none !important; }
  .sm-select__trigger, .sm-select__chev, .sm-select__option, .sm-check, .sm-date__field, .sm-date__btn, .sm-cal__day, .sm-cal__nav, .sm-cal__pick,
  .sm-range__trigger, .sm-range__chev, .sm-range__preset, .sm-seg__btn, .sm-tabs__tab, .sm-tabs__tab::after, .sm-tabs__count, .sm-menu__trigger, .sm-menu__item,
  .sm-modal__close, .sm-toast__close { transition: none !important; }
}
