/*
  Kassa SRM shared component contract, release 4.0.4.12.
  Components consume semantic --srm-* tokens. Product screens may add layout,
  but must not redefine component colors or interaction states locally.
*/

.srm-page,
.srm-theme {
  color-scheme: dark;
  color: var(--srm-text-primary);
  background: var(--srm-app-background);
  font-family: var(--srm-font-family);
  font-size: var(--srm-font-size-md);
  line-height: var(--srm-line-normal);
  letter-spacing: 0;
}

.srm-page *,
.srm-theme * {
  box-sizing: border-box;
}

.srm-page :where(button, input, select, textarea),
.srm-theme :where(button, input, select, textarea) {
  font: inherit;
  letter-spacing: 0;
}

.srm-page :where(a, button, input, select, textarea, [tabindex]):focus-visible,
.srm-theme :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 0;
  box-shadow: var(--srm-focus-ring);
}

.srm-card,
.srm-panel,
.srm-dialog,
.srm-drawer,
.srm-popover,
.srm-toast,
.srm-table-wrap,
.srm-preview-shell {
  color: var(--srm-text-primary);
  border: 1px solid var(--srm-border-subtle);
  background: var(--srm-surface-1);
}

.srm-card,
.srm-panel,
.srm-table-wrap,
.srm-preview-shell {
  border-radius: var(--srm-radius-lg);
}

.srm-dialog,
.srm-drawer,
.srm-popover,
.srm-toast {
  border-radius: var(--srm-radius-md);
  background: var(--srm-surface-elevated);
  box-shadow: var(--srm-shadow);
}

.srm-panel,
.srm-dialog,
.srm-drawer,
.srm-table-wrap {
  overflow: hidden;
}

.srm-panel__head,
.srm-panel__footer,
.srm-dialog__head,
.srm-dialog__footer,
.srm-drawer__head,
.srm-drawer__footer {
  display: flex;
  align-items: center;
  min-height: 52px;
  gap: var(--srm-space-3);
  padding: var(--srm-space-3) var(--srm-space-4);
  background: var(--srm-surface-2);
}

.srm-panel__head,
.srm-dialog__head,
.srm-drawer__head {
  border-bottom: 1px solid var(--srm-divider);
}

.srm-panel__footer,
.srm-dialog__footer,
.srm-drawer__footer {
  justify-content: flex-end;
  border-top: 1px solid var(--srm-divider);
}

.srm-card {
  padding: var(--srm-space-4);
}

.srm-metric-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label icon"
    "value icon"
    "meta trend";
  align-content: start;
  min-width: 0;
  min-height: 124px;
  gap: var(--srm-space-2) var(--srm-space-3);
  padding: var(--srm-space-4);
  border: 1px solid var(--srm-border-subtle);
  border-radius: var(--srm-radius-lg);
  color: var(--srm-text-primary);
  background:
    linear-gradient(155deg, var(--srm-surface-2), var(--srm-surface-1) 62%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.srm-metric-card__label {
  grid-area: label;
  align-self: center;
  min-width: 0;
  color: var(--srm-text-secondary);
  font-size: var(--srm-font-size-sm);
  font-weight: var(--srm-font-weight-medium);
}

.srm-metric-card__value {
  grid-area: value;
  min-width: 0;
  color: var(--srm-text-primary);
  font-size: var(--srm-font-size-2xl);
  font-weight: var(--srm-font-weight-bold);
  font-variant-numeric: tabular-nums;
  line-height: var(--srm-line-tight);
  overflow-wrap: anywhere;
}

.srm-metric-card__meta {
  grid-area: meta;
  align-self: end;
  min-width: 0;
  color: var(--srm-text-muted);
  font-size: var(--srm-font-size-xs);
}

.srm-metric-card__icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--srm-border-subtle);
  border-radius: var(--srm-radius-sm);
  color: var(--srm-text-secondary);
  background: var(--srm-surface-1);
}

.srm-metric-card__icon :where(svg, img) {
  width: var(--srm-icon-size);
  height: var(--srm-icon-size);
}

.srm-metric-card__trend {
  grid-area: trend;
  align-self: end;
  justify-self: end;
  color: var(--srm-text-secondary);
  font-size: var(--srm-font-size-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.srm-metric-card__trend--positive {
  color: var(--srm-text-success);
}

.srm-metric-card__trend--negative {
  color: var(--srm-text-error);
}

.srm-title,
.srm-heading {
  margin: 0;
  color: var(--srm-text-primary);
  font-weight: var(--srm-font-weight-bold);
  line-height: var(--srm-line-tight);
}

.srm-title {
  font-size: var(--srm-font-size-xl);
}

.srm-heading {
  font-size: var(--srm-font-size-lg);
}

.srm-secondary {
  color: var(--srm-text-secondary);
}

.srm-muted {
  color: var(--srm-text-muted);
}

.srm-button,
.srm-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: var(--srm-control-height);
  gap: var(--srm-space-2);
  padding: 0 var(--srm-space-4);
  border: 1px solid var(--srm-border-default);
  border-radius: var(--srm-radius-sm);
  color: var(--srm-text-primary);
  background: var(--srm-surface-2);
  font-weight: var(--srm-font-weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--srm-motion-fast),
    border-color var(--srm-motion-fast),
    color var(--srm-motion-fast),
    transform var(--srm-motion-fast),
    opacity var(--srm-motion-fast);
}

.srm-button:hover,
.srm-icon-button:hover {
  border-color: var(--srm-border-strong);
  background: var(--srm-surface-hover);
}

.srm-button:active,
.srm-icon-button:active {
  transform: translateY(1px);
}

.srm-button--primary {
  border-color: var(--srm-accent-border);
  color: #ffffff;
  background: linear-gradient(135deg, var(--srm-accent), var(--srm-accent-pressed));
  box-shadow: 0 10px 24px rgba(46, 42, 86, 0.34);
}

.srm-button--primary:hover {
  background: linear-gradient(135deg, var(--srm-accent-hover), var(--srm-accent));
}

.srm-button--secondary {
  border-color: var(--srm-border-interactive);
  background: var(--srm-surface-2);
}

.srm-button--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--srm-text-secondary);
}

.srm-button--ghost:hover {
  color: var(--srm-text-primary);
  background: var(--srm-surface-hover);
}

.srm-button--danger {
  border-color: var(--srm-error-border);
  color: var(--srm-text-error);
  background: var(--srm-error-subtle);
}

.srm-button--small {
  min-height: var(--srm-control-height-sm);
  padding-inline: var(--srm-space-3);
  font-size: var(--srm-font-size-sm);
}

.srm-button--large {
  min-height: var(--srm-control-height-lg);
  padding-inline: var(--srm-space-5);
}

.srm-icon-button {
  width: var(--srm-control-height);
  padding: 0;
}

.srm-icon-button > :where(svg, img) {
  display: block;
  width: var(--srm-icon-size);
  height: var(--srm-icon-size);
  margin: auto;
}

.srm-button:disabled,
.srm-icon-button:disabled,
.srm-button[aria-disabled="true"],
.srm-icon-button[aria-disabled="true"] {
  color: var(--srm-text-disabled);
  border-color: var(--srm-border-subtle);
  background: var(--srm-disabled);
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.srm-button[aria-busy="true"] {
  cursor: wait;
}

.srm-button[aria-busy="true"]::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: srm-spin 700ms linear infinite;
}

.srm-field {
  display: grid;
  gap: var(--srm-space-2);
  min-width: 0;
}

.srm-field__label {
  color: var(--srm-text-secondary);
  font-size: var(--srm-font-size-sm);
  font-weight: var(--srm-font-weight-medium);
}

.srm-field__hint,
.srm-field__message {
  color: var(--srm-text-muted);
  font-size: var(--srm-font-size-xs);
  line-height: 1.4;
}

.srm-field--error .srm-field__message {
  color: var(--srm-text-error);
}

.srm-input,
.srm-select,
.srm-textarea,
.srm-combobox,
.srm-search,
.srm-date-input,
.srm-time-input,
.srm-file-input,
.srm-page input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.srm-page select,
.srm-page textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--srm-control-height);
  padding: 9px var(--srm-space-3);
  border: 1px solid var(--srm-border-default);
  border-radius: var(--srm-radius-sm);
  color: var(--srm-text-primary);
  caret-color: var(--srm-accent);
  background-color: var(--srm-surface-2);
  transition:
    background-color var(--srm-motion-fast),
    border-color var(--srm-motion-fast),
    box-shadow var(--srm-motion-fast);
}

.srm-textarea,
.srm-page textarea {
  min-height: 92px;
  resize: vertical;
}

.srm-input:hover,
.srm-select:hover,
.srm-textarea:hover,
.srm-combobox:hover,
.srm-search:hover,
.srm-date-input:hover,
.srm-time-input:hover,
.srm-file-input:hover,
.srm-page input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):hover,
.srm-page select:hover,
.srm-page textarea:hover {
  border-color: var(--srm-border-interactive);
}

.srm-input:focus,
.srm-select:focus,
.srm-textarea:focus,
.srm-combobox:focus,
.srm-search:focus,
.srm-date-input:focus,
.srm-time-input:focus,
.srm-file-input:focus,
.srm-page input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
.srm-page select:focus,
.srm-page textarea:focus {
  border-color: var(--srm-border-focus);
  background-color: var(--srm-surface-3);
}

.srm-field--error :where(.srm-input, .srm-select, .srm-textarea, .srm-combobox) {
  border-color: var(--srm-border-error);
}

.srm-input:read-only,
.srm-textarea:read-only,
.srm-page input:read-only,
.srm-page textarea:read-only {
  color: var(--srm-text-secondary);
  background: var(--srm-surface-1);
}

.srm-input:disabled,
.srm-select:disabled,
.srm-textarea:disabled,
.srm-combobox:disabled,
.srm-page input:disabled,
.srm-page select:disabled,
.srm-page textarea:disabled {
  color: var(--srm-text-disabled);
  border-color: var(--srm-border-subtle);
  background: var(--srm-disabled);
  cursor: not-allowed;
  opacity: 1;
}

.srm-input::placeholder,
.srm-textarea::placeholder,
.srm-search::placeholder,
.srm-page input::placeholder,
.srm-page textarea::placeholder {
  color: var(--srm-text-muted);
  opacity: 1;
}

.srm-select,
.srm-page select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--srm-text-secondary) 50%),
    linear-gradient(135deg, var(--srm-text-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px;
}

.srm-select option,
.srm-page select option {
  color: var(--srm-text-primary);
  background: var(--srm-surface-modal);
}

.srm-page :where(input, textarea, select):-webkit-autofill,
.srm-theme :where(input, textarea, select):-webkit-autofill {
  -webkit-text-fill-color: var(--srm-text-primary);
  box-shadow: 0 0 0 1000px var(--srm-surface-2) inset;
  caret-color: var(--srm-text-primary);
  transition: background-color 9999s ease-out;
}

.srm-page :where(input[type="date"], input[type="time"])::-webkit-calendar-picker-indicator,
.srm-theme :where(input[type="date"], input[type="time"])::-webkit-calendar-picker-indicator {
  filter: invert(0.84) saturate(0.4);
  cursor: pointer;
}

.srm-file-input::file-selector-button {
  min-height: 32px;
  margin-right: var(--srm-space-3);
  padding: 0 var(--srm-space-3);
  border: 1px solid var(--srm-border-default);
  border-radius: var(--srm-radius-xs);
  color: var(--srm-text-primary);
  background: var(--srm-surface-3);
}

.srm-check,
.srm-radio {
  display: inline-flex;
  align-items: center;
  min-height: var(--srm-touch-target);
  gap: var(--srm-space-2);
  color: var(--srm-text-secondary);
}

.srm-check input,
.srm-radio input,
.srm-page input[type="checkbox"],
.srm-page input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--srm-accent);
}

.srm-switch {
  position: relative;
  width: 46px;
  height: 26px;
  border: 1px solid var(--srm-border-default);
  border-radius: var(--srm-radius-pill);
  background: var(--srm-surface-2);
  cursor: pointer;
}

.srm-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--srm-text-secondary);
  transition: transform var(--srm-motion-fast), background var(--srm-motion-fast);
}

.srm-switch[aria-checked="true"] {
  border-color: var(--srm-accent-border);
  background: var(--srm-accent-subtle);
}

.srm-switch[aria-checked="true"]::after {
  transform: translateX(20px);
  background: var(--srm-accent-hover);
}

.srm-tabs {
  display: inline-flex;
  max-width: 100%;
  gap: var(--srm-space-1);
  padding: var(--srm-space-1);
  border: 1px solid var(--srm-border-subtle);
  border-radius: var(--srm-radius-md);
  background: var(--srm-surface-1);
  overflow-x: auto;
}

.srm-tab {
  flex: 0 0 auto;
  min-height: var(--srm-control-height-sm);
  padding: 0 var(--srm-space-3);
  border: 0;
  border-radius: var(--srm-radius-sm);
  color: var(--srm-text-secondary);
  background: transparent;
  cursor: pointer;
}

.srm-tab:hover {
  color: var(--srm-text-primary);
  background: var(--srm-surface-hover);
}

.srm-tab[aria-selected="true"],
.srm-tab.is-active {
  color: var(--srm-text-primary);
  background: var(--srm-surface-selected);
}

.srm-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--srm-space-2);
  color: var(--srm-text-muted);
  font-size: var(--srm-font-size-sm);
}

.srm-breadcrumb a {
  color: var(--srm-text-secondary);
}

.srm-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  background: var(--srm-surface-1);
}

.srm-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  color: var(--srm-text-secondary);
  font-variant-numeric: tabular-nums;
}

.srm-table :where(th, td) {
  padding: 11px 12px;
  border-bottom: 1px solid var(--srm-divider);
  text-align: left;
  vertical-align: middle;
}

.srm-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--srm-text-primary);
  background: var(--srm-surface-2);
  font-size: var(--srm-font-size-sm);
  font-weight: var(--srm-font-weight-semibold);
}

.srm-table tbody tr {
  background: var(--srm-surface-1);
  transition: background-color var(--srm-motion-fast);
}

.srm-table tbody tr:hover {
  background: var(--srm-surface-hover);
}

.srm-table tbody tr[aria-selected="true"] {
  background: var(--srm-surface-selected);
}

.srm-table__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: var(--srm-space-2);
}

.srm-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--srm-space-2);
}

.srm-badge,
.srm-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--srm-border-default);
  border-radius: var(--srm-radius-pill);
  color: var(--srm-text-secondary);
  background: var(--srm-surface-2);
  font-size: var(--srm-font-size-xs);
  line-height: 1.25;
}

.srm-status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.srm-badge--success,
.srm-status--success {
  border-color: var(--srm-success-border);
  color: var(--srm-text-success);
  background: var(--srm-success-subtle);
}

.srm-badge--warning,
.srm-status--warning {
  border-color: var(--srm-warning-border);
  color: var(--srm-text-warning);
  background: var(--srm-warning-subtle);
}

.srm-badge--error,
.srm-status--error {
  border-color: var(--srm-error-border);
  color: var(--srm-text-error);
  background: var(--srm-error-subtle);
}

.srm-badge--info,
.srm-status--info {
  border-color: var(--srm-info-border);
  color: #c4d9fa;
  background: var(--srm-info-subtle);
}

.srm-state {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 152px;
  gap: var(--srm-space-2);
  padding: var(--srm-space-6);
  border: 1px dashed var(--srm-border-default);
  border-radius: var(--srm-radius-lg);
  color: var(--srm-text-secondary);
  background: var(--srm-surface-1);
  text-align: center;
}

.srm-state--error {
  border-color: var(--srm-error-border);
  background: var(--srm-error-subtle);
}

.srm-state--warning {
  border-color: var(--srm-warning-border);
  background: var(--srm-warning-subtle);
}

.srm-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--srm-border-default);
  border-top-color: var(--srm-accent-hover);
  border-radius: 50%;
  animation: srm-spin 700ms linear infinite;
}

.srm-skeleton {
  min-height: 14px;
  border-radius: var(--srm-radius-pill);
  background:
    linear-gradient(
      90deg,
      var(--srm-surface-2),
      var(--srm-loading),
      var(--srm-surface-2)
    );
  background-size: 220% 100%;
  animation: srm-skeleton 1.35s ease-in-out infinite;
}

.srm-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--srm-z-overlay);
  display: grid;
  place-items: center;
  padding: var(--srm-space-4);
  background: var(--srm-backdrop);
  backdrop-filter: blur(8px);
}

.srm-dialog {
  position: relative;
  z-index: var(--srm-z-modal);
  width: min(640px, 100%);
  max-height: min(86vh, 820px);
  background: var(--srm-surface-modal);
}

.srm-dialog__body,
.srm-drawer__body {
  padding: var(--srm-space-4);
  overflow: auto;
}

.srm-dialog__close {
  margin-left: auto;
}

.srm-tooltip {
  z-index: var(--srm-z-toast);
  max-width: 280px;
  padding: 7px 9px;
  border: 1px solid var(--srm-border-default);
  border-radius: var(--srm-radius-xs);
  color: var(--srm-text-primary);
  background: var(--srm-surface-elevated);
  box-shadow: var(--srm-shadow-sm);
  font-size: var(--srm-font-size-xs);
}

.srm-toast {
  z-index: var(--srm-z-toast);
  width: min(380px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--srm-space-3);
  min-height: 68px;
  padding: var(--srm-space-3);
  background: var(--srm-surface-glass);
  backdrop-filter: blur(14px);
}

.srm-toast-stack {
  display: grid;
  width: min(380px, 100%);
  gap: var(--srm-space-2);
}

.srm-toast-stack .srm-toast {
  width: 100%;
}

.srm-toast-region {
  position: fixed;
  top: max(var(--srm-space-4), env(safe-area-inset-top));
  right: max(var(--srm-space-4), env(safe-area-inset-right));
  z-index: var(--srm-z-toast);
  display: grid;
  justify-items: end;
  width: min(380px, calc(100vw - 32px));
  gap: var(--srm-space-2);
  pointer-events: none;
}

.srm-toast-region .srm-toast {
  pointer-events: auto;
}

.srm-toast__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--srm-border-default);
  border-radius: var(--srm-radius-sm);
  color: var(--srm-text-secondary);
  background: var(--srm-surface-2);
}

.srm-toast__icon :where(svg, img) {
  width: 18px;
  height: 18px;
}

.srm-toast__content {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.srm-toast__title {
  color: var(--srm-text-primary);
  font-size: var(--srm-font-size-sm);
  font-weight: var(--srm-font-weight-semibold);
  line-height: 1.3;
}

.srm-toast__message {
  color: var(--srm-text-secondary);
  font-size: var(--srm-font-size-xs);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.srm-toast__close {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.srm-toast--success {
  border-color: var(--srm-success-border);
}

.srm-toast--success .srm-toast__icon {
  border-color: var(--srm-success-border);
  color: var(--srm-text-success);
  background: var(--srm-success-subtle);
}

.srm-toast--warning {
  border-color: var(--srm-warning-border);
}

.srm-toast--warning .srm-toast__icon {
  border-color: var(--srm-warning-border);
  color: var(--srm-text-warning);
  background: var(--srm-warning-subtle);
}

.srm-toast--error {
  border-color: var(--srm-error-border);
}

.srm-toast--error .srm-toast__icon {
  border-color: var(--srm-error-border);
  color: var(--srm-text-error);
  background: var(--srm-error-subtle);
}

.srm-toast--info {
  border-color: var(--srm-info-border);
}

.srm-toast--info .srm-toast__icon {
  border-color: var(--srm-info-border);
  color: #c4d9fa;
  background: var(--srm-info-subtle);
}

.srm-bottom-nav {
  --srm-bottom-nav-columns: 5;
  display: grid;
  grid-template-columns: repeat(var(--srm-bottom-nav-columns), minmax(0, 1fr));
  width: min(560px, 100%);
  min-width: 0;
  gap: var(--srm-space-1);
  padding: var(--srm-space-1);
  border: 1px solid var(--srm-border-subtle);
  border-radius: var(--srm-radius-lg);
  background: var(--srm-surface-glass);
  box-shadow: var(--srm-shadow-sm);
  backdrop-filter: blur(14px);
}

.srm-bottom-nav--fixed {
  position: fixed;
  left: max(var(--srm-space-3), env(safe-area-inset-left));
  right: max(var(--srm-space-3), env(safe-area-inset-right));
  bottom: max(var(--srm-space-3), env(safe-area-inset-bottom));
  z-index: var(--srm-z-sticky);
  width: auto;
  max-width: 560px;
  margin-inline: auto;
  box-shadow: var(--srm-shadow-lg);
  isolation: isolate;
}

.srm-bottom-nav-host {
  --srm-bottom-nav-reserved-space:
    calc(78px + max(var(--srm-space-3), env(safe-area-inset-bottom)));
  padding-bottom: var(--srm-bottom-nav-reserved-space);
  scroll-padding-bottom: var(--srm-bottom-nav-reserved-space);
}

.srm-bottom-nav__item {
  position: relative;
  display: grid;
  grid-template-rows: 28px auto;
  place-items: center;
  min-width: 0;
  min-height: 58px;
  gap: 3px;
  padding: 5px 4px 7px;
  border: 0;
  border-radius: var(--srm-radius-sm);
  color: var(--srm-text-secondary);
  background: transparent;
  cursor: pointer;
  transition:
    color var(--srm-motion-fast),
    background-color var(--srm-motion-fast),
    transform var(--srm-motion-fast);
}

.srm-bottom-nav__item::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: var(--srm-radius-pill);
  background: var(--srm-accent-hover);
  opacity: 0;
  transform: translateX(-50%) scaleX(0.45);
  transition: opacity var(--srm-motion-fast), transform var(--srm-motion);
}

.srm-bottom-nav__item:hover {
  color: var(--srm-text-primary);
  background: var(--srm-surface-hover);
}

.srm-bottom-nav__item:active {
  transform: translateY(1px);
}

.srm-bottom-nav__item[aria-current="page"],
.srm-bottom-nav__item[aria-selected="true"],
.srm-bottom-nav__item.is-active {
  color: var(--srm-text-primary);
  background: var(--srm-surface-selected);
}

.srm-bottom-nav__item[aria-current="page"]::after,
.srm-bottom-nav__item[aria-selected="true"]::after,
.srm-bottom-nav__item.is-active::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.srm-bottom-nav__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
}

.srm-bottom-nav__icon :where(svg, img) {
  width: var(--srm-icon-size);
  height: var(--srm-icon-size);
}

.srm-bottom-nav__label {
  display: block;
  width: 100%;
  color: inherit;
  font-size: var(--srm-font-size-xs);
  font-weight: var(--srm-font-weight-medium);
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.srm-bottom-nav__badge {
  position: absolute;
  top: -4px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--srm-surface-glass);
  border-radius: var(--srm-radius-pill);
  color: var(--srm-text-primary);
  background: var(--srm-danger);
  font-size: 10px;
  font-weight: var(--srm-font-weight-bold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.srm-print-preview,
.srm-pdf-page,
.srm-receipt-page,
.srm-label-page {
  color-scheme: light;
  color: #000000;
  background: #ffffff;
}

.srm-preview-shell {
  padding: var(--srm-space-4);
  background: var(--srm-surface-1);
  overflow: auto;
}

/*
 * Navigation icons remain neutral graphite containers. The product accent is
 * reserved for the icon and active text instead of filling every icon frame.
 */
.srm-page :where(.nav-icon, .overview-card-icon) {
  border: 1px solid var(--srm-border-subtle) !important;
  background: linear-gradient(180deg, var(--srm-surface-2), var(--srm-surface-1)) !important;
  color: var(--srm-text-secondary) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.srm-page :where(
  .nav button.active .nav-icon,
  .nav-item.active .nav-icon,
  .overview-card-action:hover .overview-card-icon,
  .overview-card-action:focus-visible .overview-card-icon
) {
  border-color: var(--srm-border-interactive) !important;
  background: linear-gradient(180deg, var(--srm-surface-3), var(--srm-surface-2)) !important;
  color: var(--srm-accent-text) !important;
}

/*
 * Compact layouts use one primary vertical scroll. Ordinary cards and buttons
 * must not trap wheel/touch movement before it reaches that container.
 */
.srm-page :where(
  .main,
  .workspace,
  .control-main,
  .control-content,
  .view:not(.hidden),
  .panel,
  .card,
  .stat,
  .panel-body
) {
  overscroll-behavior-y: auto !important;
}

.srm-page :where(.main, .workspace, .control-main, .view:not(.hidden)) {
  touch-action: pan-y;
}

.srm-page :where(.table-wrap, .table-scroll, .srm-table-wrap) {
  touch-action: pan-x pan-y;
}

@keyframes srm-spin {
  to { transform: rotate(360deg); }
}

@keyframes srm-skeleton {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@media (pointer: coarse) {
  .srm-button,
  .srm-icon-button,
  .srm-tab,
  .srm-input,
  .srm-select,
  .srm-search,
  .srm-date-input,
  .srm-time-input {
    min-height: var(--srm-touch-target);
  }

  .srm-icon-button {
    width: var(--srm-touch-target);
  }

  .srm-toast__close {
    width: var(--srm-touch-target);
    min-height: var(--srm-touch-target);
  }
}

@media (max-width: 720px) {
  .srm-dialog__footer,
  .srm-panel__footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .srm-dialog__footer .srm-button,
  .srm-panel__footer .srm-button {
    width: 100%;
  }

  .srm-table {
    min-width: 560px;
  }

  .srm-toast-region {
    top: auto;
    right: max(var(--srm-space-3), env(safe-area-inset-right));
    bottom: max(var(--srm-space-3), env(safe-area-inset-bottom));
    left: max(var(--srm-space-3), env(safe-area-inset-left));
    width: auto;
  }

  .srm-toast-region .srm-toast {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .srm-bottom-nav {
    gap: 0;
  }

  .srm-bottom-nav__item {
    padding-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .srm-page *,
  .srm-page *::before,
  .srm-page *::after,
  .srm-theme *,
  .srm-theme *::before,
  .srm-theme *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* Candidate 4.0.4.18: success is communicated by the status dot, not green text. */
.srm-badge--success,
.srm-status--success {
  color: var(--srm-text-secondary) !important;
  border-color: var(--srm-border-subtle) !important;
  background: var(--srm-surface-2) !important;
}

.srm-status--success::before {
  color: var(--srm-success);
  background: var(--srm-success) !important;
}
