/**
 * APL Rebuilt Design System - extensión TELOAGENDA.
 * Las vistas consumen exclusivamente tokens --apl-ui-* y componentes .apl-*.
 */
:root {
  --apl-ui-space-7: 28px;
  --apl-ui-space-8: 32px;
  --apl-ui-content-narrow: 780px;
  --apl-ui-content-form: 980px;
  --apl-ui-table-min-width: 760px;
  --apl-ui-table-wide-min-width: 1040px;
  --apl-ui-avatar-sm: 32px;
  --apl-ui-avatar-md: 44px;
  --apl-ui-avatar-lg: 64px;
  --apl-ui-kpi-min-height: 86px;
  --apl-ui-empty-min-height: 180px;
  --apl-ui-select-menu-max-height: 260px;
  --apl-ui-card-min-width: 260px;
  --apl-ui-choice-min-width: 150px;
  --apl-ui-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --apl-ui-opacity-disabled: .55;
  --apl-ui-editor-rail-width: 250px;
  --apl-ui-chart-height: 280px;
  --apl-ui-touch-pos-date-width: calc(var(--apl-ui-control-height-lg) * 3);
  --apl-ui-agenda-time-width: 72px;
  --apl-ui-agenda-inspector-width: 320px;
  --apl-ui-agenda-grid-height: 896px;
  --apl-ui-agenda-slot-height: 28px;
  --apl-ui-agenda-scroll-height: 720px;
  --apl-ui-agenda-event-min-height: 24px;
  --apl-ui-agenda-board-min-width: 720px;
  --apl-ui-color-overlay-soft: var(--apl-ui-color-surface);
  --apl-ui-color-inverse: var(--apl-ui-color-viewer-stage);
  --apl-ui-color-inverse-border: var(--apl-ui-color-border-strong);
  --apl-ui-color-inverse-text: var(--apl-ui-color-on-solid);
  --apl-ui-color-inverse-text-muted: var(--apl-ui-color-shell-muted);
  --apl-ui-color-overlay: var(--apl-ui-color-shell-shadow);
  --apl-ui-font-size-hero: var(--apl-ui-font-size-page-title);
  --apl-ui-color-warning: var(--apl-ui-color-accent-strong);
  --apl-ui-color-info: var(--apl-ui-color-info-dark);
  --apl-ui-opacity-muted: .78;
  --apl-ui-z-tooltip: var(--apl-ui-z-toast);
  --apl-ui-border-width: 1px;
  --apl-ui-motion-fast: 160ms ease;
  --apl-ui-shadow-focus: 0 0 0 var(--apl-ui-space-1) var(--apl-ui-focus-brand);
}

.apl-telo { margin-inline: auto; max-width: var(--apl-ui-page-max-width); width: 100%; }
.apl-telo [hidden],
[data-apl-telo] [hidden] { display: none !important; }
.apl-telo__nav {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-1);
  overflow-x: auto;
  padding: var(--apl-ui-space-1);
  scrollbar-width: thin;
}
.apl-telo__nav a {
  align-items: center;
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-text-muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: var(--apl-ui-font-size-detail);
  font-weight: var(--apl-ui-font-weight-semibold);
  gap: var(--apl-ui-space-2);
  min-height: var(--apl-ui-control-height);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  text-decoration: none;
}
.apl-telo__nav a:hover,
.apl-telo__nav a:focus,
.apl-telo__nav a.is-active {
  background: var(--apl-ui-color-brand-surface);
  color: var(--apl-ui-color-brand-dark);
  text-decoration: none;
}
.apl-page__summary {
  color: var(--apl-ui-color-text-muted);
  font-size: var(--apl-ui-font-size-body);
  line-height: var(--apl-ui-line-relaxed);
  margin: 0;
  max-width: var(--apl-ui-content-form);
}
.apl-page--form { max-width: var(--apl-ui-content-form); }
.apl-page--narrow { max-width: var(--apl-ui-content-narrow); }

.apl-notice {
  align-items: flex-start;
  background: var(--apl-ui-color-info-soft);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-soft);
  border-radius: var(--apl-ui-radius-lg);
  color: var(--apl-ui-color-info-dark);
  display: flex;
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-3);
}
.apl-notice--success { background: var(--apl-ui-color-success-soft); border-color: var(--apl-ui-color-success-border); color: var(--apl-ui-color-success-dark); }
.apl-notice--warning { background: var(--apl-ui-color-warning-soft); border-color: var(--apl-ui-color-warning-border); color: var(--apl-ui-color-warning-dark); }
.apl-notice--danger { background: var(--apl-ui-color-danger-soft); border-color: var(--apl-ui-color-danger-border); color: var(--apl-ui-color-danger-dark); }
.apl-notice__icon { flex: 0 0 auto; margin-top: var(--apl-ui-space-1); }
.apl-notice__body { min-width: 0; }
.apl-notice__title { color: inherit; display: block; font-weight: var(--apl-ui-font-weight-bold); margin-bottom: var(--apl-ui-space-1); }
.apl-notice__actions { align-items: center; display: flex; gap: var(--apl-ui-space-1); margin-top: var(--apl-ui-space-2); }
.apl-notice ul { margin: var(--apl-ui-space-1) 0 0; padding-left: var(--apl-ui-space-5); }

.apl-kpi-grid { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.apl-kpi {
  align-items: flex-start;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-3);
  min-height: var(--apl-ui-kpi-min-height);
  padding: var(--apl-ui-space-3);
}
.apl-kpi__icon {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  flex: 0 0 var(--apl-ui-avatar-md);
  height: var(--apl-ui-avatar-md);
  justify-content: center;
}
.apl-kpi__copy { min-width: 0; }
.apl-kpi__label { color: var(--apl-ui-color-text-muted); display: block; font-size: var(--apl-ui-font-size-detail); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-kpi__value { color: var(--apl-ui-color-text-strong); display: block; font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); line-height: var(--apl-ui-line-tight); margin-top: var(--apl-ui-space-1); }
.apl-kpi__meta { color: var(--apl-ui-color-text-subtle); display: block; font-size: var(--apl-ui-font-size-caption); margin-top: var(--apl-ui-space-1); }

.apl-card__heading { min-width: 0; }
.apl-card__heading .apl-card__title + .apl-card__subtitle { margin-top: var(--apl-ui-space-1); }
.apl-card__tools { align-items: center; display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: var(--apl-ui-space-2); justify-content: flex-end; }
.apl-card__body--flush { padding: 0; }

.apl-filter-grid { padding: var(--apl-ui-space-3); }
.apl-filter-grid__actions { align-items: flex-end; display: flex; gap: var(--apl-ui-space-2); grid-column: span 3; justify-content: flex-end; }
.apl-field--span-2 { grid-column: span 2; }
.apl-field--span-3 { grid-column: span 3; }
.apl-field--span-4 { grid-column: span 4; }
.apl-field--span-6 { grid-column: span 6; }
.apl-field--full { grid-column: 1 / -1; }
.apl-field__required { color: var(--apl-ui-color-danger-dark); }
.apl-field__error { color: var(--apl-ui-color-danger-dark); display: block; font-size: var(--apl-ui-font-size-caption); margin-top: var(--apl-ui-space-1); }


.apl-form { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.apl-form-actions {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  bottom: 0;
  display: flex;
  gap: var(--apl-ui-space-2);
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin: var(--apl-ui-space-1) calc(var(--apl-ui-space-3) * -1) calc(var(--apl-ui-space-3) * -1);
  padding: var(--apl-ui-space-3);
  position: sticky;
  z-index: var(--apl-ui-z-sticky);
}
.apl-choice {
  align-items: flex-start;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-md);
  cursor: pointer;
  display: flex;
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
.apl-choice input { accent-color: var(--apl-ui-color-brand); margin-top: var(--apl-ui-space-1); }
.apl-choice__copy { min-width: 0; }
.apl-choice__title { color: var(--apl-ui-color-text-strong); display: block; font-weight: var(--apl-ui-font-weight-semibold); }
.apl-choice__help { color: var(--apl-ui-color-text-subtle); display: block; font-size: var(--apl-ui-font-size-caption); margin-top: var(--apl-ui-space-1); }

.apl-table-wrap .apl-table { min-width: var(--apl-ui-table-min-width); }
.apl-table-wrap--wide .apl-table { min-width: var(--apl-ui-table-wide-min-width); }
.apl-table__primary { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-table__secondary { color: var(--apl-ui-color-text-subtle); display: block; font-size: var(--apl-ui-font-size-caption); margin-top: var(--apl-ui-space-1); }
.apl-table__number { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.apl-table__actions { align-items: center; display: flex; gap: var(--apl-ui-space-1); justify-content: flex-end; white-space: nowrap; }
.apl-table__actions .apl-btn { flex: 0 0 auto; }
.apl-table__empty td { background: var(--apl-ui-color-surface-subtle); }

.apl-pagination {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
.apl-pagination__summary { color: var(--apl-ui-color-text-muted); font-size: var(--apl-ui-font-size-detail); }
.apl-pagination__pages { align-items: center; display: flex; gap: var(--apl-ui-space-1); }
.apl-pagination__pages button {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-sm);
  color: var(--apl-ui-color-text-body);
  display: inline-flex;
  font-family: var(--apl-ui-font-family);
  font-size: var(--apl-ui-font-size-detail);
  font-weight: var(--apl-ui-font-weight-semibold);
  height: var(--apl-ui-control-height-sm);
  justify-content: center;
  min-width: var(--apl-ui-control-height-sm);
}
.apl-pagination__pages button.is-active { background: var(--apl-ui-color-brand); border-color: var(--apl-ui-color-brand-dark); color: var(--apl-ui-color-on-solid); }
.apl-pagination__pages button[disabled] { cursor: not-allowed; opacity: .5; }

.apl-empty {
  align-items: center;
  color: var(--apl-ui-color-text-muted);
  display: flex;
  flex-direction: column;
  gap: var(--apl-ui-space-2);
  justify-content: center;
  min-height: var(--apl-ui-empty-min-height);
  padding: var(--apl-ui-space-5);
  text-align: center;
}
.apl-empty__icon { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-display); }
.apl-empty__title { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-label-lg); font-weight: var(--apl-ui-font-weight-bold); }
.apl-empty__text { color: var(--apl-ui-color-text-muted); margin: 0; max-width: var(--apl-ui-content-narrow); }

.apl-avatar {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  flex: 0 0 var(--apl-ui-avatar-md);
  height: var(--apl-ui-avatar-md);
  justify-content: center;
  overflow: hidden;
  width: var(--apl-ui-avatar-md);
}
.apl-avatar--sm { flex-basis: var(--apl-ui-avatar-sm); height: var(--apl-ui-avatar-sm); width: var(--apl-ui-avatar-sm); }
.apl-avatar--lg { flex-basis: var(--apl-ui-avatar-lg); height: var(--apl-ui-avatar-lg); width: var(--apl-ui-avatar-lg); }
.apl-avatar img { height: 100%; object-fit: cover; width: 100%; }
.apl-entity { align-items: center; display: flex; gap: var(--apl-ui-space-2); min-width: 0; }
.apl-entity__copy { min-width: 0; }

.apl-segmented {
  align-items: center;
  background: var(--apl-ui-color-surface-muted);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-md);
  display: inline-flex;
  gap: var(--apl-ui-space-1);
  padding: var(--apl-ui-space-1);
}
.apl-segmented a,
.apl-segmented button {
  background: transparent;
  border: 0;
  border-radius: var(--apl-ui-radius-sm);
  color: var(--apl-ui-color-text-muted);
  font-family: var(--apl-ui-font-family);
  font-size: var(--apl-ui-font-size-detail);
  font-weight: var(--apl-ui-font-weight-semibold);
  min-height: var(--apl-ui-control-height-sm);
  padding: var(--apl-ui-space-1) var(--apl-ui-space-3);
  text-decoration: none;
}
.apl-segmented a.is-active,
.apl-segmented button.is-active { background: var(--apl-ui-color-surface); box-shadow: var(--apl-ui-shadow-sm); color: var(--apl-ui-color-text-strong); }

.apl-loading { align-items: center; color: var(--apl-ui-color-text-muted); display: none; gap: var(--apl-ui-space-2); justify-content: center; padding: var(--apl-ui-space-4); }
.apl-loading.is-visible { display: flex; }
.apl-is-busy { cursor: wait; opacity: .7; pointer-events: none; }

@media (max-width: 1100px) {
  .apl-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .apl-card__header { align-items: flex-start; flex-direction: column; }
  .apl-card__tools { justify-content: flex-start; width: 100%; }
  .apl-card__tools .apl-btn { flex: 1 1 auto; }
  .apl-filter-grid,
  .apl-form { grid-template-columns: 1fr; }
  .apl-field--span-2,
  .apl-field--span-3,
  .apl-field--span-4,
  .apl-field--span-6,
  .apl-field--full,
  .apl-filter-grid__actions { grid-column: auto; }
  .apl-filter-grid__actions { align-items: stretch; justify-content: stretch; }
  .apl-filter-grid__actions .apl-btn { flex: 1 1 0; }
  .apl-form-actions { margin-inline: calc(var(--apl-ui-space-3) * -1); }
  .apl-form-actions .apl-btn { flex: 1 1 0; }
  .apl-pagination { align-items: stretch; flex-direction: column; }
  .apl-pagination__pages { justify-content: center; }
}
@media (max-width: 520px) {
  .apl-kpi-grid { grid-template-columns: 1fr; }
  .apl-page__actions .apl-btn { flex: 1 1 100%; }
  .apl-telo__nav a span { display: none; }
  .apl-form-actions { flex-direction: column-reverse; }
  .apl-form-actions .apl-btn { width: 100%; }
}

.apl-upload {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) dashed var(--apl-ui-color-border-strong);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-3);
  padding: var(--apl-ui-space-3);
}
.apl-upload__preview { flex: 0 0 auto; position: relative; }
.apl-upload__copy { min-width: 0; }
.apl-upload__copy input[type="file"] { color: var(--apl-ui-color-text-muted); font-family: var(--apl-ui-font-family); font-size: var(--apl-ui-font-size-detail); max-width: 100%; }
.apl-upload__help { color: var(--apl-ui-color-text-subtle); display: block; font-size: var(--apl-ui-font-size-caption); margin-top: var(--apl-ui-space-2); }
.apl-upload__initial { color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); }
.apl-compact-grid { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 767px) {
  .apl-upload { align-items: flex-start; }
  .apl-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .apl-upload { flex-direction: column; }
  .apl-compact-grid { grid-template-columns: 1fr; }
}

.apl-panel-grid { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-list { display: flex; flex-direction: column; margin: 0; padding: 0; }
.apl-list__item {
  align-items: center;
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  min-width: 0;
  padding: var(--apl-ui-space-2) 0;
}
.apl-list__item:last-child { border-bottom: 0; }
.apl-list__main { min-width: 0; }
.apl-list__title { color: var(--apl-ui-color-text-strong); display: block; font-weight: var(--apl-ui-font-weight-semibold); }
.apl-list__meta { color: var(--apl-ui-color-text-subtle); display: block; font-size: var(--apl-ui-font-size-caption); margin-top: var(--apl-ui-space-1); }
.apl-list__actions { align-items: center; display: flex; flex: 0 0 auto; gap: var(--apl-ui-space-1); }
.apl-days { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(7, minmax(0, 1fr)); }
.apl-feedback-inline { border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-text-muted); display: none; font-size: var(--apl-ui-font-size-detail); margin-bottom: var(--apl-ui-space-2); padding: var(--apl-ui-space-2); }
.apl-feedback-inline.is-visible { display: block; }
.apl-feedback-inline.is-success { background: var(--apl-ui-color-success-soft); color: var(--apl-ui-color-success-dark); }
.apl-feedback-inline.is-danger { background: var(--apl-ui-color-danger-soft); color: var(--apl-ui-color-danger-dark); }
.apl-section-anchor { scroll-margin-top: var(--apl-ui-space-8); }
.apl-readonly { background: var(--apl-ui-color-surface-muted); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border); border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-text-strong); min-height: var(--apl-ui-control-height); padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
.apl-modal .modal-content { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-card); box-shadow: var(--apl-ui-shadow-modal); color: var(--apl-ui-color-text-body); overflow: hidden; }
.apl-modal .modal-header,
.apl-modal .modal-footer { background: var(--apl-ui-color-surface-subtle); border-color: var(--apl-ui-color-row-divider); padding: var(--apl-ui-space-3); }
.apl-modal .modal-body { padding: var(--apl-ui-space-4); }
.apl-modal .modal-title { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-section-title); font-weight: var(--apl-ui-font-weight-bold); }
@media (max-width: 900px) {
  .apl-panel-grid { grid-template-columns: 1fr; }
  .apl-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .apl-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-list__item { align-items: flex-start; flex-direction: column; }
  .apl-list__actions { width: 100%; }
}


/* Composición reutilizable para agenda, integraciones y paneles operativos. */
.apl-card-grid { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(auto-fit, minmax(var(--apl-ui-card-min-width), 1fr)); }
.apl-card-mini { background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); padding: var(--apl-ui-space-3); }
.apl-card-mini__header { align-items: flex-start; display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; }
.apl-card-mini__title { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-label-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-card-mini__meta { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); margin: var(--apl-ui-space-1) 0 0; }
.apl-stack { display: flex; flex-direction: column; gap: var(--apl-ui-space-3); }
.apl-inline { align-items: center; display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-2); }
.apl-code { color: var(--apl-ui-color-text-muted); font-family: var(--apl-ui-font-family-mono); font-size: var(--apl-ui-font-size-caption); overflow-wrap: anywhere; }
.apl-choice-grid { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(auto-fit, minmax(var(--apl-ui-choice-min-width), 1fr)); }
.apl-choice-grid.is-disabled { opacity: var(--apl-ui-opacity-disabled); }
.apl-copy-row { align-items: center; display: grid; gap: var(--apl-ui-space-2); grid-template-columns: minmax(0, 1fr) auto; }
.apl-copy-status { color: var(--apl-ui-color-text-muted); font-size: var(--apl-ui-font-size-detail); margin: 0; min-height: var(--apl-ui-line-relaxed); }
.apl-copy-status.is-success { color: var(--apl-ui-color-success-dark); }
.apl-copy-status.is-danger { color: var(--apl-ui-color-danger-dark); }
.apl-field__label { color: var(--apl-ui-color-text-muted); display: block; font-size: var(--apl-ui-font-size-label); font-weight: var(--apl-ui-font-weight-bold); margin-bottom: var(--apl-ui-space-1); }
@media (max-width: 520px) {
  .apl-copy-row { grid-template-columns: 1fr; }
  .apl-copy-row .apl-btn { width: 100%; }
}


/* Centro de reservas: línea de tiempo propia, sin herencia de calendarios anteriores. */
.apl-agenda { display: grid; gap: var(--apl-ui-space-4); }
.apl-agenda__hero { margin-bottom: 0; }
.apl-agenda-pulse { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.apl-agenda-pulse__item { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-text-body); cursor: pointer; display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); text-align: left; }
.apl-agenda-pulse__item:hover,
.apl-agenda-pulse__item:focus,
.apl-agenda-pulse__item.is-active { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); color: var(--apl-ui-color-brand-dark); }
.apl-agenda-pulse__label { font-size: var(--apl-ui-font-size-detail); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-agenda-pulse__value { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); line-height: var(--apl-ui-line-tight); }
.apl-agenda-pulse__meta { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-agenda-command { align-items: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: auto auto minmax(var(--apl-ui-card-min-width), 1fr) auto; padding: var(--apl-ui-space-2); position: sticky; top: var(--apl-ui-space-2); z-index: var(--apl-ui-z-sticky); }
.apl-agenda-command__navigation,
.apl-agenda-command__actions { align-items: center; display: flex; gap: var(--apl-ui-space-1); }
.apl-agenda-command__period { display: grid; min-width: var(--apl-ui-card-min-width); }
.apl-agenda-command__period strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }
.apl-agenda-command__period span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-agenda-date { align-items: center; color: var(--apl-ui-color-text-muted); display: flex; font-size: var(--apl-ui-font-size-caption); gap: var(--apl-ui-space-1); }
.apl-agenda-date input { border: var(--apl-ui-border-width) solid var(--apl-ui-color-border); border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-text-body); font-family: var(--apl-ui-font-family); min-height: var(--apl-ui-control-height-sm); padding: var(--apl-ui-space-1); }
.apl-agenda-lens { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); border-radius: var(--apl-ui-radius-xl); box-shadow: var(--apl-ui-shadow-lg); display: grid; gap: 0; position: relative; }
.apl-agenda-lens[hidden] { display: none; }
.apl-agenda-lens__header,
.apl-agenda-lens__footer { align-items: center; display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3) var(--apl-ui-space-4); }
.apl-agenda-lens__header { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); }
.apl-agenda-lens__footer { background: var(--apl-ui-color-surface-subtle); border-radius: 0 0 var(--apl-ui-radius-xl) var(--apl-ui-radius-xl); border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); justify-content: flex-end; }
.apl-agenda-lens__body { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(5, minmax(0, 1fr)); padding: var(--apl-ui-space-4); }
.apl-agenda-lens__section { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); grid-column: span 5; padding-top: var(--apl-ui-space-3); }
.apl-agenda-calendar-options { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(auto-fit, minmax(var(--apl-ui-choice-min-width), 1fr)); }
.apl-agenda-workspace { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(0, 1fr) var(--apl-ui-agenda-inspector-width); }
.apl-agenda-board { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); min-width: 0; overflow: hidden; }
.apl-agenda-dayrail { background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; grid-template-columns: repeat(var(--apl-agenda-days, 7), minmax(0, 1fr)); padding-left: var(--apl-ui-agenda-time-width); }
.apl-agenda-dayrail__day { background: transparent; border: 0; border-left: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); color: var(--apl-ui-color-text-muted); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-2); text-align: center; }
.apl-agenda-dayrail__day strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-label-lg); font-weight: var(--apl-ui-font-weight-bold); }
.apl-agenda-dayrail__day span { font-size: var(--apl-ui-font-size-caption); }
.apl-agenda-dayrail__day.is-today,
.apl-agenda-dayrail__day:hover { background: var(--apl-ui-color-brand-surface); color: var(--apl-ui-color-brand-dark); }
.apl-agenda-board__status { align-items: center; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); color: var(--apl-ui-color-text-subtle); display: flex; font-size: var(--apl-ui-font-size-caption); gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
.apl-agenda-timeline { max-height: var(--apl-ui-agenda-scroll-height); overflow: auto; position: relative; }
.apl-agenda-timeline__canvas { display: grid; grid-template-columns: var(--apl-ui-agenda-time-width) repeat(var(--apl-agenda-days, 7), minmax(var(--apl-ui-choice-min-width), 1fr)); min-width: var(--apl-ui-agenda-board-min-width); }
.apl-agenda-hours { background: var(--apl-ui-color-surface-subtle); height: var(--apl-ui-agenda-grid-height); position: relative; }
.apl-agenda-hour { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); left: 0; padding-right: var(--apl-ui-space-2); position: absolute; text-align: right; transform: translateY(-50%); width: 100%; }
.apl-agenda-lane { border-left: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); height: var(--apl-ui-agenda-grid-height); position: relative; }
.apl-agenda-lane.is-today { background: var(--apl-ui-color-brand-surface); }
.apl-agenda-lane__slots { display: grid; grid-template-rows: repeat(32, var(--apl-ui-agenda-slot-height)); inset: 0; position: absolute; }
.apl-agenda-lane__slot { background: transparent; border: 0; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); cursor: crosshair; padding: 0; }
.apl-agenda-lane__slot:nth-child(2n) { border-bottom-style: dashed; }
.apl-agenda-lane__slot:hover { background: var(--apl-ui-color-info-soft); }
.apl-agenda-lane__events { inset: 0; pointer-events: none; position: absolute; }
.apl-agenda-event { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-strong); border-left: var(--apl-ui-space-1) solid var(--apl-ui-color-brand); border-radius: var(--apl-ui-radius-md); box-shadow: var(--apl-ui-shadow-sm); color: var(--apl-ui-color-text-body); cursor: pointer; display: grid; gap: var(--apl-ui-space-1); left: calc(var(--apl-event-column, 0) * (100% / var(--apl-event-columns, 1))); min-height: var(--apl-ui-agenda-event-min-height); overflow: hidden; padding: var(--apl-ui-space-1) var(--apl-ui-space-2); pointer-events: auto; position: absolute; top: var(--apl-event-top); width: calc((100% / var(--apl-event-columns, 1)) - var(--apl-ui-space-1)); z-index: var(--apl-ui-z-base); }
.apl-agenda-event:hover,
.apl-agenda-event:focus,
.apl-agenda-event.is-selected { border-color: var(--apl-ui-color-brand-dark); box-shadow: var(--apl-ui-shadow-md); z-index: var(--apl-ui-z-dropdown); }
.apl-agenda-event[data-status="0"] { background: var(--apl-ui-color-surface-muted); border-left-color: var(--apl-ui-color-text-subtle); }
.apl-agenda-event[data-status="3"] { background: var(--apl-ui-color-warning-soft); border-left-color: var(--apl-ui-color-warning-dark); }
.apl-agenda-event[data-source="gcal"] { background: var(--apl-ui-color-info-soft); border-left-color: var(--apl-ui-color-info-dark); }
.apl-agenda-event__time { font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-bold); }
.apl-agenda-event__title { font-size: var(--apl-ui-font-size-detail); font-weight: var(--apl-ui-font-weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-agenda-event__meta { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-agenda-now { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-danger); left: 0; pointer-events: none; position: absolute; right: 0; top: var(--apl-agenda-now); z-index: var(--apl-ui-z-dropdown); }
.apl-agenda-stream { display: grid; gap: var(--apl-ui-space-2); max-height: var(--apl-ui-agenda-scroll-height); overflow: auto; padding: var(--apl-ui-space-3); }
.apl-agenda-stream[hidden] { display: none; }
.apl-agenda-stream__day { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); margin-top: var(--apl-ui-space-2); }
.apl-agenda-stream__event { align-items: center; background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-text-body); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--apl-ui-space-3); text-align: left; }
.apl-agenda-inspector { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); min-height: var(--apl-ui-empty-min-height); overflow: hidden; position: sticky; scroll-margin-top: calc(var(--apl-ui-control-height) + var(--apl-ui-space-6)); top: calc(var(--apl-ui-control-height) + var(--apl-ui-space-5)); }
.apl-agenda-inspector__empty { align-items: center; color: var(--apl-ui-color-text-muted); display: flex; flex-direction: column; gap: var(--apl-ui-space-2); justify-content: center; min-height: var(--apl-ui-empty-min-height); padding: var(--apl-ui-space-4); text-align: center; }
.apl-agenda-inspector__empty i { font-size: var(--apl-ui-font-size-display); }
.apl-agenda-inspector__empty p { margin: 0; }
.apl-agenda-inspector__header,
.apl-agenda-inspector__body,
.apl-agenda-inspector__footer { padding: var(--apl-ui-space-3); }
.apl-agenda-inspector__header { align-items: flex-start; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; }
.apl-agenda-inspector__header h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: var(--apl-ui-space-2) 0 var(--apl-ui-space-1); }
.apl-agenda-inspector__header p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-agenda-inspector__body { display: grid; gap: var(--apl-ui-space-3); }
.apl-agenda-inspector__footer { background: var(--apl-ui-color-surface-subtle); border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); }
.apl-agenda-person { align-items: center; display: flex; gap: var(--apl-ui-space-2); }
.apl-agenda-person div { display: grid; min-width: 0; }
.apl-agenda-person span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-detail); }
.apl-agenda-facts { display: grid; gap: var(--apl-ui-space-2); margin: 0; }
.apl-agenda-facts div { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); padding-top: var(--apl-ui-space-2); }
.apl-agenda-facts dt { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-agenda-facts dd { color: var(--apl-ui-color-text-strong); margin: var(--apl-ui-space-1) 0 0; overflow-wrap: anywhere; }
.apl-agenda-history { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-agenda-history__header { align-items: center; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-4); }
.apl-agenda-history__header h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-section-title); font-weight: var(--apl-ui-font-weight-bold); margin: var(--apl-ui-space-1) 0; }
.apl-agenda-history__header p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-agenda-history__body { min-height: var(--apl-ui-empty-min-height); }
.apl-reservation-feed { display: grid; }
.apl-reservation-feed__day { align-items: center; background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); color: var(--apl-ui-color-text-muted); display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; padding: var(--apl-ui-space-2) var(--apl-ui-space-4); text-transform: capitalize; }
.apl-reservation-row { align-items: center; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: auto minmax(var(--apl-ui-card-min-width), 1fr) minmax(var(--apl-ui-card-min-width), 1fr) auto auto; padding: var(--apl-ui-space-3) var(--apl-ui-space-4); }
.apl-reservation-row:hover { background: var(--apl-ui-color-surface-subtle); }
.apl-reservation-row__time,
.apl-reservation-row__client > div,
.apl-reservation-row__service,
.apl-reservation-row__state { display: grid; gap: var(--apl-ui-space-1); }
.apl-reservation-row__time strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-label-lg); }
.apl-reservation-row__time span,
.apl-reservation-row__client span,
.apl-reservation-row__service span,
.apl-reservation-row__state small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-reservation-row__client { align-items: center; display: flex; gap: var(--apl-ui-space-2); min-width: 0; }
.apl-reservation-row__client strong,
.apl-reservation-row__service strong { color: var(--apl-ui-color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-reservation-row__actions { align-items: center; display: flex; gap: var(--apl-ui-space-1); }
.apl-agenda-history__pagination { align-items: center; background: var(--apl-ui-color-surface-subtle); color: var(--apl-ui-color-text-muted); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3) var(--apl-ui-space-4); }
.apl-pagination__pages a { align-items: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border); border-radius: var(--apl-ui-radius-sm); color: var(--apl-ui-color-text-body); display: inline-flex; font-size: var(--apl-ui-font-size-detail); font-weight: var(--apl-ui-font-weight-semibold); min-height: var(--apl-ui-control-height-sm); min-width: var(--apl-ui-control-height-sm); justify-content: center; padding: var(--apl-ui-space-1); text-decoration: none; }
.apl-pagination__pages a.is-active { background: var(--apl-ui-color-brand); border-color: var(--apl-ui-color-brand-dark); color: var(--apl-ui-color-on-solid); }
.apl-pagination__pages a.is-disabled { cursor: not-allowed; opacity: var(--apl-ui-opacity-disabled); pointer-events: none; }
.apl-agenda-timeline__canvas { position: relative; }
.apl-agenda-toast { background: var(--apl-ui-color-inverse); border: var(--apl-ui-border-width) solid var(--apl-ui-color-inverse-border); border-radius: var(--apl-ui-radius-pill); bottom: var(--apl-ui-space-5); box-shadow: var(--apl-ui-shadow-lg); color: var(--apl-ui-color-on-solid); left: 50%; max-width: var(--apl-ui-content-narrow); opacity: 0; padding: var(--apl-ui-space-2) var(--apl-ui-space-4); pointer-events: none; position: fixed; transform: translate(-50%, var(--apl-ui-space-3)); transition: opacity var(--apl-ui-motion-fast), transform var(--apl-ui-motion-fast); z-index: var(--apl-ui-z-toast); }
.apl-agenda-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.apl-agenda-toast.is-success { background: var(--apl-ui-color-success-dark); border-color: var(--apl-ui-color-success-border); }
.apl-agenda-toast.is-error { background: var(--apl-ui-color-danger-dark); border-color: var(--apl-ui-color-danger-border); }
.apl-agenda-toast.is-loading { background: var(--apl-ui-color-info-dark); }
@media (max-width: 1180px) {
  .apl-agenda-command { grid-template-columns: auto minmax(0, 1fr) auto; }
  .apl-agenda-command__period { grid-column: 1 / -1; grid-row: 1; }
  .apl-agenda-workspace { grid-template-columns: 1fr; }
  .apl-agenda-inspector { position: static; }
  .apl-reservation-row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; }
  .apl-reservation-row__actions { grid-column: 2 / -1; justify-content: flex-end; }
}
@media (max-width: 820px) {
  .apl-agenda-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-agenda-command { grid-template-columns: 1fr; position: static; }
  .apl-agenda-command__navigation,
  .apl-agenda-command__actions { flex-wrap: wrap; justify-content: space-between; }
  .apl-agenda-lens__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-agenda-lens__section { grid-column: span 2; }
  .apl-reservation-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .apl-reservation-row__service { grid-column: 2; }
  .apl-reservation-row__state { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 560px) {
  .apl-agenda-pulse { grid-template-columns: 1fr; }
  .apl-agenda-lens__body { grid-template-columns: 1fr; }
  .apl-agenda-lens__section { grid-column: auto; }
  .apl-agenda-dayrail { padding-left: 0; }
  .apl-agenda-board__status { align-items: flex-start; flex-direction: column; }
  .apl-reservation-row { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
  .apl-reservation-row__service,
  .apl-reservation-row__state,
  .apl-reservation-row__actions { grid-column: 2; grid-row: auto; justify-content: flex-start; }
  .apl-agenda-history__header,
  .apl-agenda-history__pagination { align-items: stretch; flex-direction: column; }
}


/* Base de las experiencias públicas reconstruidas. */
.apl-public { margin-inline: auto; max-width: var(--apl-ui-content-form); width: 100%; }


.apl-chart { height: var(--apl-ui-chart-height); position: relative; width: 100%; }
.apl-chart canvas { height: 100% !important; width: 100% !important; }


/* Inventario TELOAGENDA */
.apl-inventory-stock { align-items: flex-end; display: flex; flex-direction: column; gap: var(--apl-ui-space-1); }
.apl-inventory-flow { align-items: center; display: inline-flex; gap: var(--apl-ui-space-1); white-space: nowrap; }
.apl-inventory-context { background: var(--apl-ui-color-info-soft); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-soft); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-info-dark); padding: var(--apl-ui-space-3); }
.apl-inventory-adjustment[hidden] { display: none; }
.apl-pagination__pages a,
.apl-pagination__pages span {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-sm);
  color: var(--apl-ui-color-text-body);
  display: inline-flex;
  font-size: var(--apl-ui-font-size-detail);
  font-weight: var(--apl-ui-font-weight-semibold);
  height: var(--apl-ui-control-height-sm);
  justify-content: center;
  min-width: var(--apl-ui-control-height-sm);
  padding-inline: var(--apl-ui-space-2);
  text-decoration: none;
}
.apl-pagination__pages span.is-active { background: var(--apl-ui-color-brand); border-color: var(--apl-ui-color-brand-dark); color: var(--apl-ui-color-on-solid); }
.apl-pagination__pages span.is-disabled { opacity: var(--apl-ui-opacity-disabled); }
.apl-metric-list { display: grid; gap: var(--apl-ui-space-2); }
.apl-metric-list__item { align-items: center; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-2) 0; }
.apl-metric-list__item:last-child { border-bottom: 0; }
.apl-metric-list__copy { min-width: 0; }
.apl-metric-list__value { color: var(--apl-ui-color-text-strong); flex: 0 0 auto; font-weight: var(--apl-ui-font-weight-bold); white-space: nowrap; }


/* Catálogos de trabajo: consulta compacta y fichas específicas por dominio. */
.apl-catalog { display: grid; gap: var(--apl-ui-space-4); }
.apl-catalog-command { align-items: end; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(var(--apl-ui-card-min-width), 1fr) repeat(2, minmax(var(--apl-ui-choice-min-width), auto)) auto; padding: var(--apl-ui-space-3); }
.apl-catalog-command__field { display: grid; gap: var(--apl-ui-space-1); }
.apl-catalog-command__field label { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-catalog-command__actions { align-items: center; display: flex; gap: var(--apl-ui-space-1); }
.apl-catalog-summary { align-items: center; color: var(--apl-ui-color-text-muted); display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; }
.apl-catalog-summary strong { color: var(--apl-ui-color-text-strong); }
.apl-catalog-grid { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-catalog-card { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); min-width: 0; padding: var(--apl-ui-space-3); position: relative; }
.apl-catalog-card:hover { border-color: var(--apl-ui-color-brand-border); box-shadow: var(--apl-ui-shadow-md); }
.apl-catalog-card__header { align-items: flex-start; display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; }
.apl-catalog-card__identity { align-items: center; display: flex; gap: var(--apl-ui-space-2); min-width: 0; }
.apl-catalog-card__copy,
.apl-catalog-card__identity > div { display: grid; min-width: 0; row-gap: var(--apl-ui-space-1); }
.apl-catalog-card__title { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-catalog-card__meta { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-catalog-card__metric { background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-catalog-card__metric span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-catalog-card__metric strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); }
.apl-catalog-card__facts { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-catalog-card__fact { display: grid; gap: var(--apl-ui-space-1); }
.apl-catalog-card__fact span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-catalog-card__fact strong { color: var(--apl-ui-color-text-body); overflow-wrap: anywhere; }
.apl-catalog-card__actions { align-items: center; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-1); justify-content: flex-end; padding-top: var(--apl-ui-space-2); }
.apl-catalog-card--professional .apl-catalog-card__metric { background: var(--apl-ui-color-brand-surface); }
.apl-catalog-card--service .apl-catalog-card__metric { background: var(--apl-ui-color-info-soft); }
.apl-catalog-card--price .apl-catalog-card__metric { align-items: baseline; grid-template-columns: 1fr auto; }
.apl-catalog-card--payment .apl-avatar,
.apl-catalog-card--concept .apl-avatar { border-radius: var(--apl-ui-radius-md); }
@media (max-width: 1050px) {
  .apl-catalog-command { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-catalog-command__search { grid-column: 1 / -1; }
  .apl-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .apl-catalog-command,
  .apl-catalog-grid { grid-template-columns: 1fr; }
  .apl-catalog-command__search { grid-column: auto; }
  .apl-catalog-command__actions { justify-content: stretch; }
  .apl-catalog-command__actions .apl-btn { flex: 1 1 0; }
}


/* Editores guiados: contexto lateral, decisiones por secciones y efecto operativo visible. */
.apl-editor-page { display: grid; gap: var(--apl-ui-space-4); max-width: var(--apl-ui-page-max-width); }
.apl-editor-workspace { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: var(--apl-ui-editor-rail-width) minmax(0, 1fr); }
.apl-editor-rail { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-3); position: sticky; top: var(--apl-ui-space-3); }
.apl-editor-rail__preview { align-items: center; display: flex; flex-direction: column; gap: var(--apl-ui-space-2); text-align: center; }
.apl-editor-rail__preview strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }
.apl-editor-rail__preview span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-editor-rail__steps { display: grid; gap: var(--apl-ui-space-1); }
.apl-editor-rail__step { align-items: center; border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-text-muted); display: flex; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-2); }
.apl-editor-rail__step i { align-items: center; background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-pill); display: inline-flex; flex: 0 0 var(--apl-ui-avatar-sm); height: var(--apl-ui-avatar-sm); justify-content: center; }
.apl-editor-rail__step.is-current { background: var(--apl-ui-color-brand-surface); color: var(--apl-ui-color-brand-dark); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-editor-rail__impact { background: var(--apl-ui-color-info-soft); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-info-dark); display: grid; font-size: var(--apl-ui-font-size-caption); gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-editor-canvas { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-editor-section { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-4); }
.apl-editor-section:last-of-type { border-bottom: 0; }
.apl-editor-section__header { align-items: flex-start; display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; }
.apl-editor-section__header > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-editor-section__index { align-items: center; background: var(--apl-ui-color-brand-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-brand-dark); display: inline-flex; flex: 0 0 var(--apl-ui-avatar-sm); font-weight: var(--apl-ui-font-weight-bold); height: var(--apl-ui-avatar-sm); justify-content: center; }
.apl-editor-section__title { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-editor-section__help { color: var(--apl-ui-color-text-subtle); margin: 0; }
.apl-editor-fields { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-editor-fields--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-editor-fields > .apl-field--full { grid-column: 1 / -1; }
.apl-editor-actions { align-items: center; background: var(--apl-ui-color-surface-subtle); display: flex; gap: var(--apl-ui-space-2); justify-content: flex-end; padding: var(--apl-ui-space-3) var(--apl-ui-space-4); position: sticky; bottom: 0; z-index: var(--apl-ui-z-sticky); }
.apl-editor-choice-grid { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-editor-choice { background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); cursor: pointer; display: grid; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
.apl-editor-choice:has(input:checked) { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); }
.apl-editor-choice input { accent-color: var(--apl-ui-color-brand); }
.apl-editor-choice strong { color: var(--apl-ui-color-text-strong); }
.apl-editor-choice span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-offer-tariff-switch { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-offer-tariff-switch > label { background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); cursor: pointer; display: flex; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
.apl-offer-tariff-switch > label:has(input:checked) { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); }
.apl-offer-tariff-switch > label > span { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-offer-tariff-switch > label i { color: var(--apl-ui-color-brand); margin-right: var(--apl-ui-space-1); }
.apl-offer-tariff-switch > label strong { color: var(--apl-ui-color-text-strong); }
.apl-offer-tariff-switch > label small { color: var(--apl-ui-color-text-subtle); }
.apl-offer-tariff-panel { background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); padding: var(--apl-ui-space-3); }
.apl-offer-stock__group { display: grid; gap: var(--apl-ui-space-2); }
.apl-offer-stock__group > strong { color: var(--apl-ui-color-text-strong); }
.apl-editor-matrix { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-editor-matrix__row { align-items: end; background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); grid-template-columns: minmax(0, 1fr) minmax(var(--apl-ui-choice-min-width), auto); padding: var(--apl-ui-space-3); }
.apl-editor-matrix__row > strong { color: var(--apl-ui-color-text-strong); grid-column: 1 / -1; }
.apl-editor-focus { align-items: center; display: grid; gap: var(--apl-ui-space-4); grid-template-columns: minmax(0, 1fr) minmax(var(--apl-ui-card-min-width), auto); }
.apl-editor-focus__visual { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-brand-dark); display: flex; flex-direction: column; gap: var(--apl-ui-space-2); justify-content: center; min-height: var(--apl-ui-empty-min-height); padding: var(--apl-ui-space-4); text-align: center; }
.apl-editor-focus__visual i { font-size: var(--apl-ui-font-size-display); }
.apl-editor-focus__visual strong { font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); }
@media (max-width: 900px) {
  .apl-editor-workspace { grid-template-columns: 1fr; }
  .apl-editor-rail { position: static; }
  .apl-editor-rail__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-editor-rail__impact { display: none; }
}
@media (max-width: 650px) {
  .apl-editor-fields,
  .apl-editor-fields--three,
  .apl-editor-choice-grid,
  .apl-offer-tariff-switch,
  .apl-editor-matrix,
  .apl-editor-focus { grid-template-columns: 1fr; }
  .apl-editor-rail__steps { grid-template-columns: 1fr; }
  .apl-editor-matrix__row { grid-template-columns: 1fr; }
  .apl-editor-actions { align-items: stretch; flex-direction: column-reverse; }
}


/* Diarios operativos y alcance de consultas. */
.apl-scopebar { align-items: end; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: flex; gap: var(--apl-ui-space-2); overflow-x: auto; padding: var(--apl-ui-space-3); }
.apl-scopebar__search { flex: 1 0 var(--apl-ui-card-min-width); }
.apl-scopebar__field { display: grid; flex: 0 0 var(--apl-ui-card-min-width); gap: var(--apl-ui-space-1); }
.apl-scopebar__field--compact { flex-basis: var(--apl-ui-choice-min-width); }
.apl-scopebar__field label { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-scopebar__actions { align-items: center; display: flex; flex: 0 0 auto; gap: var(--apl-ui-space-1); }
.apl-ledger { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-ledger__header { align-items: center; background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3) var(--apl-ui-space-4); }
.apl-ledger__header h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-section-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-ledger__header p { color: var(--apl-ui-color-text-muted); margin: var(--apl-ui-space-1) 0 0; }
.apl-ledger__body { display: grid; }
.apl-ledger-row { align-items: center; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: auto minmax(var(--apl-ui-card-min-width), 1fr) minmax(var(--apl-ui-choice-min-width), auto) minmax(var(--apl-ui-choice-min-width), auto) auto; padding: var(--apl-ui-space-3) var(--apl-ui-space-4); }
.apl-ledger-row:hover { background: var(--apl-ui-color-surface-subtle); }
.apl-ledger-row__date { display: grid; min-width: var(--apl-ui-avatar-lg); }
.apl-ledger-row__date strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-label-lg); }
.apl-ledger-row__date span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-ledger-row__date small { align-items: center; color: var(--apl-ui-color-text-muted); display: inline-flex; font-size: var(--apl-ui-font-size-caption); gap: var(--apl-ui-space-1); white-space: nowrap; }
.apl-ledger-row__main { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-ledger-row__main strong { color: var(--apl-ui-color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-ledger-row__main span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-ledger-row__main .apl-status { justify-self: start; max-width: 100%; width: fit-content; }
.apl-ledger-row__detail { display: grid; gap: var(--apl-ui-space-1); }
.apl-ledger-row__detail span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-ledger-row__amount { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-variant-numeric: tabular-nums; font-weight: var(--apl-ui-font-weight-bold); text-align: right; white-space: nowrap; }
.apl-ledger-row__actions { align-items: center; display: flex; gap: var(--apl-ui-space-1); justify-content: flex-end; }
.apl-stock-page { --apl-ui-page-gap: var(--apl-ui-space-2); }
.apl-stock-page__header { min-height: 0; }
.apl-stock-page__header .apl-context-bar__main { flex-wrap: wrap; }
.apl-stock-page__header .apl-context-bar__title { flex: 0 0 auto; }
.apl-stock-page__header .apl-context-bar__meta { flex: 1 1 auto; }
.apl-stock-page__header .apl-context-bar__meta span { padding-block: var(--apl-ui-space-1); }
.apl-stock-page__header .apl-context-bar__meta .apl-stock-page__alert { background: var(--apl-ui-color-warning-soft); border-color: var(--apl-ui-color-warning-border); color: var(--apl-ui-color-warning-dark); }
.apl-stock-page .apl-scopebar { display: grid; grid-template-columns: minmax(var(--apl-ui-choice-min-width), 1.25fr) minmax(var(--apl-ui-control-height-lg), .55fr) repeat(5, minmax(var(--apl-ui-choice-min-width), .8fr)) auto; overflow: visible; padding: var(--apl-ui-space-2); }
.apl-stock-page .apl-scopebar__field { min-width: 0; }
.apl-stock-view-switch button { align-items: center; display: inline-flex; gap: var(--apl-ui-space-1); justify-content: center; }
.apl-stock-grid { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.apl-stock-card { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-2); }
.apl-stock-card.is-low { background: var(--apl-ui-color-warning-soft); border-color: var(--apl-ui-color-warning-border); }
.apl-stock-card__header { align-items: flex-start; display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; }
.apl-stock-card__identity { display: grid; min-width: 0; }
.apl-stock-card__identity strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-stock-card__identity span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-stock-card__quantity { align-items: end; background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-lg); display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; padding: var(--apl-ui-space-2); }
.apl-stock-card__quantity strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); }
.apl-stock-card__quantity span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-stock-card__values { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-stock-card__values div { display: grid; }
.apl-stock-card__values span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-stock-card__values strong { color: var(--apl-ui-color-text-body); }
.apl-stock-card__actions { align-items: center; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-1); justify-content: flex-end; padding-top: var(--apl-ui-space-1); }
.apl-stock-grid[data-apl-view-mode="list"] { grid-template-columns: minmax(0, 1fr); }
.apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card { align-items: center; grid-template-columns: minmax(var(--apl-ui-card-min-width), 1.5fr) minmax(var(--apl-ui-choice-min-width), .8fr) minmax(var(--apl-ui-card-min-width), 1fr) auto; }
.apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__quantity { align-items: center; }
.apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__actions { border-left: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); border-top: 0; padding-left: var(--apl-ui-space-2); padding-top: 0; }
@media (max-width: 1200px) {
  .apl-stock-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .apl-stock-page .apl-scopebar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .apl-stock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__header { grid-column: 1 / -1; }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__actions { border-left: 0; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); grid-column: 1 / -1; padding-left: 0; padding-top: var(--apl-ui-space-1); }
  .apl-ledger-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .apl-ledger-row__detail { grid-column: 2; }
  .apl-ledger-row__actions { grid-column: 2 / -1; }
}
@media (max-width: 720px) {
  .apl-stock-page .apl-scopebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-stock-page .apl-scopebar__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 620px) {
  .apl-stock-grid { grid-template-columns: 1fr; }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card { grid-template-columns: minmax(0, 1fr); }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__header,
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__actions { grid-column: auto; }
  .apl-ledger-row { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
  .apl-ledger-row__detail,
  .apl-ledger-row__amount,
  .apl-ledger-row__actions { grid-column: 2; text-align: left; }
  .apl-ledger__header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .apl-stock-page .apl-scopebar { grid-template-columns: minmax(0, 1fr); }
  .apl-stock-page .apl-scopebar__actions { justify-content: stretch; }
  .apl-stock-page .apl-scopebar__actions .apl-btn:last-child { flex: 1 1 auto; }
}


/* Superficies reconstruidas: análisis, finanzas, inventario, reglas y excepciones. */
:root {
  --apl-ui-analysis-rail-width: 300px;
  --apl-ui-analysis-hero-min-height: 176px;
  --apl-ui-analysis-card-min-height: 128px;
  --apl-ui-price-tile-min-height: 156px;
  --apl-ui-stream-date-width: 108px;
  --apl-ui-stream-marker-size: 36px;
  --apl-ui-dialog-width: 640px;
  --apl-ui-rule-card-min-height: 288px;
  --apl-ui-builder-width: 520px;
}

.apl-analysis-cockpit { align-items: stretch; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(var(--apl-ui-card-min-width), auto) minmax(0, 1fr); padding: var(--apl-ui-space-3); }
.apl-analysis-cockpit--compact { grid-template-columns: minmax(var(--apl-ui-card-min-width), auto) minmax(0, 1fr); }
.apl-analysis-cockpit > .apl-query-drawer { grid-column: 1 / -1; }
.apl-analysis-hero { background: var(--apl-ui-color-brand-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); border-radius: var(--apl-ui-radius-lg); display: flex; flex-direction: column; justify-content: center; min-height: var(--apl-ui-analysis-hero-min-height); padding: var(--apl-ui-space-4); }
.apl-analysis-hero__label { color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-detail); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-analysis-hero__value { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-hero); font-weight: var(--apl-ui-font-weight-bold); line-height: var(--apl-ui-line-tight); margin-block: var(--apl-ui-space-2); }
.apl-analysis-hero__meta { color: var(--apl-ui-color-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-analysis-equation { align-items: center; background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(5, auto); justify-content: center; padding: var(--apl-ui-space-4); }
.apl-analysis-equation--wide { border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); grid-template-columns: repeat(5, minmax(0, auto)); }
.apl-analysis-equation div { display: grid; gap: var(--apl-ui-space-1); min-width: var(--apl-ui-choice-min-width); text-align: center; }
.apl-analysis-equation span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-analysis-equation strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); white-space: nowrap; }
.apl-analysis-equation i { color: var(--apl-ui-color-text-subtle); }

.apl-query-drawer { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); overflow: hidden; }
.apl-query-drawer > summary { align-items: center; cursor: pointer; display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; list-style: none; padding: var(--apl-ui-space-3); }
.apl-query-drawer > summary::-webkit-details-marker { display: none; }
.apl-query-drawer > summary > span { align-items: center; color: var(--apl-ui-color-text-strong); display: inline-flex; font-weight: var(--apl-ui-font-weight-semibold); gap: var(--apl-ui-space-2); }
.apl-query-drawer > summary small { color: var(--apl-ui-color-text-subtle); }
.apl-query-drawer[open] > summary { background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); }
.apl-query-drawer__body { align-items: end; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(3, minmax(0, 1fr)); padding: var(--apl-ui-space-3); }
.apl-query-drawer__body > label,
.apl-dialog__body > label { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-query-drawer__body > label > span,
.apl-dialog__body > label > span { color: var(--apl-ui-color-text-muted); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-query-drawer__actions { align-items: center; display: flex; gap: var(--apl-ui-space-2); grid-column: 1 / -1; justify-content: flex-end; }

.apl-signal-strip { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.apl-signal-strip article { border-right: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-signal-strip article:last-child { border-right: 0; }
.apl-signal-strip span,
.apl-signal-strip small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-signal-strip strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.apl-analysis-stage { align-items: stretch; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(0, 1fr) var(--apl-ui-analysis-rail-width); }
.apl-analysis-stage__chart,
.apl-rank-panel,
.apl-replenishment-board,
.apl-transaction-audit,
.apl-commission-days,
.apl-period-compare > article { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); padding: var(--apl-ui-space-3); }
.apl-section-heading { align-items: flex-start; display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; }
.apl-section-heading > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-section-heading span,
.apl-section-heading small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-section-heading h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-section-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-chart--hero { min-height: var(--apl-ui-chart-height); }
.apl-insight-rail { background: var(--apl-ui-color-inverse); border: var(--apl-ui-border-width) solid var(--apl-ui-color-inverse-border); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: grid; overflow: hidden; }
.apl-insight-rail h2 { color: inherit; font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; padding: var(--apl-ui-space-3); }
.apl-insight-rail > div { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-inverse-border); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-insight-rail > div:first-child { border-top: 0; }
.apl-insight-rail span,
.apl-insight-rail small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-insight-rail strong { color: inherit; font-weight: var(--apl-ui-font-weight-bold); }

.apl-analysis-board { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-rank-panel { display: grid; gap: var(--apl-ui-space-3); min-width: 0; }
.apl-rank-list { display: grid; }
.apl-rank-row,
.apl-period-row { align-items: center; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-2); grid-template-columns: auto minmax(0, 1fr) auto; min-height: var(--apl-ui-control-height); padding-block: var(--apl-ui-space-2); }
.apl-rank-row__position { align-items: center; background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-text-muted); display: inline-flex; height: var(--apl-ui-avatar-sm); justify-content: center; width: var(--apl-ui-avatar-sm); }
.apl-rank-row strong,
.apl-period-row strong { color: var(--apl-ui-color-text-strong); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-rank-row > span:last-child,
.apl-period-row > b { color: var(--apl-ui-color-text-strong); font-variant-numeric: tabular-nums; font-weight: var(--apl-ui-font-weight-bold); white-space: nowrap; }
.apl-rank-row small,
.apl-period-row small { color: var(--apl-ui-color-text-subtle); }

.apl-price-gallery { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.apl-price-tile { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-2); min-height: var(--apl-ui-price-tile-min-height); padding: var(--apl-ui-space-3); }
.apl-price-tile--consumable { background: var(--apl-ui-color-surface-subtle); }
.apl-price-tile__kind { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-price-tile h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-price-tile strong { align-self: end; color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-price-tile small { color: var(--apl-ui-color-text-subtle); }

.apl-finance-banner { align-items: center; background: var(--apl-ui-color-inverse); border: var(--apl-ui-border-width) solid var(--apl-ui-color-inverse-border); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: flex; gap: var(--apl-ui-space-4); justify-content: space-between; padding: var(--apl-ui-space-4); }
.apl-finance-banner > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-finance-banner > div > span,
.apl-finance-banner > div > small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-finance-banner > div > strong { color: inherit; font-size: var(--apl-ui-font-size-hero); font-weight: var(--apl-ui-font-weight-bold); }
.apl-period-switcher { align-items: end; display: flex; gap: var(--apl-ui-space-2); }
.apl-period-switcher label { display: grid; gap: var(--apl-ui-space-1); }
.apl-period-switcher label span { color: inherit; font-size: var(--apl-ui-font-size-caption); }
.apl-period-switcher--builder { color: var(--apl-ui-color-text-body); }
.apl-money-stream { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-money-stream__entry { align-items: center; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: var(--apl-ui-stream-date-width) var(--apl-ui-stream-marker-size) minmax(0, 1fr) auto; padding: var(--apl-ui-space-3); }
.apl-money-stream__entry time { color: var(--apl-ui-color-text-muted); font-variant-numeric: tabular-nums; }
.apl-money-stream__marker { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-brand-dark); display: inline-flex; height: var(--apl-ui-stream-marker-size); justify-content: center; width: var(--apl-ui-stream-marker-size); }
.apl-money-stream__entry > div { display: grid; min-width: 0; }
.apl-money-stream__entry > div strong { color: var(--apl-ui-color-text-strong); }
.apl-money-stream__entry small { color: var(--apl-ui-color-text-subtle); }
.apl-money-stream__entry b { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); white-space: nowrap; }

.apl-balance-layout { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(0, 1fr) var(--apl-ui-analysis-rail-width); }
.apl-balance-cards { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-balance-cards > .apl-pagination { grid-column: 1 / -1; }
.apl-balance-card { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); overflow: hidden; padding: var(--apl-ui-space-3); }
.apl-balance-card--attention { background: var(--apl-ui-color-warning-soft); border-color: var(--apl-ui-color-warning-border); }
.apl-balance-card header { display: grid; gap: var(--apl-ui-space-1); }
.apl-balance-card header span,
.apl-balance-card small,
.apl-balance-card footer span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-balance-card h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-balance-card__flow { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-balance-card__flow div { background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-md); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-2); }
.apl-balance-card__flow strong { color: var(--apl-ui-color-text-strong); }
.apl-balance-card footer { align-items: center; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; padding-top: var(--apl-ui-space-2); }
.apl-balance-card footer b { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }

.apl-stock-radar { background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(var(--apl-ui-card-min-width), auto) minmax(0, 1fr); padding: var(--apl-ui-space-3); }
.apl-stock-radar__value { display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-stock-radar__value span,
.apl-stock-radar__value small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-stock-radar__value strong { color: inherit; font-size: var(--apl-ui-font-size-hero); font-weight: var(--apl-ui-font-weight-bold); }
.apl-stock-radar__alerts { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-stock-radar__alerts article { background: var(--apl-ui-color-surface); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-text-body); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-stock-radar__alerts span,
.apl-stock-radar__alerts small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-stock-radar__alerts strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-stock-radar > .apl-query-drawer { color: var(--apl-ui-color-text-body); grid-column: 1 / -1; }
.apl-replenishment-board { display: grid; gap: var(--apl-ui-space-3); }
.apl-replenishment-grid { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-replenishment-card { background: var(--apl-ui-color-warning-soft); border: var(--apl-ui-border-width) solid var(--apl-ui-color-warning-border); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
.apl-replenishment-card__flag { color: var(--apl-ui-color-warning-dark); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-bold); }
.apl-replenishment-card h3 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-replenishment-card > div { display: flex; gap: var(--apl-ui-space-3); }
.apl-replenishment-card > div span { color: var(--apl-ui-color-text-subtle); display: grid; font-size: var(--apl-ui-font-size-caption); }
.apl-unlinked-strip { align-items: center; background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: auto minmax(0, 1fr); padding: var(--apl-ui-space-3); }
.apl-unlinked-strip > div:first-child { display: grid; }
.apl-unlinked-strip span,
.apl-unlinked-strip small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-unlinked-strip strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-unlinked-strip__items { display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-1); justify-content: flex-end; }
.apl-unlinked-strip__items > span { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-pill); padding: var(--apl-ui-space-1) var(--apl-ui-space-2); }

.apl-commission-head { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(var(--apl-ui-card-min-width), auto) minmax(0, 1fr); padding: var(--apl-ui-space-3); }
.apl-commission-head__amount { background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-commission-head__amount span,
.apl-commission-head__amount small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-commission-head__amount strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-hero); font-weight: var(--apl-ui-font-weight-bold); }
.apl-commission-head__facts { align-items: center; display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-commission-head__facts span { color: var(--apl-ui-color-text-muted); text-align: center; }
.apl-commission-head__facts strong { color: var(--apl-ui-color-text-strong); display: block; font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-commission-head > .apl-query-drawer { grid-column: 1 / -1; }
.apl-commission-days,
.apl-transaction-audit { display: grid; gap: var(--apl-ui-space-3); }
.apl-commission-day-grid { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-commission-day { background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
.apl-commission-day time,
.apl-commission-day small,
.apl-commission-day footer span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-commission-day h3 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-commission-day > div { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-commission-day > div span { display: grid; }
.apl-commission-day footer { align-items: center; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; justify-content: space-between; padding-top: var(--apl-ui-space-2); }
.apl-commission-day footer b { color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }
.apl-transaction-audit__list { display: grid; }
.apl-transaction-row { align-items: center; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-2); grid-template-columns: auto auto minmax(0, 1fr) auto auto; padding-block: var(--apl-ui-space-2); }
.apl-transaction-row__id,
.apl-transaction-row time,
.apl-transaction-row small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-transaction-row > div,
.apl-transaction-row > span { display: grid; min-width: 0; }
.apl-transaction-row strong { color: var(--apl-ui-color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-transaction-row b { color: var(--apl-ui-color-text-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.apl-period-compare { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-period-compare > article { min-width: 0; }
.apl-period-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.apl-period-row > div { display: grid; min-width: 0; }

.apl-rule-map-head { align-items: stretch; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(var(--apl-ui-card-min-width), auto) minmax(0, 1fr); }
.apl-rule-map-head__pulse { background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-rule-map-head__pulse span,
.apl-rule-map-head__pulse small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-rule-map-head__pulse strong { color: inherit; font-size: var(--apl-ui-font-size-hero); font-weight: var(--apl-ui-font-weight-bold); }
.apl-rule-map-head .apl-scopebar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; overflow: visible; }
.apl-rule-map-head .apl-scopebar > label { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-rule-map-head .apl-scopebar > label > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-rule-command { align-items: center; background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
.apl-rule-command > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-rule-command small { color: var(--apl-ui-color-text-subtle); }
.apl-select-all { align-items: center; display: inline-flex; gap: var(--apl-ui-space-2); }
.apl-rule-map { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-rule-card { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); min-height: var(--apl-ui-rule-card-min-height); padding: var(--apl-ui-space-3); position: relative; }
.apl-rule-card__select { align-items: center; display: flex; gap: var(--apl-ui-space-1); justify-content: flex-end; }
.apl-rule-card__select span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-rule-card header { align-items: flex-start; display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; }
.apl-rule-card header > div { display: grid; min-width: 0; }
.apl-rule-card header span,
.apl-rule-card__assignment span,
.apl-rule-card__timing span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-rule-card h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-rule-card__assignment { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-lg); display: flex; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-2); }
.apl-rule-card__assignment > div { display: grid; min-width: 0; }
.apl-rule-card__assignment strong { color: var(--apl-ui-color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-rule-card__timing { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-rule-card__timing div { display: grid; }
.apl-rule-card footer { align-items: end; display: flex; justify-content: flex-end; }

.apl-dialog { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-strong); border-radius: var(--apl-ui-radius-xl); box-shadow: var(--apl-ui-shadow-lg); color: var(--apl-ui-color-text-body); max-width: calc(100% - var(--apl-ui-space-4)); padding: 0; width: var(--apl-ui-dialog-width); }
.apl-dialog::backdrop { background: var(--apl-ui-color-overlay); }
.apl-dialog__header { align-items: flex-start; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-dialog__header span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-dialog__header h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-dialog__close { background: transparent; border: 0; color: var(--apl-ui-color-text-muted); font-size: var(--apl-ui-font-size-title-lg); }
.apl-dialog__body { display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-3); }
.apl-dialog__body p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-dialog__actions { align-items: center; background: var(--apl-ui-color-surface-subtle); border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-2); justify-content: flex-end; padding: var(--apl-ui-space-3); }

/* El desplegable debe permanecer en la misma top layer del dialogo nativo. */
dialog.apl-dialog.apl-dialog--selectbox-open { overflow: visible; }
dialog.apl-dialog > .apl-selectbox__panel { z-index: var(--apl-ui-z-toast); }

.apl-exception-summary { background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.apl-exception-summary > div { border-right: var(--apl-ui-border-width) solid var(--apl-ui-color-inverse-border); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-exception-summary > div:last-child { border-right: 0; }
.apl-exception-summary span { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-exception-summary strong { color: inherit; font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-exception-workbench { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: var(--apl-ui-builder-width) minmax(0, 1fr); }
.apl-exception-builder,
.apl-exception-list { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-exception-builder > header,
.apl-exception-list > .apl-section-heading { padding: var(--apl-ui-space-3); }
.apl-exception-builder > header span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-exception-builder > header h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-exception-builder > header p { color: var(--apl-ui-color-text-muted); margin: var(--apl-ui-space-1) 0 0; }
.apl-exception-builder__step { border: 0; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-3); margin: 0; padding: var(--apl-ui-space-3); }
.apl-exception-builder__step legend { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-semibold); margin: 0; padding: 0; }
.apl-exception-builder__step legend b { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-brand-dark); display: inline-flex; height: var(--apl-ui-avatar-sm); justify-content: center; margin-right: var(--apl-ui-space-1); width: var(--apl-ui-avatar-sm); }
.apl-exception-builder .apl-editor-choices { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-exception-builder .apl-editor-choice > span { display: grid; gap: var(--apl-ui-space-1); }
.apl-exception-builder__reason { display: grid; gap: var(--apl-ui-space-1); }
.apl-exception-builder__reason > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-wide-toggle { align-items: center; background: var(--apl-ui-color-brand-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); border-radius: var(--apl-ui-radius-lg); display: flex; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-2); }
.apl-wide-toggle > span { display: grid; }
.apl-wide-toggle small { color: var(--apl-ui-color-text-subtle); }
.apl-person-picker { display: grid; gap: var(--apl-ui-space-1); grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: var(--apl-ui-select-menu-max-height); overflow-y: auto; }
.apl-person-picker > label { align-items: center; background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-md); display: flex; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-2); }
.apl-person-picker.is-disabled { opacity: var(--apl-ui-opacity-disabled); }
.apl-exception-builder > footer { align-items: center; background: var(--apl-ui-color-surface-subtle); border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-2); justify-content: flex-end; padding: var(--apl-ui-space-3); }
.apl-exception-list { padding-bottom: var(--apl-ui-space-3); }
.apl-exception-list > div { display: grid; gap: var(--apl-ui-space-2); padding-inline: var(--apl-ui-space-3); }
.apl-exception-card { border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
.apl-exception-card > header,
.apl-exception-card > footer,
.apl-exception-card__period { align-items: center; display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; }
.apl-exception-card header small,
.apl-exception-card p { color: var(--apl-ui-color-text-subtle); }
.apl-exception-card p { margin: 0; }
.apl-exception-card__period time { color: var(--apl-ui-color-text-strong); font-variant-numeric: tabular-nums; }
.apl-exception-card > footer { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); justify-content: flex-end; padding-top: var(--apl-ui-space-2); }
.apl-exception-card > footer form { margin: 0; }

@media (max-width: 1100px) {
  .apl-price-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-rule-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-exception-workbench { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .apl-analysis-cockpit,
  .apl-analysis-cockpit--compact,
  .apl-analysis-stage,
  .apl-balance-layout,
  .apl-stock-radar,
  .apl-commission-head,
  .apl-rule-map-head { grid-template-columns: minmax(0, 1fr); }
  .apl-analysis-board,
  .apl-period-compare { grid-template-columns: minmax(0, 1fr); }
  .apl-query-drawer__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-signal-strip,
  .apl-exception-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-signal-strip article:nth-child(2),
  .apl-exception-summary > div:nth-child(2) { border-right: 0; }
  .apl-finance-banner { align-items: stretch; flex-direction: column; }
  .apl-stock-radar__alerts,
  .apl-commission-day-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-rule-map-head .apl-scopebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .apl-price-gallery,
  .apl-rule-map,
  .apl-balance-cards,
  .apl-replenishment-grid,
  .apl-stock-radar__alerts,
  .apl-commission-day-grid { grid-template-columns: minmax(0, 1fr); }
  .apl-query-drawer__body,
  .apl-rule-map-head .apl-scopebar { grid-template-columns: minmax(0, 1fr); }
  .apl-analysis-equation { grid-template-columns: minmax(0, 1fr); }
  .apl-analysis-equation i { transform: rotate(90deg); }
  .apl-signal-strip,
  .apl-exception-summary { grid-template-columns: minmax(0, 1fr); }
  .apl-signal-strip article,
  .apl-exception-summary > div { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); border-right: 0; }
  .apl-signal-strip article:last-child,
  .apl-exception-summary > div:last-child { border-bottom: 0; }
  .apl-period-switcher { align-items: stretch; flex-direction: column; }
  .apl-period-switcher > i { align-self: center; transform: rotate(90deg); }
  .apl-money-stream__entry { grid-template-columns: var(--apl-ui-stream-marker-size) minmax(0, 1fr); }
  .apl-money-stream__entry time,
  .apl-money-stream__entry > b { grid-column: 2; }
  .apl-transaction-row { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
  .apl-transaction-row time { justify-self: end; }
  .apl-transaction-row > div,
  .apl-transaction-row > span { grid-column: 2; }
  .apl-period-row { grid-template-columns: minmax(0, 1fr) auto; }
  .apl-period-row > span { grid-column: 1; }
  .apl-unlinked-strip { grid-template-columns: minmax(0, 1fr); }
  .apl-unlinked-strip__items { justify-content: flex-start; }
  .apl-rule-command { align-items: stretch; flex-direction: column; }
  .apl-person-picker,
  .apl-exception-builder .apl-editor-choices { grid-template-columns: minmax(0, 1fr); }
  .apl-exception-card__period { align-items: flex-start; flex-direction: column; }
  .apl-exception-card__period i { transform: rotate(90deg); }
}


/* Compositores financieros y de inventario. */
.apl-voucher-builder { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); overflow: hidden; }
.apl-voucher-amount { align-items: center; background: var(--apl-ui-color-inverse); color: var(--apl-ui-color-inverse-text); display: grid; gap: var(--apl-ui-space-1); justify-items: center; padding: var(--apl-ui-space-5); text-align: center; }
.apl-voucher-amount > span,
.apl-voucher-amount > small { color: var(--apl-ui-color-inverse-text-muted); }
.apl-voucher-amount > label { align-items: center; display: flex; gap: var(--apl-ui-space-2); }
.apl-voucher-amount > label > b { font-size: var(--apl-ui-font-size-display); }
.apl-voucher-amount input { font-size: var(--apl-ui-font-size-hero); max-width: var(--apl-ui-card-min-width); text-align: center; }
.apl-voucher-route { align-items: end; display: grid; gap: var(--apl-ui-space-2); grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); padding: var(--apl-ui-space-3); }
.apl-voucher-route__node { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-voucher-route__node > span,
.apl-voucher-note label > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-voucher-route > i { align-self: center; color: var(--apl-ui-color-text-subtle); }
.apl-voucher-note { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); padding: var(--apl-ui-space-3); }
.apl-voucher-note label { display: grid; gap: var(--apl-ui-space-1); }
.apl-voucher-actions { align-items: center; background: var(--apl-ui-color-surface-subtle); border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-voucher-actions > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }

.apl-stock-passport { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: var(--apl-ui-analysis-rail-width) minmax(0, 1fr); }
.apl-stock-passport__rail { align-items: center; background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: flex; flex-direction: column; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-4); position: sticky; text-align: center; top: var(--apl-ui-space-3); }
.apl-stock-passport__rail > span,
.apl-stock-passport__rail > small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-stock-passport__rail > i { font-size: var(--apl-ui-font-size-hero); }
.apl-stock-passport__rail > strong { font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-stock-passport__rail > p { color: inherit; margin: 0; }
.apl-stock-passport__body { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-stock-passport__body > section { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-4); }
.apl-stock-passport__body > section > header,
.apl-movement-console__body > section > header { align-items: flex-start; display: flex; gap: var(--apl-ui-space-2); }
.apl-stock-passport__body > section > header > b,
.apl-movement-console__body > section > header > b { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-brand-dark); display: inline-flex; flex: 0 0 var(--apl-ui-avatar-sm); height: var(--apl-ui-avatar-sm); justify-content: center; }
.apl-stock-passport__body h2,
.apl-movement-console__body h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-stock-passport__body header p,
.apl-movement-console__body header p { color: var(--apl-ui-color-text-subtle); margin: var(--apl-ui-space-1) 0 0; }
.apl-stock-passport__wide,
.apl-stock-passport__fields > label,
.apl-stock-threshold > label { display: grid; gap: var(--apl-ui-space-1); }
.apl-stock-passport__wide > span,
.apl-stock-passport__fields span,
.apl-stock-threshold span,
.apl-stock-opening-grid span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-stock-passport__fields { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-stock-threshold { align-items: end; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.apl-stock-opening-grid { align-items: end; display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-stock-opening-grid > label { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-stock-opening-grid > label > div { align-items: center; display: flex; gap: var(--apl-ui-space-1); }
.apl-stock-threshold > label > div,
.apl-movement-impact-fields label > div,
.apl-sale-correction__amount label { align-items: center; display: flex; gap: var(--apl-ui-space-1); }
.apl-stock-threshold > i { align-self: center; color: var(--apl-ui-color-text-subtle); }
.apl-stock-passport__body > footer,
.apl-movement-console__body > footer,
.apl-sale-correction > footer { align-items: center; background: var(--apl-ui-color-surface-subtle); display: flex; gap: var(--apl-ui-space-2); justify-content: flex-end; padding: var(--apl-ui-space-3); }

.apl-movement-console { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(0, 1fr) var(--apl-ui-analysis-rail-width); }
.apl-movement-console__body { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-movement-console__body > section { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-4); }
.apl-movement-console__pair,
.apl-movement-impact-fields { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-movement-console__pair > label,
.apl-movement-impact-fields > label,
.apl-movement-console__wide,
.apl-movement-adjustment { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-movement-console__pair label > span,
.apl-movement-impact-fields label > span,
.apl-movement-console__wide > span,
.apl-movement-adjustment > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-movement-impact-fields small { color: var(--apl-ui-color-text-subtle); }
.apl-movement-adjustment .apl-editor-choices { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-movement-adjustment .apl-editor-choice > span { display: grid; }
.apl-movement-preview { align-items: center; background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: flex; flex-direction: column; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-4); position: sticky; text-align: center; top: var(--apl-ui-space-3); }
.apl-movement-preview > span,
.apl-movement-preview small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-movement-preview > i:first-of-type { font-size: var(--apl-ui-font-size-hero); }
.apl-movement-preview > div { display: grid; }
.apl-movement-preview strong { color: inherit; font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-movement-preview p { color: var(--apl-ui-color-inverse-text-muted); margin: 0; }
.apl-movement-preview p.is-danger { color: var(--apl-ui-color-accent); font-weight: var(--apl-ui-font-weight-semibold); }

.apl-sale-correction { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-sale-correction__stamp { align-items: center; background: var(--apl-ui-color-inverse); color: var(--apl-ui-color-inverse-text); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-sale-correction__stamp > div { align-items: baseline; display: flex; gap: var(--apl-ui-space-2); }
.apl-sale-correction__stamp span,
.apl-sale-correction__stamp small { color: var(--apl-ui-color-inverse-text-muted); }
.apl-sale-correction__stamp strong { color: inherit; font-size: var(--apl-ui-font-size-title-lg); }
.apl-sale-correction__route { align-items: end; display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(7, minmax(0, auto)); padding: var(--apl-ui-space-4); }
.apl-sale-correction__route > label { display: grid; gap: var(--apl-ui-space-1); min-width: var(--apl-ui-choice-min-width); }
.apl-sale-correction__route > label > span,
.apl-sale-correction__amount span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-sale-correction__route > i { align-self: center; color: var(--apl-ui-color-text-subtle); }
.apl-sale-correction__amount { align-items: center; background: var(--apl-ui-color-brand-surface); border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); display: flex; gap: var(--apl-ui-space-4); justify-content: space-between; padding: var(--apl-ui-space-4); }
.apl-sale-correction__amount > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-sale-correction__amount input { font-size: var(--apl-ui-font-size-display); max-width: var(--apl-ui-card-min-width); }
.apl-sale-correction__amount p { color: var(--apl-ui-color-text-muted); margin: 0; max-width: var(--apl-ui-content-narrow); }
.apl-sale-value-audit {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  overflow: hidden;
}
.apl-sale-value-audit > header {
  align-items: center;
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-3) var(--apl-ui-space-4);
}
.apl-sale-value-audit > header > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-sale-value-audit > header span,
.apl-sale-value-audit > header p { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-sale-value-audit > header h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); margin: 0; }
.apl-sale-value-audit > header p { margin: 0; }
.apl-sale-value-audit__events { display: grid; padding: var(--apl-ui-space-2) var(--apl-ui-space-4); }
.apl-sale-value-audit__event {
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: auto minmax(0, 1fr);
  padding-block: var(--apl-ui-space-3);
}
.apl-sale-value-audit__event + .apl-sale-value-audit__event { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); }
.apl-sale-value-audit__marker {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  height: var(--apl-ui-avatar-md);
  justify-content: center;
  width: var(--apl-ui-avatar-md);
}
.apl-sale-value-audit__event > div { display: grid; gap: var(--apl-ui-space-2); min-width: 0; }
.apl-sale-value-audit__event header { align-items: center; display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; }
.apl-sale-value-audit__event header > div { align-items: center; display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-2); }
.apl-sale-value-audit__event header strong { color: var(--apl-ui-color-text-strong); }
.apl-sale-value-audit__event time,
.apl-sale-value-audit__event p { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-sale-value-audit__event dl { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.apl-sale-value-audit__event dl > div { background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-md); display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; padding: var(--apl-ui-space-2); }
.apl-sale-value-audit__event dt,
.apl-sale-value-audit__event dd { margin: 0; }
.apl-sale-value-audit__event dt { color: var(--apl-ui-color-text-subtle); }
.apl-sale-value-audit__event dd { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-bold); }
.apl-sale-value-audit__event p { align-items: center; display: flex; gap: var(--apl-ui-space-1); margin: 0; }
.apl-danger-zone { align-items: center; background: var(--apl-ui-color-danger-soft); border: var(--apl-ui-border-width) solid var(--apl-ui-color-danger-border); border-radius: var(--apl-ui-radius-xl); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-danger-zone > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-danger-zone span,
.apl-danger-zone p { color: var(--apl-ui-color-danger-dark); font-size: var(--apl-ui-font-size-caption); margin: 0; }
.apl-danger-zone strong { color: var(--apl-ui-color-text-strong); }

@media (max-width: 900px) {
  .apl-stock-passport,
  .apl-movement-console { grid-template-columns: minmax(0, 1fr); }
  .apl-stock-passport__rail,
  .apl-movement-preview { position: static; }
  .apl-sale-correction__route { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-sale-correction__route > i { display: none; }
}
@media (max-width: 680px) {
  .apl-voucher-route,
  .apl-stock-passport__fields,
  .apl-stock-opening-grid,
  .apl-stock-threshold,
  .apl-movement-console__pair,
  .apl-movement-impact-fields,
  .apl-movement-adjustment .apl-editor-choices,
  .apl-sale-correction__route { grid-template-columns: minmax(0, 1fr); }
  .apl-voucher-route > i,
  .apl-stock-threshold > i { justify-self: center; transform: rotate(90deg); }
  .apl-voucher-actions,
  .apl-sale-correction__stamp,
  .apl-sale-correction__amount,
  .apl-danger-zone { align-items: stretch; flex-direction: column; }
}


/* Experiencia pública de reservas: recorrido, selección, agenda y comprobante. */
:root {
  --apl-ui-booking-max-width: 1040px;
  --apl-ui-booking-team-width: 240px;
  --apl-ui-booking-day-width: 248px;
  --apl-ui-ticket-width: 360px;
  --apl-ui-booking-error-min-height: 440px;
}
.apl-booking { gap: var(--apl-ui-space-4); max-width: var(--apl-ui-booking-max-width); }
.apl-booking-path { align-items: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-pill); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
.apl-booking-path__label { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-bold); }
.apl-booking-path ol { align-items: center; display: flex; gap: var(--apl-ui-space-1); list-style: none; margin: 0; padding: 0; }
.apl-booking-path li { align-items: center; color: var(--apl-ui-color-text-subtle); display: flex; gap: var(--apl-ui-space-1); }
.apl-booking-path li:not(:last-child)::after { background: var(--apl-ui-color-border-muted); content: ''; display: block; height: var(--apl-ui-space-1); margin-inline: var(--apl-ui-space-1); width: var(--apl-ui-space-5); }
.apl-booking-path li b { align-items: center; background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-pill); display: inline-flex; height: var(--apl-ui-avatar-sm); justify-content: center; width: var(--apl-ui-avatar-sm); }
.apl-booking-path li.is-current { color: var(--apl-ui-color-brand-dark); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-booking-path li.is-current b,
.apl-booking-path li.is-done b { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); color: var(--apl-ui-color-brand-dark); }

.apl-booking-hero { display: grid; gap: var(--apl-ui-space-1); text-align: center; }
.apl-booking-hero > span { color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-bold); }
.apl-booking-hero h1 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-page-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-booking-hero p { color: var(--apl-ui-color-text-muted); margin: 0; }

.apl-booking-service-picker { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-booking-service-picker > header { align-items: center; background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-booking-service-picker > header label { align-items: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border); border-radius: var(--apl-ui-radius-pill); display: flex; flex: 1 1 auto; gap: var(--apl-ui-space-2); max-width: var(--apl-ui-content-narrow); padding-inline: var(--apl-ui-space-3); }
.apl-booking-service-picker > header label input { background: transparent; border: 0; box-shadow: none; }
.apl-booking-service-picker > header small { color: var(--apl-ui-color-text-subtle); }
.apl-booking-service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-booking-service { align-items: center; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); color: var(--apl-ui-color-text-body); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: auto minmax(0, 1fr) auto auto; min-height: var(--apl-ui-analysis-card-min-height); padding: var(--apl-ui-space-3); text-decoration: none; }
.apl-booking-service:nth-child(odd) { border-right: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); }
.apl-booking-service:hover { background: var(--apl-ui-color-brand-surface); color: var(--apl-ui-color-text-body); text-decoration: none; }
.apl-booking-service__icon { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-brand-dark); display: inline-flex; height: var(--apl-ui-avatar-lg); justify-content: center; width: var(--apl-ui-avatar-lg); }
.apl-booking-service__name { display: grid; min-width: 0; }
.apl-booking-service__name strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }
.apl-booking-service__name small { color: var(--apl-ui-color-text-subtle); }
.apl-booking-service > b { color: var(--apl-ui-color-brand-dark); font-weight: var(--apl-ui-font-weight-bold); white-space: nowrap; }
.apl-booking-trust { align-items: center; color: var(--apl-ui-color-text-subtle); display: flex; gap: var(--apl-ui-space-2); justify-content: center; }

.apl-booking-context { align-items: center; background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(0, 1fr) auto auto; padding: var(--apl-ui-space-3); }
.apl-booking-context > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-booking-context span,
.apl-booking-context p { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); margin: 0; }
.apl-booking-context h1 { color: inherit; font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-booking-context > strong { color: inherit; font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-booking-scheduler { align-items: stretch; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: var(--apl-ui-booking-team-width) minmax(0, 1fr); }
.apl-booking-team,
.apl-booking-times { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); min-width: 0; overflow: hidden; }
.apl-booking-team > header,
.apl-booking-times > header { padding: var(--apl-ui-space-3); }
.apl-booking-team > header span,
.apl-booking-times > header span,
.apl-booking-times > header small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-booking-team h2,
.apl-booking-times h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-booking-team header p { color: var(--apl-ui-color-text-muted); margin: var(--apl-ui-space-1) 0 0; }
.apl-booking-team__list { display: grid; gap: var(--apl-ui-space-1); padding: 0 var(--apl-ui-space-2); }
.apl-booking-person { align-items: center; background: transparent; border: var(--apl-ui-border-width) solid transparent; border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-text-body); display: flex; gap: var(--apl-ui-space-2); min-height: var(--apl-ui-control-height); padding: var(--apl-ui-space-2); text-align: left; width: 100%; }
.apl-booking-person:hover,
.apl-booking-person.is-active { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); color: var(--apl-ui-color-brand-dark); }
.apl-booking-team > p { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); padding: var(--apl-ui-space-2); }
.apl-booking-times > header { align-items: flex-start; border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; justify-content: space-between; }
.apl-booking-days { display: grid; gap: var(--apl-ui-space-2); grid-auto-columns: var(--apl-ui-booking-day-width); grid-auto-flow: column; overflow-x: auto; padding: var(--apl-ui-space-3); scroll-snap-type: x proximity; }
.apl-booking-day { border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); overflow: hidden; scroll-snap-align: start; }
.apl-booking-day__header { background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-label-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; padding: var(--apl-ui-space-2); }
.apl-booking-day__body { display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-2); }
.apl-booking-time-band { display: grid; gap: var(--apl-ui-space-1); }
.apl-booking-time-band__title { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); margin: 0; }
.apl-booking-slot-grid { display: grid; gap: var(--apl-ui-space-1); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-booking-slot { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border); border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-text-body); min-height: var(--apl-ui-control-height); padding: var(--apl-ui-space-1); }
.apl-booking-slot:hover,
.apl-booking-slot.is-active { background: var(--apl-ui-color-brand); border-color: var(--apl-ui-color-brand-dark); color: var(--apl-ui-color-on-solid); }
.apl-booking-times > .apl-btn { margin: 0 var(--apl-ui-space-3) var(--apl-ui-space-3); }
.apl-booking-professional-choice { align-items: center; background: var(--apl-ui-color-brand-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); border-radius: var(--apl-ui-radius-lg); display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-2); }
.apl-booking-professional-choice > span { color: var(--apl-ui-color-brand-dark); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-booking-checkout { align-items: center; background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); bottom: var(--apl-ui-space-2); color: var(--apl-ui-color-inverse-text); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); position: sticky; z-index: var(--apl-ui-z-sticky); }
.apl-booking-checkout > div { display: grid; min-width: 0; }
.apl-booking-checkout span { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-booking-checkout strong { color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.apl-booking-confirmation { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: var(--apl-ui-ticket-width) minmax(0, 1fr); }
.apl-appointment-ticket { background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); overflow: hidden; }
.apl-appointment-ticket > header { border-bottom: var(--apl-ui-border-width) dashed var(--apl-ui-color-inverse-border); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-4); }
.apl-appointment-ticket header span,
.apl-appointment-ticket header small,
.apl-appointment-ticket__professional span,
.apl-appointment-ticket dt { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-appointment-ticket header strong { color: inherit; font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); }
.apl-appointment-ticket__professional { align-items: center; display: flex; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
.apl-appointment-ticket__professional > div { display: grid; }
.apl-appointment-ticket dl { display: grid; gap: var(--apl-ui-space-2); margin: 0; padding: var(--apl-ui-space-3); }
.apl-appointment-ticket dl div { display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; }
.apl-appointment-ticket dt,
.apl-appointment-ticket dd { margin: 0; }
.apl-appointment-ticket dd { color: inherit; text-align: right; }
.apl-appointment-ticket > footer { border-top: var(--apl-ui-border-width) dashed var(--apl-ui-color-inverse-border); display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-appointment-ticket > footer a { color: var(--apl-ui-color-on-solid); font-size: var(--apl-ui-font-size-caption); }
.apl-booking-contact { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-booking-contact > header { background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); padding: var(--apl-ui-space-3); }
.apl-booking-contact header span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-booking-contact h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-booking-contact header p { color: var(--apl-ui-color-text-muted); margin: var(--apl-ui-space-1) 0 0; }
.apl-booking-contact__form { display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-3); }
.apl-booking-contact__form > div { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-booking-contact__form label { display: grid; gap: var(--apl-ui-space-1); }
.apl-booking-contact__form label > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }

.apl-confirmation-seal { align-items: center; background: var(--apl-ui-color-brand-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); border-radius: var(--apl-ui-radius-xl); display: flex; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-4); }
.apl-confirmation-seal > span { align-items: center; background: var(--apl-ui-color-brand); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-on-solid); display: inline-flex; flex: 0 0 var(--apl-ui-avatar-lg); height: var(--apl-ui-avatar-lg); justify-content: center; }
.apl-confirmation-seal > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-confirmation-seal small { color: var(--apl-ui-color-brand-dark); }
.apl-confirmation-seal h1 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-page-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-confirmation-seal p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-confirmation-receipt { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-confirmation-receipt > header { align-items: center; background: var(--apl-ui-color-inverse); color: var(--apl-ui-color-inverse-text); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-confirmation-receipt > header > div { display: grid; }
.apl-confirmation-receipt > header span,
.apl-confirmation-receipt > header small { color: var(--apl-ui-color-inverse-text-muted); }
.apl-confirmation-receipt > header strong { color: inherit; font-size: var(--apl-ui-font-size-title-lg); }
.apl-confirmation-receipt__when { align-items: center; background: var(--apl-ui-color-brand-surface); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-4); }
.apl-confirmation-receipt__when span { color: var(--apl-ui-color-text-subtle); }
.apl-confirmation-receipt__when strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); }
.apl-confirmation-receipt__body { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: auto minmax(0, 1fr); padding: var(--apl-ui-space-4); }
.apl-confirmation-receipt__person { align-items: center; border-right: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-2); padding-right: var(--apl-ui-space-3); }
.apl-confirmation-receipt__person > div { display: grid; }
.apl-confirmation-receipt__person span,
.apl-confirmation-receipt dt,
.apl-confirmation-receipt__contact span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-confirmation-receipt dl { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.apl-confirmation-receipt dl div,
.apl-confirmation-receipt__contact div { display: grid; }
.apl-confirmation-receipt dt,
.apl-confirmation-receipt dd { margin: 0; }
.apl-confirmation-receipt dd { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-confirmation-receipt__contact { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-2); grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: var(--apl-ui-space-3); }
.apl-confirmation-receipt > footer { background: var(--apl-ui-color-surface-subtle); border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; justify-content: flex-end; padding: var(--apl-ui-space-3); }
.apl-booking-error { align-content: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-2); justify-items: center; min-height: var(--apl-ui-booking-error-min-height); padding: var(--apl-ui-space-5); text-align: center; }
.apl-booking-error__icon { align-items: center; background: var(--apl-ui-color-warning-soft); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-warning-dark); display: inline-flex; height: var(--apl-ui-avatar-lg); justify-content: center; width: var(--apl-ui-avatar-lg); }
.apl-booking-error small { color: var(--apl-ui-color-text-subtle); }
.apl-booking-error h1 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-page-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-booking-error p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-booking-error > div { background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-1); margin-top: var(--apl-ui-space-3); padding: var(--apl-ui-space-3); }
.apl-booking-cancel { align-items: center; background: var(--apl-ui-color-danger-soft); border: var(--apl-ui-border-width) solid var(--apl-ui-color-danger-border); border-radius: var(--apl-ui-radius-xl); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-booking-cancel__copy { display: grid; }
.apl-booking-cancel span,
.apl-booking-cancel p { color: var(--apl-ui-color-danger-dark); margin: 0; }
.apl-booking-cancel__form { flex: 0 0 auto; margin: 0; }
.apl-booking-cancel__confirmation { display: grid; }
.apl-booking-cancel__confirmation > summary { cursor: pointer; list-style: none; }
.apl-booking-cancel__confirmation > summary::-webkit-details-marker { display: none; }
.apl-booking-cancel .apl-btn span { color: inherit; }
.apl-booking-cancel__close-label { display: none; }
.apl-booking-cancel__confirmation[open] .apl-booking-cancel__open-label { display: none; }
.apl-booking-cancel__confirmation[open] .apl-booking-cancel__close-label { display: inline; }
.apl-booking-cancel .apl-booking-cancel__confirmation[open] > summary.apl-btn.apl-btn--danger { background: var(--apl-ui-color-surface); border-color: var(--apl-ui-color-danger-border); color: var(--apl-ui-color-danger-dark); }
.apl-booking-cancel__panel { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-danger-border); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); margin-top: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
.apl-booking-cancel__panel strong { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-booking-cancel__panel .apl-btn { width: 100%; }

.apl-share-hub { align-items: stretch; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(0, 1fr) var(--apl-ui-analysis-rail-width); }
.apl-share-hub__main { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-4); }
.apl-share-hub__main h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-share-hub__main p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-share-hub__main > label { display: grid; gap: var(--apl-ui-space-1); }
.apl-share-hub__main > label > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-share-hub__main > label > div { display: flex; gap: var(--apl-ui-space-2); }
.apl-share-channels { display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-2); }
.apl-share-alias { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); display: grid; gap: var(--apl-ui-space-2); padding-top: var(--apl-ui-space-3); }
.apl-share-alias > label { display: grid; gap: var(--apl-ui-space-1); }
.apl-share-alias > label > span { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-body-sm); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-share-alias > label > small { color: var(--apl-ui-color-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-share-alias__control { align-items: center; display: grid; gap: var(--apl-ui-space-2); grid-template-columns: max-content minmax(0, 1fr) max-content; }
.apl-share-alias__control > span { background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-text-muted); font-size: var(--apl-ui-font-size-caption); padding: var(--apl-ui-space-2); }
.apl-share-hub__preview { align-items: center; background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: flex; flex-direction: column; gap: var(--apl-ui-space-3); justify-content: center; padding: var(--apl-ui-space-4); text-align: center; }
.apl-share-hub__preview span,
.apl-share-hub__preview small { color: var(--apl-ui-color-inverse-text-muted); }
.apl-share-hub__preview i { font-size: var(--apl-ui-font-size-hero); }
.apl-share-hub__preview strong { color: inherit; }

@media (max-width: 820px) {
  .apl-booking-scheduler,
  .apl-booking-confirmation,
  .apl-share-hub { grid-template-columns: minmax(0, 1fr); }
  .apl-booking-team__list { display: flex; overflow-x: auto; }
  .apl-booking-person { flex: 0 0 auto; width: auto; }
  .apl-confirmation-receipt__body { grid-template-columns: minmax(0, 1fr); }
  .apl-confirmation-receipt__person { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); border-right: 0; padding: 0 0 var(--apl-ui-space-3); }
}
@media (max-width: 620px) {
  .apl-booking-path__label,
  .apl-booking-path li span { display: none; }
  .apl-booking-service-list { grid-template-columns: minmax(0, 1fr); }
  .apl-booking-service:nth-child(odd) { border-right: 0; }
  .apl-booking-context { grid-template-columns: minmax(0, 1fr) auto; }
  .apl-booking-context > a { grid-column: 1 / -1; }
  .apl-booking-checkout,
  .apl-confirmation-seal,
  .apl-booking-cancel { align-items: stretch; flex-direction: column; }
  .apl-booking-contact__form > div,
  .apl-confirmation-receipt dl,
  .apl-confirmation-receipt__contact { grid-template-columns: minmax(0, 1fr); }
  .apl-confirmation-receipt__when { align-items: flex-start; flex-direction: column; }
  .apl-share-hub__main > label > div { align-items: stretch; flex-direction: column; }
  .apl-share-alias__control { align-items: stretch; grid-template-columns: minmax(0, 1fr); }
}


/* Integración de calendario y arquitectura de reglas. */
:root {
  --apl-ui-rule-rail-width: 260px;
  --apl-ui-source-min-width: 220px;
  --apl-ui-week-day-width: 48px;
}
.apl-integration-pulse { align-items: stretch; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(var(--apl-ui-card-min-width), auto) minmax(0, 1fr); padding: var(--apl-ui-space-3); }
.apl-integration-pulse__state { background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-inverse-text); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-integration-pulse__state span,
.apl-integration-pulse__state small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-integration-pulse__state strong { color: inherit; font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); }
.apl-integration-pulse__flow { align-items: center; display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(5, auto); justify-content: center; }
.apl-integration-pulse__flow div { display: grid; min-width: var(--apl-ui-choice-min-width); text-align: center; }
.apl-integration-pulse__flow span,
.apl-integration-pulse__flow small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-integration-pulse__flow strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }

.apl-credential-vault { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-credential-vault > summary { align-items: center; cursor: pointer; display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; list-style: none; padding: var(--apl-ui-space-3); }
.apl-credential-vault > summary::-webkit-details-marker { display: none; }
.apl-credential-vault > summary > div { align-items: center; display: flex; gap: var(--apl-ui-space-2); }
.apl-credential-vault > summary > div > i { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-brand-dark); display: inline-flex; height: var(--apl-ui-avatar-md); justify-content: center; width: var(--apl-ui-avatar-md); }
.apl-credential-vault > summary > div > span { display: grid; }
.apl-credential-vault > summary small { color: var(--apl-ui-color-text-subtle); }
.apl-credential-vault > form { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); }
.apl-credential-vault__status { background: var(--apl-ui-color-surface-subtle); display: flex; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
.apl-credential-vault__status span { color: var(--apl-ui-color-warning-dark); font-size: var(--apl-ui-font-size-caption); }
.apl-credential-vault__status span.is-ready { color: var(--apl-ui-color-success-dark); }
.apl-credential-vault__fields { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--apl-ui-space-3); }
.apl-credential-vault__fields label { display: grid; gap: var(--apl-ui-space-1); }
.apl-credential-vault__fields label > span { color: var(--apl-ui-color-text-muted); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-credential-vault__fields small { color: var(--apl-ui-color-text-subtle); }
.apl-credential-vault footer { align-items: center; background: var(--apl-ui-color-surface-subtle); border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-2); justify-content: flex-end; padding: var(--apl-ui-space-3); }

.apl-calendar-inventory,
.apl-assignment-board { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-3); }
.apl-calendar-inventory__grid { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-calendar-source { align-items: center; background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); grid-template-columns: auto minmax(0, 1fr) auto; min-width: 0; padding: var(--apl-ui-space-2); }
.apl-calendar-source > i { color: var(--apl-ui-color-brand-dark); }
.apl-calendar-source > div { display: grid; min-width: 0; }
.apl-calendar-source strong { color: var(--apl-ui-color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-calendar-source small { color: var(--apl-ui-color-text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-assignment-board__list { display: grid; }
.apl-assignment-row { align-items: end; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-2); grid-template-columns: minmax(var(--apl-ui-source-min-width), 1fr) minmax(var(--apl-ui-card-min-width), 2fr) minmax(var(--apl-ui-choice-min-width), 1fr) auto; padding-block: var(--apl-ui-space-3); }
.apl-assignment-row__person { align-items: center; display: flex; gap: var(--apl-ui-space-2); min-width: 0; }
.apl-assignment-row__person > div { display: grid; min-width: 0; }
.apl-assignment-row__person strong { color: var(--apl-ui-color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-assignment-row__person small,
.apl-assignment-row label > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-assignment-row > label { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }

.apl-rule-architect { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: var(--apl-ui-rule-rail-width) minmax(0, 1fr); }
.apl-rule-architect__rail { background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-3); position: sticky; top: var(--apl-ui-space-3); }
.apl-rule-architect__rail > span { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-rule-architect__rail nav { display: grid; }
.apl-rule-architect__rail nav a { align-items: center; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-inverse-border); color: var(--apl-ui-color-inverse-text); display: flex; gap: var(--apl-ui-space-2); padding-block: var(--apl-ui-space-2); text-decoration: none; }
.apl-rule-architect__rail nav b { align-items: center; background: var(--apl-ui-color-surface); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-brand-dark); display: inline-flex; height: var(--apl-ui-avatar-sm); justify-content: center; width: var(--apl-ui-avatar-sm); }
.apl-rule-architect__rail > div { background: var(--apl-ui-color-surface); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-text-body); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-2); }
.apl-rule-architect__rail > div small { color: var(--apl-ui-color-text-subtle); }
.apl-rule-blueprint { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-rule-blueprint > section { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-4); }
.apl-rule-blueprint > section > header { align-items: flex-start; display: flex; gap: var(--apl-ui-space-2); }
.apl-rule-blueprint > section > header > b { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-brand-dark); display: inline-flex; height: var(--apl-ui-avatar-md); justify-content: center; width: var(--apl-ui-avatar-md); }
.apl-rule-blueprint > section > header span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-rule-blueprint h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-rule-blueprint__fields { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-rule-blueprint__fields > label,
.apl-rule-readonly { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-rule-blueprint__fields label > span,
.apl-rule-readonly span { color: var(--apl-ui-color-text-muted); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-rule-blueprint__fields small,
.apl-rule-readonly small { color: var(--apl-ui-color-text-subtle); }
.apl-rule-blueprint__wide { grid-column: 1 / -1; }
.apl-rule-readonly { background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); padding: var(--apl-ui-space-2); }
.apl-time-engine { align-items: center; background: var(--apl-ui-color-brand-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(5, auto); justify-content: center; padding: var(--apl-ui-space-3); }
.apl-time-engine > label { display: grid; gap: var(--apl-ui-space-1); max-width: var(--apl-ui-choice-min-width); text-align: center; }
.apl-time-engine span,
.apl-time-engine small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-time-engine input { text-align: center; }
.apl-rule-blueprint > footer { align-items: center; background: var(--apl-ui-color-surface-subtle); display: flex; gap: var(--apl-ui-space-2); justify-content: flex-end; padding: var(--apl-ui-space-3); }

.apl-rule-operations { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apl-rule-operation { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); overflow: hidden; padding: var(--apl-ui-space-3); }
.apl-rule-operation:last-child { grid-column: 1 / -1; }
.apl-rule-operation > header { align-items: flex-start; display: flex; justify-content: space-between; }
.apl-rule-operation > header span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-rule-operation h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-rule-operation header p { color: var(--apl-ui-color-text-muted); margin: var(--apl-ui-space-1) 0 0; }
.apl-inline-builder { align-items: end; background: var(--apl-ui-color-surface-subtle); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(5, minmax(0, 1fr)) auto; padding: var(--apl-ui-space-2); }
.apl-inline-builder > label { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-inline-builder label > span,
.apl-inline-builder__wide > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-inline-builder > i { align-self: center; color: var(--apl-ui-color-text-subtle); }
.apl-inline-builder__wide { display: grid; gap: var(--apl-ui-space-1); grid-column: 1 / -2; }
.apl-inline-builder--reminder { grid-template-columns: minmax(var(--apl-ui-choice-min-width), 1fr) repeat(2, minmax(var(--apl-ui-source-min-width), 1fr)) auto; }
.apl-day-picker { align-items: center; display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-1); }
.apl-day-picker label { cursor: pointer; display: inline-flex; margin: var(--apl-ui-space-0); position: relative; }
.apl-day-picker span {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-text-body);
  display: inline-flex;
  font-weight: var(--apl-ui-font-weight-semibold);
  justify-content: center;
  min-height: var(--apl-ui-control-height);
  min-width: var(--apl-ui-week-day-width);
  padding-inline: var(--apl-ui-space-2);
  transition: background var(--apl-ui-duration-fast) var(--apl-ui-ease-standard), border-color var(--apl-ui-duration-fast) var(--apl-ui-ease-standard), color var(--apl-ui-duration-fast) var(--apl-ui-ease-standard);
}
.apl-day-picker input:checked + span { background: var(--apl-ui-color-brand); border-color: var(--apl-ui-color-brand-dark); color: var(--apl-ui-color-on-solid); }
.apl-day-picker input:focus-visible + span { box-shadow: var(--apl-ui-shadow-focus); }

.apl-week-blocks,
.apl-local-exceptions { display: grid; gap: var(--apl-ui-space-1); }
.apl-week-block { align-items: center; border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); grid-template-columns: var(--apl-ui-week-day-width) minmax(0, 1fr) auto; padding: var(--apl-ui-space-2); }
.apl-week-block__day { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-brand-dark); display: flex; font-weight: var(--apl-ui-font-weight-bold); height: var(--apl-ui-avatar-md); justify-content: center; text-transform: uppercase; }
.apl-week-block > div:nth-child(2) { display: grid; }
.apl-week-block span { color: var(--apl-ui-color-text-subtle); }
.apl-week-block__actions { align-items: center; display: flex; gap: var(--apl-ui-space-1); }
.apl-week-block__actions form { margin: 0; }
.apl-week-duplicate { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-lg); display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-2); }
.apl-week-duplicate > span { color: var(--apl-ui-color-brand-dark); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-local-exception { align-items: center; border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); display: grid; gap: var(--apl-ui-space-2); grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--apl-ui-space-2); }
.apl-local-exception > div { align-items: center; display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-2); }
.apl-local-exception small { color: var(--apl-ui-color-text-subtle); flex-basis: 100%; }
.apl-reminder-sequence { display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-2); }
.apl-reminder-node { align-items: center; background: var(--apl-ui-color-brand-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); border-radius: var(--apl-ui-radius-lg); display: flex; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-2); }
.apl-reminder-node__time { color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-reminder-node > div { display: grid; }
.apl-reminder-node > div > span { color: var(--apl-ui-color-text-subtle); display: flex; gap: var(--apl-ui-space-1); }

@media (max-width: 980px) {
  .apl-integration-pulse,
  .apl-rule-architect { grid-template-columns: minmax(0, 1fr); }
  .apl-rule-architect__rail { position: static; }
  .apl-rule-architect__rail nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-calendar-inventory__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-assignment-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-rule-operations { grid-template-columns: minmax(0, 1fr); }
  .apl-rule-operation:last-child { grid-column: auto; }
}
@media (max-width: 680px) {
  .apl-integration-pulse__flow,
  .apl-time-engine { grid-template-columns: minmax(0, 1fr); }
  .apl-integration-pulse__flow > i,
  .apl-time-engine > i { transform: rotate(90deg); }
  .apl-credential-vault__fields,
  .apl-calendar-inventory__grid,
  .apl-assignment-row,
  .apl-rule-blueprint__fields,
  .apl-inline-builder,
  .apl-inline-builder--reminder { grid-template-columns: minmax(0, 1fr); }
  .apl-rule-architect__rail nav { grid-template-columns: minmax(0, 1fr); }
  .apl-inline-builder__wide { grid-column: auto; }
  .apl-week-block { grid-template-columns: var(--apl-ui-week-day-width) minmax(0, 1fr); }
  .apl-week-block__actions { grid-column: 2; }
  .apl-local-exception { grid-template-columns: minmax(0, 1fr) auto; }
  .apl-local-exception > .apl-status { grid-column: 1 / -1; }
}


/* Expediente y reprogramación de reservas. */
.apl-reservation-head { align-items: center; background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)) auto; padding: var(--apl-ui-space-3); }
.apl-reservation-head > div { display: grid; min-width: 0; }
.apl-reservation-head > div > span,
.apl-reservation-head > div > small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-reservation-head > div > strong { color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-reservation-editor { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: var(--apl-ui-analysis-rail-width) minmax(0, 1fr); }
.apl-reservation-editor__customer,
.apl-rebook-engine { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-reservation-editor__customer { display: grid; gap: var(--apl-ui-space-3); padding: var(--apl-ui-space-3); }
.apl-reservation-editor__customer > header { display: grid; gap: var(--apl-ui-space-1); }
.apl-reservation-editor__customer header span,
.apl-rebook-engine header span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-reservation-editor__customer h2,
.apl-rebook-engine h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-reservation-editor__customer header p,
.apl-rebook-engine header p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-reservation-editor__customer > label { display: grid; gap: var(--apl-ui-space-1); }
.apl-reservation-editor__customer > label > span,
.apl-rebook-engine__selectors label > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-rebook-engine > header { align-items: flex-start; background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-rebook-engine__selectors { align-items: end; display: grid; gap: var(--apl-ui-space-2); grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: var(--apl-ui-space-3); }
.apl-rebook-engine__selectors > label { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-rebook-engine__selectors > i { align-self: center; color: var(--apl-ui-color-text-subtle); }
.apl-rebook-days { display: grid; gap: var(--apl-ui-space-2); grid-auto-columns: var(--apl-ui-booking-day-width); grid-auto-flow: column; overflow-x: auto; padding: var(--apl-ui-space-3); }
.apl-rebook-day { border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-lg); overflow: hidden; }
.apl-rebook-day__title { background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-label-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; padding: var(--apl-ui-space-2); text-transform: capitalize; }
.apl-rebook-slot-grid { display: grid; gap: var(--apl-ui-space-1); grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--apl-ui-space-2); }
.apl-rebook-slot { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border); border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-text-body); min-height: var(--apl-ui-control-height); }
.apl-rebook-slot.is-current { border-color: var(--apl-ui-color-brand-border); }
.apl-rebook-slot.is-active { background: var(--apl-ui-color-brand); border-color: var(--apl-ui-color-brand-dark); color: var(--apl-ui-color-on-solid); }
.apl-rebook-selection { align-items: center; background: var(--apl-ui-color-brand-surface); border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-rebook-selection span { color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-caption); }
.apl-rebook-selection strong { color: var(--apl-ui-color-text-strong); }
.apl-cancelled-snapshot { align-items: center; background: var(--apl-ui-color-warning-soft); display: flex; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
.apl-cancelled-snapshot > div { display: grid; }
.apl-cancelled-snapshot span { color: var(--apl-ui-color-text-subtle); }
.apl-cancelled-snapshot__facts { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: var(--apl-ui-space-3); }
.apl-cancelled-snapshot__facts div { display: grid; }
.apl-cancelled-snapshot__facts dt { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-cancelled-snapshot__facts dd { color: var(--apl-ui-color-text-strong); margin: 0; }
.apl-reservation-editor__actions { grid-column: 1 / -1; }
.apl-reservation-lifecycle { align-items: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-reservation-lifecycle > div { display: grid; }
.apl-reservation-lifecycle span,
.apl-reservation-lifecycle p { color: var(--apl-ui-color-text-subtle); margin: 0; }

@media (max-width: 820px) {
  .apl-reservation-editor { grid-template-columns: minmax(0, 1fr); }
  .apl-reservation-editor__actions { grid-column: auto; }
}
@media (max-width: 620px) {
  .apl-reservation-head,
  .apl-rebook-engine__selectors,
  .apl-cancelled-snapshot__facts { grid-template-columns: minmax(0, 1fr); }
  .apl-rebook-engine__selectors > i { justify-self: center; transform: rotate(90deg); }
  .apl-reservation-lifecycle,
  .apl-rebook-selection { align-items: stretch; flex-direction: column; }
}


/* Punto de venta guiado. */
.apl-pos-launch { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-pos-launch > a { align-items: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-text-body); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: auto minmax(0, 1fr) auto; min-height: var(--apl-ui-analysis-hero-min-height); padding: var(--apl-ui-space-4); text-decoration: none; }
.apl-pos-launch > a:hover { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); text-decoration: none; }
.apl-pos-launch > a > span { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-brand-dark); display: flex; height: var(--apl-ui-avatar-lg); justify-content: center; width: var(--apl-ui-avatar-lg); }
.apl-pos-launch > a > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-pos-launch small { color: var(--apl-ui-color-text-subtle); }
.apl-pos-launch h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-pos-launch p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-pos-portal { align-items: center; background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-pos-portal > div { align-items: center; display: flex; gap: var(--apl-ui-space-2); }
.apl-pos-portal > div > span { display: grid; }
.apl-pos-portal small { color: var(--apl-ui-color-inverse-text-muted); }

.apl-checkout-path { align-items: center; background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-inverse-text-muted); display: flex; gap: var(--apl-ui-space-2); justify-content: center; padding: var(--apl-ui-space-2); }
.apl-checkout-path > span { align-items: center; display: flex; gap: var(--apl-ui-space-1); max-width: var(--apl-ui-card-min-width); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-checkout-path b { align-items: center; background: var(--apl-ui-color-inverse-border); border-radius: var(--apl-ui-radius-pill); display: inline-flex; flex: 0 0 var(--apl-ui-avatar-sm); height: var(--apl-ui-avatar-sm); justify-content: center; }
.apl-checkout-path .is-current,
.apl-checkout-path .is-done { color: var(--apl-ui-color-inverse-text); }
.apl-checkout-path .is-current b,
.apl-checkout-path .is-done b { background: var(--apl-ui-color-brand); color: var(--apl-ui-color-on-solid); }
.apl-pos-modes { align-items: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-pill); display: flex; gap: var(--apl-ui-space-1); justify-content: center; padding: var(--apl-ui-space-1); }
.apl-pos-modes a { border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-text-muted); padding: var(--apl-ui-space-2) var(--apl-ui-space-4); text-decoration: none; }
.apl-pos-modes a.is-active { background: var(--apl-ui-color-brand); color: var(--apl-ui-color-on-solid); font-weight: var(--apl-ui-font-weight-semibold); }

.apl-pos-picker { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-pos-picker > header { align-items: center; background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-pos-picker > header > label { align-items: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border); border-radius: var(--apl-ui-radius-pill); display: flex; flex: 1 1 auto; gap: var(--apl-ui-space-2); max-width: var(--apl-ui-content-narrow); padding-inline: var(--apl-ui-space-3); }
.apl-pos-picker > header input { background: transparent; border: 0; box-shadow: none; }
.apl-pos-picker > header small { color: var(--apl-ui-color-text-subtle); }
.apl-pos-people { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(4, minmax(0, 1fr)); padding: var(--apl-ui-space-3); }
.apl-pos-person { align-items: center; border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-text-body); display: grid; gap: var(--apl-ui-space-2); justify-items: center; min-height: var(--apl-ui-analysis-hero-min-height); padding: var(--apl-ui-space-3); text-align: center; text-decoration: none; }
.apl-pos-person:hover { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); text-decoration: none; }
.apl-pos-person strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }
.apl-pos-person small { color: var(--apl-ui-color-text-subtle); }
.apl-pos-items { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(4, minmax(0, 1fr)); padding: var(--apl-ui-space-3); }
.apl-pos-item { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-2); min-height: var(--apl-ui-rule-card-min-height); padding: var(--apl-ui-space-3); }
.apl-pos-item.is-disabled { background: var(--apl-ui-color-surface-subtle); opacity: var(--apl-ui-opacity-muted); }
.apl-pos-item > span,
.apl-pos-item > small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-pos-item h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-pos-item > strong { align-self: end; color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-pos-item__stock { background: var(--apl-ui-color-success-soft); border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-success-dark); font-size: var(--apl-ui-font-size-caption); padding: var(--apl-ui-space-1) var(--apl-ui-space-2); }
.apl-pos-item__stock.is-empty { background: var(--apl-ui-color-danger-soft); color: var(--apl-ui-color-danger-dark); }

.apl-pos-checkout { align-items: start; display: grid; gap: var(--apl-ui-space-3); grid-template-columns: var(--apl-ui-ticket-width) minmax(0, 1fr); }
.apl-pos-receipt { background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-inverse-text); overflow: hidden; }
.apl-pos-receipt > header { border-bottom: var(--apl-ui-border-width) dashed var(--apl-ui-color-inverse-border); display: flex; justify-content: space-between; padding: var(--apl-ui-space-3); }
.apl-pos-receipt > div,
.apl-pos-receipt > label { display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-pos-receipt span,
.apl-pos-receipt small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-pos-receipt input { color: var(--apl-ui-color-text-body); }
.apl-pos-receipt > footer { align-items: center; border-top: var(--apl-ui-border-width) dashed var(--apl-ui-color-inverse-border); display: flex; justify-content: space-between; padding: var(--apl-ui-space-4); }
.apl-pos-receipt > footer strong { color: inherit; font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-payment-wall { background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); overflow: hidden; }
.apl-payment-wall > header { background: var(--apl-ui-color-surface-subtle); border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); padding: var(--apl-ui-space-3); }
.apl-payment-wall header span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-payment-wall h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-payment-wall header p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-payment-wall > div { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, minmax(0, 1fr)); padding: var(--apl-ui-space-3); }
.apl-payment-wall button { align-items: center; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border); border-radius: var(--apl-ui-radius-xl); color: var(--apl-ui-color-text-body); display: grid; gap: var(--apl-ui-space-2); justify-items: center; min-height: var(--apl-ui-analysis-card-min-height); padding: var(--apl-ui-space-3); }
.apl-payment-wall button:hover { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); }
.apl-payment-wall button i { color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-title-lg); }
.apl-payment-wall button span { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-bold); }
.apl-payment-wall button small { color: var(--apl-ui-color-text-subtle); }

@media (max-width: 980px) {
  .apl-pos-launch,
  .apl-pos-people,
  .apl-pos-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-payment-wall > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .apl-pos-launch,
  .apl-pos-people,
  .apl-pos-items,
  .apl-pos-checkout,
  .apl-payment-wall > div { grid-template-columns: minmax(0, 1fr); }
  .apl-checkout-path > i,
  .apl-checkout-path > span:not(.is-current) { display: none; }
  .apl-pos-modes { overflow-x: auto; justify-content: flex-start; }
  .apl-pos-modes a { flex: 0 0 auto; }
  .apl-pos-portal { align-items: stretch; flex-direction: column; }
}

.apl-ledger-pulse { align-items: stretch; background: var(--apl-ui-color-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-xl); display: grid; gap: var(--apl-ui-space-3); grid-template-columns: minmax(var(--apl-ui-card-min-width), auto) minmax(0, 1fr); padding: var(--apl-ui-space-3); }
.apl-ledger-pulse__total { background: var(--apl-ui-color-inverse); border-radius: var(--apl-ui-radius-lg); color: var(--apl-ui-color-inverse-text); display: grid; gap: var(--apl-ui-space-1); padding: var(--apl-ui-space-3); }
.apl-ledger-pulse__total span,
.apl-ledger-pulse__total small,
.apl-ledger-pulse__breakdown span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-ledger-pulse__total span,
.apl-ledger-pulse__total small { color: var(--apl-ui-color-inverse-text-muted); }
.apl-ledger-pulse__total strong { color: inherit; font-size: var(--apl-ui-font-size-hero); font-weight: var(--apl-ui-font-weight-bold); }
.apl-ledger-pulse__breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-ledger-pulse__breakdown > div { border-right: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); display: grid; gap: var(--apl-ui-space-1); justify-content: center; padding: var(--apl-ui-space-3); text-align: center; }
.apl-ledger-pulse__breakdown > div:last-child { border-right: 0; }
.apl-ledger-pulse__breakdown strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }
@media (max-width: 700px) {
  .apl-ledger-pulse,
  .apl-ledger-pulse__breakdown { grid-template-columns: minmax(0, 1fr); }
  .apl-ledger-pulse__breakdown > div { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); border-right: 0; }
}


/* Contrato adaptable TELOAGENDA: aislamiento del tema y ancho real del contenedor. */
[data-apl-telo] {
  container-name: apl-telo;
  container-type: inline-size;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
[data-apl-telo] > *,
[data-apl-telo] section,
[data-apl-telo] article,
[data-apl-telo] header,
[data-apl-telo] footer,
[data-apl-telo] main,
[data-apl-telo] aside,
[data-apl-telo] form,
[data-apl-telo] fieldset,
[data-apl-telo] label,
[data-apl-telo] div {
  min-width: 0;
}
[data-apl-telo] input,
[data-apl-telo] select,
[data-apl-telo] textarea {
  max-width: 100%;
}
[data-apl-telo] img,
[data-apl-telo] svg,
[data-apl-telo] canvas {
  max-width: 100%;
}
[data-apl-telo] .apl-btn {
  flex-shrink: 0;
  max-width: 100%;
  white-space: nowrap;
}
[data-apl-telo] .apl-segmented {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
[data-apl-telo] .apl-segmented > * {
  flex: 0 0 auto;
}

/* El selector de fecha de agenda consume el sistema reconstruido, no el tema general. */
body.janox-template [data-apl-telo] .apl-agenda-date input[type="date"],
[data-apl-telo] .apl-agenda-date input[type="date"] {
  background: var(--apl-ui-color-surface-subtle) !important;
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border) !important;
  border-radius: var(--apl-ui-radius-md) !important;
  box-shadow: none !important;
  color: var(--apl-ui-color-text-body) !important;
  font: var(--apl-ui-font-weight-regular) var(--apl-ui-font-size-control)/var(--apl-ui-line-normal) var(--apl-ui-font-family) !important;
  height: var(--apl-ui-control-height-sm) !important;
  min-height: var(--apl-ui-control-height-sm) !important;
  padding: var(--apl-ui-space-1) var(--apl-ui-space-2) !important;
  width: calc(var(--apl-ui-control-height) * 4);
}
body.janox-template [data-apl-telo] .apl-agenda-date input[type="date"]::-webkit-calendar-picker-indicator,
[data-apl-telo] .apl-agenda-date input[type="date"]::-webkit-calendar-picker-indicator {
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  height: var(--apl-ui-font-size-control) !important;
  margin: 0 !important;
  opacity: 1;
  padding: 0 !important;
  width: var(--apl-ui-font-size-control) !important;
}

/* Equivalentes por ancho del área útil: funcionan con el menú lateral abierto. */
@container apl-telo (max-width: 1100px) {
  .apl-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container apl-telo (max-width: 767px) {
  .apl-card__header { align-items: flex-start; flex-direction: column; }
  .apl-card__tools { justify-content: flex-start; width: 100%; }
  .apl-card__tools .apl-btn { flex: 1 1 auto; }
  .apl-filter-grid,
  .apl-form { grid-template-columns: 1fr; }
  .apl-field--span-2,
  .apl-field--span-3,
  .apl-field--span-4,
  .apl-field--span-6,
  .apl-field--full,
  .apl-filter-grid__actions { grid-column: auto; }
  .apl-filter-grid__actions { align-items: stretch; justify-content: stretch; }
  .apl-filter-grid__actions .apl-btn { flex: 1 1 0; }
  .apl-form-actions { margin-inline: calc(var(--apl-ui-space-3) * -1); }
  .apl-form-actions .apl-btn { flex: 1 1 0; }
  .apl-pagination { align-items: stretch; flex-direction: column; }
  .apl-pagination__pages { justify-content: center; }
}
@container apl-telo (max-width: 520px) {
  .apl-kpi-grid { grid-template-columns: 1fr; }
  .apl-page__actions .apl-btn { flex: 1 1 100%; }
  .apl-telo__nav a span { display: none; }
  .apl-form-actions { flex-direction: column-reverse; }
  .apl-form-actions .apl-btn { width: 100%; }
}
@container apl-telo (max-width: 767px) {
  .apl-upload { align-items: flex-start; }
  .apl-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container apl-telo (max-width: 520px) {
  .apl-upload { flex-direction: column; }
  .apl-compact-grid { grid-template-columns: 1fr; }
}
@container apl-telo (max-width: 900px) {
  .apl-panel-grid { grid-template-columns: 1fr; }
  .apl-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container apl-telo (max-width: 520px) {
  .apl-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-list__item { align-items: flex-start; flex-direction: column; }
  .apl-list__actions { width: 100%; }
}
@container apl-telo (max-width: 520px) {
  .apl-copy-row { grid-template-columns: 1fr; }
  .apl-copy-row .apl-btn { width: 100%; }
}
@container apl-telo (max-width: 1180px) {
  .apl-agenda-command { grid-template-columns: auto minmax(0, 1fr) auto; }
  .apl-agenda-command__period { grid-column: 1 / -1; grid-row: 1; }
  .apl-agenda-workspace { grid-template-columns: 1fr; }
  .apl-agenda-inspector { position: static; }
  .apl-reservation-row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; }
  .apl-reservation-row__actions { grid-column: 2 / -1; justify-content: flex-end; }
}
@container apl-telo (max-width: 820px) {
  .apl-agenda-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-agenda-command { grid-template-columns: 1fr; position: static; }
  .apl-agenda-command__navigation,
  .apl-agenda-command__actions { flex-wrap: wrap; justify-content: space-between; }
  .apl-agenda-lens__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-agenda-lens__section { grid-column: span 2; }
  .apl-reservation-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .apl-reservation-row__service { grid-column: 2; }
  .apl-reservation-row__state { grid-column: 3; grid-row: 1 / span 2; }
}
@container apl-telo (max-width: 560px) {
  .apl-agenda-pulse { grid-template-columns: 1fr; }
  .apl-agenda-lens__body { grid-template-columns: 1fr; }
  .apl-agenda-lens__section { grid-column: auto; }
  .apl-agenda-dayrail { padding-left: 0; }
  .apl-agenda-board__status { align-items: flex-start; flex-direction: column; }
  .apl-reservation-row { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
  .apl-reservation-row__service,
  .apl-reservation-row__state,
  .apl-reservation-row__actions { grid-column: 2; grid-row: auto; justify-content: flex-start; }
  .apl-agenda-history__header,
  .apl-agenda-history__pagination { align-items: stretch; flex-direction: column; }
}
@container apl-telo (max-width: 1050px) {
  .apl-catalog-command { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-catalog-command__search { grid-column: 1 / -1; }
  .apl-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container apl-telo (max-width: 650px) {
  .apl-catalog-command,
  .apl-catalog-grid { grid-template-columns: 1fr; }
  .apl-catalog-command__search { grid-column: auto; }
  .apl-catalog-command__actions { justify-content: stretch; }
  .apl-catalog-command__actions .apl-btn { flex: 1 1 0; }
}
@container apl-telo (max-width: 900px) {
  .apl-editor-workspace { grid-template-columns: 1fr; }
  .apl-editor-rail { position: static; }
  .apl-editor-rail__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-editor-rail__impact { display: none; }
}
@container apl-telo (max-width: 650px) {
  .apl-editor-fields,
  .apl-editor-fields--three,
  .apl-editor-choice-grid,
  .apl-editor-matrix,
  .apl-editor-focus { grid-template-columns: 1fr; }
  .apl-editor-rail__steps { grid-template-columns: 1fr; }
  .apl-editor-matrix__row { grid-template-columns: 1fr; }
  .apl-editor-actions { align-items: stretch; flex-direction: column-reverse; }
}
@container apl-telo (max-width: 1180px) {
  .apl-stock-page .apl-scopebar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .apl-stock-page .apl-scopebar__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@container apl-telo (max-width: 980px) {
  .apl-stock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__header { grid-column: 1 / -1; }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__actions { border-left: 0; border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); grid-column: 1 / -1; padding-left: 0; padding-top: var(--apl-ui-space-1); }
  .apl-ledger-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .apl-ledger-row__detail { grid-column: 2; }
  .apl-ledger-row__actions { grid-column: 2 / -1; }
}
@container apl-telo (max-width: 760px) {
  .apl-stock-page .apl-scopebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container apl-telo (max-width: 620px) {
  .apl-stock-page .apl-scopebar { grid-template-columns: minmax(0, 1fr); }
  .apl-stock-page .apl-scopebar__actions { justify-content: stretch; }
  .apl-stock-page .apl-scopebar__actions .apl-btn:last-child { flex: 1 1 auto; }
  .apl-stock-grid { grid-template-columns: 1fr; }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card { grid-template-columns: minmax(0, 1fr); }
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__header,
  .apl-stock-grid[data-apl-view-mode="list"] .apl-stock-card__actions { grid-column: auto; }
  .apl-ledger-row { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
  .apl-ledger-row__detail,
  .apl-ledger-row__amount,
  .apl-ledger-row__actions { grid-column: 2; text-align: left; }
  .apl-ledger__header { align-items: flex-start; flex-direction: column; }
}
@container apl-telo (max-width: 1100px) {
  .apl-price-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-rule-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-exception-workbench { grid-template-columns: minmax(0, 1fr); }
}
@container apl-telo (max-width: 900px) {
  .apl-analysis-cockpit,
  .apl-analysis-cockpit--compact,
  .apl-analysis-stage,
  .apl-balance-layout,
  .apl-stock-radar,
  .apl-commission-head,
  .apl-rule-map-head { grid-template-columns: minmax(0, 1fr); }
  .apl-analysis-board,
  .apl-period-compare { grid-template-columns: minmax(0, 1fr); }
  .apl-query-drawer__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-signal-strip,
  .apl-exception-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-signal-strip article:nth-child(2),
  .apl-exception-summary > div:nth-child(2) { border-right: 0; }
  .apl-finance-banner { align-items: stretch; flex-direction: column; }
  .apl-stock-radar__alerts,
  .apl-commission-day-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-rule-map-head .apl-scopebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container apl-telo (max-width: 680px) {
  .apl-price-gallery,
  .apl-rule-map,
  .apl-balance-cards,
  .apl-replenishment-grid,
  .apl-stock-radar__alerts,
  .apl-commission-day-grid { grid-template-columns: minmax(0, 1fr); }
  .apl-query-drawer__body,
  .apl-rule-map-head .apl-scopebar { grid-template-columns: minmax(0, 1fr); }
  .apl-analysis-equation { grid-template-columns: minmax(0, 1fr); }
  .apl-analysis-equation i { transform: rotate(90deg); }
  .apl-signal-strip,
  .apl-exception-summary { grid-template-columns: minmax(0, 1fr); }
  .apl-signal-strip article,
  .apl-exception-summary > div { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); border-right: 0; }
  .apl-signal-strip article:last-child,
  .apl-exception-summary > div:last-child { border-bottom: 0; }
  .apl-period-switcher { align-items: stretch; flex-direction: column; }
  .apl-period-switcher > i { align-self: center; transform: rotate(90deg); }
  .apl-money-stream__entry { grid-template-columns: var(--apl-ui-stream-marker-size) minmax(0, 1fr); }
  .apl-money-stream__entry time,
  .apl-money-stream__entry > b { grid-column: 2; }
  .apl-transaction-row { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
  .apl-transaction-row time { justify-self: end; }
  .apl-transaction-row > div,
  .apl-transaction-row > span { grid-column: 2; }
  .apl-period-row { grid-template-columns: minmax(0, 1fr) auto; }
  .apl-period-row > span { grid-column: 1; }
  .apl-unlinked-strip { grid-template-columns: minmax(0, 1fr); }
  .apl-unlinked-strip__items { justify-content: flex-start; }
  .apl-rule-command { align-items: stretch; flex-direction: column; }
  .apl-person-picker,
  .apl-exception-builder .apl-editor-choices { grid-template-columns: minmax(0, 1fr); }
  .apl-exception-card__period { align-items: flex-start; flex-direction: column; }
  .apl-exception-card__period i { transform: rotate(90deg); }
}
@container apl-telo (max-width: 900px) {
  .apl-stock-passport,
  .apl-movement-console { grid-template-columns: minmax(0, 1fr); }
  .apl-stock-passport__rail,
  .apl-movement-preview { position: static; }
  .apl-sale-correction__route { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-sale-correction__route > i { display: none; }
}
@container apl-telo (max-width: 680px) {
  .apl-voucher-route,
  .apl-stock-passport__fields,
  .apl-stock-threshold,
  .apl-movement-console__pair,
  .apl-movement-impact-fields,
  .apl-movement-adjustment .apl-editor-choices,
  .apl-sale-correction__route { grid-template-columns: minmax(0, 1fr); }
  .apl-voucher-route > i,
  .apl-stock-threshold > i { justify-self: center; transform: rotate(90deg); }
  .apl-voucher-actions,
  .apl-sale-correction__stamp,
  .apl-sale-correction__amount,
  .apl-danger-zone { align-items: stretch; flex-direction: column; }
  .apl-sale-value-audit > header,
  .apl-sale-value-audit__event header { align-items: flex-start; flex-direction: column; }
  .apl-sale-value-audit__event dl { grid-template-columns: minmax(0, 1fr); }
}
@container apl-telo (max-width: 820px) {
  .apl-booking-scheduler,
  .apl-booking-confirmation,
  .apl-share-hub { grid-template-columns: minmax(0, 1fr); }
  .apl-booking-team__list { display: flex; overflow-x: auto; }
  .apl-booking-person { flex: 0 0 auto; width: auto; }
  .apl-confirmation-receipt__body { grid-template-columns: minmax(0, 1fr); }
  .apl-confirmation-receipt__person { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); border-right: 0; padding: 0 0 var(--apl-ui-space-3); }
}
@container apl-telo (max-width: 620px) {
  .apl-booking-path__label,
  .apl-booking-path li span { display: none; }
  .apl-booking-service-list { grid-template-columns: minmax(0, 1fr); }
  .apl-booking-service:nth-child(odd) { border-right: 0; }
  .apl-booking-context { grid-template-columns: minmax(0, 1fr) auto; }
  .apl-booking-context > a { grid-column: 1 / -1; }
  .apl-booking-checkout,
  .apl-confirmation-seal,
  .apl-booking-cancel { align-items: stretch; flex-direction: column; }
  .apl-booking-contact__form > div,
  .apl-confirmation-receipt dl,
  .apl-confirmation-receipt__contact { grid-template-columns: minmax(0, 1fr); }
  .apl-confirmation-receipt__when { align-items: flex-start; flex-direction: column; }
  .apl-share-hub__main > label > div { align-items: stretch; flex-direction: column; }
}
@container apl-telo (max-width: 980px) {
  .apl-integration-pulse,
  .apl-rule-architect { grid-template-columns: minmax(0, 1fr); }
  .apl-rule-architect__rail { position: static; }
  .apl-rule-architect__rail nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-calendar-inventory__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-assignment-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-rule-operations { grid-template-columns: minmax(0, 1fr); }
  .apl-rule-operation:last-child { grid-column: auto; }
}
@container apl-telo (max-width: 680px) {
  .apl-integration-pulse__flow,
  .apl-time-engine { grid-template-columns: minmax(0, 1fr); }
  .apl-integration-pulse__flow > i,
  .apl-time-engine > i { transform: rotate(90deg); }
  .apl-credential-vault__fields,
  .apl-calendar-inventory__grid,
  .apl-assignment-row,
  .apl-rule-blueprint__fields,
  .apl-inline-builder,
  .apl-inline-builder--reminder { grid-template-columns: minmax(0, 1fr); }
  .apl-rule-architect__rail nav { grid-template-columns: minmax(0, 1fr); }
  .apl-inline-builder__wide { grid-column: auto; }
  .apl-week-block { grid-template-columns: var(--apl-ui-week-day-width) minmax(0, 1fr); }
  .apl-week-block__actions { grid-column: 2; }
  .apl-local-exception { grid-template-columns: minmax(0, 1fr) auto; }
  .apl-local-exception > .apl-status { grid-column: 1 / -1; }
}
@container apl-telo (max-width: 820px) {
  .apl-reservation-editor { grid-template-columns: minmax(0, 1fr); }
  .apl-reservation-editor__actions { grid-column: auto; }
}
@container apl-telo (max-width: 620px) {
  .apl-reservation-head,
  .apl-rebook-engine__selectors,
  .apl-cancelled-snapshot__facts { grid-template-columns: minmax(0, 1fr); }
  .apl-rebook-engine__selectors > i { justify-self: center; transform: rotate(90deg); }
  .apl-reservation-lifecycle,
  .apl-rebook-selection { align-items: stretch; flex-direction: column; }
}
@container apl-telo (max-width: 980px) {
  .apl-pos-launch,
  .apl-pos-people,
  .apl-pos-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-payment-wall > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container apl-telo (max-width: 700px) {
  .apl-pos-launch,
  .apl-pos-people,
  .apl-pos-items,
  .apl-pos-checkout,
  .apl-payment-wall > div { grid-template-columns: minmax(0, 1fr); }
  .apl-checkout-path > i,
  .apl-checkout-path > span:not(.is-current) { display: none; }
  .apl-pos-modes { overflow-x: auto; justify-content: flex-start; }
  .apl-pos-modes a { flex: 0 0 auto; }
  .apl-pos-portal { align-items: stretch; flex-direction: column; }
}
@container apl-telo (max-width: 700px) {
  .apl-ledger-pulse,
  .apl-ledger-pulse__breakdown { grid-template-columns: minmax(0, 1fr); }
  .apl-ledger-pulse__breakdown > div { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); border-right: 0; }
}

/* La agenda libera el buscador antes de que navegación y acciones se compriman. */
@container apl-telo (max-width: 1440px) {
  .apl-agenda-command {
    grid-template-areas:
      "navigation period actions"
      "search search search";
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .apl-agenda-command__navigation { grid-area: navigation; }
  .apl-agenda-command__period { grid-area: period; }
  .apl-agenda-command__search { grid-area: search; }
  .apl-agenda-command__actions { grid-area: actions; justify-self: end; }
}
@container apl-telo (max-width: 820px) {
  .apl-agenda-command {
    grid-template-areas:
      "period"
      "navigation"
      "search"
      "actions";
    grid-template-columns: minmax(0, 1fr);
  }
  .apl-agenda-command__actions {
    justify-self: stretch;
    width: 100%;
  }
  .apl-agenda-command__actions .apl-segmented {
    flex: 1 1 auto;
  }
}

/* Dashboard ejecutivo compacto; los lienzos de gráficos conservan su altura funcional. */
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-analysis-cockpit,
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-analysis-hero,
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-analysis-equation,
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-analysis-stage__chart,
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-rank-panel,
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-insight-rail > div {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-analysis-hero__value {
  font-size: var(--apl-ui-font-size-display);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-query-drawer__body {
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-signal-strip article {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-analysis-stage {
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) 220px;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-analysis-board,
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-rank-panel {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-rank-row {
  min-height: 0;
  padding-block: var(--apl-ui-space-1);
}
@media (max-width: 1100px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-query-drawer__body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-query-drawer__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-analysis-stage {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 620px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-business-dashboard-page .apl-query-drawer__body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Agenda y reservas administrativas compactas. */
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page,
[data-apl-telo]:not([data-apl-density-exception])[data-availability-manager] {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-pulse {
  gap: var(--apl-ui-space-1);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-pulse__item {
  align-items: center;
  gap: var(--apl-ui-space-1) var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-pulse__value {
  font-size: var(--apl-ui-font-size-title-lg);
  grid-column: 2;
  grid-row: 1 / span 2;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-command {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-command__period {
  min-width: 190px;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-lens__header,
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-lens__body,
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-lens__footer {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-workspace {
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) 260px;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-inspector__empty {
  min-height: 160px;
  padding: var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-inspector__header,
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-inspector__body,
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-inspector__footer {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-inspector__body,
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-facts {
  gap: var(--apl-ui-space-1);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-facts div {
  padding-top: var(--apl-ui-space-1);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-history__header,
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-history__pagination,
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-reservation-feed__day,
[data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-reservation-row {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-reservation-head {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-reservation-editor {
  gap: var(--apl-ui-space-2);
  grid-template-columns: 220px minmax(0, 1fr);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-reservation-editor__customer,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-rebook-engine > header,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-rebook-engine__selectors,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-rebook-selection,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-cancelled-snapshot,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-cancelled-snapshot__facts,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-reservation-lifecycle {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-rebook-days {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map-head,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-workbench,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-integration-pulse {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map-head {
  grid-template-columns: 220px minmax(0, 1fr);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map-head__pulse,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map-head .apl-scopebar {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map-head__pulse strong {
  font-size: var(--apl-ui-font-size-display);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-command {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map {
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-card {
  gap: var(--apl-ui-space-2);
  min-height: 0;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-summary > div {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-summary strong {
  font-size: var(--apl-ui-font-size-title-lg);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-workbench,
[data-apl-telo]:not([data-apl-density-exception])[data-availability-manager] .apl-exception-workbench {
  gap: var(--apl-ui-space-2);
  grid-template-columns: 340px minmax(0, 1fr);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-builder > header,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-list > .apl-section-heading,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-builder__step,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-builder > footer,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-card,
[data-apl-telo]:not([data-apl-density-exception])[data-availability-manager] .apl-exception-builder > header,
[data-apl-telo]:not([data-apl-density-exception])[data-availability-manager] .apl-exception-list > .apl-section-heading,
[data-apl-telo]:not([data-apl-density-exception])[data-availability-manager] .apl-exception-builder__step,
[data-apl-telo]:not([data-apl-density-exception])[data-availability-manager] .apl-exception-builder > footer,
[data-apl-telo]:not([data-apl-density-exception])[data-availability-manager] .apl-exception-card {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-integration-pulse,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-integration-pulse__state {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-credential-vault > summary,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-credential-vault__fields,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-credential-vault footer {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-calendar-inventory__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-architect {
  gap: var(--apl-ui-space-2);
  grid-template-columns: 220px minmax(0, 1fr);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-architect__rail,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-blueprint > section,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-blueprint > footer,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-operation {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-blueprint__fields,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-operations {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-blueprint h2,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-operation h2 {
  font-size: var(--apl-ui-font-size-title);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-hours-flow,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-hours-metrics,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-company-hours {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-hours-flow,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-hours-flow > article,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-hours-metrics > article,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-company-hours,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-hours-builder,
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-hours-week > article {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-hours-metrics > article {
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
}
@media (max-width: 1180px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-agenda-admin-page .apl-agenda-workspace,
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map-head {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map,
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-calendar-inventory__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-editor-page .apl-reservation-editor,
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-architect,
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-exception-workbench,
  [data-apl-telo]:not([data-apl-density-exception])[data-availability-manager] .apl-exception-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-architect__rail {
    position: static;
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map,
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-calendar-inventory__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-rule-map,
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-config-page .apl-calendar-inventory__grid,
  [data-apl-telo]:not([data-apl-density-exception]).apl-reservation-rule-page .apl-rule-blueprint__fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Operación financiera y notificaciones compactas. */
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-form-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-ledger-pulse {
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(220px, .8fr) minmax(0, 2fr);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-ledger-pulse__total,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-ledger-pulse__breakdown > div {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-ledger-pulse__total strong {
  font-size: var(--apl-ui-font-size-display);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-scopebar {
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  overflow: visible;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-scopebar__field {
  min-width: 0;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-scopebar__actions {
  justify-self: end;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-ledger__header,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-ledger-row {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-voucher-builder {
  gap: 0;
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-voucher-amount {
  padding: var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-voucher-amount input {
  font-size: var(--apl-ui-font-size-display);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-voucher-route,
[data-apl-telo]:not([data-apl-density-exception]) .apl-voucher-note,
[data-apl-telo]:not([data-apl-density-exception]) .apl-voucher-actions {
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-voucher-note textarea {
  min-height: calc(var(--apl-ui-control-height) * 2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-sale-correction__stamp,
[data-apl-telo]:not([data-apl-density-exception]) .apl-sale-correction__route,
[data-apl-telo]:not([data-apl-density-exception]) .apl-sale-correction__amount,
[data-apl-telo]:not([data-apl-density-exception]) .apl-sale-correction > footer,
[data-apl-telo]:not([data-apl-density-exception]) .apl-danger-zone {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-sale-correction__amount input {
  font-size: var(--apl-ui-font-size-title-lg);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-finance-banner,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-analysis-cockpit,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-analysis-equation,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-balance-card,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-insight-rail > div {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-finance-banner > div > strong,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-analysis-hero__value {
  font-size: var(--apl-ui-font-size-display);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-money-stream__entry {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-balance-layout {
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) 220px;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-balance-cards {
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-balance-card {
  min-width: 0;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-balance-card h2 {
  font-size: var(--apl-ui-font-size-title);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-signal-strip article {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page > .apl-command-hero {
  box-shadow: none;
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-command-hero__top,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-command-hero__actions {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-context-strip {
  margin-top: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-1);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-querybar {
  display: grid !important;
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
  overflow: visible;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-querybar__field,
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-querybar__actions {
  min-width: 0;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-querybar__actions {
  padding-left: 0;
  position: static;
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-settlement-detail .apl-context-strip {
  margin-bottom: var(--apl-ui-space-2);
  margin-top: 0;
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-settlement-detail .apl-metric-grid {
  gap: var(--apl-ui-space-2);
  margin-bottom: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-settlement-detail .apl-metric {
  min-height: 0;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-settlement-detail .apl-card__body,
[data-apl-telo]:not([data-apl-density-exception]) .apl-settlement-detail .apl-card__header,
[data-apl-telo]:not([data-apl-density-exception]) .apl-settlement-detail .apl-card__footer,
[data-apl-telo]:not([data-apl-density-exception]) .apl-settlement__payment {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-settlement__timeline {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-settlement__danger-zone {
  margin-top: var(--apl-ui-space-2);
  padding-top: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-summary {
  display: grid;
  gap: var(--apl-ui-space-1);
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-summary article {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  min-width: 0;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-summary span {
  color: var(--apl-ui-color-text-subtle);
  font-size: var(--apl-ui-font-size-caption);
  min-width: 0;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-summary strong {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-title);
  flex: 0 0 auto;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-filters {
  align-items: end;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-filters label {
  color: var(--apl-ui-color-text-muted);
  display: grid;
  font-size: var(--apl-ui-font-size-caption);
  gap: var(--apl-ui-space-1);
  margin: 0;
  min-width: 0;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-actions {
  align-items: center;
  display: flex;
  gap: var(--apl-ui-space-1);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-table-wrap {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  overflow-x: auto;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-table {
  border-collapse: collapse;
  margin: 0;
  min-width: var(--apl-ui-table-wide-min-width);
  width: 100%;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-table th {
  background: var(--apl-ui-color-surface-subtle);
  color: var(--apl-ui-color-text-muted);
  font-size: var(--apl-ui-font-size-caption);
  letter-spacing: .04em;
  padding: var(--apl-ui-space-2);
  text-align: left;
  text-transform: uppercase;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-table td {
  border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  font-size: var(--apl-ui-font-size-detail);
  padding: var(--apl-ui-space-2);
  vertical-align: middle;
  white-space: nowrap;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-table td small {
  color: var(--apl-ui-color-text-subtle);
  display: block;
  max-width: var(--apl-ui-card-min-width);
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-preview {
  max-width: var(--apl-ui-card-min-width);
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-empty {
  color: var(--apl-ui-color-text-muted);
  padding: var(--apl-ui-space-4);
  text-align: center;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-note {
  color: var(--apl-ui-color-text-subtle);
  font-size: var(--apl-ui-font-size-caption);
  margin: 0 var(--apl-ui-space-1);
}
@media (max-width: 1100px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-balance-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-querybar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-ledger-pulse,
  [data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-balance-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 680px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-scopebar,
  [data-apl-telo]:not([data-apl-density-exception]).apl-finance-analysis-page .apl-balance-cards,
  [data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-querybar,
  [data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-filters {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-finance-ledger-page .apl-scopebar__actions,
  [data-apl-telo]:not([data-apl-density-exception]).apl-finance-settlement-page .apl-querybar__actions {
    justify-self: stretch;
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-notifications-page .apl-notif-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container apl-telo (max-width: 560px) {
  .apl-agenda-command__navigation {
    align-items: center;
    display: flex;
  }
  .apl-agenda-date {
    flex: 1 1 100%;
    width: 100%;
  }
  body.janox-template [data-apl-telo] .apl-agenda-date input[type="date"],
  [data-apl-telo] .apl-agenda-date input[type="date"] {
    flex: 1 1 auto;
    width: auto;
  }
  .apl-agenda-command__actions {
    align-items: stretch;
    flex-direction: column;
  }
  .apl-agenda-command__actions .apl-segmented,
  .apl-agenda-command__actions > .apl-btn {
    width: 100%;
  }
}


/* Componentes base también responden al ancho útil de TELOAGENDA. */
@container apl-telo (max-width: 767px) {
  .apl-page__hero {
    align-items: stretch;
    flex-direction: column;
    padding: var(--apl-ui-space-4);
  }
  .apl-page__title {
    font-size: var(--apl-ui-font-size-display);
  }
  .apl-page__actions {
    justify-content: flex-start;
    width: 100%;
  }
  .apl-grid,
  .apl-grid--2,
  .apl-grid--3,
  .apl-grid--4,
  .apl-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .apl-col-3,
  .apl-col-4,
  .apl-col-6,
  .apl-col-8,
  .apl-col-12 {
    grid-column: auto;
  }
}
@container apl-telo (max-width: 520px) {
  .apl-page__actions .apl-btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* Controles TELOAGENDA 2026: componentes propios, sin HTML ni estilos heredados. */
[data-apl-telo] .apl-card-mini {
  align-content: start;
  display: grid;
  gap: var(--apl-ui-space-1);
  min-height: var(--apl-ui-kpi-min-height);
}
[data-apl-telo] .apl-card-mini__meta {
  display: block;
  line-height: var(--apl-ui-line-normal);
  margin: 0;
  order: 1;
}
[data-apl-telo] .apl-card-mini__title {
  display: block;
  font-size: var(--apl-ui-font-size-title-lg);
  line-height: var(--apl-ui-line-tight);
  margin: 0;
  max-width: 100%;
  order: 2;
  overflow-wrap: anywhere;
}

[data-apl-telo] .apl-catalog-command {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  overflow: visible;
}
[data-apl-telo] .apl-catalog-command__search {
  flex: 2 1 var(--apl-ui-card-min-width);
}
[data-apl-telo] .apl-catalog-command__field {
  flex: 1 1 var(--apl-ui-choice-min-width);
}
[data-apl-telo] .apl-catalog-command__summary {
  flex: 1 1 var(--apl-ui-card-min-width);
  min-width: 0;
}
[data-apl-telo] .apl-catalog-command__actions {
  flex: 0 0 auto;
  margin-left: auto;
}
[data-apl-telo] .apl-scopebar {
  flex-wrap: wrap;
  overflow: visible;
}
[data-apl-telo] .apl-scopebar__search {
  flex: 2 1 var(--apl-ui-card-min-width);
}
[data-apl-telo] .apl-scopebar__field {
  flex: 1 1 var(--apl-ui-choice-min-width);
}

body.janox-template [data-apl-telo] .apl-catalog-command input.form-control:not([type="search"]),
body.janox-template [data-apl-telo] .apl-scopebar input.form-control:not([type="search"]),
body.janox-template [data-apl-telo] .apl-query-drawer__body input.form-control:not([type="search"]),
body.janox-template [data-apl-telo] .apl-agenda-lens__body input.form-control:not([type="search"]) {
  background: var(--apl-ui-color-surface-subtle) !important;
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border) !important;
  border-radius: var(--apl-ui-radius-md) !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: var(--apl-ui-color-text-body) !important;
  font: var(--apl-ui-font-weight-regular) var(--apl-ui-font-size-control)/var(--apl-ui-line-normal) var(--apl-ui-font-family) !important;
  height: var(--apl-ui-control-height) !important;
  margin: 0 !important;
  min-height: var(--apl-ui-control-height) !important;
  padding: 0 var(--apl-ui-space-3) !important;
  width: 100% !important;
}
body.janox-template [data-apl-telo] .apl-catalog-command input.form-control:not([type="search"]):focus,
body.janox-template [data-apl-telo] .apl-scopebar input.form-control:not([type="search"]):focus,
body.janox-template [data-apl-telo] .apl-query-drawer__body input.form-control:not([type="search"]):focus,
body.janox-template [data-apl-telo] .apl-agenda-lens__body input.form-control:not([type="search"]):focus {
  background: var(--apl-ui-color-surface) !important;
  border-color: var(--apl-ui-color-brand-border) !important;
  box-shadow: var(--apl-ui-shadow-focus) !important;
  outline: 0 !important;
}

@media (max-width: 650px) {
  [data-apl-telo] .apl-catalog-command__search,
  [data-apl-telo] .apl-catalog-command__field,
  [data-apl-telo] .apl-catalog-command__summary,
  [data-apl-telo] .apl-catalog-command__actions,
  [data-apl-telo] .apl-scopebar__search,
  [data-apl-telo] .apl-scopebar__field,
  [data-apl-telo] .apl-scopebar__actions {
    flex-basis: 100%;
    width: 100%;
  }
  [data-apl-telo] .apl-catalog-command__actions,
  [data-apl-telo] .apl-scopebar__actions {
    margin-left: 0;
  }
  [data-apl-telo] .apl-catalog-command__actions > *,
  [data-apl-telo] .apl-scopebar__actions > * {
    flex: 1 1 0;
  }
}


/* Sistema de campos TELOAGENDA: controles propios y sin dependencias de apariencia heredada. */
body.janox-template [data-apl-telo] .apl-control,
[data-apl-telo] .apl-control {
  appearance: none;
  background: var(--apl-ui-color-surface-subtle) !important;
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border) !important;
  border-radius: var(--apl-ui-radius-md) !important;
  box-shadow: none !important;
  color: var(--apl-ui-color-text-body) !important;
  display: block;
  font: var(--apl-ui-font-weight-regular) var(--apl-ui-font-size-control)/var(--apl-ui-line-normal) var(--apl-ui-font-family) !important;
  height: var(--apl-ui-control-height) !important;
  margin: 0;
  min-height: var(--apl-ui-control-height) !important;
  outline: 0 !important;
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3) !important;
  width: 100% !important;
}
body.janox-template [data-apl-telo] .apl-control:hover,
[data-apl-telo] .apl-control:hover {
  background: var(--apl-ui-color-surface) !important;
  border-color: var(--apl-ui-color-border-strong) !important;
}
body.janox-template [data-apl-telo] .apl-control:focus,
[data-apl-telo] .apl-control:focus {
  background: var(--apl-ui-color-surface) !important;
  border-color: var(--apl-ui-color-brand-border) !important;
  box-shadow: var(--apl-ui-shadow-focus) !important;
}
body.janox-template [data-apl-telo] textarea.apl-control,
[data-apl-telo] textarea.apl-control {
  height: auto !important;
  min-height: calc(var(--apl-ui-control-height) * 3) !important;
  resize: vertical;
}
body.janox-template [data-apl-telo] select.apl-control[multiple],
[data-apl-telo] select.apl-control[multiple] {
  height: auto !important;
  min-height: calc(var(--apl-ui-control-height) * 3) !important;
}
body.janox-template [data-apl-telo] .apl-control[disabled],
body.janox-template [data-apl-telo] .apl-control[readonly],
[data-apl-telo] .apl-control[disabled],
[data-apl-telo] .apl-control[readonly] {
  background: var(--apl-ui-color-surface-muted) !important;
  border-color: var(--apl-ui-color-border-muted) !important;
  box-shadow: none !important;
  color: var(--apl-ui-color-text-subtle) !important;
  cursor: not-allowed;
  opacity: var(--apl-ui-opacity-disabled);
}
body.janox-template [data-apl-telo] input.apl-control[type="date"],
body.janox-template [data-apl-telo] input.apl-control[type="time"],
body.janox-template [data-apl-telo] input.apl-control[type="datetime-local"],
body.janox-template [data-apl-telo] input.apl-control[type="month"],
[data-apl-telo] input.apl-control[type="date"],
[data-apl-telo] input.apl-control[type="time"],
[data-apl-telo] input.apl-control[type="datetime-local"],
[data-apl-telo] input.apl-control[type="month"] {
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3) !important;
}
body.janox-template [data-apl-telo] input.apl-control[type="date"]::-webkit-calendar-picker-indicator,
body.janox-template [data-apl-telo] input.apl-control[type="time"]::-webkit-calendar-picker-indicator,
body.janox-template [data-apl-telo] input.apl-control[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.janox-template [data-apl-telo] input.apl-control[type="month"]::-webkit-calendar-picker-indicator,
[data-apl-telo] input.apl-control[type="date"]::-webkit-calendar-picker-indicator,
[data-apl-telo] input.apl-control[type="time"]::-webkit-calendar-picker-indicator,
[data-apl-telo] input.apl-control[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-apl-telo] input.apl-control[type="month"]::-webkit-calendar-picker-indicator {
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  height: var(--apl-ui-font-size-control) !important;
  margin: 0 !important;
  opacity: 1;
  padding: 0 !important;
  width: var(--apl-ui-font-size-control) !important;
}

[data-apl-telo] .apl-native-select {
  display: block;
  min-width: 0;
  position: relative;
  width: 100%;
}
[data-apl-telo] .apl-native-select > .apl-control--select {
  padding-right: var(--apl-ui-control-height) !important;
}
[data-apl-telo] .apl-native-select > i {
  color: var(--apl-ui-color-text-subtle);
  pointer-events: none;
  position: absolute;
  right: var(--apl-ui-space-3);
  top: 50%;
  transform: translateY(-50%);
}

body.janox-template [data-apl-telo] .apl-file-control,
[data-apl-telo] .apl-file-control {
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) dashed var(--apl-ui-color-border-strong);
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-text-muted);
  display: block;
  font: var(--apl-ui-font-weight-regular) var(--apl-ui-font-size-control)/var(--apl-ui-line-normal) var(--apl-ui-font-family);
  max-width: 100%;
  padding: var(--apl-ui-space-2);
  width: 100%;
}
[data-apl-telo] .apl-file-control::file-selector-button {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-sm);
  color: var(--apl-ui-color-text-strong);
  font: var(--apl-ui-font-weight-semibold) var(--apl-ui-font-size-button)/var(--apl-ui-line-normal) var(--apl-ui-font-family);
  margin-right: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}

body.janox-template [data-apl-telo] .apl-choice-control,
[data-apl-telo] .apl-choice-control {
  appearance: none;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-strong);
  box-shadow: none;
  display: inline-block;
  flex: 0 0 var(--apl-ui-font-size-label-lg);
  height: var(--apl-ui-font-size-label-lg);
  margin: 0;
  min-height: 0;
  padding: 0;
  vertical-align: middle;
  width: var(--apl-ui-font-size-label-lg);
}
body.janox-template [data-apl-telo] .apl-choice-control[type="checkbox"],
[data-apl-telo] .apl-choice-control[type="checkbox"] {
  border-radius: var(--apl-ui-radius-sm);
}
body.janox-template [data-apl-telo] .apl-choice-control[type="radio"],
[data-apl-telo] .apl-choice-control[type="radio"] {
  border-radius: var(--apl-ui-radius-pill);
}
body.janox-template [data-apl-telo] .apl-choice-control:checked,
[data-apl-telo] .apl-choice-control:checked {
  background: var(--apl-ui-color-brand);
  border-color: var(--apl-ui-color-brand-dark);
}
body.janox-template [data-apl-telo] .apl-choice-control[type="radio"]:checked,
[data-apl-telo] .apl-choice-control[type="radio"]:checked {
  box-shadow: inset 0 0 0 var(--apl-ui-space-1) var(--apl-ui-color-surface);
}
body.janox-template [data-apl-telo] .apl-choice-control:focus,
[data-apl-telo] .apl-choice-control:focus {
  box-shadow: var(--apl-ui-shadow-focus);
  outline: 0;
}

[data-apl-telo] .apl-selectbox {
  display: block;
  min-width: 0;
  position: relative;
  width: 100%;
}
body.janox-template [data-apl-telo] select.apl-selectbox__source,
[data-apl-telo] select.apl-selectbox__source {
  border: 0 !important;
  bottom: 0;
  height: var(--apl-ui-border-width) !important;
  left: 0;
  margin: 0 !important;
  min-height: 0 !important;
  opacity: 0;
  overflow: hidden;
  padding: 0 !important;
  pointer-events: none;
  position: absolute !important;
  width: var(--apl-ui-border-width) !important;
}
body.janox-template [data-apl-telo] .apl-selectbox__trigger,
[data-apl-telo] .apl-selectbox__trigger {
  align-items: center;
  appearance: none;
  background: var(--apl-ui-color-surface-subtle) !important;
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border) !important;
  border-radius: var(--apl-ui-radius-md) !important;
  box-shadow: none !important;
  color: var(--apl-ui-color-text-body) !important;
  display: grid;
  font: var(--apl-ui-font-weight-regular) var(--apl-ui-font-size-control)/var(--apl-ui-line-normal) var(--apl-ui-font-family) !important;
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
  height: var(--apl-ui-control-height) !important;
  margin: 0;
  min-height: var(--apl-ui-control-height) !important;
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3) !important;
  text-align: left;
  width: 100%;
}
[data-apl-telo] .apl-selectbox__trigger:hover {
  background: var(--apl-ui-color-surface) !important;
  border-color: var(--apl-ui-color-border-strong) !important;
}
[data-apl-telo] .apl-selectbox__trigger:focus,
[data-apl-telo] .apl-selectbox.is-open .apl-selectbox__trigger {
  background: var(--apl-ui-color-surface) !important;
  border-color: var(--apl-ui-color-brand-border) !important;
  box-shadow: var(--apl-ui-shadow-focus) !important;
  outline: 0;
}
[data-apl-telo] .apl-selectbox__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-apl-telo] .apl-selectbox.is-empty .apl-selectbox__value {
  color: var(--apl-ui-color-text-subtle);
}
[data-apl-telo] .apl-selectbox__arrow {
  color: var(--apl-ui-color-text-subtle);
  transition: transform var(--apl-ui-motion-fast);
}
[data-apl-telo] .apl-selectbox.is-open .apl-selectbox__arrow {
  transform: rotate(180deg);
}
[data-apl-telo] .apl-selectbox.is-disabled {
  opacity: var(--apl-ui-opacity-disabled);
}
[data-apl-telo] .apl-selectbox.is-invalid .apl-selectbox__trigger {
  border-color: var(--apl-ui-color-danger-border) !important;
  box-shadow: 0 0 0 var(--apl-ui-space-1) var(--apl-ui-color-danger-soft) !important;
}

.apl-selectbox__panel {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-strong);
  border-radius: var(--apl-ui-radius-lg);
  box-shadow: var(--apl-ui-shadow-lg);
  color: var(--apl-ui-color-text-body);
  display: grid;
  font-family: var(--apl-ui-font-family);
  gap: var(--apl-ui-space-2);
  max-width: calc(100% - var(--apl-ui-space-4));
  overflow: hidden;
  padding: var(--apl-ui-space-2);
  position: fixed;
  transform: none;
  z-index: var(--apl-ui-z-toast);
}
.apl-selectbox__panel[hidden] {
  display: none !important;
}
.apl-selectbox__panel.is-above {
  transform: none;
}
.apl-selectbox__options {
  display: grid;
  gap: var(--apl-ui-space-1);
  max-height: var(--apl-ui-select-menu-max-height);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.apl-selectbox__option {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-text-body);
  display: grid;
  font: var(--apl-ui-font-weight-regular) var(--apl-ui-font-size-body)/var(--apl-ui-line-normal) var(--apl-ui-font-family);
  gap: var(--apl-ui-space-2);
  grid-template-columns: var(--apl-ui-control-height-sm) minmax(0, 1fr);
  min-height: var(--apl-ui-control-height);
  padding: var(--apl-ui-space-2);
  text-align: left;
  width: 100%;
}
.apl-selectbox__option:hover,
.apl-selectbox__option:focus {
  background: var(--apl-ui-color-surface-muted);
  outline: 0;
}
.apl-selectbox__option.is-selected {
  background: var(--apl-ui-color-brand-surface);
  color: var(--apl-ui-color-brand-dark);
}
.apl-selectbox__option > i {
  color: transparent;
  text-align: center;
}
.apl-selectbox__option.is-selected > i {
  color: var(--apl-ui-color-brand-dark);
}
.apl-selectbox__option-copy {
  display: grid;
  min-width: 0;
}
.apl-selectbox__option-copy strong {
  color: inherit;
  font-weight: var(--apl-ui-font-weight-semibold);
  overflow-wrap: anywhere;
}
.apl-selectbox__option-copy small {
  color: var(--apl-ui-color-text-subtle);
  font-size: var(--apl-ui-font-size-caption);
}
.apl-selectbox__option[disabled] {
  cursor: not-allowed;
  opacity: var(--apl-ui-opacity-disabled);
}
.apl-selectbox__empty {
  color: var(--apl-ui-color-text-subtle);
  margin: 0;
  padding: var(--apl-ui-space-3);
  text-align: center;
}
.apl-selectbox__footer {
  align-items: center;
  border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  padding-top: var(--apl-ui-space-2);
}
.apl-selectbox__clear,
.apl-selectbox__done {
  appearance: none;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-sm);
  color: var(--apl-ui-color-text-body);
  font: var(--apl-ui-font-weight-semibold) var(--apl-ui-font-size-button)/var(--apl-ui-line-normal) var(--apl-ui-font-family);
  min-height: var(--apl-ui-control-height-sm);
  padding: var(--apl-ui-space-1) var(--apl-ui-space-3);
}
.apl-selectbox__done {
  background: var(--apl-ui-color-brand);
  border-color: var(--apl-ui-color-brand-dark);
  color: var(--apl-ui-color-on-solid);
}
.apl-selectbox__clear[disabled] {
  opacity: var(--apl-ui-opacity-disabled);
}

@container apl-telo (max-width: 560px) {
  [data-apl-telo] .apl-control,
  [data-apl-telo] .apl-selectbox__trigger {
    min-width: 0;
  }
}



/* Buscador TELOAGENDA: componente único para vistas y selectores. */
body.janox-template [data-apl-telo] .apl-finder,
[data-apl-telo] .apl-finder,
body.janox-template .apl-selectbox__panel .apl-finder,
.apl-selectbox__panel .apl-finder {
  align-items: center !important;
  background: var(--apl-ui-color-surface-subtle) !important;
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border) !important;
  border-radius: var(--apl-ui-radius-md) !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: var(--apl-ui-color-text-body) !important;
  display: flex !important;
  gap: var(--apl-ui-space-2) !important;
  height: var(--apl-ui-control-height) !important;
  line-height: var(--apl-ui-line-normal) !important;
  margin: 0 !important;
  max-width: 100% !important;
  min-height: var(--apl-ui-control-height) !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 0 var(--apl-ui-space-2) !important;
  position: relative !important;
  width: 100% !important;
}
body.janox-template [data-apl-telo] .apl-finder:focus-within,
[data-apl-telo] .apl-finder:focus-within,
body.janox-template .apl-selectbox__panel .apl-finder:focus-within,
.apl-selectbox__panel .apl-finder:focus-within {
  background: var(--apl-ui-color-surface) !important;
  border-color: var(--apl-ui-color-brand-border) !important;
  box-shadow: var(--apl-ui-shadow-focus) !important;
}
body.janox-template [data-apl-telo] .apl-finder > .fa-search,
[data-apl-telo] .apl-finder > .fa-search,
body.janox-template .apl-selectbox__panel .apl-finder > .fa-search,
.apl-selectbox__panel .apl-finder > .fa-search {
  align-items: center !important;
  align-self: stretch !important;
  color: var(--apl-ui-color-text-subtle) !important;
  display: inline-flex !important;
  flex: 0 0 var(--apl-ui-font-size-label-lg) !important;
  float: none !important;
  height: auto !important;
  justify-content: center !important;
  left: auto !important;
  line-height: var(--apl-ui-line-normal) !important;
  margin: 0 !important;
  pointer-events: none !important;
  position: static !important;
  top: auto !important;
  transform: none !important;
  width: var(--apl-ui-font-size-label-lg) !important;
  z-index: auto !important;
}
body.janox-template [data-apl-telo] .apl-finder > input[type="search"],
[data-apl-telo] .apl-finder > input[type="search"],
body.janox-template .apl-selectbox__panel .apl-finder > input[type="search"],
.apl-selectbox__panel .apl-finder > input[type="search"] {
  align-self: stretch !important;
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  bottom: auto !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: var(--apl-ui-color-text-body) !important;
  display: block !important;
  flex: 1 1 auto !important;
  float: none !important;
  font: var(--apl-ui-font-weight-regular) var(--apl-ui-font-size-control)/var(--apl-ui-line-normal) var(--apl-ui-font-family) !important;
  height: auto !important;
  left: auto !important;
  margin: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  min-width: 0 !important;
  outline: 0 !important;
  padding: 0 !important;
  position: static !important;
  right: auto !important;
  text-indent: 0 !important;
  top: auto !important;
  transform: none !important;
  width: auto !important;
}
body.janox-template [data-apl-telo] .apl-finder > input[type="search"]::placeholder,
[data-apl-telo] .apl-finder > input[type="search"]::placeholder,
body.janox-template .apl-selectbox__panel .apl-finder > input[type="search"]::placeholder,
.apl-selectbox__panel .apl-finder > input[type="search"]::placeholder {
  color: var(--apl-ui-color-text-subtle) !important;
  font: inherit !important;
  opacity: 1 !important;
}
.apl-finder > input[type="search"]::-webkit-search-cancel-button,
.apl-finder > input[type="search"]::-webkit-search-decoration {
  appearance: none !important;
}
body.janox-template [data-apl-telo] .apl-finder > button,
[data-apl-telo] .apl-finder > button,
body.janox-template .apl-selectbox__panel .apl-finder > button,
.apl-selectbox__panel .apl-finder > button {
  align-items: center !important;
  align-self: center !important;
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--apl-ui-radius-sm) !important;
  bottom: auto !important;
  color: var(--apl-ui-color-text-subtle) !important;
  display: inline-flex !important;
  flex: 0 0 var(--apl-ui-control-height-sm) !important;
  float: none !important;
  height: var(--apl-ui-control-height-sm) !important;
  justify-content: center !important;
  left: auto !important;
  margin: 0 !important;
  min-height: var(--apl-ui-control-height-sm) !important;
  padding: 0 !important;
  position: static !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  width: var(--apl-ui-control-height-sm) !important;
  z-index: auto !important;
}
.apl-finder > button[hidden] {
  display: none !important;
}
.apl-finder > button:hover,
.apl-finder > button:focus {
  background: var(--apl-ui-color-surface-muted) !important;
  color: var(--apl-ui-color-text-strong) !important;
  outline: 0 !important;
}
.apl-finder > .sr-only {
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  height: var(--apl-ui-border-width) !important;
  margin: calc(var(--apl-ui-border-width) * -1) !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: var(--apl-ui-border-width) !important;
}


/* Disponibilidad publica reconstruida: motor por rangos e interaccion inmediata. */
:root {
  --apl-ui-availability-people-width: var(--apl-ui-card-min-width);
  --apl-ui-availability-date-width: var(--apl-ui-agenda-time-width);
  --apl-ui-availability-slot-width: calc(var(--apl-ui-control-height) * 2);
}
.apl-availability {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  min-width: 0;
  overflow: hidden;
}
.apl-availability__header {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-4);
}
.apl-availability__header > div { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-availability__eyebrow,
.apl-availability__header p,
.apl-availability__people header > span,
.apl-availability__people header p,
.apl-availability__toolbar > div > span,
.apl-availability-hours > header span,
.apl-availability-hours > header small,
.apl-availability-assignment > div:first-child > span,
.apl-availability-checkout span,
.apl-availability-checkout small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-availability__header h2,
.apl-availability__people h3,
.apl-availability__toolbar h3,
.apl-availability-hours h3 { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-availability__header h2 { font-size: var(--apl-ui-font-size-title-lg); }
.apl-availability__header p,
.apl-availability__people header p { margin: 0; }
.apl-availability__status {
  align-items: center;
  background: var(--apl-ui-color-success-soft);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-success-border);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-success-dark);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: var(--apl-ui-font-size-caption);
  gap: var(--apl-ui-space-2);
  min-height: var(--apl-ui-control-height-sm);
  padding-inline: var(--apl-ui-space-3);
}
.apl-availability__status i { font-size: var(--apl-ui-font-size-caption); }
.apl-availability__status.is-loading {
  background: var(--apl-ui-color-info-soft);
  border-color: var(--apl-ui-color-border-soft);
  color: var(--apl-ui-color-info-dark);
}
.apl-availability__status.is-loading i { animation: apl-availability-pulse var(--apl-ui-motion-fast) infinite alternate; }
.apl-availability__layout { display: grid; grid-template-columns: var(--apl-ui-availability-people-width) minmax(0, 1fr); min-width: 0; }
.apl-availability__people {
  border-right: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  min-width: 0;
  padding-block: var(--apl-ui-space-3);
}
.apl-availability__people > header { display: grid; gap: var(--apl-ui-space-1); padding: 0 var(--apl-ui-space-3) var(--apl-ui-space-3); }
.apl-availability__people h3,
.apl-availability__toolbar h3,
.apl-availability-hours h3 { font-size: var(--apl-ui-font-size-title); }
.apl-availability__people-list { display: grid; gap: var(--apl-ui-space-1); padding-inline: var(--apl-ui-space-2); }
.apl-availability-person {
  align-items: center;
  background: transparent;
  border: var(--apl-ui-border-width) solid transparent;
  border-radius: var(--apl-ui-radius-lg);
  color: var(--apl-ui-color-text-body);
  display: flex;
  gap: var(--apl-ui-space-2);
  min-height: var(--apl-ui-control-height-lg);
  padding: var(--apl-ui-space-2);
  text-align: left;
  transition: background var(--apl-ui-motion-fast), border-color var(--apl-ui-motion-fast), color var(--apl-ui-motion-fast);
  width: 100%;
}
.apl-availability-person > span:last-child { display: grid; min-width: 0; }
.apl-availability-person strong { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-availability-person small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-availability-person:hover,
.apl-availability-person:focus,
.apl-availability-person.is-active {
  background: var(--apl-ui-color-brand-surface);
  border-color: var(--apl-ui-color-brand-border);
  color: var(--apl-ui-color-brand-dark);
}
.apl-availability__people > p { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); margin: var(--apl-ui-space-3) 0 0; padding-inline: var(--apl-ui-space-3); }
.apl-availability__agenda { min-width: 0; }
.apl-availability__toolbar {
  align-items: center;
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-3);
}
.apl-availability__toolbar > div { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-availability__toolbar nav { display: flex; flex: 0 0 auto; gap: var(--apl-ui-space-1); }
.apl-availability-dates {
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: grid;
  gap: var(--apl-ui-space-1);
  grid-auto-columns: minmax(var(--apl-ui-availability-date-width), auto);
  grid-auto-flow: column;
  overflow-x: auto;
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.apl-availability-date {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  color: var(--apl-ui-color-text-body);
  display: grid;
  gap: var(--apl-ui-space-1);
  justify-items: center;
  min-height: calc(var(--apl-ui-control-height-lg) + var(--apl-ui-space-4));
  padding: var(--apl-ui-space-2);
  scroll-snap-align: center;
  transition: background var(--apl-ui-motion-fast), border-color var(--apl-ui-motion-fast), color var(--apl-ui-motion-fast);
}
.apl-availability-date span,
.apl-availability-date small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); white-space: nowrap; }
.apl-availability-date strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); line-height: var(--apl-ui-line-tight); }
.apl-availability-date:hover,
.apl-availability-date:focus,
.apl-availability-date.is-active {
  background: var(--apl-ui-color-brand-surface);
  border-color: var(--apl-ui-color-brand-border);
  color: var(--apl-ui-color-brand-dark);
}
.apl-availability-date.is-active { box-shadow: var(--apl-ui-shadow-sm); }
.apl-availability-date.is-empty { opacity: var(--apl-ui-opacity-muted); }
.apl-availability-hours > header {
  align-items: center;
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-3) var(--apl-ui-space-4) var(--apl-ui-space-2);
}
.apl-availability-hours > header > div { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-availability-hours__body { display: grid; gap: var(--apl-ui-space-4); padding: var(--apl-ui-space-2) var(--apl-ui-space-4) var(--apl-ui-space-4); }
.apl-availability-band { display: grid; gap: var(--apl-ui-space-2); }
.apl-availability-band h4 {
  align-items: center;
  color: var(--apl-ui-color-text-muted);
  display: flex;
  font-size: var(--apl-ui-font-size-detail);
  font-weight: var(--apl-ui-font-weight-semibold);
  gap: var(--apl-ui-space-2);
  margin: 0;
}
.apl-availability-slot-grid { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(auto-fit, minmax(var(--apl-ui-availability-slot-width), 1fr)); }
.apl-availability-slot {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-lg);
  color: var(--apl-ui-color-text-body);
  display: grid;
  gap: var(--apl-ui-space-1);
  justify-items: start;
  min-height: var(--apl-ui-control-height-lg);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  text-align: left;
  transition: background var(--apl-ui-motion-fast), border-color var(--apl-ui-motion-fast), color var(--apl-ui-motion-fast), transform var(--apl-ui-motion-fast);
}
.apl-availability-slot strong { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-bold); white-space: nowrap; }
.apl-availability-slot small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-availability-slot:hover,
.apl-availability-slot:focus { border-color: var(--apl-ui-color-brand-border); transform: translateY(calc(var(--apl-ui-border-width) * -1)); }
.apl-availability-slot.is-active { background: var(--apl-ui-color-brand); border-color: var(--apl-ui-color-brand-dark); color: var(--apl-ui-color-on-solid); box-shadow: var(--apl-ui-shadow-sm); }
.apl-availability-slot.is-active strong,
.apl-availability-slot.is-active small { color: inherit; }
.apl-availability-empty {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) dashed var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-3);
  margin: var(--apl-ui-space-2) var(--apl-ui-space-4) var(--apl-ui-space-4);
  padding: var(--apl-ui-space-4);
}
.apl-availability-empty__icon {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-text-subtle);
  display: inline-flex;
  flex: 0 0 var(--apl-ui-avatar-md);
  height: var(--apl-ui-avatar-md);
  justify-content: center;
}
.apl-availability-empty strong { color: var(--apl-ui-color-text-strong); }
.apl-availability-empty p { color: var(--apl-ui-color-text-muted); margin: var(--apl-ui-space-1) 0 0; }
.apl-availability-skeleton { display: grid; gap: var(--apl-ui-space-4); padding: var(--apl-ui-space-3); }
.apl-availability-skeleton__dates,
.apl-availability-skeleton__slots { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(5, minmax(0, 1fr)); }
.apl-availability-skeleton__dates i,
.apl-availability-skeleton__slots i {
  animation: apl-availability-pulse var(--apl-ui-motion-fast) infinite alternate;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: block;
  min-height: var(--apl-ui-control-height-lg);
}
.apl-availability-skeleton__dates i { min-height: calc(var(--apl-ui-control-height-lg) + var(--apl-ui-space-4)); }
.apl-availability-skeleton__slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-availability-assignment {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-xl);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-3);
}
.apl-availability-assignment > div:first-child { display: grid; flex: 0 0 auto; }
.apl-availability-assignment > div:first-child strong { color: var(--apl-ui-color-brand-dark); }
.apl-availability-assignment__options { display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-2); justify-content: flex-end; }
.apl-availability-assignee {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-text-body);
  display: inline-flex;
  gap: var(--apl-ui-space-2);
  min-height: var(--apl-ui-control-height);
  padding: var(--apl-ui-space-1) var(--apl-ui-space-3) var(--apl-ui-space-1) var(--apl-ui-space-1);
}
.apl-availability-assignee.is-active { background: var(--apl-ui-color-brand); border-color: var(--apl-ui-color-brand-dark); color: var(--apl-ui-color-on-solid); }
.apl-availability-checkout {
  align-items: center;
  background: var(--apl-ui-color-inverse);
  border-radius: var(--apl-ui-radius-xl);
  bottom: var(--apl-ui-space-2);
  color: var(--apl-ui-color-inverse-text);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-3);
  position: sticky;
  z-index: var(--apl-ui-z-sticky);
}
.apl-availability-checkout > div { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-availability-checkout strong { color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-availability-checkout span,
.apl-availability-checkout small { color: var(--apl-ui-color-inverse-text-muted); }
.apl-availability-checkout .apl-btn { flex: 0 0 auto; }
#apl-disponibilidad-reintentar { margin: 0 var(--apl-ui-space-4) var(--apl-ui-space-4); }
@keyframes apl-availability-pulse { from { opacity: var(--apl-ui-opacity-disabled); } to { opacity: var(--apl-ui-opacity-muted); } }

@media (max-width: 820px) {
  .apl-availability__layout { grid-template-columns: minmax(0, 1fr); }
  .apl-availability__people { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); border-right: 0; }
  .apl-availability__people-list { display: flex; overflow-x: auto; }
  .apl-availability-person { flex: 0 0 auto; width: auto; }
  .apl-availability__people > p { margin-top: var(--apl-ui-space-2); }
}
@media (max-width: 620px) {
  .apl-availability__header,
  .apl-availability__toolbar,
  .apl-availability-hours > header,
  .apl-availability-assignment,
  .apl-availability-checkout { align-items: stretch; flex-direction: column; }
  .apl-availability__status { align-self: flex-start; }
  .apl-availability__toolbar nav { align-self: flex-end; }
  .apl-availability-hours__body { padding-inline: var(--apl-ui-space-3); }
  .apl-availability-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-availability-assignment__options { justify-content: flex-start; }
  .apl-availability-checkout strong { white-space: normal; }
}
@container apl-telo (max-width: 820px) {
  .apl-availability__layout { grid-template-columns: minmax(0, 1fr); }
  .apl-availability__people { border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); border-right: 0; }
  .apl-availability__people-list { display: flex; overflow-x: auto; }
  .apl-availability-person { flex: 0 0 auto; width: auto; }
}
@container apl-telo (max-width: 620px) {
  .apl-availability__header,
  .apl-availability__toolbar,
  .apl-availability-hours > header,
  .apl-availability-assignment,
  .apl-availability-checkout { align-items: stretch; flex-direction: column; }
  .apl-availability__status { align-self: flex-start; }
  .apl-availability__toolbar nav { align-self: flex-end; }
  .apl-availability-hours__body { padding-inline: var(--apl-ui-space-3); }
  .apl-availability-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-availability-assignment__options { justify-content: flex-start; }
  .apl-availability-checkout strong { white-space: normal; }
}


/* Caja rapida reconstruida para tablet y operacion tactil. */
.apl-touch-pos {
  --apl-ui-touch-pos-target: calc(var(--apl-ui-control-height-lg) + var(--apl-ui-space-3));
  --apl-ui-touch-pos-card-height: calc(var(--apl-ui-analysis-card-min-height) + var(--apl-ui-space-5));
  --apl-ui-touch-pos-summary-width: calc(var(--apl-ui-ticket-width) + var(--apl-ui-space-3));
  container-name: apl-touch-pos;
  container-type: inline-size;
  gap: var(--apl-ui-space-3);
  max-width: var(--apl-ui-page-max-width);
  min-width: 0;
}
.apl-touch-pos button,
.apl-touch-pos a,
.apl-touch-pos input { touch-action: manipulation; }
.apl-touch-pos .apl-telo__nav {
  background: var(--apl-ui-color-surface);
}
.apl-touch-pos .apl-btn {
  min-height: var(--apl-ui-touch-pos-target);
  padding-inline: var(--apl-ui-space-4);
}
.apl-touch-pos__hero,
.apl-touch-pos__heading {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  display: flex;
  gap: var(--apl-ui-space-4);
  justify-content: space-between;
  min-width: 0;
  padding: var(--apl-ui-space-4);
}
.apl-touch-pos__hero > div,
.apl-touch-pos__heading > div { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-touch-pos__hero h1,
.apl-touch-pos__heading h1 {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-page-title);
  font-weight: var(--apl-ui-font-weight-bold);
  margin: 0;
}
.apl-touch-pos__hero p,
.apl-touch-pos__heading p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-touch-pos__utility {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-xl);
  color: var(--apl-ui-color-brand-dark);
  display: flex;
  flex: 0 0 auto;
  gap: var(--apl-ui-space-3);
  min-height: var(--apl-ui-touch-pos-target);
  padding: var(--apl-ui-space-3) var(--apl-ui-space-4);
  text-decoration: none;
}
.apl-touch-pos__utility > i { font-size: var(--apl-ui-font-size-title-lg); }
.apl-touch-pos__utility > span { display: grid; }
.apl-touch-pos__utility strong { color: inherit; }
.apl-touch-pos__utility small { color: var(--apl-ui-color-text-subtle); }

.apl-touch-pos-start {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  overflow: hidden;
}
.apl-touch-pos-start > header {
  background: var(--apl-ui-color-surface-subtle);
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: grid;
  gap: var(--apl-ui-space-1);
  padding: var(--apl-ui-space-3) var(--apl-ui-space-4);
}
.apl-touch-pos-start > header span,
.apl-touch-pos-picker > header > div:first-child > span,
.apl-touch-pos-summary > header span,
.apl-touch-pos-payments > header span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-touch-pos-start h2,
.apl-touch-pos-picker h2,
.apl-touch-pos-summary h2,
.apl-touch-pos-payments h2 {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-title-lg);
  font-weight: var(--apl-ui-font-weight-bold);
  margin: 0;
}
.apl-touch-pos-start__grid {
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: var(--apl-ui-space-4);
}
.apl-touch-pos-start__grid > a {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-xl);
  color: var(--apl-ui-color-text-body);
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: var(--apl-ui-touch-pos-card-height);
  padding: var(--apl-ui-space-4);
  text-decoration: none;
  transition: background var(--apl-ui-motion-fast), border-color var(--apl-ui-motion-fast), transform var(--apl-ui-motion-fast);
}
.apl-touch-pos-start__grid > a:active { transform: translateY(var(--apl-ui-border-width)); }
.apl-touch-pos-start__icon,
.apl-touch-pos-shortcut__icon,
.apl-touch-pos-payment__icon {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border-radius: var(--apl-ui-radius-lg);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  flex: 0 0 var(--apl-ui-avatar-lg);
  height: var(--apl-ui-avatar-lg);
  justify-content: center;
  width: var(--apl-ui-avatar-lg);
}
.apl-touch-pos-start__icon i { font-size: var(--apl-ui-font-size-title-lg); }
.apl-touch-pos-start__copy { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-touch-pos-start__copy small { color: var(--apl-ui-color-text-subtle); }
.apl-touch-pos-start__copy > strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); }
.apl-touch-pos-start__copy > span { color: var(--apl-ui-color-text-muted); }
.apl-touch-pos-shortcut {
  align-items: center;
  background: var(--apl-ui-color-inverse);
  border-radius: var(--apl-ui-radius-xl);
  color: var(--apl-ui-color-inverse-text);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-3);
}
.apl-touch-pos-shortcut > div { align-items: center; display: flex; gap: var(--apl-ui-space-3); min-width: 0; }
.apl-touch-pos-shortcut > div > span:last-child { display: grid; min-width: 0; }
.apl-touch-pos-shortcut strong { color: inherit; }
.apl-touch-pos-shortcut small { color: var(--apl-ui-color-inverse-text-muted); }
.apl-touch-pos-shortcut__icon { background: var(--apl-ui-color-inverse-border); color: var(--apl-ui-color-inverse-text); flex-basis: var(--apl-ui-avatar-md); height: var(--apl-ui-avatar-md); width: var(--apl-ui-avatar-md); }

.apl-touch-pos-flow {
  align-items: stretch;
  background: var(--apl-ui-color-inverse);
  border-radius: var(--apl-ui-radius-xl);
  color: var(--apl-ui-color-inverse-text-muted);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  padding: var(--apl-ui-space-2);
}
.apl-touch-pos-flow > span,
.apl-touch-pos-flow > a {
  align-items: center;
  border-radius: var(--apl-ui-radius-lg);
  color: inherit;
  display: flex;
  gap: var(--apl-ui-space-2);
  min-height: var(--apl-ui-touch-pos-target);
  min-width: 0;
  padding: var(--apl-ui-space-2);
  text-decoration: none;
}
.apl-touch-pos-flow > i { align-self: center; }
.apl-touch-pos-flow b {
  align-items: center;
  background: var(--apl-ui-color-inverse-border);
  border-radius: var(--apl-ui-radius-pill);
  display: inline-flex;
  flex: 0 0 var(--apl-ui-avatar-sm);
  height: var(--apl-ui-avatar-sm);
  justify-content: center;
}
.apl-touch-pos-flow span > span,
.apl-touch-pos-flow a > span { display: grid; min-width: 0; }
.apl-touch-pos-flow small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-touch-pos-flow strong { color: inherit; font-weight: var(--apl-ui-font-weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-touch-pos-flow .is-current { background: var(--apl-ui-color-brand); color: var(--apl-ui-color-on-solid); }
.apl-touch-pos-flow .is-current b { background: var(--apl-ui-color-on-solid); color: var(--apl-ui-color-brand-dark); }
.apl-touch-pos-flow .is-current small { color: inherit; }
.apl-touch-pos-flow .is-done { color: var(--apl-ui-color-inverse-text); }
.apl-touch-pos-flow .is-done b { background: var(--apl-ui-color-brand); color: var(--apl-ui-color-on-solid); }

.apl-touch-pos-types {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: var(--apl-ui-space-2);
}
.apl-touch-pos-types a {
  align-items: center;
  border: var(--apl-ui-border-width) solid transparent;
  border-radius: var(--apl-ui-radius-lg);
  color: var(--apl-ui-color-text-muted);
  display: flex;
  font-weight: var(--apl-ui-font-weight-semibold);
  gap: var(--apl-ui-space-2);
  justify-content: center;
  min-height: var(--apl-ui-touch-pos-target);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  text-decoration: none;
}
.apl-touch-pos-types a.is-active {
  background: var(--apl-ui-color-brand-surface);
  border-color: var(--apl-ui-color-brand-border);
  color: var(--apl-ui-color-brand-dark);
}

.apl-touch-pos-picker,
.apl-touch-pos-summary,
.apl-touch-pos-payments,
.apl-touch-price-browser {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  min-width: 0;
  overflow: hidden;
}
.apl-touch-pos-picker > header {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: grid;
  gap: var(--apl-ui-space-4);
  grid-template-columns: minmax(0, 1fr) minmax(var(--apl-ui-card-min-width), var(--apl-ui-content-narrow));
  padding: var(--apl-ui-space-3) var(--apl-ui-space-4);
}
.apl-touch-pos-picker > header > div:first-child { display: grid; gap: var(--apl-ui-space-1); }
.apl-touch-pos-search { align-items: center; display: flex; gap: var(--apl-ui-space-3); min-width: 0; }
.apl-touch-pos-search .apl-finder {
  border-radius: var(--apl-ui-radius-lg);
  flex: 1 1 auto;
  min-height: var(--apl-ui-touch-pos-target);
  min-width: 0;
}
.apl-touch-pos-search .apl-finder input {
  height: var(--apl-ui-touch-pos-target) !important;
  min-height: var(--apl-ui-touch-pos-target) !important;
}
.apl-touch-pos-search [data-apl-touch-clear] {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--apl-ui-color-text-subtle);
  display: inline-flex;
  flex: 0 0 var(--apl-ui-touch-pos-target);
  height: var(--apl-ui-touch-pos-target);
  justify-content: center;
  width: var(--apl-ui-touch-pos-target);
}
.apl-touch-pos-search > small { color: var(--apl-ui-color-text-subtle); flex: 0 0 auto; white-space: nowrap; }
.apl-touch-pos-search > small strong { color: var(--apl-ui-color-text-strong); }
.apl-touch-pos-people,
.apl-touch-pos-items {
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: var(--apl-ui-space-4);
}
.apl-touch-pos-person {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-xl);
  color: var(--apl-ui-color-text-body);
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: var(--apl-ui-touch-pos-card-height);
  padding: var(--apl-ui-space-4);
  text-decoration: none;
  transition: background var(--apl-ui-motion-fast), border-color var(--apl-ui-motion-fast), transform var(--apl-ui-motion-fast);
}
.apl-touch-pos-person > span:nth-child(2) { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-touch-pos-person strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }
.apl-touch-pos-person small { color: var(--apl-ui-color-text-subtle); }
.apl-touch-pos-person:active { transform: translateY(var(--apl-ui-border-width)); }
.apl-touch-pos-item {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-xl);
  min-height: var(--apl-ui-touch-pos-card-height);
  overflow: hidden;
  transition: background var(--apl-ui-motion-fast), border-color var(--apl-ui-motion-fast), transform var(--apl-ui-motion-fast);
}
.apl-touch-pos-item > button {
  align-content: stretch;
  background: transparent;
  border: 0;
  color: var(--apl-ui-color-text-body);
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: 100%;
  min-height: var(--apl-ui-touch-pos-card-height);
  padding: var(--apl-ui-space-4);
  text-align: left;
  width: 100%;
}
.apl-touch-pos-item:not(.is-disabled):active { transform: translateY(var(--apl-ui-border-width)); }
.apl-touch-pos-item.is-disabled { background: var(--apl-ui-color-surface-subtle); opacity: var(--apl-ui-opacity-muted); }
.apl-touch-pos-item__top { align-items: center; display: flex; gap: var(--apl-ui-space-2); justify-content: space-between; min-width: 0; }
.apl-touch-pos-item__top > small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-touch-pos-item__name { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }
.apl-touch-pos-item__price { display: grid; gap: var(--apl-ui-space-1); }
.apl-touch-pos-item__price > strong { color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-touch-pos-item__price > small { color: var(--apl-ui-color-text-subtle); }
.apl-touch-pos-stock {
  background: var(--apl-ui-color-success-soft);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-success-dark);
  font-size: var(--apl-ui-font-size-caption);
  padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
  white-space: nowrap;
}
.apl-touch-pos-stock.is-empty { background: var(--apl-ui-color-danger-soft); color: var(--apl-ui-color-danger-dark); }
.apl-touch-pos-item__action {
  align-items: center;
  border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  color: var(--apl-ui-color-brand-dark);
  display: flex;
  font-weight: var(--apl-ui-font-weight-semibold);
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  min-height: var(--apl-ui-touch-pos-target);
  padding-top: var(--apl-ui-space-2);
}
.apl-touch-pos-no-results {
  align-items: center;
  color: var(--apl-ui-color-text-muted);
  display: flex;
  flex-direction: column;
  gap: var(--apl-ui-space-2);
  min-height: var(--apl-ui-empty-min-height);
  padding: var(--apl-ui-space-4);
  text-align: center;
}
.apl-touch-pos-no-results i { font-size: var(--apl-ui-font-size-page-title); }
.apl-touch-pos-no-results strong { color: var(--apl-ui-color-text-strong); }

.apl-touch-pos-checkout {
  align-items: start;
  display: grid;
  gap: var(--apl-ui-space-4);
  grid-template-columns: minmax(var(--apl-ui-card-min-width), var(--apl-ui-touch-pos-summary-width)) minmax(0, 1fr);
  min-width: 0;
}
.apl-touch-pos-summary { position: sticky; top: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-3)); }
.apl-touch-pos-summary > header,
.apl-touch-pos-payments > header {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-4);
}
.apl-touch-pos-summary > header > div,
.apl-touch-pos-payments > header > div { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-touch-pos-summary__ready {
  align-items: center;
  background: var(--apl-ui-color-success-soft);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-success-dark) !important;
  display: inline-flex;
  gap: var(--apl-ui-space-1);
  padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
}
.apl-touch-pos-summary dl { display: grid; margin: 0; padding: var(--apl-ui-space-2) var(--apl-ui-space-4); }
.apl-touch-pos-summary dl > div,
.apl-touch-pos-summary__single {
  align-items: center;
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  min-width: 0;
  padding-block: var(--apl-ui-space-3);
}
.apl-touch-pos-summary dt,
.apl-touch-pos-summary dd { margin: 0; }
.apl-touch-pos-summary dt,
.apl-touch-pos-summary__single span { color: var(--apl-ui-color-text-subtle); }
.apl-touch-pos-summary dd { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-semibold); min-width: 0; text-align: right; }
.apl-touch-pos-sale-date {
  align-items: center;
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  margin-inline: var(--apl-ui-space-4);
  padding-block: var(--apl-ui-space-3);
}
.apl-touch-pos-sale-date > div { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-touch-pos-sale-date label { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-semibold); margin: 0; }
.apl-touch-pos-sale-date small { color: var(--apl-ui-color-text-subtle); }
.apl-touch-pos-sale-date input.form-control {
  flex: 0 0 auto;
  min-height: var(--apl-ui-control-height);
  width: var(--apl-ui-touch-pos-date-width);
}
.apl-touch-pos-price {
  align-items: center;
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: grid;
  gap: var(--apl-ui-space-2) var(--apl-ui-space-3);
  grid-template-columns: minmax(0, 1fr) auto;
  margin-inline: var(--apl-ui-space-4);
  padding-block: var(--apl-ui-space-3);
}
.apl-touch-pos-price > label { display: grid; gap: var(--apl-ui-space-1); margin: 0; min-width: 0; }
.apl-touch-pos-price > label span { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-touch-pos-price > label small,
.apl-touch-pos-price > small { color: var(--apl-ui-color-text-subtle); }
.apl-touch-pos-price > small { grid-column: 1 / -1; }
.apl-touch-pos-price > small.is-adjusted { color: var(--apl-ui-color-warning-dark); }
.apl-touch-pos-price > small.is-invalid { color: var(--apl-ui-color-danger-dark); }
.apl-touch-pos-price__control {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: var(--apl-ui-card-min-width);
  overflow: hidden;
}
.apl-touch-pos-price__control > span {
  align-items: center;
  align-self: stretch;
  box-sizing: border-box;
  color: var(--apl-ui-color-text-muted);
  display: inline-flex;
  font-weight: var(--apl-ui-font-weight-semibold);
  justify-content: center;
  min-width: calc(var(--apl-ui-space-6) + var(--apl-ui-space-2));
  padding: 0 var(--apl-ui-space-2) 0 var(--apl-ui-space-3);
}
.apl-touch-pos-price__control input.form-control {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--apl-ui-color-text-strong) !important;
  font-size: var(--apl-ui-font-size-title-lg) !important;
  font-weight: var(--apl-ui-font-weight-bold) !important;
  min-height: var(--apl-ui-touch-pos-target) !important;
  min-width: 0 !important;
  padding-inline: var(--apl-ui-space-2) var(--apl-ui-space-3) !important;
  text-align: right;
  width: 100% !important;
}
.apl-touch-pos-price__control:focus-within { border-color: var(--apl-ui-color-brand); box-shadow: var(--apl-ui-shadow-focus); }
.apl-touch-pos-quantity { align-items: center; display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; padding: var(--apl-ui-space-3) var(--apl-ui-space-4); }
.apl-touch-pos-quantity > div:first-child { display: grid; gap: var(--apl-ui-space-1); }
.apl-touch-pos-quantity > div:first-child span { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-touch-pos-quantity > div:first-child small { color: var(--apl-ui-color-text-subtle); }
.apl-touch-pos-stepper {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  grid-template-columns: var(--apl-ui-touch-pos-target) var(--apl-ui-touch-pos-target) var(--apl-ui-touch-pos-target);
  overflow: hidden;
}
.apl-touch-pos-stepper button {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: 0;
  color: var(--apl-ui-color-brand-dark);
  display: flex;
  height: var(--apl-ui-touch-pos-target);
  justify-content: center;
  min-height: var(--apl-ui-touch-pos-target);
}
.apl-touch-pos-stepper input.form-control {
  background: transparent !important;
  border: 0 !important;
  border-left: var(--apl-ui-border-width) solid var(--apl-ui-color-border) !important;
  border-radius: 0 !important;
  border-right: var(--apl-ui-border-width) solid var(--apl-ui-color-border) !important;
  box-shadow: none !important;
  color: var(--apl-ui-color-text-strong) !important;
  font-size: var(--apl-ui-font-size-title) !important;
  font-weight: var(--apl-ui-font-weight-bold) !important;
  height: var(--apl-ui-touch-pos-target) !important;
  min-height: var(--apl-ui-touch-pos-target) !important;
  padding: 0 !important;
  text-align: center;
  width: var(--apl-ui-touch-pos-target) !important;
}
.apl-touch-pos-summary__single { margin-inline: var(--apl-ui-space-4); }
.apl-touch-pos-summary > footer {
  align-items: center;
  background: var(--apl-ui-color-inverse);
  color: var(--apl-ui-color-inverse-text);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-4);
}
.apl-touch-pos-summary > footer span { color: var(--apl-ui-color-inverse-text-muted); }
.apl-touch-pos-summary > footer strong { color: inherit; font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-touch-pos-payments > header p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-touch-pos-payments > header > small { align-items: center; color: var(--apl-ui-color-text-subtle); display: inline-flex; flex: 0 0 auto; gap: var(--apl-ui-space-1); }
.apl-touch-pos-payments__grid {
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: var(--apl-ui-space-4);
}
.apl-touch-pos-payments__grid > button {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-xl);
  color: var(--apl-ui-color-text-body);
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-5));
  padding: var(--apl-ui-space-3);
  text-align: left;
  transition: background var(--apl-ui-motion-fast), border-color var(--apl-ui-motion-fast), transform var(--apl-ui-motion-fast);
}
.apl-touch-pos-payments__grid > button > span:nth-child(2) { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-touch-pos-payments__grid > button strong { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-bold); }
.apl-touch-pos-payments__grid > button small { color: var(--apl-ui-color-text-subtle); }
.apl-touch-pos-payment__icon { flex-basis: var(--apl-ui-avatar-md); height: var(--apl-ui-avatar-md); width: var(--apl-ui-avatar-md); }
.apl-touch-pos-payment__check { color: var(--apl-ui-color-border); font-size: var(--apl-ui-font-size-title-lg); }
.apl-touch-pos-payments__grid > button.is-active { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); box-shadow: var(--apl-ui-shadow-sm); }
.apl-touch-pos-payments__grid > button.is-active .apl-touch-pos-payment__check { color: var(--apl-ui-color-brand-dark); }
.apl-touch-pos-payments__grid > button:active { transform: translateY(var(--apl-ui-border-width)); }
.apl-touch-pos-confirm {
  align-items: center;
  background: var(--apl-ui-color-inverse);
  bottom: 0;
  color: var(--apl-ui-color-inverse-text);
  display: flex;
  gap: var(--apl-ui-space-4);
  justify-content: space-between;
  padding: var(--apl-ui-space-3) var(--apl-ui-space-4);
  position: sticky;
  z-index: var(--apl-ui-z-sticky);
}
.apl-touch-pos-confirm > div { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-touch-pos-confirm > div span,
.apl-touch-pos-confirm > div small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-touch-pos-confirm > div strong { color: inherit; }
.apl-touch-pos-confirm .apl-btn { flex: 0 0 auto; min-width: var(--apl-ui-card-min-width); }
.apl-touch-pos-confirm .apl-btn b { font-weight: var(--apl-ui-font-weight-bold); }

.apl-touch-price-command {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: minmax(var(--apl-ui-card-min-width), var(--apl-ui-content-narrow)) auto;
  justify-content: space-between;
  padding: var(--apl-ui-space-3);
}
.apl-touch-price-kinds {
  background: var(--apl-ui-color-surface-subtle);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-1);
  padding: var(--apl-ui-space-1);
}
.apl-touch-price-kinds button {
  align-items: center;
  background: transparent;
  border: var(--apl-ui-border-width) solid transparent;
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-text-muted);
  display: inline-flex;
  gap: var(--apl-ui-space-2);
  min-height: var(--apl-ui-touch-pos-target);
  padding-inline: var(--apl-ui-space-3);
}
.apl-touch-price-kinds button span {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border-radius: var(--apl-ui-radius-pill);
  display: inline-flex;
  height: var(--apl-ui-avatar-sm);
  justify-content: center;
  min-width: var(--apl-ui-avatar-sm);
}
.apl-touch-price-kinds button.is-active { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); color: var(--apl-ui-color-brand-dark); font-weight: var(--apl-ui-font-weight-semibold); }
.apl-touch-price-grid {
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--apl-ui-space-4);
}
.apl-touch-price-card {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-xl);
  display: grid;
  gap: var(--apl-ui-space-2);
  min-height: var(--apl-ui-analysis-card-min-height);
  padding: var(--apl-ui-space-4);
}
.apl-touch-price-card__kind { align-items: center; color: var(--apl-ui-color-text-subtle); display: flex; font-size: var(--apl-ui-font-size-caption); gap: var(--apl-ui-space-1); }
.apl-touch-price-card h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-touch-price-card > strong { align-self: end; color: var(--apl-ui-color-brand-dark); font-size: var(--apl-ui-font-size-display); font-weight: var(--apl-ui-font-weight-bold); }
.apl-touch-price-card > small { color: var(--apl-ui-color-text-subtle); }
.apl-touch-price-browser .apl-pagination { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider); padding: var(--apl-ui-space-3) var(--apl-ui-space-4); }
.apl-touch-price-browser .apl-pagination button { min-height: var(--apl-ui-touch-pos-target); min-width: var(--apl-ui-touch-pos-target); }

@media (hover: hover) {
  .apl-touch-pos-start__grid > a:hover,
  .apl-touch-pos-person:hover,
  .apl-touch-pos-item:not(.is-disabled):hover { background: var(--apl-ui-color-brand-surface); border-color: var(--apl-ui-color-brand-border); text-decoration: none; }
  .apl-touch-pos__utility:hover { background: var(--apl-ui-color-brand-surface); color: var(--apl-ui-color-brand-dark); text-decoration: none; }
  .apl-touch-pos-payments__grid > button:hover { border-color: var(--apl-ui-color-brand-border); }
}
@media (max-width: 980px) {
  .apl-touch-pos-start__grid,
  .apl-touch-pos-people,
  .apl-touch-pos-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-touch-price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-touch-pos-checkout { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-summary { position: static; }
}
@media (max-width: 700px) {
  .apl-touch-pos__hero,
  .apl-touch-pos__heading,
  .apl-touch-pos-shortcut,
  .apl-touch-pos-confirm { align-items: stretch; flex-direction: column; }
  .apl-touch-pos__hero > a,
  .apl-touch-pos__heading > a { align-self: stretch; }
  .apl-touch-pos-flow { gap: var(--apl-ui-space-1); }
  .apl-touch-pos-flow > i { display: none; }
  .apl-touch-pos-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-touch-pos-flow > span,
  .apl-touch-pos-flow > a { justify-content: center; }
  .apl-touch-pos-flow span > span,
  .apl-touch-pos-flow a > span { display: none; }
  .apl-touch-pos-picker > header,
  .apl-touch-price-command { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-search { align-items: stretch; flex-direction: column; }
  .apl-touch-pos-search > small { align-self: flex-end; }
  .apl-touch-pos-start__grid,
  .apl-touch-pos-people,
  .apl-touch-pos-items { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-payments > header { align-items: flex-start; flex-direction: column; }
  .apl-touch-pos-confirm .apl-btn { min-width: 0; width: 100%; }
  .apl-touch-price-kinds { overflow-x: auto; }
  .apl-touch-price-kinds button { flex: 0 0 auto; }
  .apl-touch-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .apl-touch-pos-types a { flex-direction: column; gap: var(--apl-ui-space-1); }
  .apl-touch-pos-sale-date { align-items: stretch; flex-direction: column; }
  .apl-touch-pos-sale-date input.form-control { width: 100%; }
  .apl-touch-pos-price { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-price__control { min-width: 0; width: 100%; }
  .apl-touch-pos-quantity { align-items: stretch; flex-direction: column; }
  .apl-touch-pos-stepper { align-self: stretch; grid-template-columns: var(--apl-ui-touch-pos-target) minmax(0, 1fr) var(--apl-ui-touch-pos-target); }
  .apl-touch-pos-stepper input.form-control { width: 100% !important; }
  .apl-touch-pos-payments__grid,
  .apl-touch-price-grid { grid-template-columns: minmax(0, 1fr); }
}
@container apl-touch-pos (max-width: 900px) {
  .apl-touch-pos-start__grid,
  .apl-touch-pos-people,
  .apl-touch-pos-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-touch-price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-touch-pos-checkout { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-summary { position: static; }
}
@container apl-touch-pos (max-width: 620px) {
  .apl-touch-pos__hero,
  .apl-touch-pos__heading,
  .apl-touch-pos-shortcut,
  .apl-touch-pos-confirm { align-items: stretch; flex-direction: column; }
  .apl-touch-pos-flow { gap: var(--apl-ui-space-1); grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-touch-pos-flow > i { display: none; }
  .apl-touch-pos-flow > span,
  .apl-touch-pos-flow > a { justify-content: center; }
  .apl-touch-pos-flow span > span,
  .apl-touch-pos-flow a > span { display: none; }
  .apl-touch-pos-picker > header,
  .apl-touch-price-command { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-search { align-items: stretch; flex-direction: column; }
  .apl-touch-pos-search > small { align-self: flex-end; }
  .apl-touch-pos-start__grid,
  .apl-touch-pos-people,
  .apl-touch-pos-items { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-payments > header { align-items: flex-start; flex-direction: column; }
  .apl-touch-pos-confirm .apl-btn { min-width: 0; width: 100%; }
  .apl-touch-price-kinds { overflow-x: auto; }
  .apl-touch-price-kinds button { flex: 0 0 auto; }
  .apl-touch-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container apl-touch-pos (max-width: 420px) {
  .apl-touch-pos-types a { flex-direction: column; gap: var(--apl-ui-space-1); }
  .apl-touch-pos-sale-date { align-items: stretch; flex-direction: column; }
  .apl-touch-pos-sale-date input.form-control { width: 100%; }
  .apl-touch-pos-price { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-price__control { min-width: 0; width: 100%; }
  .apl-touch-pos-quantity { align-items: stretch; flex-direction: column; }
  .apl-touch-pos-stepper { align-self: stretch; grid-template-columns: var(--apl-ui-touch-pos-target) minmax(0, 1fr) var(--apl-ui-touch-pos-target); }
  .apl-touch-pos-stepper input.form-control { width: 100% !important; }
  .apl-touch-pos-payments__grid,
  .apl-touch-price-grid { grid-template-columns: minmax(0, 1fr); }
}


/* Prioridad tactil sobre las dimensiones base del buscador compartido. */
body.janox-template [data-apl-telo].apl-touch-pos .apl-touch-pos-search .apl-finder,
[data-apl-telo].apl-touch-pos .apl-touch-pos-search .apl-finder {
  height: var(--apl-ui-touch-pos-target) !important;
  min-height: var(--apl-ui-touch-pos-target) !important;
}
body.janox-template [data-apl-telo].apl-touch-pos .apl-touch-pos-search .apl-finder > button,
[data-apl-telo].apl-touch-pos .apl-touch-pos-search .apl-finder > button {
  flex-basis: var(--apl-ui-touch-pos-target) !important;
  height: var(--apl-ui-touch-pos-target) !important;
  min-height: var(--apl-ui-touch-pos-target) !important;
  width: var(--apl-ui-touch-pos-target) !important;
}
.apl-touch-pos .apl-telo__nav a { min-height: var(--apl-ui-touch-pos-target); }

.apl-touch-pos a:focus-visible,
.apl-touch-pos button:focus-visible,
.apl-touch-pos input:focus-visible {
  box-shadow: var(--apl-ui-shadow-focus);
  outline: 0;
}


/* Acciones visibles para modificar la reserva antes de confirmar. */
.apl-appointment-ticket__actions {
  border-top: var(--apl-ui-border-width) dashed var(--apl-ui-color-inverse-border);
  display: grid;
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-3);
}
.apl-appointment-ticket__action {
  align-items: center;
  background: var(--apl-ui-color-inverse-border);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-strong);
  border-radius: var(--apl-ui-radius-lg);
  color: var(--apl-ui-color-inverse-text);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: var(--apl-ui-control-height-lg);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  text-decoration: none;
  transition: background var(--apl-ui-motion-fast), border-color var(--apl-ui-motion-fast), transform var(--apl-ui-motion-fast);
}
.apl-appointment-ticket__action--primary {
  background: var(--apl-ui-color-surface);
  border-color: var(--apl-ui-color-surface);
  color: var(--apl-ui-color-text-strong);
}
.apl-appointment-ticket__action > span:nth-child(2) { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-appointment-ticket__action strong { color: inherit; font-weight: var(--apl-ui-font-weight-bold); }
.apl-appointment-ticket__action small { color: var(--apl-ui-color-inverse-text-muted); font-size: var(--apl-ui-font-size-caption); }
.apl-appointment-ticket__action--primary small { color: var(--apl-ui-color-text-subtle); }
.apl-appointment-ticket__action-icon {
  align-items: center;
  background: var(--apl-ui-color-brand);
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-on-solid);
  display: inline-flex;
  flex: 0 0 var(--apl-ui-avatar-sm);
  height: var(--apl-ui-avatar-sm);
  justify-content: center;
  width: var(--apl-ui-avatar-sm);
}
.apl-appointment-ticket__action:hover,
.apl-appointment-ticket__action:focus {
  background: var(--apl-ui-color-brand-surface);
  border-color: var(--apl-ui-color-brand-border);
  color: var(--apl-ui-color-brand-dark);
  text-decoration: none;
}
.apl-appointment-ticket__action:active { transform: translateY(var(--apl-ui-border-width)); }
.apl-appointment-ticket__action:focus-visible { box-shadow: var(--apl-ui-shadow-focus); outline: 0; }

/* Reserva pública · Paso 1: catálogo de servicios */
.apl-booking--services {
  --apl-ui-booking-max-width: 1120px;
  gap: var(--apl-ui-space-3);
}

.apl-booking--services .apl-booking-path {
  border-radius: var(--apl-ui-radius-xl);
  box-shadow: var(--apl-ui-shadow-sm);
  min-height: 56px;
  padding: var(--apl-ui-space-2) var(--apl-ui-space-4);
}

.apl-booking--services .apl-booking-path li:not(:last-child)::after {
  height: 2px;
  width: var(--apl-ui-space-6);
}

.apl-booking-app-promo {
  align-items: center;
  background: linear-gradient(125deg, var(--apl-ui-color-inverse) 0%, var(--apl-ui-color-brand-dark) 58%, var(--apl-ui-color-brand) 100%);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-dark);
  border-radius: var(--apl-ui-radius-xl);
  box-shadow: var(--apl-ui-shadow-lg);
  color: var(--apl-ui-color-on-solid);
  display: grid;
  gap: var(--apl-ui-space-5);
  grid-template-columns: minmax(0, 1fr) 230px;
  overflow: hidden;
  padding: var(--apl-ui-space-5);
  position: relative;
}

.apl-booking-app-promo::before,
.apl-booking-app-promo::after {
  background: rgba(255, 255, 255, .08);
  border-radius: var(--apl-ui-radius-pill);
  content: '';
  pointer-events: none;
  position: absolute;
}

.apl-booking-app-promo::before { height: 190px; right: -72px; top: -92px; width: 190px; }
.apl-booking-app-promo::after { bottom: -92px; height: 170px; left: 45%; width: 170px; }

.apl-booking-app-promo__content {
  display: grid;
  gap: var(--apl-ui-space-2);
  min-width: 0;
  position: relative;
  z-index: 1;
}

.apl-booking-app-promo__eyebrow {
  align-items: center;
  color: var(--apl-ui-color-on-solid);
  display: inline-flex;
  font-size: var(--apl-ui-font-size-caption);
  font-weight: var(--apl-ui-font-weight-bold);
  gap: var(--apl-ui-space-2);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.apl-booking-app-promo__eyebrow i { color: var(--apl-ui-color-warning); }

.apl-booking-app-promo h2 {
  color: var(--apl-ui-color-on-solid);
  font-size: var(--apl-ui-font-size-display);
  font-weight: var(--apl-ui-font-weight-bold);
  line-height: var(--apl-ui-line-tight);
  margin: 0;
  max-width: 720px;
}

.apl-booking-app-promo__content > p {
  color: rgba(255, 255, 255, .82);
  font-size: var(--apl-ui-font-size-body);
  line-height: var(--apl-ui-line-relaxed);
  margin: 0;
  max-width: 720px;
}

.apl-booking-app-promo__steps {
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: var(--apl-ui-space-2) 0 0;
  padding: 0;
}

.apl-booking-app-promo__steps li {
  align-items: center;
  background: rgba(255, 255, 255, .1);
  border: var(--apl-ui-border-width) solid rgba(255, 255, 255, .16);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-2);
  min-width: 0;
  padding: var(--apl-ui-space-2);
}

.apl-booking-app-promo__steps b {
  align-items: center;
  background: var(--apl-ui-color-on-solid);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.apl-booking-app-promo__steps span { display: grid; min-width: 0; }
.apl-booking-app-promo__steps strong { color: var(--apl-ui-color-on-solid); font-size: var(--apl-ui-font-size-caption); }
.apl-booking-app-promo__steps small { color: rgba(255, 255, 255, .7); line-height: var(--apl-ui-line-normal); }

.apl-booking-app-promo__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--apl-ui-space-3);
  margin-top: var(--apl-ui-space-2);
}

[data-apl-telo] .apl-booking-app-promo__primary.apl-btn {
  background: var(--apl-ui-color-on-solid);
  border-color: var(--apl-ui-color-on-solid);
  color: var(--apl-ui-color-brand-dark);
  min-height: 46px;
}

[data-apl-telo] .apl-booking-app-promo__primary.apl-btn:hover,
[data-apl-telo] .apl-booking-app-promo__primary.apl-btn:focus {
  background: var(--apl-ui-color-brand-surface);
  border-color: var(--apl-ui-color-brand-surface);
  color: var(--apl-ui-color-brand-dark);
}

.apl-booking-app-promo__secondary {
  color: rgba(255, 255, 255, .88);
  font-size: var(--apl-ui-font-size-caption);
  font-weight: var(--apl-ui-font-weight-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.apl-booking-app-promo__secondary:hover,
.apl-booking-app-promo__secondary:focus { color: var(--apl-ui-color-on-solid); }

.apl-booking-app-promo__phone {
  background: var(--apl-ui-color-surface);
  border: 6px solid rgba(255, 255, 255, .28);
  border-radius: 28px;
  box-shadow: var(--apl-ui-shadow-lg);
  color: var(--apl-ui-color-text-body);
  display: grid;
  gap: var(--apl-ui-space-3);
  justify-self: center;
  min-height: 238px;
  padding: var(--apl-ui-space-4) var(--apl-ui-space-3) var(--apl-ui-space-3);
  position: relative;
  transform: rotate(3deg);
  width: 190px;
  z-index: 1;
}

.apl-booking-app-promo__speaker {
  background: var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-pill);
  height: 4px;
  left: 50%;
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  width: 42px;
}

.apl-booking-app-promo__phone-head { align-items: center; display: flex; gap: var(--apl-ui-space-2); }
.apl-booking-app-promo__phone-head > span { align-items: center; background: var(--apl-ui-color-brand-surface); border-radius: var(--apl-ui-radius-md); color: var(--apl-ui-color-brand-dark); display: inline-flex; height: 34px; justify-content: center; width: 34px; }
.apl-booking-app-promo__phone-head small { color: var(--apl-ui-color-text-strong); font-weight: var(--apl-ui-font-weight-bold); }
.apl-booking-app-promo__phone-card { align-items: center; background: var(--apl-ui-color-brand-surface); border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border); border-radius: var(--apl-ui-radius-lg); display: flex; gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
.apl-booking-app-promo__phone-card > i { color: var(--apl-ui-color-brand-dark); font-size: 22px; }
.apl-booking-app-promo__phone-card span { display: grid; }
.apl-booking-app-promo__phone-card strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-caption); }
.apl-booking-app-promo__phone-card small { color: var(--apl-ui-color-text-subtle); }
.apl-booking-app-promo__phone-actions { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(3, 1fr); }
.apl-booking-app-promo__phone-actions span { background: var(--apl-ui-color-surface-subtle); border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted); border-radius: var(--apl-ui-radius-md); height: 38px; }
.apl-booking-app-promo__install { align-items: center; align-self: end; background: var(--apl-ui-color-brand); border-radius: var(--apl-ui-radius-pill); color: var(--apl-ui-color-on-solid); display: flex; font-size: var(--apl-ui-font-size-caption); font-weight: var(--apl-ui-font-weight-bold); gap: var(--apl-ui-space-2); justify-content: center; min-height: 36px; padding: var(--apl-ui-space-1) var(--apl-ui-space-3); }

.apl-booking-services-intro {
  align-items: center;
  background: linear-gradient(135deg, var(--apl-ui-color-brand-surface) 0%, var(--apl-ui-color-surface) 66%);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-xl);
  box-shadow: var(--apl-ui-shadow-sm);
  display: grid;
  gap: var(--apl-ui-space-4);
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: var(--apl-ui-space-5);
  position: relative;
}

.apl-booking-services-intro::after {
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-pill);
  content: '';
  height: 150px;
  opacity: .55;
  position: absolute;
  right: -58px;
  top: -76px;
  width: 150px;
}

.apl-booking-services-intro__copy {
  display: grid;
  gap: var(--apl-ui-space-1);
  max-width: 650px;
  position: relative;
  z-index: 1;
}

.apl-booking-services-intro__eyebrow {
  align-items: center;
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  font-size: var(--apl-ui-font-size-caption);
  font-weight: var(--apl-ui-font-weight-bold);
  gap: var(--apl-ui-space-2);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.apl-booking-services-intro h1 {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-display);
  font-weight: var(--apl-ui-font-weight-bold);
  line-height: var(--apl-ui-line-tight);
  margin: 0;
}

.apl-booking-services-intro p {
  color: var(--apl-ui-color-text-muted);
  font-size: var(--apl-ui-font-size-body);
  line-height: var(--apl-ui-line-relaxed);
  margin: 0;
}

.apl-booking-services-intro__benefits {
  display: grid;
  gap: var(--apl-ui-space-2);
  min-width: 210px;
  position: relative;
  z-index: 1;
}

.apl-booking-services-intro__benefits span {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-text-muted);
  display: flex;
  font-size: var(--apl-ui-font-size-caption);
  font-weight: var(--apl-ui-font-weight-semibold);
  gap: var(--apl-ui-space-2);
  min-height: 38px;
  padding: var(--apl-ui-space-1) var(--apl-ui-space-3);
}

.apl-booking-services-intro__benefits i {
  color: var(--apl-ui-color-brand-dark);
}

.apl-booking--services .apl-booking-service-picker {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.apl-booking--services .apl-booking-service-command {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  box-shadow: var(--apl-ui-shadow-sm);
  display: grid;
  gap: var(--apl-ui-space-4);
  grid-template-columns: minmax(210px, auto) minmax(0, 1fr);
  margin-bottom: var(--apl-ui-space-3);
  padding: var(--apl-ui-space-3) var(--apl-ui-space-4);
}

.apl-booking-service-command__heading {
  display: grid;
  gap: 2px;
}

.apl-booking-service-command__heading > span {
  color: var(--apl-ui-color-brand-dark);
  font-size: var(--apl-ui-font-size-caption);
  font-weight: var(--apl-ui-font-weight-bold);
  text-transform: uppercase;
}

.apl-booking-service-command__heading h2 {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-title-lg);
  font-weight: var(--apl-ui-font-weight-bold);
  margin: 0;
}

.apl-booking-service-command__tools {
  align-items: center;
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: flex-end;
  min-width: 0;
}

[data-apl-telo].apl-booking--services .apl-booking-service-command .apl-finder {
  background: var(--apl-ui-color-surface-subtle);
  border-color: var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-pill);
  flex: 1 1 auto;
  max-width: 520px;
  min-height: 46px;
}

.apl-booking-service-count {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 38px;
  padding: var(--apl-ui-space-1) var(--apl-ui-space-3);
}

.apl-booking-service-count span {
  color: var(--apl-ui-color-text-subtle);
  font-size: var(--apl-ui-font-size-caption);
}

.apl-booking--services .apl-booking-service-list {
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.apl-booking--services .apl-booking-service {
  align-items: stretch;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  box-shadow: var(--apl-ui-shadow-sm);
  color: var(--apl-ui-color-text-body);
  display: flex;
  flex-direction: column;
  gap: var(--apl-ui-space-3);
  min-height: 154px;
  padding: var(--apl-ui-space-4);
  position: relative;
  text-decoration: none;
  transition: border-color var(--apl-ui-duration-normal) var(--apl-ui-ease-standard), box-shadow var(--apl-ui-duration-normal) var(--apl-ui-ease-standard), transform var(--apl-ui-duration-normal) var(--apl-ui-ease-standard);
}

.apl-booking--services .apl-booking-service:nth-child(odd) {
  border-right: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
}

.apl-booking--services .apl-booking-service:hover,
.apl-booking--services .apl-booking-service:focus {
  background: var(--apl-ui-color-surface);
  border-color: var(--apl-ui-color-brand-border);
  box-shadow: var(--apl-ui-shadow-md);
  color: var(--apl-ui-color-text-body);
  outline: 0;
  text-decoration: none;
  transform: translateY(-3px);
}

.apl-booking--services .apl-booking-service:focus-visible {
  box-shadow: var(--apl-ui-shadow-focus), var(--apl-ui-shadow-md);
}

.apl-booking-service__main {
  align-items: center;
  display: flex;
  gap: var(--apl-ui-space-3);
  min-width: 0;
}

.apl-booking--services .apl-booking-service__icon {
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  flex: 0 0 auto;
  height: var(--apl-ui-avatar-lg);
  overflow: hidden;
  width: var(--apl-ui-avatar-lg);
}
.apl-booking--services .apl-booking-service__icon.has-image { background: var(--apl-ui-color-surface-subtle); }
.apl-booking--services .apl-booking-service__icon img { display: block; height: 100%; object-fit: cover; width: 100%; }

.apl-booking--services .apl-booking-service__name {
  display: grid;
  gap: 3px;
}

.apl-booking--services .apl-booking-service__name > small {
  color: var(--apl-ui-color-brand-dark);
  font-size: var(--apl-ui-font-size-caption);
  font-weight: var(--apl-ui-font-weight-bold);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.apl-booking--services .apl-booking-service__name strong {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-title-lg);
  line-height: var(--apl-ui-line-tight);
}

.apl-booking--services .apl-booking-service__name > span {
  align-items: center;
  color: var(--apl-ui-color-text-subtle);
  display: inline-flex;
  font-size: var(--apl-ui-font-size-caption);
  gap: var(--apl-ui-space-1);
}

.apl-booking-service__footer {
  align-items: end;
  border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-row-divider);
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--apl-ui-space-3);
}

.apl-booking-service__price {
  display: grid;
  gap: 1px;
}

.apl-booking-service__price small {
  color: var(--apl-ui-color-text-subtle);
  font-size: var(--apl-ui-font-size-caption);
}

.apl-booking-service__price b {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-title);
}

.apl-booking-service__choose {
  align-items: center;
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  font-size: var(--apl-ui-font-size-caption);
  font-weight: var(--apl-ui-font-weight-bold);
  gap: var(--apl-ui-space-2);
}

.apl-booking--services .apl-booking-service:hover .apl-booking-service__choose i,
.apl-booking--services .apl-booking-service:focus .apl-booking-service__choose i {
  transform: translateX(3px);
}

.apl-booking-service__choose i {
  transition: transform var(--apl-ui-duration-fast) var(--apl-ui-ease-standard);
}

.apl-service-avatar-manager {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: var(--apl-ui-space-3);
  padding: var(--apl-ui-space-3);
}
.apl-service-avatar-manager__preview {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-lg);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  height: var(--apl-ui-avatar-lg);
  justify-content: center;
  overflow: hidden;
  width: var(--apl-ui-avatar-lg);
}
.apl-service-avatar-manager__preview img { display: block; height: 100%; object-fit: cover; width: 100%; }
.apl-service-avatar-manager > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-service-avatar-manager > div > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-service-avatar-manager h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-service-avatar-manager p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-service-avatar-manager form { margin: 0; }

.apl-booking-service-empty {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) dashed var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-xl);
  color: var(--apl-ui-color-text-muted);
  display: flex;
  flex-direction: column;
  gap: var(--apl-ui-space-2);
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 220px;
  padding: var(--apl-ui-space-5);
  text-align: center;
}

.apl-booking-service-empty > span {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.apl-booking-service-empty strong {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-title-lg);
}

.apl-booking-service-empty p {
  margin: 0;
  max-width: 440px;
}

.apl-booking--services .apl-booking-trust {
  font-size: var(--apl-ui-font-size-caption);
  padding-block: var(--apl-ui-space-1);
}

@media (max-width: 900px) {
  .apl-booking-app-promo { grid-template-columns: minmax(0, 1fr) 180px; }
  .apl-booking-app-promo__steps { grid-template-columns: minmax(0, 1fr); }
  .apl-service-avatar-manager { grid-template-columns: auto minmax(0, 1fr); }
  .apl-service-avatar-manager form { grid-column: 1 / -1; justify-self: end; }
  .apl-booking--services .apl-booking-service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-booking--services .apl-booking-service-command { grid-template-columns: minmax(0, 1fr); }
  .apl-booking-service-command__tools { justify-content: stretch; }
  [data-apl-telo].apl-booking--services .apl-booking-service-command .apl-finder { max-width: none; }
}

@media (max-width: 620px) {
  .apl-booking--services { gap: var(--apl-ui-space-2); }
  .apl-booking--services .apl-booking-path { min-height: 48px; padding-inline: var(--apl-ui-space-3); }
  .apl-booking-app-promo { gap: var(--apl-ui-space-3); grid-template-columns: minmax(0, 1fr); padding: var(--apl-ui-space-4); }
  .apl-booking-app-promo h2 { font-size: var(--apl-ui-font-size-page-title); }
  .apl-booking-app-promo__phone { display: none; }
  .apl-booking-app-promo__actions { align-items: stretch; flex-direction: column; }
  [data-apl-telo] .apl-booking-app-promo__primary.apl-btn { justify-content: center; width: 100%; }
  .apl-booking-app-promo__secondary { align-self: center; min-height: 36px; padding: var(--apl-ui-space-2); }
  .apl-booking-services-intro { grid-template-columns: minmax(0, 1fr); padding: var(--apl-ui-space-4); }
  .apl-booking-services-intro__benefits { display: flex; min-width: 0; overflow-x: auto; }
  .apl-booking-services-intro__benefits span { flex: 0 0 auto; }
  .apl-booking--services .apl-booking-service-command { padding: var(--apl-ui-space-3); }
  .apl-booking-service-command__tools { align-items: stretch; flex-direction: column; }
  .apl-booking-service-count { align-self: flex-start; }
  .apl-booking--services .apl-booking-service-list { grid-template-columns: minmax(0, 1fr); }
  .apl-booking--services .apl-booking-service { min-height: 148px; }
}

@container apl-telo (max-width: 900px) {
  .apl-booking--services .apl-booking-service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-booking--services .apl-booking-service-command { grid-template-columns: minmax(0, 1fr); }
}

@container apl-telo (max-width: 620px) {
  .apl-booking--services .apl-booking-service-list,
  .apl-booking-services-intro { grid-template-columns: minmax(0, 1fr); }
  .apl-booking-service-command__tools { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .apl-booking--services .apl-booking-service,
  .apl-booking-service__choose i { transition: none; }
  .apl-booking--services .apl-booking-service:hover,
  .apl-booking--services .apl-booking-service:focus { transform: none; }
}

/* Disponibilidad operativa: extension del sistema central de TELOAGENDA. */
.apl-timeblock-layer {
  overflow: auto;
}

.apl-timeblock-dialog {
  max-height: min(var(--apl-ui-dialog-max-height), calc(100vh - (var(--apl-ui-space-4) * 2)));
  width: min(820px, calc(100vw - (var(--apl-ui-space-4) * 2)));
}

.apl-timeblock-dialog__form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  min-height: 0;
  width: 100%;
}

.apl-timeblock-dialog__body {
  display: grid;
  gap: var(--apl-ui-space-2);
  min-height: 0;
  overscroll-behavior: contain;
  padding: var(--apl-ui-space-3);
}

.apl-timeblock-step {
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-2);
  margin: 0;
  min-width: 0;
  padding: var(--apl-ui-space-3);
}

.apl-timeblock-step[disabled] {
  opacity: var(--apl-ui-opacity-muted);
}

.apl-timeblock-step > legend {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-body);
  font-weight: var(--apl-ui-font-weight-bold);
  margin: 0;
  padding: 0 var(--apl-ui-space-1);
}

.apl-timeblock-step > legend > span {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  height: var(--apl-ui-avatar-sm);
  justify-content: center;
  margin-right: var(--apl-ui-space-1);
  width: var(--apl-ui-avatar-sm);
}

.apl-timeblock-decision {
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.apl-timeblock-decision .apl-editor-choice > span {
  display: grid;
  gap: var(--apl-ui-space-1);
  min-height: 100%;
}

.apl-timeblock-mode {
  justify-self: start;
}

.apl-timeblock-scope {
  display: grid;
  gap: var(--apl-ui-space-1);
}

.apl-timeblock-scope[hidden],
.apl-timeblock-context[hidden],
.apl-timeblock-impact[hidden] {
  display: none !important;
}

.apl-timeblock-context {
  align-items: start;
  background: var(--apl-ui-color-info-soft);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: auto minmax(0, 1fr);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}

.apl-timeblock-context__icon {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-info-dark);
  display: inline-flex;
  height: var(--apl-ui-control-height-sm);
  justify-content: center;
  width: var(--apl-ui-control-height-sm);
}

.apl-timeblock-context > div {
  display: grid;
  gap: var(--apl-ui-space-1);
  min-width: 0;
}

.apl-timeblock-context strong {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-body-sm);
}

.apl-timeblock-context small {
  color: var(--apl-ui-color-text-muted);
  font-size: var(--apl-ui-font-size-caption);
}

.apl-timeblock-context.is-success {
  background: var(--apl-ui-color-success-soft);
  border-color: var(--apl-ui-color-success-border);
}

.apl-timeblock-context.is-success .apl-timeblock-context__icon {
  color: var(--apl-ui-color-success-dark);
}

.apl-timeblock-context.is-warning {
  background: var(--apl-ui-color-warning-soft);
  border-color: var(--apl-ui-color-warning-border);
}

.apl-timeblock-context.is-warning .apl-timeblock-context__icon {
  color: var(--apl-ui-color-warning-dark);
}

.apl-timeblock-context.is-error {
  background: var(--apl-ui-color-danger-soft);
  border-color: var(--apl-ui-color-danger-border);
}

.apl-timeblock-context.is-error .apl-timeblock-context__icon {
  color: var(--apl-ui-color-danger-dark);
}

.apl-timeblock-context__ranges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--apl-ui-space-1);
}

.apl-timeblock-context__ranges[hidden] {
  display: none !important;
}

.apl-timeblock-context__ranges > span {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-text-body);
  font-size: var(--apl-ui-font-size-caption);
  font-weight: var(--apl-ui-font-weight-semibold);
  padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
}

.apl-timeblock-impact {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  color: var(--apl-ui-color-brand-dark);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: auto minmax(0, 1fr);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}

.apl-timeblock-impact > i {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border-radius: var(--apl-ui-radius-md);
  display: inline-flex;
  height: var(--apl-ui-control-height-sm);
  justify-content: center;
  width: var(--apl-ui-control-height-sm);
}

.apl-timeblock-impact > span {
  display: grid;
  gap: var(--apl-ui-space-0);
  min-width: 0;
}

.apl-timeblock-impact strong {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-body-sm);
}

.apl-timeblock-impact small {
  color: var(--apl-ui-color-text-muted);
  font-size: var(--apl-ui-font-size-caption);
}

.apl-timeblock-range {
  align-items: start;
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.apl-timeblock-range.is-single-date {
  grid-template-columns: minmax(0, 1fr);
}

.apl-timeblock-step .apl-field {
  align-content: start;
  align-self: start;
  display: grid;
  gap: var(--apl-ui-space-1);
  min-width: 0;
  width: 100%;
}

.apl-timeblock-step .apl-field__label {
  color: var(--apl-ui-color-text-muted);
  font-size: var(--apl-ui-font-size-detail);
  font-weight: var(--apl-ui-font-weight-semibold);
}

.apl-timeblock-picker {
  display: block;
  min-width: 0;
  position: relative;
  width: 100%;
}

body.janox-template [data-apl-telo] .apl-timeblock-dialog .apl-timeblock-picker input.apl-control[type="date"],
body.janox-template [data-apl-telo] .apl-timeblock-dialog .apl-timeblock-picker input.apl-control[type="time"],
body.janox-template [data-apl-telo] .apl-timeblock-dialog .apl-timeblock-picker input.apl-control[type="datetime-local"],
[data-apl-telo] .apl-timeblock-dialog .apl-timeblock-picker input.apl-control[type="date"],
[data-apl-telo] .apl-timeblock-dialog .apl-timeblock-picker input.apl-control[type="time"],
[data-apl-telo] .apl-timeblock-dialog .apl-timeblock-picker input.apl-control[type="datetime-local"] {
  color-scheme: light;
  cursor: pointer;
  min-width: 0;
  padding-right: calc(var(--apl-ui-control-height) + var(--apl-ui-space-1)) !important;
}

body.janox-template [data-apl-telo] .apl-timeblock-picker input.apl-control[type="date"]::-webkit-calendar-picker-indicator,
body.janox-template [data-apl-telo] .apl-timeblock-picker input.apl-control[type="time"]::-webkit-calendar-picker-indicator,
body.janox-template [data-apl-telo] .apl-timeblock-picker input.apl-control[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-apl-telo] .apl-timeblock-picker input.apl-control[type="date"]::-webkit-calendar-picker-indicator,
[data-apl-telo] .apl-timeblock-picker input.apl-control[type="time"]::-webkit-calendar-picker-indicator,
[data-apl-telo] .apl-timeblock-picker input.apl-control[type="datetime-local"]::-webkit-calendar-picker-indicator {
  display: none !important;
}

.apl-timeblock-picker > button {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: 0;
  border-left: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: 0 var(--apl-ui-radius-md) var(--apl-ui-radius-md) 0;
  bottom: var(--apl-ui-border-width);
  color: var(--apl-ui-color-brand-dark);
  cursor: pointer;
  display: inline-flex;
  font-size: var(--apl-ui-font-size-control);
  justify-content: center;
  padding: 0;
  position: absolute;
  right: var(--apl-ui-border-width);
  top: var(--apl-ui-border-width);
  width: calc(var(--apl-ui-control-height) - var(--apl-ui-border-width) - var(--apl-ui-border-width));
  z-index: 1;
}

.apl-timeblock-picker > button:hover,
.apl-timeblock-picker > button:focus,
.apl-timeblock-picker:focus-within > button {
  background: var(--apl-ui-color-brand-surface);
  color: var(--apl-ui-color-brand-dark);
  outline: 0;
}

.apl-timeblock-people {
  max-height: 150px;
  overflow: auto;
}

.apl-timeblock-feedback {
  align-items: center;
  background: var(--apl-ui-color-info-soft);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: auto minmax(0, 1fr);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  position: sticky;
  top: 0;
  z-index: 2;
}

.apl-timeblock-feedback[hidden] {
  display: none !important;
}

.apl-timeblock-feedback__icon {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border-radius: var(--apl-ui-radius-pill);
  color: var(--apl-ui-color-info-dark);
  display: inline-flex;
  height: var(--apl-ui-control-height-sm);
  justify-content: center;
  width: var(--apl-ui-control-height-sm);
}

.apl-timeblock-feedback__copy {
  display: grid;
  gap: var(--apl-ui-space-0);
  min-width: 0;
}

.apl-timeblock-feedback__copy strong {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-body-sm);
}

.apl-timeblock-feedback__copy small {
  color: var(--apl-ui-color-text-muted);
  font-size: var(--apl-ui-font-size-caption);
  overflow-wrap: anywhere;
}

.apl-timeblock-feedback.is-success {
  background: var(--apl-ui-color-success-soft);
  border-color: var(--apl-ui-color-success-border);
}

.apl-timeblock-feedback.is-success .apl-timeblock-feedback__icon {
  color: var(--apl-ui-color-success-dark);
}

.apl-timeblock-feedback.is-warning {
  background: var(--apl-ui-color-warning-soft);
  border-color: var(--apl-ui-color-warning-border);
}

.apl-timeblock-feedback.is-warning .apl-timeblock-feedback__icon {
  color: var(--apl-ui-color-warning-dark);
}

.apl-timeblock-feedback.is-error {
  background: var(--apl-ui-color-danger-soft);
  border-color: var(--apl-ui-color-danger-border);
}

.apl-timeblock-feedback.is-error .apl-timeblock-feedback__icon {
  color: var(--apl-ui-color-danger-dark);
}

.apl-timeblock-sync-summary {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: auto minmax(0, 1fr);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}

.apl-timeblock-sync-summary > span {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  height: var(--apl-ui-control-height-sm);
  justify-content: center;
  width: var(--apl-ui-control-height-sm);
}

.apl-timeblock-sync-summary > div {
  display: grid;
  gap: var(--apl-ui-space-0);
  min-width: 0;
}

.apl-timeblock-sync-summary strong {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-body-sm);
}

.apl-timeblock-sync-summary small {
  color: var(--apl-ui-color-text-subtle);
  font-size: var(--apl-ui-font-size-caption);
  overflow-wrap: anywhere;
}

body.apl-dialog-open .datetimepicker,
body.apl-dialog-open .datetimepicker-dropdown,
body.apl-dialog-open .bootstrap-datetimepicker-widget,
body.apl-dialog-open .datepicker-dropdown {
  z-index: calc(var(--apl-ui-z-overlay) + 10) !important;
}

.apl-agenda-event[data-kind="disponibilidad"][data-status="7"] {
  background: var(--apl-ui-color-warning-soft);
  border-left-color: var(--apl-ui-color-warning-dark);
}

.apl-agenda-event[data-kind="disponibilidad"][data-status="6"] {
  background: var(--apl-ui-color-success-soft);
  border-left-color: var(--apl-ui-color-success-dark);
}

.apl-agenda-inspector__footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--apl-ui-space-2);
}

@media (max-width: 700px) {
  .apl-timeblock-dialog {
    width: calc(100vw - (var(--apl-ui-space-2) * 2));
  }

  .apl-timeblock-decision,
  .apl-timeblock-range {
    grid-template-columns: minmax(0, 1fr);
  }

  .apl-timeblock-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-self: stretch;
  }
}

.apl-exception-builder__reason textarea {
  min-height: 92px;
  resize: vertical;
}

.apl-exception-builder__reason small,
.apl-period-switcher label small {
  color: var(--apl-ui-color-text-subtle);
  font-size: var(--apl-ui-font-size-caption);
}

.apl-exception-builder > .apl-notice {
  margin: 0 var(--apl-ui-space-3) var(--apl-ui-space-3);
}

.apl-exception-card__audit {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--apl-ui-space-2) var(--apl-ui-space-3);
}

.apl-exception-card__audit > span {
  align-items: center;
  color: var(--apl-ui-color-text-subtle);
  display: inline-flex;
  font-size: var(--apl-ui-font-size-caption);
  gap: var(--apl-ui-space-1);
}

.apl-exception-card.is-disabled {
  background: var(--apl-ui-color-surface-muted);
}


/* Caja rapida: composicion vertical compacta para tablet y celular. */
.apl-touch-pos {
  --apl-ui-touch-pos-target: calc(var(--apl-ui-control-height-lg) + var(--apl-ui-space-2));
  --apl-ui-touch-pos-card-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-3));
  gap: var(--apl-ui-space-2);
}
.apl-touch-pos .apl-telo__nav a { min-height: var(--apl-ui-touch-pos-target); }
.apl-touch-pos__hero,
.apl-touch-pos__heading {
  border-radius: var(--apl-ui-radius-lg);
  gap: var(--apl-ui-space-3);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
.apl-touch-pos__hero h1,
.apl-touch-pos__heading h1 { font-size: var(--apl-ui-font-size-title-lg); }
.apl-touch-pos__hero p,
.apl-touch-pos__heading p { font-size: var(--apl-ui-font-size-detail); }
.apl-touch-pos__utility {
  border-radius: var(--apl-ui-radius-lg);
  min-height: var(--apl-ui-touch-pos-target);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
.apl-touch-pos__utility > i { font-size: var(--apl-ui-font-size-icon-lg); }
.apl-touch-pos-start { border-radius: var(--apl-ui-radius-lg); }
.apl-touch-pos-start > header { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
.apl-touch-pos-start__grid {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
.apl-touch-pos-start__grid > a {
  border-radius: var(--apl-ui-radius-lg);
  gap: var(--apl-ui-space-2);
  min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-5));
  padding: var(--apl-ui-space-3);
}
.apl-touch-pos-start__icon,
.apl-touch-pos-shortcut__icon {
  flex-basis: var(--apl-ui-avatar-md);
  height: var(--apl-ui-avatar-md);
  width: var(--apl-ui-avatar-md);
}
.apl-touch-pos-shortcut {
  border-radius: var(--apl-ui-radius-lg);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
.apl-touch-pos-flow {
  border-radius: var(--apl-ui-radius-lg);
  padding: var(--apl-ui-space-1);
}
.apl-touch-pos-flow > span,
.apl-touch-pos-flow > a {
  min-height: var(--apl-ui-touch-pos-target);
  padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
}
.apl-touch-pos-flow small { display: none; }
.apl-touch-pos-stagebar {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: var(--apl-ui-space-2);
}
.apl-touch-pos-stagebar .apl-touch-pos__heading,
.apl-touch-pos-stagebar .apl-touch-pos-types {
  border: 0;
  min-width: 0;
  padding: 0;
}
.apl-touch-pos-stagebar .apl-touch-pos-types {
  background: var(--apl-ui-color-surface-subtle);
  padding: var(--apl-ui-space-1);
}
.apl-touch-pos-types { border-radius: var(--apl-ui-radius-lg); }
.apl-touch-pos-types a {
  min-height: var(--apl-ui-touch-pos-target);
  padding: var(--apl-ui-space-1) var(--apl-ui-space-3);
}
.apl-touch-pos-picker,
.apl-touch-pos-summary,
.apl-touch-pos-payments,
.apl-touch-price-browser { border-radius: var(--apl-ui-radius-lg); }
.apl-touch-pos-picker > header {
  gap: var(--apl-ui-space-3);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
.apl-touch-pos-search { gap: var(--apl-ui-space-2); }
.apl-touch-pos-search .apl-finder,
.apl-touch-pos-search .apl-finder input {
  height: var(--apl-ui-touch-pos-target) !important;
  min-height: var(--apl-ui-touch-pos-target) !important;
}
.apl-touch-pos-people,
.apl-touch-pos-items {
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--apl-ui-space-2);
}
.apl-touch-pos-person {
  border-radius: var(--apl-ui-radius-lg);
  gap: var(--apl-ui-space-2);
  min-height: var(--apl-ui-touch-pos-card-height);
  padding: var(--apl-ui-space-2);
}
.apl-touch-pos-person .apl-avatar--lg {
  flex-basis: var(--apl-ui-avatar-md);
  height: var(--apl-ui-avatar-md);
  width: var(--apl-ui-avatar-md);
}
.apl-touch-pos-person strong { font-size: var(--apl-ui-font-size-title); }
.apl-touch-pos-item {
  border-radius: var(--apl-ui-radius-lg);
  min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-6));
}
.apl-touch-pos-item > button {
  gap: var(--apl-ui-space-1);
  min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-6));
  padding: var(--apl-ui-space-2);
}
.apl-touch-pos-item__price {
  align-items: end;
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
}
.apl-touch-pos-item__price > strong { font-size: var(--apl-ui-font-size-title-lg); }
.apl-touch-pos-item__action {
  min-height: var(--apl-ui-control-height);
  padding-top: var(--apl-ui-space-1);
}
.apl-touch-pos-checkout { gap: var(--apl-ui-space-2); }
.apl-touch-pos-summary > header,
.apl-touch-pos-payments > header { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
.apl-touch-pos-summary dl { padding: var(--apl-ui-space-1) var(--apl-ui-space-3); }
.apl-touch-pos-summary dl > div,
.apl-touch-pos-summary__single { padding-block: var(--apl-ui-space-2); }
.apl-touch-pos-price { margin-inline: var(--apl-ui-space-3); padding-block: var(--apl-ui-space-2); }
.apl-touch-pos-quantity { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
.apl-touch-pos-summary__single { margin-inline: var(--apl-ui-space-3); }
.apl-touch-pos-summary > footer { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
.apl-touch-pos-summary > footer strong { font-size: var(--apl-ui-font-size-title-lg); }
.apl-touch-pos-payments__grid {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
.apl-touch-pos-payments__grid > button {
  border-radius: var(--apl-ui-radius-lg);
  gap: var(--apl-ui-space-2);
  min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-2));
  padding: var(--apl-ui-space-2);
}
.apl-touch-pos-confirm {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  padding-bottom: max(var(--apl-ui-space-2), env(safe-area-inset-bottom));
}
.apl-touch-price-command { padding: var(--apl-ui-space-2); }
.apl-touch-price-grid {
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: var(--apl-ui-space-2);
}
.apl-touch-price-card {
  border-radius: var(--apl-ui-radius-lg);
  gap: var(--apl-ui-space-1);
  min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-6));
  padding: var(--apl-ui-space-2);
}
.apl-touch-price-card > strong { font-size: var(--apl-ui-font-size-title-lg); }

@media (max-width: 1100px) {
  .apl-touch-pos__hero > div > p:not(.apl-page__eyebrow),
  .apl-touch-pos__heading > div > p:not(.apl-page__eyebrow),
  .apl-touch-pos-start__copy > span,
  .apl-touch-pos-person small,
  .apl-touch-pos-item__action,
  .apl-touch-pos-payments > header p,
  .apl-touch-pos-payments > header > small { display: none; }
  .apl-touch-pos-start__grid,
  .apl-touch-pos-people,
  .apl-touch-pos-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-touch-price-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .apl-touch-pos-item,
  .apl-touch-pos-item > button { min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-5)); }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .apl-touch-pos-checkout {
    grid-template-columns: minmax(var(--apl-ui-card-min-width), var(--apl-ui-touch-pos-summary-width)) minmax(0, 1fr);
  }
  .apl-touch-pos-summary { position: sticky; }
}

@media (max-width: 700px) {
  .apl-touch-pos .apl-telo__nav { justify-content: space-between; }
  .apl-touch-pos .apl-telo__nav a {
    flex: 1 1 0;
    justify-content: center;
    padding-inline: var(--apl-ui-space-2);
  }
  .apl-touch-pos .apl-telo__nav a span { display: none; }
  .apl-touch-pos__hero,
  .apl-touch-pos__heading,
  .apl-touch-pos-shortcut,
  .apl-touch-pos-confirm {
    align-items: center;
    flex-direction: row;
  }
  .apl-touch-pos__hero > div > p,
  .apl-touch-pos__heading > div > p,
  .apl-touch-pos__utility small { display: none; }
  .apl-touch-pos__hero > a,
  .apl-touch-pos__heading > a { align-self: center; }
  .apl-touch-pos__hero > div,
  .apl-touch-pos__heading > div { flex: 1 1 auto; }
  .apl-touch-pos-stagebar { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-stagebar .apl-touch-pos__heading { padding-inline: var(--apl-ui-space-1); }
  .apl-touch-pos-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-touch-pos-flow > span,
  .apl-touch-pos-flow > a { justify-content: center; }
  .apl-touch-pos-flow > i,
  .apl-touch-pos-flow span > span,
  .apl-touch-pos-flow a > span { display: none; }
  .apl-touch-pos-types a {
    flex-direction: row;
    gap: var(--apl-ui-space-1);
    padding-inline: var(--apl-ui-space-1);
  }
  .apl-touch-pos-start > header { display: none; }
  .apl-touch-pos-start__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .apl-touch-pos-start__grid > a {
    gap: var(--apl-ui-space-1);
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-6));
    padding: var(--apl-ui-space-2);
    text-align: center;
  }
  .apl-touch-pos-start__grid > a > i:last-child,
  .apl-touch-pos-start__copy small,
  .apl-touch-pos-start__copy > span,
  .apl-touch-pos-shortcut small { display: none; }
  .apl-touch-pos-start__copy > strong { font-size: var(--apl-ui-font-size-title); }
  .apl-touch-pos-shortcut__icon {
    flex-basis: var(--apl-ui-avatar-sm);
    height: var(--apl-ui-avatar-sm);
    width: var(--apl-ui-avatar-sm);
  }
  .apl-touch-pos-picker > header { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-picker > header > div:first-child { display: none; }
  .apl-touch-pos-search {
    align-items: center;
    flex-direction: row;
  }
  .apl-touch-pos-search > small { align-self: center; }
  .apl-touch-pos-people,
  .apl-touch-pos-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-touch-pos-person {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .apl-touch-pos-person > i,
  .apl-touch-pos-person small { display: none; }
  .apl-touch-pos-item__top > small,
  .apl-touch-pos-item__price > small { display: none; }
  .apl-touch-pos-item__name { font-size: var(--apl-ui-font-size-body); }
  .apl-touch-pos-item,
  .apl-touch-pos-item > button { min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-5)); }
  .apl-touch-pos-checkout { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-summary { position: static; }
  .apl-touch-pos-summary > header,
  .apl-touch-pos-summary__single { display: none; }
  .apl-touch-pos-summary dl {
    display: grid;
    gap: var(--apl-ui-space-2);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  }
  .apl-touch-pos-summary dl > div {
    align-items: flex-start;
    border: 0;
    display: grid;
    gap: var(--apl-ui-space-1);
    justify-content: start;
    padding: 0;
  }
  .apl-touch-pos-summary dl > div:nth-child(3) { display: none; }
  .apl-touch-pos-summary dd { text-align: left; }
  .apl-touch-pos-quantity { align-items: center; flex-direction: row; }
  .apl-touch-pos-stepper {
    align-self: auto;
    grid-template-columns: var(--apl-ui-touch-pos-target) var(--apl-ui-touch-pos-target) var(--apl-ui-touch-pos-target);
  }
  .apl-touch-pos-stepper input.form-control { width: var(--apl-ui-touch-pos-target) !important; }
  .apl-touch-pos-payments > header {
    align-items: center;
    flex-direction: row;
  }
  .apl-touch-pos-payments > header span,
  .apl-touch-pos-payments > header p,
  .apl-touch-pos-payments > header > small { display: none; }
  .apl-touch-pos-payments__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-touch-pos-payments__grid > button {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: var(--apl-ui-touch-pos-target);
  }
  .apl-touch-pos-payments__grid > button small { display: none; }
  .apl-touch-pos-payment__icon {
    flex-basis: var(--apl-ui-avatar-sm);
    height: var(--apl-ui-avatar-sm);
    width: var(--apl-ui-avatar-sm);
  }
  .apl-touch-pos-confirm > div span,
  .apl-touch-pos-confirm > div small { display: none; }
  .apl-touch-pos-confirm > div { flex: 1 1 auto; overflow: hidden; }
  .apl-touch-pos-confirm > div strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .apl-touch-pos-confirm .apl-btn {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }
  .apl-touch-price-command { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-price-kinds { overflow-x: auto; }
  .apl-touch-price-kinds button { flex: 0 0 auto; }
  .apl-touch-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-touch-price-card { min-height: calc(var(--apl-ui-touch-pos-target) + var(--apl-ui-space-5)); }
}

@container apl-touch-pos (max-width: 1100px) {
  .apl-touch-pos-start__grid,
  .apl-touch-pos-people,
  .apl-touch-pos-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-touch-price-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@container apl-touch-pos (max-width: 700px) {
  .apl-touch-pos-stagebar,
  .apl-touch-pos-picker > header,
  .apl-touch-price-command { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-start__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-touch-pos-people,
  .apl-touch-pos-items,
  .apl-touch-pos-payments__grid,
  .apl-touch-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-touch-pos-picker > header > div:first-child { display: none; }
  .apl-touch-pos-search { align-items: center; flex-direction: row; }
  .apl-touch-pos-checkout { grid-template-columns: minmax(0, 1fr); }
  .apl-touch-pos-summary { position: static; }
}


/* Reserva publica optimizada para celulares y tablets. */
body.apl-public-booking-document {
  background: var(--apl-ui-color-surface-subtle);
  overscroll-behavior-y: contain;
}
body.apl-public-booking-document .page-header { display: none; }
body.apl-public-booking-document #main-container.container {
  margin-bottom: 0 !important;
  margin-top: var(--apl-ui-public-content-start);
  margin-top: calc(var(--apl-ui-public-content-start) + env(safe-area-inset-top));
  max-width: none;
  padding: var(--apl-ui-space-3);
  width: 100%;
}
body.apl-public-booking-document #home-body { min-width: 0; }
body.apl-public-booking-document .apl-booking {
  gap: var(--apl-ui-space-3);
  margin-bottom: 0;
  max-width: 1120px;
  padding-bottom: max(var(--apl-ui-space-3), env(safe-area-inset-bottom));
}
.apl-booking--availability { max-width: 1120px; }
.apl-booking button,
.apl-booking a,
.apl-booking input,
.apl-booking textarea { touch-action: manipulation; }
.apl-booking button,
.apl-booking a { -webkit-tap-highlight-color: transparent; }
.apl-booking-context__change { white-space: nowrap; }
.apl-booking-context__change i { margin-right: var(--apl-ui-space-1); }
.apl-booking-context__change span,
.apl-availability-checkout .apl-btn span { color: inherit; }

@media (min-width: 700px) and (max-width: 900px) {
  .apl-booking--confirm .apl-booking-confirmation {
    gap: var(--apl-ui-space-2);
    grid-template-columns: minmax(270px, .85fr) minmax(0, 1.15fr);
  }
  .apl-booking--confirm .apl-appointment-ticket > header { padding: var(--apl-ui-space-3); }
  .apl-booking--confirm .apl-appointment-ticket__professional,
  .apl-booking--confirm .apl-appointment-ticket dl,
  .apl-booking--confirm .apl-appointment-ticket__actions { padding: var(--apl-ui-space-2); }
  .apl-booking--confirm .apl-appointment-ticket__action small { display: none; }
}

@media (max-width: 900px) {
  body.apl-public-booking-document #main-container.container { padding: var(--apl-ui-space-2); }
  body.apl-public-booking-document .apl-booking { gap: var(--apl-ui-space-2); }

  .apl-booking-path {
    border-radius: var(--apl-ui-radius-lg);
    min-height: var(--apl-ui-control-height);
    padding: var(--apl-ui-space-1) var(--apl-ui-space-3);
  }
  .apl-booking-path li:not(:last-child)::after { width: var(--apl-ui-space-4); }

  .apl-booking-services-intro { padding: var(--apl-ui-space-3); }
  .apl-booking--services .apl-booking-service-command {
    gap: var(--apl-ui-space-2);
    margin-bottom: var(--apl-ui-space-2);
    padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
    position: sticky;
    top: max(var(--apl-ui-space-1), env(safe-area-inset-top));
    z-index: var(--apl-ui-z-sticky);
  }
  .apl-booking--services .apl-booking-service-list { gap: var(--apl-ui-space-2); }
  .apl-booking--services .apl-booking-service {
    gap: var(--apl-ui-space-2);
    min-height: 132px;
    padding: var(--apl-ui-space-3);
  }

  .apl-booking-context {
    border-radius: var(--apl-ui-radius-lg);
    gap: var(--apl-ui-space-2);
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  }
  .apl-booking-context > a { grid-column: auto; }
  .apl-booking-context h1 { font-size: var(--apl-ui-font-size-title); }
  .apl-booking-context > strong { font-size: var(--apl-ui-font-size-title-lg); }

  .apl-availability { border-radius: var(--apl-ui-radius-lg); }
  .apl-availability__header { padding: var(--apl-ui-space-3); }
  .apl-availability__header p { display: none; }
  .apl-availability__people { padding-block: var(--apl-ui-space-2); }
  .apl-availability__people > header { padding: 0 var(--apl-ui-space-3) var(--apl-ui-space-2); }
  .apl-availability__people header p { display: none; }
  .apl-availability__people-list {
    gap: var(--apl-ui-space-2);
    padding: 0 var(--apl-ui-space-3);
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }
  .apl-availability-person {
    min-height: var(--apl-ui-control-height);
    padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
    scroll-snap-align: start;
  }
  .apl-availability__people > p { display: none; }
  .apl-availability__toolbar { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
  .apl-availability-dates { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
  .apl-availability-hours > header { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
  .apl-availability-hours__body {
    gap: var(--apl-ui-space-3);
    padding: var(--apl-ui-space-2) var(--apl-ui-space-3) var(--apl-ui-space-3);
  }
  .apl-availability-slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-availability-slot {
    min-height: var(--apl-ui-control-height);
    padding: var(--apl-ui-space-2);
  }
  .apl-availability-assignment {
    border-radius: var(--apl-ui-radius-lg);
    padding: var(--apl-ui-space-2);
  }
  .apl-availability-checkout {
    border-radius: var(--apl-ui-radius-lg);
    bottom: max(var(--apl-ui-space-1), env(safe-area-inset-bottom));
    padding: var(--apl-ui-space-2);
  }
  .apl-availability-checkout .apl-btn { min-height: var(--apl-ui-control-height); }

  .apl-booking--confirm .apl-booking-hero { gap: 0; }
  .apl-booking--confirm .apl-booking-hero p { display: none; }
  .apl-booking--confirm .apl-booking-contact__form { gap: var(--apl-ui-space-2); }
  .apl-booking--confirm .apl-booking-contact__form .apl-control { min-height: var(--apl-ui-control-height-lg); }
}

@media (max-width: 620px) {
  body.apl-public-booking-document #main-container.container {
    padding: var(--apl-ui-space-1);
  }
  body.apl-public-booking-document .apl-booking {
    gap: var(--apl-ui-space-2);
    padding-bottom: max(var(--apl-ui-space-2), env(safe-area-inset-bottom));
  }

  .apl-booking-path {
    box-shadow: none;
    min-height: 42px;
    padding-inline: var(--apl-ui-space-2);
  }
  .apl-booking-path__label { display: none; }
  .apl-booking-path ol { justify-content: space-between; width: 100%; }
  .apl-booking-path li { gap: var(--apl-ui-space-1); }
  .apl-booking-path li span { display: none; }
  .apl-booking-path li.is-current span { display: inline; font-size: var(--apl-ui-font-size-caption); }
  .apl-booking-path li:not(:last-child)::after { margin-inline: var(--apl-ui-space-1); width: var(--apl-ui-space-3); }
  .apl-booking-path li b { height: 28px; width: 28px; }

  .apl-booking-services-intro {
    gap: var(--apl-ui-space-2);
    padding: var(--apl-ui-space-3);
  }
  .apl-booking-services-intro::after { height: 96px; right: -48px; top: -50px; width: 96px; }
  .apl-booking-services-intro h1 { font-size: var(--apl-ui-font-size-page-title); }
  .apl-booking-services-intro p {
    display: -webkit-box;
    font-size: var(--apl-ui-font-size-body-sm);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .apl-booking-services-intro__benefits { display: none; }
  .apl-booking--services .apl-booking-service-command {
    border-radius: var(--apl-ui-radius-lg);
    padding: var(--apl-ui-space-2);
  }
  .apl-booking-service-command__heading { display: none; }
  .apl-booking-service-command__tools {
    align-items: center;
    flex-direction: row;
    gap: var(--apl-ui-space-1);
  }
  [data-apl-telo].apl-booking--services .apl-booking-service-command .apl-finder {
    min-height: var(--apl-ui-control-height);
  }
  .apl-booking-service-count {
    min-height: var(--apl-ui-control-height-sm);
    padding-inline: var(--apl-ui-space-2);
  }
  .apl-booking-service-count span { display: none; }
  .apl-booking--services .apl-booking-service {
    border-radius: var(--apl-ui-radius-lg);
    gap: var(--apl-ui-space-2);
    min-height: 0;
    padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  }
  .apl-booking--services .apl-booking-service__icon { height: var(--apl-ui-avatar-md); width: var(--apl-ui-avatar-md); }
  .apl-booking--services .apl-booking-service__name > small { display: none; }
  .apl-booking--services .apl-booking-service__name strong { font-size: var(--apl-ui-font-size-title); }
  .apl-booking-service__footer { padding-top: var(--apl-ui-space-2); }
  .apl-booking-service__price b { font-size: var(--apl-ui-font-size-body); }
  .apl-booking--services .apl-pagination { padding-block: var(--apl-ui-space-2); }
  .apl-booking--services .apl-booking-trust { display: none; }

  .apl-booking-context {
    gap: var(--apl-ui-space-1);
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: var(--apl-ui-space-2);
  }
  .apl-booking-context > div { gap: 0; }
  .apl-booking-context > div > span { display: none; }
  .apl-booking-context h1 {
    font-size: var(--apl-ui-font-size-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .apl-booking-context p { white-space: nowrap; }
  .apl-booking-context > strong { font-size: var(--apl-ui-font-size-title); }
  .apl-booking-context__change {
    align-items: center;
    display: inline-flex;
    height: var(--apl-ui-control-height);
    justify-content: center;
    min-height: var(--apl-ui-control-height);
    padding: 0;
    width: var(--apl-ui-control-height);
  }
  .apl-booking-context__change i { margin: 0; }
  .apl-booking-context__change span { display: none; }

  .apl-availability__header {
    align-items: center;
    flex-direction: row;
    gap: var(--apl-ui-space-2);
    padding: var(--apl-ui-space-2);
  }
  .apl-availability__eyebrow { display: none; }
  .apl-availability__header h2 { font-size: var(--apl-ui-font-size-title); }
  .apl-availability__status {
    align-self: center;
    max-width: 48%;
    min-height: 30px;
    overflow: hidden;
    padding-inline: var(--apl-ui-space-2);
  }
  .apl-availability__status span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .apl-availability__people { padding-block: var(--apl-ui-space-1); }
  .apl-availability__people > header { display: none; }
  .apl-availability__people-list {
    gap: var(--apl-ui-space-1);
    padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
  }
  .apl-availability-person {
    border-color: var(--apl-ui-color-border-muted);
    min-height: 40px;
    padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
  }
  .apl-availability-person .apl-avatar { height: 30px; width: 30px; }
  .apl-availability-person small { display: none; }
  .apl-availability-person strong { font-size: var(--apl-ui-font-size-body-sm); max-width: 150px; }

  .apl-availability__toolbar {
    align-items: center;
    flex-direction: row;
    gap: var(--apl-ui-space-2);
    padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
  }
  .apl-availability__toolbar > div > span { display: none; }
  .apl-availability__toolbar h3 { font-size: var(--apl-ui-font-size-body-sm); }
  .apl-availability__toolbar nav { align-self: center; }
  .apl-availability__toolbar .apl-btn--icon { height: 40px; min-height: 40px; width: 40px; }
  .apl-availability-dates {
    gap: var(--apl-ui-space-1);
    grid-auto-columns: 72px;
    padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
  }
  .apl-availability-date {
    border-radius: var(--apl-ui-radius-md);
    gap: 1px;
    min-height: 62px;
    padding: var(--apl-ui-space-1);
  }
  .apl-availability-date strong { font-size: var(--apl-ui-font-size-title); }
  .apl-availability-date span,
  .apl-availability-date small { font-size: var(--apl-ui-font-size-caption); }

  .apl-availability-hours > header {
    align-items: center;
    flex-direction: row;
    gap: var(--apl-ui-space-2);
    padding: var(--apl-ui-space-2);
  }
  .apl-availability-hours > header span { display: none; }
  .apl-availability-hours h3 { font-size: var(--apl-ui-font-size-body); }
  .apl-availability-hours__body {
    gap: var(--apl-ui-space-2);
    padding: var(--apl-ui-space-1) var(--apl-ui-space-2) var(--apl-ui-space-3);
  }
  .apl-availability-band { gap: var(--apl-ui-space-1); }
  .apl-availability-band h4 { font-size: var(--apl-ui-font-size-detail); }
  .apl-availability-slot-grid {
    gap: var(--apl-ui-space-1);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .apl-availability-slot {
    border-radius: var(--apl-ui-radius-md);
    justify-items: center;
    min-height: 44px;
    padding: var(--apl-ui-space-1);
    text-align: center;
  }
  .apl-availability-slot strong { font-size: var(--apl-ui-font-size-body-sm); }
  .apl-availability-slot small { display: none; }
  .apl-availability-empty {
    gap: var(--apl-ui-space-2);
    margin: var(--apl-ui-space-1) var(--apl-ui-space-2) var(--apl-ui-space-2);
    padding: var(--apl-ui-space-2);
  }
  .apl-availability-empty p { font-size: var(--apl-ui-font-size-caption); }
  .apl-availability-skeleton { gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-2); }
  .apl-availability-skeleton__dates i:nth-child(n+5),
  .apl-availability-skeleton__slots i:nth-child(n+4) { display: none; }
  .apl-availability-skeleton__dates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .apl-availability-skeleton__slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .apl-availability-assignment {
    align-items: center;
    flex-direction: row;
    gap: var(--apl-ui-space-2);
    overflow: hidden;
  }
  .apl-availability-assignment > div:first-child { display: none; }
  .apl-availability-assignment__options {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: 0;
    overflow-x: auto;
  }
  .apl-availability-assignee { flex: 0 0 auto; min-height: 40px; }
  .apl-availability-checkout {
    align-items: center;
    flex-direction: row;
    gap: var(--apl-ui-space-2);
    padding: var(--apl-ui-space-1);
  }
  .apl-availability-checkout > div { flex: 1 1 auto; padding-left: var(--apl-ui-space-1); }
  .apl-availability-checkout > div > span,
  .apl-availability-checkout > div > small { display: none; }
  .apl-availability-checkout strong {
    display: -webkit-box;
    font-size: var(--apl-ui-font-size-detail);
    line-height: var(--apl-ui-line-tight);
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .apl-availability-checkout .apl-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding-inline: var(--apl-ui-space-3);
  }

  .apl-booking--confirm .apl-booking-hero { text-align: left; }
  .apl-booking--confirm .apl-booking-hero > span { font-size: var(--apl-ui-font-size-caption); }
  .apl-booking--confirm .apl-booking-hero h1 { font-size: var(--apl-ui-font-size-page-title); }
  .apl-booking--confirm .apl-booking-confirmation { gap: var(--apl-ui-space-2); }
  .apl-booking--confirm .apl-appointment-ticket,
  .apl-booking--confirm .apl-booking-contact { border-radius: var(--apl-ui-radius-lg); }
  .apl-booking--confirm .apl-appointment-ticket > header { padding: var(--apl-ui-space-3); }
  .apl-booking--confirm .apl-appointment-ticket header strong { font-size: var(--apl-ui-font-size-title); }
  .apl-booking--confirm .apl-appointment-ticket__professional { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
  .apl-booking--confirm .apl-appointment-ticket dl {
    gap: var(--apl-ui-space-1);
    padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
  }
  .apl-booking--confirm .apl-appointment-ticket__actions {
    gap: var(--apl-ui-space-1);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: var(--apl-ui-space-2);
  }
  .apl-booking--confirm .apl-appointment-ticket__action {
    gap: var(--apl-ui-space-1);
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 44px;
    padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
  }
  .apl-booking--confirm .apl-appointment-ticket__action-icon,
  .apl-booking--confirm .apl-appointment-ticket__action small { display: none; }
  .apl-booking--confirm .apl-appointment-ticket__action strong { font-size: var(--apl-ui-font-size-detail); }
  .apl-booking--confirm .apl-booking-contact > header { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
  .apl-booking--confirm .apl-booking-contact header p { display: none; }
  .apl-booking--confirm .apl-booking-contact h2 { font-size: var(--apl-ui-font-size-title); }
  .apl-booking--confirm .apl-booking-contact__form {
    gap: var(--apl-ui-space-2);
    padding: var(--apl-ui-space-2) var(--apl-ui-space-3) var(--apl-ui-space-3);
  }
  .apl-booking--confirm .apl-booking-contact__form > div { gap: var(--apl-ui-space-2); }
  .apl-booking--confirm .apl-booking-contact__form textarea.apl-control { min-height: 72px; }
  .apl-booking--confirm .apl-booking-contact__form > .apl-btn { min-height: 48px; width: 100%; }

  .apl-booking--success .apl-confirmation-seal {
    align-items: center;
    flex-direction: row;
    gap: var(--apl-ui-space-2);
    padding: var(--apl-ui-space-3);
  }
  .apl-booking--success .apl-confirmation-seal > span { flex-basis: 42px; height: 42px; }
  .apl-booking--success .apl-confirmation-seal h1 { font-size: var(--apl-ui-font-size-page-title); }
  .apl-booking--success .apl-confirmation-seal p { display: none; }
  .apl-booking--success .apl-confirmation-receipt { border-radius: var(--apl-ui-radius-lg); }
  .apl-booking--success .apl-confirmation-receipt > header,
  .apl-booking--success .apl-confirmation-receipt__when,
  .apl-booking--success .apl-confirmation-receipt__body,
  .apl-booking--success .apl-confirmation-receipt > footer { padding: var(--apl-ui-space-2) var(--apl-ui-space-3); }
  .apl-booking--success .apl-confirmation-receipt__when {
    align-items: center;
    flex-direction: row;
    gap: var(--apl-ui-space-2);
  }
  .apl-booking--success .apl-confirmation-receipt__when strong { font-size: var(--apl-ui-font-size-title); text-align: right; }
  .apl-booking--success .apl-confirmation-receipt__body { gap: var(--apl-ui-space-2); }
  .apl-booking--success .apl-confirmation-receipt__contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-booking--success .apl-confirmation-receipt > footer .apl-btn { width: 100%; }

  .apl-booking-error {
    border-radius: var(--apl-ui-radius-lg);
    min-height: 320px;
    padding: var(--apl-ui-space-4) var(--apl-ui-space-3);
  }
  .apl-booking-error h1 { font-size: var(--apl-ui-font-size-page-title); }
  .apl-booking-cancel { border-radius: var(--apl-ui-radius-lg); gap: var(--apl-ui-space-2); padding: var(--apl-ui-space-3); }
  .apl-booking-cancel__form,
  .apl-booking-cancel__confirmation > summary { width: 100%; }
}

@media (max-width: 370px) {
  .apl-availability-slot strong { font-size: var(--apl-ui-font-size-detail); }
  .apl-booking-context p { display: none; }
  .apl-booking-context > strong { font-size: var(--apl-ui-font-size-body); }
  .apl-booking--confirm .apl-appointment-ticket__actions { grid-template-columns: minmax(0, 1fr); }
}

/* Horario general de empresa y herencia por servicio. */
.apl-hours-flow {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  padding: var(--apl-ui-space-2);
}
.apl-hours-flow > article {
  align-items: center;
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-2);
  min-width: 0;
  padding: var(--apl-ui-space-2);
}
.apl-hours-flow > article.is-current { background: var(--apl-ui-color-brand-surface); }
.apl-hours-flow > article > b {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-brand-dark);
  display: inline-flex;
  flex: 0 0 var(--apl-ui-avatar-md);
  font-weight: var(--apl-ui-font-weight-bold);
  height: var(--apl-ui-avatar-md);
  justify-content: center;
}
.apl-hours-flow > article > div { display: grid; min-width: 0; }
.apl-hours-flow span,
.apl-hours-flow small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-hours-flow strong { color: var(--apl-ui-color-text-strong); }
.apl-hours-flow > i { color: var(--apl-ui-color-text-subtle); }

.apl-hours-metrics { display: grid; gap: var(--apl-ui-space-3); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-hours-metrics > article {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-1);
  padding: var(--apl-ui-space-3);
}
.apl-hours-metrics span,
.apl-hours-metrics small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-hours-metrics strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title); font-weight: var(--apl-ui-font-weight-bold); }

.apl-company-hours {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  display: grid;
  gap: var(--apl-ui-space-3);
  padding: var(--apl-ui-space-3);
}
.apl-company-hours > header { align-items: flex-start; display: flex; gap: var(--apl-ui-space-3); justify-content: space-between; }
.apl-company-hours > header > div { display: grid; }
.apl-company-hours > header span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-company-hours h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-title-lg); font-weight: var(--apl-ui-font-weight-bold); margin: 0; }
.apl-company-hours header p { color: var(--apl-ui-color-text-muted); margin: var(--apl-ui-space-1) 0 0; }
.apl-hours-builder {
  align-items: end;
  background: var(--apl-ui-color-surface-subtle);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: max-content minmax(var(--apl-ui-choice-min-width), var(--apl-ui-source-min-width)) auto minmax(var(--apl-ui-choice-min-width), var(--apl-ui-source-min-width)) auto;
  justify-content: start;
  padding: var(--apl-ui-space-2);
}
.apl-hours-builder > label,
.apl-hours-builder__days { display: grid; gap: var(--apl-ui-space-1); min-width: 0; }
.apl-hours-builder > label > span,
.apl-hours-builder__days > span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-hours-builder > i { align-self: center; color: var(--apl-ui-color-text-subtle); }
.apl-hours-week { display: grid; gap: var(--apl-ui-space-2); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.apl-hours-week > article {
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
.apl-hours-week > article > header { align-items: center; display: grid; gap: var(--apl-ui-space-2); grid-template-columns: var(--apl-ui-week-day-width) minmax(0, 1fr); }
.apl-hours-week > article > header > div:last-child { display: grid; }
.apl-hours-week header span,
.apl-hours-week small { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-hours-week > article > div { display: grid; gap: var(--apl-ui-space-1); }
.apl-hours-range {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border-radius: var(--apl-ui-radius-md);
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
}
.apl-hours-range > span { color: var(--apl-ui-color-text-strong); font-variant-numeric: tabular-nums; }
.apl-hours-range form { margin: 0; }
.apl-hours-required {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-3);
}
.apl-hours-required > div { align-items: center; display: flex; gap: var(--apl-ui-space-2); }
.apl-hours-required p { color: var(--apl-ui-color-text-muted); margin: var(--apl-ui-space-1) 0 0; }
.apl-rule-card__schedule {
  align-items: center;
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
.apl-rule-card__schedule > div { display: grid; min-width: 0; }
.apl-rule-card__schedule span { color: var(--apl-ui-color-text-subtle); font-size: var(--apl-ui-font-size-caption); }
.apl-rule-card__schedule strong { color: var(--apl-ui-color-text-strong); }

/* Separación consistente entre etiquetas y valores apilados. */
.apl-stock-card__quantity > div { display: grid; min-width: 0; }
.apl-catalog-card__copy,
.apl-catalog-card__identity > div,
.apl-ledger-row__date,
.apl-stock-card__identity,
.apl-stock-card__quantity > div,
.apl-stock-card__values > div,
.apl-replenishment-card > div span,
.apl-unlinked-strip > div:first-child,
.apl-commission-day > div span,
.apl-transaction-row > div,
.apl-transaction-row > span,
.apl-period-row > div,
.apl-rule-card header > div,
.apl-rule-card__assignment > div,
.apl-rule-card__timing > div,
.apl-rule-card__schedule > div,
.apl-appointment-ticket__professional > div,
.apl-confirmation-receipt > header > div,
.apl-confirmation-receipt__person > div,
.apl-confirmation-receipt dl > div,
.apl-confirmation-receipt__contact > div,
.apl-booking-cancel > div,
.apl-integration-pulse__flow > div,
.apl-credential-vault > summary > div > span,
.apl-availability-person > span:last-child,
.apl-availability-assignment > div:first-child,
.apl-hours-flow > article > div,
.apl-hours-week > article > header > div:last-child,
.apl-inventory-alert-form__footer span {
  row-gap: var(--apl-ui-space-1);
}

.apl-rule-operation--schedule { grid-column: 1 / -1; }
.apl-schedule-source {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  display: flex;
  gap: var(--apl-ui-space-3);
  justify-content: space-between;
  padding: var(--apl-ui-space-2);
}
.apl-schedule-source--inherited {
  background: var(--apl-ui-color-brand-surface);
  border-color: var(--apl-ui-color-brand-border);
}
.apl-schedule-source > div { align-items: center; display: flex; gap: var(--apl-ui-space-2); }
.apl-schedule-source p { color: var(--apl-ui-color-text-muted); margin: var(--apl-ui-space-1) 0 0; }
.apl-schedule-source form { margin: 0; }
.apl-inherited-hours { display: flex; flex-wrap: wrap; gap: var(--apl-ui-space-1); }
.apl-inherited-hours > span {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-text-muted);
  display: inline-flex;
  gap: var(--apl-ui-space-1);
  padding: var(--apl-ui-space-1) var(--apl-ui-space-2);
}
.apl-inherited-hours b { color: var(--apl-ui-color-brand-dark); font-weight: var(--apl-ui-font-weight-bold); text-transform: uppercase; }
.apl-inline-builder__wide small { color: var(--apl-ui-color-text-subtle); }

@media (max-width: 980px) {
  .apl-hours-flow { grid-template-columns: minmax(0, 1fr); }
  .apl-hours-flow > i { display: none; }
  .apl-hours-builder { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; }
  .apl-hours-builder__days { grid-column: 1 / -1; }
  .apl-hours-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .apl-hours-metrics,
  .apl-hours-builder,
  .apl-hours-week { grid-template-columns: minmax(0, 1fr); }
  .apl-hours-builder > i { display: none; }
  .apl-hours-required,
  .apl-schedule-source { align-items: stretch; flex-direction: column; }
}

/* APL Negocios · alertas de inventario */
.apl-inventory-alert-settings { --apl-ui-page-gap: var(--apl-ui-space-2); max-width: 1240px; }
.apl-inventory-alert-header { min-height: 0; }
.apl-inventory-alert-header .apl-context-bar__main { flex-wrap: wrap; }
.apl-inventory-alert-header .apl-context-bar__title { flex: 0 0 auto; }
.apl-inventory-alert-header .apl-context-bar__meta { flex: 1 1 auto; }
.apl-inventory-alert-header .apl-inventory-alert-header__warning { background: var(--apl-ui-color-warning-soft); border-color: var(--apl-ui-color-warning-border); color: var(--apl-ui-color-warning-dark); }
.apl-inventory-alert-form {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  box-shadow: var(--apl-ui-shadow-sm);
  overflow: hidden;
}
.apl-inventory-alert-form > section { padding: var(--apl-ui-space-3); }
.apl-inventory-alert-form > section + section,
.apl-inventory-alert-form > details { border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-border-soft); }
.apl-inventory-alert-form section > header {
  align-items: flex-start;
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: 30px minmax(0, 1fr) auto;
  margin-bottom: var(--apl-ui-space-2);
}
.apl-inventory-alert-form section > header > span,
.apl-inventory-template-review__summary > span:first-child {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-brand-border);
  border-radius: 50%;
  color: var(--apl-ui-color-brand-dark);
  display: flex;
  font-weight: var(--apl-ui-font-weight-bold);
  height: 28px;
  justify-content: center;
  width: 28px;
}
.apl-inventory-alert-form h2 {
  color: var(--apl-ui-color-text-strong);
  font-size: var(--apl-ui-font-size-subtitle);
  margin: 0;
}
.apl-inventory-alert-form header p {
  color: var(--apl-ui-color-text-subtle);
  margin: var(--apl-ui-space-1) 0 0;
}
.apl-inventory-alert-channel-grid {
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.apl-inventory-alert-channel {
  align-items: center;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-lg);
  cursor: pointer;
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  margin: 0;
  padding: var(--apl-ui-space-2);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.apl-inventory-alert-channel:hover {
  border-color: var(--apl-ui-color-brand-border);
  box-shadow: var(--apl-ui-shadow-sm);
  transform: translateY(-1px);
}
.apl-inventory-alert-channel:has(input:checked) {
  background: var(--apl-ui-color-brand-surface);
  border-color: var(--apl-ui-color-brand-border);
}
.apl-inventory-alert-channel__icon {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border-radius: var(--apl-ui-radius-md);
  color: var(--apl-ui-color-brand-dark);
  display: flex;
  font-size: 19px;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.apl-inventory-alert-channel__icon.is-whatsapp { color: #16884f; }
.apl-inventory-alert-channel > span:nth-of-type(2) { display: grid; gap: 3px; min-width: 0; }
.apl-inventory-alert-channel strong { color: var(--apl-ui-color-text-strong); }
.apl-inventory-alert-channel small { color: var(--apl-ui-color-text-subtle); font-weight: var(--apl-ui-font-weight-regular); }
.apl-inventory-alert-channel > b {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: 999px;
  color: var(--apl-ui-color-text-muted);
  font-size: var(--apl-ui-font-size-caption);
  padding: 4px 9px;
}
.apl-inventory-alert-channel:has(input:checked) > b {
  border-color: var(--apl-ui-color-brand-border);
  color: var(--apl-ui-color-brand-dark);
}
.apl-inventory-alert-contact-list { display: grid; gap: var(--apl-ui-space-2); }
.apl-inventory-alert-contact {
  align-items: end;
  background: var(--apl-ui-color-surface-subtle);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-soft);
  border-radius: var(--apl-ui-radius-lg);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
  padding: var(--apl-ui-space-2);
}
.apl-inventory-alert-contact__avatar {
  align-items: center;
  align-self: center;
  background: var(--apl-ui-color-brand-surface);
  border-radius: 50%;
  color: var(--apl-ui-color-brand-dark);
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.apl-inventory-alert-contact label { margin: 0; }
.apl-inventory-alert-contact label > span {
  color: var(--apl-ui-color-text-subtle);
  display: block;
  font-size: var(--apl-ui-font-size-caption);
  margin-bottom: 4px;
}
.apl-inventory-alert-contact .apl-btn { margin-bottom: 2px; }
.apl-inventory-template-review { background: var(--apl-ui-color-surface-subtle); padding: var(--apl-ui-space-3); }
.apl-inventory-template-review__summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: 30px minmax(0, 1fr) auto;
  list-style: none;
}
.apl-inventory-template-review__summary::-webkit-details-marker { display: none; }
.apl-inventory-template-review__summary h2 { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-subtitle); margin: 0; }
.apl-inventory-template-review__summary p { color: var(--apl-ui-color-text-subtle); margin: var(--apl-ui-space-1) 0 0; }
.apl-inventory-template-review__toggle { align-items: center; color: var(--apl-ui-color-brand-dark); display: inline-flex; font-size: var(--apl-ui-font-size-detail); font-weight: var(--apl-ui-font-weight-semibold); gap: var(--apl-ui-space-1); }
.apl-inventory-template-review__toggle i { transition: transform var(--apl-ui-motion-fast); }
.apl-inventory-template-review[open] .apl-inventory-template-review__toggle i { transform: rotate(180deg); }
.apl-inventory-template-review code {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-soft);
  border-radius: 5px;
  color: var(--apl-ui-color-brand-dark);
  padding: 2px 5px;
}
.apl-inventory-template-review__layout {
  display: grid;
  gap: var(--apl-ui-space-3);
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
  margin-top: var(--apl-ui-space-3);
}
.apl-inventory-template-phone {
  background: #e7ded5;
  border: 6px solid #24333b;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(27, 42, 51, .18);
  max-width: 390px;
  overflow: hidden;
  width: 100%;
}
.apl-inventory-template-phone__top {
  align-items: center;
  background: #075e54;
  color: #fff;
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px 14px;
}
.apl-inventory-template-phone__top i { font-size: 22px; }
.apl-inventory-template-phone__top span { font-size: 11px; opacity: .78; }
.apl-inventory-template-bubble {
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 4px rgba(30, 40, 45, .1);
  color: #263238;
  margin: 12px 10px 16px;
  padding: 10px 12px 8px;
}
.apl-inventory-template-bubble p { line-height: 1.38; margin: 0 0 var(--apl-ui-space-2); }
.apl-inventory-template-bubble > a {
  align-items: center;
  border-top: 1px solid #edf0f1;
  color: #087c70;
  display: flex;
  font-weight: var(--apl-ui-font-weight-semibold);
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
  padding: 9px 4px 3px;
  pointer-events: none;
  text-decoration: none;
}
.apl-inventory-template-bubble small {
  border-top: 1px solid #edf0f1;
  color: #758087;
  display: block;
  margin-top: 4px;
  padding-top: 7px;
}
.apl-inventory-alert-rules {
  background: var(--apl-ui-color-surface);
  border: var(--apl-ui-border-width) solid var(--apl-ui-color-border-muted);
  border-radius: var(--apl-ui-radius-xl);
  padding: var(--apl-ui-space-3);
}
.apl-inventory-alert-rules > strong { color: var(--apl-ui-color-text-strong); font-size: var(--apl-ui-font-size-subtitle); }
.apl-inventory-alert-rules ol { display: grid; gap: var(--apl-ui-space-2); list-style: none; margin: var(--apl-ui-space-3) 0 0; padding: 0; }
.apl-inventory-alert-rules li {
  align-items: center;
  border-bottom: var(--apl-ui-border-width) solid var(--apl-ui-color-border-soft);
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: auto minmax(0, 1fr);
  padding-bottom: var(--apl-ui-space-2);
}
.apl-inventory-alert-rules li:last-child { border-bottom: 0; padding-bottom: 0; }
.apl-inventory-alert-rules li span {
  align-items: center;
  background: var(--apl-ui-color-brand-surface);
  border-radius: 50%;
  color: var(--apl-ui-color-brand-dark);
  display: flex;
  font-weight: var(--apl-ui-font-weight-bold);
  height: 28px;
  justify-content: center;
  width: 28px;
}
.apl-inventory-alert-rules p { color: var(--apl-ui-color-text-muted); margin: 0; }
.apl-inventory-alert-form__footer {
  align-items: center;
  background: var(--apl-ui-color-surface);
  border-top: var(--apl-ui-border-width) solid var(--apl-ui-color-border-soft);
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
.apl-inventory-alert-form__footer > div { align-items: center; display: flex; gap: var(--apl-ui-space-2); }
.apl-inventory-alert-form__footer > div > i { color: var(--apl-ui-color-brand-dark); font-size: 20px; }
.apl-inventory-alert-form__footer span { display: grid; }
.apl-inventory-alert-form__footer strong { color: var(--apl-ui-color-text-strong); }
.apl-inventory-alert-form__footer small { color: var(--apl-ui-color-text-subtle); }

@media (max-width: 900px) {
  .apl-inventory-alert-channel-grid,
  .apl-inventory-template-review__layout { grid-template-columns: minmax(0, 1fr); }
  .apl-inventory-template-phone { justify-self: center; }
}
@media (max-width: 680px) {
  .apl-inventory-alert-form > section { padding: var(--apl-ui-space-3); }
  .apl-inventory-alert-form section > header,
  .apl-inventory-template-review__summary { grid-template-columns: 30px minmax(0, 1fr); }
  .apl-inventory-alert-form section > header > .apl-btn { grid-column: 1 / -1; }
  .apl-inventory-template-review__toggle { grid-column: 2; }
  .apl-inventory-alert-contact { align-items: end; grid-template-columns: auto minmax(0, 1fr) auto; }
  .apl-inventory-alert-contact label { grid-column: 2 / -1; }
  .apl-inventory-alert-contact .apl-btn { grid-column: 3; grid-row: 1; }
  .apl-inventory-alert-form__footer { align-items: stretch; flex-direction: column; }
  .apl-inventory-alert-form__footer .apl-btn { width: 100%; }
}

/*
 * Contrato compacto de APL Negocios.
 * Se activa únicamente en superficies administrativas data-apl-telo.
 * Caja rápida y las experiencias declaradas como excepción conservan su geometría.
 */
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) {
  --apl-ui-density-field-gap: var(--apl-ui-space-2);
  --apl-ui-density-section-gap: var(--apl-ui-space-2);
  --apl-ui-density-surface-padding: var(--apl-ui-space-3);
  --apl-ui-page-gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-page__hero {
  align-items: center;
  box-shadow: none;
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-page__hero > div:first-child {
  flex: 1 1 var(--apl-ui-page-copy-min);
  min-width: 0;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-page__hero .apl-page__eyebrow {
  font-size: var(--apl-ui-font-size-caption);
  letter-spacing: .04em;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-page__hero .apl-page__title {
  font-size: var(--apl-ui-font-size-heading-lg);
  margin: 2px 0;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-page__hero .apl-page__summary {
  font-size: var(--apl-ui-font-size-detail);
  line-height: var(--apl-ui-line-normal);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid {
  gap: var(--apl-ui-space-1);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid > .apl-card-mini {
  align-items: baseline;
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  min-width: 0;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid .apl-card-mini__meta {
  margin: 0;
  min-width: 0;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-page__actions,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-scopebar__actions,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-catalog-command__actions,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-filter-actions,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-table__actions,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-telo__nav a,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-context-bar__meta span,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-status,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-badge {
  column-gap: var(--apl-ui-space-1);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-btn > i,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-page__actions i,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-telo__nav a > i,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-context-bar__meta i,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-status > i,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-badge > i {
  flex: 0 0 auto;
  line-height: 1;
  margin: 0;
  position: static;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-notice {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-pagination {
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
@media (max-width: 767px) {
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-page__hero {
    align-items: stretch;
    padding: var(--apl-ui-space-3);
  }
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Catálogos y editores administrativos compactos. */
[data-apl-telo]:not([data-apl-density-exception]).apl-catalog {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command {
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command__search {
  grid-column: span 4;
  min-width: 0;
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command__field {
  grid-column: span 2;
  min-width: 0;
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command__actions {
  grid-column: span 2;
  justify-self: end;
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-summary {
  font-size: var(--apl-ui-font-size-caption);
  min-height: 0;
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-grid {
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-card {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-card__metric {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-card__metric strong {
  font-size: var(--apl-ui-font-size-title);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-card__actions {
  padding-top: var(--apl-ui-space-1);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-editor-page {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-editor-workspace {
  gap: var(--apl-ui-space-2);
  grid-template-columns: 220px minmax(0, 1fr);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-editor-rail {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-editor-rail__impact {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-editor-section {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-editor-section__header {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-editor-focus {
  gap: var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-editor-focus__visual {
  min-height: 120px;
  padding: var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-editor-actions {
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
@media (max-width: 1100px) {
  [data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  [data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  [data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command__search,
  [data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command__field,
  [data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command__actions {
    grid-column: auto;
  }
  [data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command__actions {
    justify-self: stretch;
  }
  [data-apl-telo]:not([data-apl-density-exception]) .apl-editor-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-apl-telo]:not([data-apl-density-exception]) .apl-editor-rail {
    position: static;
  }
}
@media (max-width: 760px) {
  [data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  [data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-command,
  [data-apl-telo]:not([data-apl-density-exception]) .apl-catalog-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Inventario administrativo compacto. */
[data-apl-telo]:not([data-apl-density-exception]).apl-stock-editor-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-movement-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-ledger-page,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport {
  gap: var(--apl-ui-space-2);
  grid-template-columns: 220px minmax(0, 1fr);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport__rail {
  gap: var(--apl-ui-space-1);
  padding: var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport__rail > i {
  font-size: var(--apl-ui-font-size-display);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport__rail > strong {
  font-size: var(--apl-ui-font-size-title-lg);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport__body > section,
[data-apl-telo]:not([data-apl-density-exception]) .apl-movement-console__body > section {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport__body h2,
[data-apl-telo]:not([data-apl-density-exception]) .apl-movement-console__body h2 {
  font-size: var(--apl-ui-font-size-title);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport__body > footer,
[data-apl-telo]:not([data-apl-density-exception]) .apl-movement-console__body > footer {
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-movement-console {
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) 220px;
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-movement-preview {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-movement-preview > i:first-of-type {
  font-size: var(--apl-ui-font-size-display);
}
[data-apl-telo]:not([data-apl-density-exception]) .apl-movement-preview strong {
  font-size: var(--apl-ui-font-size-title-lg);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-ledger-page .apl-scopebar {
  display: grid;
  gap: var(--apl-ui-space-2);
  grid-template-columns: minmax(180px, 1.35fr) repeat(4, minmax(112px, .7fr)) auto;
  overflow: visible;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-ledger-page .apl-scopebar__field {
  min-width: 0;
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-ledger-page .apl-ledger__header {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-ledger-page .apl-ledger-row {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2) var(--apl-ui-space-3);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-stock-radar {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-stock-radar__value,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-stock-radar__alerts article {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-stock-radar__value strong {
  font-size: var(--apl-ui-font-size-display);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-query-drawer__body {
  gap: var(--apl-ui-space-2);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-signal-strip article,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-rank-panel,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-replenishment-board,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-replenishment-card,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-unlinked-strip {
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-analysis-board,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-rank-panel,
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-replenishment-board {
  gap: var(--apl-ui-space-2);
}
[data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-rank-row {
  min-height: 0;
  padding-block: var(--apl-ui-space-1);
}
@media (max-width: 1100px) {
  [data-apl-telo]:not([data-apl-density-exception]).apl-inventory-ledger-page .apl-scopebar,
  [data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-query-drawer__body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  [data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport,
  [data-apl-telo]:not([data-apl-density-exception]) .apl-movement-console {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport__rail,
  [data-apl-telo]:not([data-apl-density-exception]) .apl-movement-preview {
    position: static;
  }
  [data-apl-telo]:not([data-apl-density-exception]).apl-inventory-ledger-page .apl-scopebar,
  [data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-query-drawer__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  [data-apl-telo]:not([data-apl-density-exception]) .apl-stock-passport__fields,
  [data-apl-telo]:not([data-apl-density-exception]) .apl-movement-console__pair,
  [data-apl-telo]:not([data-apl-density-exception]) .apl-movement-impact-fields,
  [data-apl-telo]:not([data-apl-density-exception]).apl-inventory-ledger-page .apl-scopebar,
  [data-apl-telo]:not([data-apl-density-exception]).apl-inventory-analysis-page .apl-query-drawer__body {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-apl-telo]:not([data-apl-density-exception]) .apl-stock-threshold {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-apl-telo]:not([data-apl-density-exception]) .apl-stock-threshold > i {
    justify-self: center;
    transform: rotate(90deg);
  }
}

/*
 * Contrato final de KPI horizontales y densos para APL Negocios.
 * Esta regla es deliberadamente la última del archivo: neutraliza alturas mínimas
 * heredadas y evita que cuatro indicadores desperdicien una segunda fila.
 */
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) {
  --apl-ui-kpi-min-height: 0px;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-kpi-grid,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-metric-grid,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-agenda-pulse,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-signal-strip,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-exception-summary {
  gap: var(--apl-ui-space-1);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid > .apl-card-mini,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-kpi {
  align-items: center;
  align-content: center;
  display: flex;
  flex-direction: row;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  min-height: 0;
  min-width: 0;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid .apl-card-mini__meta {
  line-height: var(--apl-ui-line-tight);
  margin: 0;
  min-width: 0;
  order: 1;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid .apl-card-mini__title {
  flex: 0 0 auto;
  font-size: var(--apl-ui-font-size-title);
  line-height: var(--apl-ui-line-tight);
  margin: 0;
  order: 2;
  white-space: nowrap;
}

[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-metric {
  gap: var(--apl-ui-space-2);
  min-height: 0;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-metric .apl-icon-frame {
  flex: 0 0 auto;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-metric__copy {
  align-items: center;
  display: grid;
  gap: 0 var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-metric__label {
  grid-column: 1;
  grid-row: 1;
  line-height: var(--apl-ui-line-tight);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-metric__value {
  font-size: var(--apl-ui-font-size-title);
  grid-column: 2;
  grid-row: 1 / span 2;
  line-height: var(--apl-ui-line-tight);
  margin: 0;
  text-align: right;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-metric__meta {
  grid-column: 1;
  grid-row: 2;
  line-height: var(--apl-ui-line-tight);
  margin: 0;
}

[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-agenda-pulse__item,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-signal-strip article,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-hours-metrics > article {
  align-items: center;
  display: grid;
  gap: 0 var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-agenda-pulse__label,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-signal-strip article > span,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-hours-metrics article > span {
  grid-column: 1;
  grid-row: 1;
  line-height: var(--apl-ui-line-tight);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-agenda-pulse__value,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-signal-strip article > strong,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-hours-metrics article > strong {
  font-size: var(--apl-ui-font-size-title);
  grid-column: 2;
  grid-row: 1 / span 2;
  line-height: var(--apl-ui-line-tight);
  text-align: right;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-agenda-pulse__meta,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-signal-strip article > small,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-hours-metrics article > small {
  grid-column: 1;
  grid-row: 2;
  line-height: var(--apl-ui-line-tight);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-hours-metrics {
  gap: var(--apl-ui-space-1);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-exception-summary > div {
  align-items: center;
  display: flex;
  gap: var(--apl-ui-space-2);
  justify-content: space-between;
  min-height: 0;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-exception-summary strong {
  font-size: var(--apl-ui-font-size-title);
  line-height: var(--apl-ui-line-tight);
}

[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse {
  gap: var(--apl-ui-space-1);
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  padding: var(--apl-ui-space-1);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse__total,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse__breakdown > div {
  align-items: center;
  display: grid;
  gap: 0 var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
  min-height: 0;
  padding: var(--apl-ui-space-2);
  text-align: left;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse__total > span,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse__breakdown span {
  grid-column: 1;
  grid-row: 1;
  line-height: var(--apl-ui-line-tight);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse__total > strong,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse__breakdown strong {
  font-size: var(--apl-ui-font-size-title);
  grid-column: 2;
  grid-row: 1 / span 2;
  line-height: var(--apl-ui-line-tight);
  text-align: right;
  white-space: nowrap;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse__total > small {
  grid-column: 1;
  grid-row: 2;
  line-height: var(--apl-ui-line-tight);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse__breakdown {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-analysis-cockpit,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-integration-pulse {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-analysis-hero,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar__value,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar__alerts article,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-integration-pulse__state,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-rule-map-head__pulse {
  align-items: center;
  display: grid;
  gap: 0 var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-analysis-hero__label,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar__value > span,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar__alerts article > span,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-integration-pulse__state > span,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-rule-map-head__pulse > span {
  grid-column: 1;
  grid-row: 1;
  line-height: var(--apl-ui-line-tight);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-analysis-hero__value,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar__value > strong,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar__alerts article > strong,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-integration-pulse__state > strong,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-rule-map-head__pulse > strong {
  font-size: var(--apl-ui-font-size-title);
  grid-column: 2;
  grid-row: 1 / span 2;
  line-height: var(--apl-ui-line-tight);
  margin: 0;
  text-align: right;
  white-space: nowrap;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-analysis-hero__meta,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar__value > small,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar__alerts article > small,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-integration-pulse__state > small,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-rule-map-head__pulse > small {
  grid-column: 1;
  grid-row: 2;
  line-height: var(--apl-ui-line-tight);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-analysis-equation {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-analysis-equation div {
  min-width: 0;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-analysis-equation strong,
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-integration-pulse__flow strong {
  font-size: var(--apl-ui-font-size-title);
  line-height: var(--apl-ui-line-tight);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-stock-radar__alerts {
  gap: var(--apl-ui-space-1);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-integration-pulse__flow {
  gap: var(--apl-ui-space-2);
}

/* Identidad comercial completa dentro del diario de ventas. */
.apl-sales-ledger-row {
  grid-template-columns: auto minmax(var(--apl-ui-card-min-width), 1fr) minmax(var(--apl-ui-card-min-width), auto) minmax(var(--apl-ui-choice-min-width), auto) auto auto;
}
.apl-sale-item__heading {
  align-items: center;
  display: flex;
  gap: var(--apl-ui-space-2);
  min-width: 0;
}
.apl-sale-item__heading > strong {
  min-width: 0;
}
.apl-sale-item__heading .apl-status {
  flex: 0 0 auto;
}
.apl-sale-item__meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--apl-ui-space-1) var(--apl-ui-space-3);
}
.apl-sale-item__meta span,
.apl-sale-item__note,
.apl-sale-item__detail small,
.apl-sale-total > span {
  color: var(--apl-ui-color-text-subtle);
  font-size: var(--apl-ui-font-size-caption);
}
.apl-sale-item__meta span,
.apl-sale-item__note {
  align-items: center;
  display: inline-flex;
  gap: var(--apl-ui-space-1);
  white-space: normal;
}
.apl-sale-item__note {
  color: var(--apl-ui-color-text-muted);
}
.apl-sale-item__detail {
  min-width: var(--apl-ui-card-min-width);
}
.apl-sale-item__detail small {
  display: block;
}
.apl-sale-total {
  display: grid;
  gap: var(--apl-ui-space-1);
  text-align: right;
}

@container apl-telo (max-width: 980px) {
  .apl-sales-ledger-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .apl-sales-ledger-row .apl-sale-item__detail,
  .apl-sales-ledger-row .apl-sale-payment {
    grid-column: 2;
  }
  .apl-sales-ledger-row .apl-ledger-row__actions {
    grid-column: 3;
  }
}

@container apl-telo (max-width: 620px) {
  .apl-sales-ledger-row {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .apl-sales-ledger-row .apl-sale-item__detail,
  .apl-sales-ledger-row .apl-sale-payment,
  .apl-sales-ledger-row .apl-sale-total,
  .apl-sales-ledger-row .apl-ledger-row__actions {
    grid-column: 2;
    text-align: left;
  }
}

[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-finance-banner {
  gap: var(--apl-ui-space-2);
  padding: var(--apl-ui-space-2);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-finance-banner > div {
  align-items: center;
  display: grid;
  gap: 0 var(--apl-ui-space-2);
  grid-template-columns: minmax(0, 1fr) auto;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-finance-banner > div > strong {
  font-size: var(--apl-ui-font-size-title);
  grid-column: 2;
  grid-row: 1 / span 2;
  line-height: var(--apl-ui-line-tight);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-finance-banner > div > span {
  grid-column: 1;
  grid-row: 1;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-finance-banner > div > small {
  grid-column: 1;
  grid-row: 2;
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-notif-summary {
  gap: var(--apl-ui-space-1);
}
[data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-notif-summary article {
  align-items: center;
  min-height: 0;
  padding: var(--apl-ui-space-2);
}

@container apl-telo (max-width: 900px) {
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-kpi-grid,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-metric-grid,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-agenda-pulse,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-signal-strip,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-exception-summary,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-hours-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container apl-telo (max-width: 760px) {
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse {
    grid-template-columns: minmax(0, 1fr);
  }
}
@container apl-telo (max-width: 560px) {
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) > .apl-compact-grid,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-kpi-grid,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-metric-grid,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-agenda-pulse,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-signal-strip,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-exception-summary,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-hours-metrics,
  [data-apl-telo]:not(.apl-touch-pos):not([data-apl-density-exception]) .apl-ledger-pulse__breakdown {
    grid-template-columns: minmax(0, 1fr);
  }
}
