.ui-segmented {
  display: inline-flex;
  max-width: 100%;
  gap: var(--space-1);
  padding: var(--space-1);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  scrollbar-width: none;
}
.ui-segmented::-webkit-scrollbar { display: none; }
.ui-segmented__item {
  flex: 0 0 auto;
  min-height: var(--touch-min);
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  white-space: nowrap;
}
.ui-segmented__item[aria-selected="true"], .ui-segmented__item.on { background: var(--bg-active-tab); color: var(--accent-blue); }

.ui-money-field { position: relative; }
.ui-money-field__symbol { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--accent-blue); font-size: 16px; font-weight: 800; pointer-events: none; }
.ui-money-input { width: 100%; min-height: 52px; padding: 12px 14px 12px 34px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-input); color: var(--text-primary); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

.ui-filter-chips { display: flex; max-width: 100%; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; }
.ui-filter-chips::-webkit-scrollbar { display: none; }
.ui-filter-chip { flex: 0 0 auto; min-height: 36px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-card); color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.ui-filter-chip[aria-pressed="true"], .ui-filter-chip.is-active { border-color: rgba(var(--accent-gold-rgb), 0.28); background: var(--bg-active-tab); color: var(--accent-blue); }

.ui-compact-row { display: flex; align-items: center; justify-content: space-between; min-width: 0; min-height: 64px; gap: var(--space-3); padding: var(--space-3) 0; }
.ui-compact-row > * { min-width: 0; }

.ui-sheet-backdrop { position: fixed; inset: 0; z-index: 1190; display: grid; max-width: 100vw; align-items: end; overflow-x: clip; background: rgba(15, 23, 42, 0.48); }
.ui-sheet { width: min(100%, 640px); min-width: 0; max-width: 100%; max-height: min(88dvh, 760px); margin-inline: auto; padding: 12px 20px calc(20px + var(--safe-bottom)); overflow: auto; border-radius: 22px 22px 0 0; background: var(--bg-card); color: var(--text-primary); box-shadow: 0 -18px 60px rgba(15, 23, 42, 0.22); }
.ui-sheet::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 16px; border-radius: 999px; background: #cbd5e1; }

.ui-app-status {
  position: fixed;
  z-index: 1400;
  inset: auto calc(16px + var(--safe-right)) calc(16px + var(--safe-bottom)) auto;
  display: flex;
  max-width: min(420px, calc(100vw - 32px - var(--safe-left) - var(--safe-right)));
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #eef2ff;
  color: #312e81;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
  font-size: 13px;
  font-weight: 700;
}
.ui-app-status[hidden] { display: none; }
.ui-app-status.is-offline { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.ui-app-status button { min-height: 36px; flex: none; padding: 6px 10px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; font-weight: 800; cursor: pointer; }

@media (min-width: 640px) {
  .ui-sheet-backdrop { place-items: center; padding: var(--space-6); }
  .ui-sheet { border-radius: 22px; padding-bottom: 24px; }
  .ui-sheet::before { display: none; }
}

@media (max-width: 639px) {
  .ui-app-status { right: calc(12px + var(--safe-right)); bottom: calc(76px + var(--safe-bottom)); left: calc(12px + var(--safe-left)); max-width: none; justify-content: space-between; }
}
