/* MonobankDS — Component CSS Classes
   Based on Design Language archetypes from Figma
   Last updated: 2026-03-25
*/

/* ========================================
   RESET & BASE
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--ds-font-text);
  font-weight: var(--ds-weight-regular);
  font-size: 14px;
  color: var(--ds-text-primary);
  background: var(--ds-bg-primary);
}

/* ========================================
   PHONE FRAME
   ======================================== */

.ds-phone {
  width: var(--ds-screen-width);
  min-height: 812px;
  margin: 20px auto;
  background: var(--ds-bg-primary);
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 0 0 8px #1a1a1a, 0 0 0 10px #333, var(--ds-elevation-xlarge);
  position: relative;
}

.ds-phone-dark {
  background: var(--ds-bg-dark);
  color: var(--ds-text-inverse);
}

/* ========================================
   STATUS BAR
   ======================================== */

.ds-status-bar {
  height: 56px;
  padding: 14px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: var(--ds-weight-semibold);
}

.ds-status-bar-dark {
  color: var(--ds-text-inverse);
}

/* ========================================
   SCREEN CONTENT
   ======================================== */

.ds-screen {
  padding: 0 var(--ds-space-16);
}

.ds-screen-scroll {
  padding: 0 var(--ds-space-16);
  overflow-y: auto;
  max-height: calc(812px - 56px - 83px);
}

/* ========================================
   TYPOGRAPHY CLASSES
   ======================================== */

/* Display (4 styles) */
.ds-display-large { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); font-size: 48px; line-height: 56px; letter-spacing: 0.36px; }
.ds-display-medium { font-family: var(--ds-font-display); font-weight: var(--ds-weight-semibold); font-size: 40px; line-height: 48px; letter-spacing: 0.36px; }
.ds-display-small { font-family: var(--ds-font-display); font-weight: var(--ds-weight-semibold); font-size: 32px; line-height: 40px; }
.ds-display-small-bold { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); font-size: 32px; line-height: 58px; }

/* Heading (11 styles) */
.ds-heading-large { font-family: var(--ds-font-display); font-weight: var(--ds-weight-semibold); font-size: 28px; }
.ds-heading-medium { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); font-size: 24px; line-height: 32px; letter-spacing: 0.36px; }
.ds-heading-medium-auto { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); font-size: 24px; }
.ds-heading-medium-28 { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); font-size: 24px; line-height: 28px; }
.ds-heading-medium-small { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); font-size: 22px; }
.ds-heading-small { font-family: var(--ds-font-display); font-weight: var(--ds-weight-semibold); font-size: 20px; letter-spacing: 0.38px; }
.ds-heading-small-bold { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); font-size: 20px; letter-spacing: 0.38px; }
.ds-heading-small-medium { font-family: var(--ds-font-display); font-weight: var(--ds-weight-medium); font-size: 20px; }
.ds-heading-xsmall { font-family: var(--ds-font-display); font-weight: var(--ds-weight-semibold); font-size: 18px; }
.ds-heading-xsmall-bold { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); font-size: 18px; line-height: 24px; }
.ds-heading-xsmall-medium { font-family: var(--ds-font-display); font-weight: var(--ds-weight-medium); font-size: 18px; line-height: 24px; letter-spacing: -0.45px; }

/* Body 14 (all line-height variants) */
.ds-body-regular-14 { font-size: 14px; font-weight: var(--ds-weight-regular); }
.ds-body-regular-14-16 { font-size: 14px; font-weight: var(--ds-weight-regular); line-height: 16px; letter-spacing: -0.154px; }
.ds-body-regular-14-18 { font-size: 14px; font-weight: var(--ds-weight-regular); line-height: 18px; }
.ds-body-regular-14-19 { font-size: 14px; font-weight: var(--ds-weight-regular); line-height: 19px; }
.ds-body-regular-14-20 { font-size: 14px; font-weight: var(--ds-weight-regular); line-height: 20px; }
.ds-body-regular-14-24 { font-size: 14px; font-weight: var(--ds-weight-regular); line-height: 24px; letter-spacing: -0.154px; }
.ds-body-regular-14-140 { font-size: 14px; font-weight: var(--ds-weight-regular); line-height: 140%; }
.ds-body-medium-14 { font-size: 14px; font-weight: var(--ds-weight-medium); }
.ds-body-medium-14-16 { font-size: 14px; font-weight: var(--ds-weight-medium); line-height: 16px; letter-spacing: -0.154px; }
.ds-body-medium-14-24 { font-size: 14px; font-weight: var(--ds-weight-medium); line-height: 24px; }
.ds-body-semibold-14 { font-size: 14px; font-weight: var(--ds-weight-semibold); }
.ds-body-semibold-14-24 { font-size: 14px; font-weight: var(--ds-weight-semibold); line-height: 24px; letter-spacing: -0.154px; }
.ds-body-bold-14 { font-size: 14px; font-weight: var(--ds-weight-bold); letter-spacing: -0.154px; }
.ds-body-bold-14-16 { font-size: 14px; font-weight: var(--ds-weight-bold); line-height: 16px; }

/* Body 16 (all line-height variants) */
.ds-body-regular-16 { font-size: 16px; font-weight: var(--ds-weight-regular); }
.ds-body-regular-16-20 { font-size: 16px; font-weight: var(--ds-weight-regular); line-height: 20px; }
.ds-body-regular-16-24 { font-size: 16px; font-weight: var(--ds-weight-regular); line-height: 24px; letter-spacing: -0.32px; }
.ds-body-regular-17-22 { font-size: 17px; font-weight: var(--ds-weight-regular); line-height: 22px; }
.ds-body-medium-16 { font-size: 16px; font-weight: var(--ds-weight-medium); }
.ds-body-medium-16-24 { font-size: 16px; font-weight: var(--ds-weight-medium); line-height: 24px; letter-spacing: -0.32px; }
.ds-body-semibold-16 { font-size: 16px; font-weight: var(--ds-weight-semibold); letter-spacing: -0.32px; }
.ds-body-semibold-16-21 { font-size: 16px; font-weight: var(--ds-weight-semibold); line-height: 21px; }
.ds-body-semibold-16-24 { font-size: 16px; font-weight: var(--ds-weight-semibold); line-height: 24px; letter-spacing: -0.32px; }
.ds-body-bold-16 { font-size: 16px; font-weight: var(--ds-weight-bold); letter-spacing: -0.32px; }
.ds-body-bold-16-24 { font-size: 16px; font-weight: var(--ds-weight-bold); line-height: 24px; letter-spacing: -0.32px; }

/* Body 18+ */
.ds-body-semibold-18-24 { font-size: 18px; font-weight: var(--ds-weight-semibold); line-height: 24px; }
.ds-body-bold-18 { font-size: 18px; font-weight: var(--ds-weight-bold); }
.ds-body-semibold-20-24 { font-size: 20px; font-weight: var(--ds-weight-semibold); line-height: 24px; }
.ds-body-semibold-22 { font-size: 22px; font-weight: var(--ds-weight-semibold); }
.ds-body-semibold-24-24 { font-size: 24px; font-weight: var(--ds-weight-semibold); line-height: 24px; }
.ds-body-semibold-24-32 { font-size: 24px; font-weight: var(--ds-weight-semibold); line-height: 32px; }
.ds-body-regular-24 { font-size: 24px; font-weight: var(--ds-weight-regular); }

/* Caption (14 styles) */
.ds-caption-regular-12 { font-size: 12px; font-weight: var(--ds-weight-regular); }
.ds-caption-regular-12-16 { font-size: 12px; font-weight: var(--ds-weight-regular); line-height: 16px; }
.ds-caption-regular-12-18 { font-size: 12px; font-weight: var(--ds-weight-regular); line-height: 18px; }
.ds-caption-regular-12-19 { font-size: 12px; font-weight: var(--ds-weight-regular); line-height: 19px; }
.ds-caption-medium-10 { font-size: 10px; font-weight: var(--ds-weight-medium); letter-spacing: -0.24px; }
.ds-caption-medium-12 { font-size: 12px; font-weight: var(--ds-weight-medium); }
.ds-caption-medium-12-14 { font-size: 12px; font-weight: var(--ds-weight-medium); line-height: 14px; }
.ds-caption-medium-12-16 { font-size: 12px; font-weight: var(--ds-weight-medium); line-height: 16px; }
.ds-caption-semibold-12 { font-size: 12px; font-weight: var(--ds-weight-semibold); }
.ds-caption-semibold-12-16 { font-size: 12px; font-weight: var(--ds-weight-semibold); line-height: 16px; }
.ds-caption-semibold-12-24 { font-size: 12px; font-weight: var(--ds-weight-semibold); line-height: 24px; }
.ds-caption-semibold-12-140 { font-size: 12px; font-weight: var(--ds-weight-semibold); line-height: 140%; }
.ds-caption-bold-12-140 { font-size: 12px; font-weight: var(--ds-weight-bold); line-height: 140%; }
.ds-caption-heavy-11 { font-size: 11px; font-weight: var(--ds-weight-heavy); }

/* Special typography */
.ds-special-card-number { font-family: var(--ds-font-mono); font-size: 16px; line-height: 24px; }
.ds-special-card-number-large { font-family: var(--ds-font-mono); font-size: 22px; line-height: 32px; }
.ds-special-rounded-semibold-10 { font-family: var(--ds-font-rounded); font-weight: var(--ds-weight-semibold); font-size: 10px; line-height: 140%; }
.ds-special-rounded-semibold-20 { font-family: var(--ds-font-rounded); font-weight: var(--ds-weight-semibold); font-size: 20px; line-height: 140%; }
.ds-special-rounded-heavy-12 { font-family: var(--ds-font-rounded); font-weight: var(--ds-weight-heavy); font-size: 12px; line-height: 24px; }
.ds-special-bold-56 { font-family: var(--ds-font-display); font-weight: var(--ds-weight-bold); font-size: 56px; }
.ds-special-numpad-25 { font-family: var(--ds-font-display); font-weight: var(--ds-weight-regular); font-size: 25px; }

/* Text colors (modifiers) */
.ds-text-primary { color: var(--ds-text-primary); }
.ds-text-secondary { color: var(--ds-text-secondary); }
.ds-text-tertiary { color: var(--ds-text-tertiary); }
.ds-text-inverse { color: var(--ds-text-inverse); }
.ds-text-error { color: var(--ds-text-error); }
.ds-text-error-red { color: var(--ds-text-error-red); }
.ds-text-link { color: var(--ds-text-link); }
.ds-text-accent { color: var(--ds-text-accent); }
.ds-text-cashback { color: var(--ds-text-cashback); }
.ds-text-pundiki { color: var(--ds-text-pundiki); }
.ds-text-promo { color: var(--ds-text-promo); }
.ds-text-disabled { color: var(--ds-text-disabled); }
.ds-text-dark-secondary { color: var(--ds-text-dark-secondary); }

/* ========================================
   NAVIGATION BAR
   ======================================== */

.ds-nav-bar {
  display: flex;
  align-items: center;
  padding: var(--ds-space-12) var(--ds-space-16);
  min-height: 56px;
  gap: var(--ds-space-16);
}

.ds-nav-bar-title {
  flex: 1;
  font-family: var(--ds-font-display);
  font-weight: var(--ds-weight-bold);
  font-size: 24px;
  line-height: 32px;
}

.ds-nav-bar-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ========================================
   CARD
   ======================================== */

.ds-card {
  background: var(--ds-bg-primary);
  border-radius: var(--ds-radius-16);
  padding: var(--ds-space-16);
  width: var(--ds-content-width);
}

.ds-card-large {
  border-radius: var(--ds-radius-20);
}

.ds-card-secondary {
  background: var(--ds-bg-secondary);
}

.ds-card-dark {
  background: var(--ds-bg-dark);
  color: var(--ds-text-inverse);
}

.ds-card-elevated {
  box-shadow: var(--ds-elevation-medium);
}

.ds-card-shadow {
  box-shadow: var(--ds-elevation-card);
}

/* ========================================
   BUTTON
   ======================================== */

.ds-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: var(--ds-content-width);
  border-radius: var(--ds-radius-16);
  border: none;
  cursor: pointer;
  font-family: var(--ds-font-text);
  font-size: 16px;
  font-weight: var(--ds-weight-semibold);
  transition: opacity 0.2s;
}

.ds-button:active {
  opacity: 0.8;
}

.ds-button-primary {
  background: var(--ds-primary-default);
  color: var(--ds-text-inverse);
}

.ds-button-primary:disabled,
.ds-button-primary.disabled {
  background: var(--ds-primary-disabled);
  cursor: not-allowed;
}

.ds-button-secondary {
  background: transparent;
  color: var(--ds-text-error);
  border: var(--ds-stroke-1) solid var(--ds-border-default);
}

.ds-button-secondary:disabled,
.ds-button-secondary.disabled {
  color: var(--ds-text-disabled);
  border-color: var(--ds-border-disabled);
}

.ds-button-dark {
  background: var(--ds-bg-dark);
  color: var(--ds-text-inverse);
}

.ds-button-text {
  background: none;
  border: none;
  color: var(--ds-text-link);
  height: auto;
  width: auto;
  font-weight: var(--ds-weight-regular);
}

.ds-button-small {
  height: 32px;
  width: auto;
  padding: 0 var(--ds-space-14);
  border-radius: var(--ds-radius-100);
  font-size: 14px;
}

/* ========================================
   CHIP / PILL
   ======================================== */

.ds-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-4);
  padding: var(--ds-space-6) var(--ds-space-12);
  border-radius: var(--ds-radius-full);
  background: var(--ds-bg-secondary);
  font-size: 14px;
  font-weight: var(--ds-weight-regular);
}

.ds-chip-active {
  background: var(--ds-bg-dark);
  color: var(--ds-text-inverse);
}

.ds-chip-outlined {
  background: transparent;
  border: var(--ds-stroke-0-5) solid var(--ds-border-muted);
}

/* ========================================
   LIST ITEM / ROW
   ======================================== */

.ds-list-item {
  display: flex;
  align-items: center;
  padding: var(--ds-space-12) var(--ds-space-16);
  gap: var(--ds-space-16);
  min-height: 64px;
}

.ds-list-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
}

.ds-list-item-title {
  font-size: 16px;
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-primary);
}

.ds-list-item-subtitle {
  font-size: 14px;
  font-weight: var(--ds-weight-regular);
  color: var(--ds-text-secondary);
}

.ds-list-item-trailing {
  font-size: 16px;
  font-weight: var(--ds-weight-medium);
  text-align: right;
}

/* ========================================
   FIELD / INPUT
   ======================================== */

.ds-field {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
  width: var(--ds-content-width);
}

.ds-field-label {
  font-size: 14px;
  color: var(--ds-text-secondary);
  padding-left: var(--ds-space-16);
}

.ds-field-input {
  height: 48px;
  background: var(--ds-bg-secondary);
  border-radius: var(--ds-radius-16);
  border: none;
  padding: 0 var(--ds-space-16);
  font-family: var(--ds-font-text);
  font-size: 16px;
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-primary);
  outline: none;
  width: 100%;
}

.ds-field-input:focus {
  box-shadow: inset 0 0 0 1px var(--ds-border-default);
}

.ds-field-input::placeholder {
  color: var(--ds-text-tertiary);
}

.ds-field-error .ds-field-input {
  box-shadow: inset 0 0 0 1px var(--ds-border-error);
}

.ds-field-error-message {
  font-size: 12px;
  color: var(--ds-text-error);
  padding-left: var(--ds-space-16);
}

/* Search field */
.ds-field-search {
  height: 48px;
  background: var(--ds-bg-secondary);
  border-radius: var(--ds-radius-100);
  border: none;
  padding: 0 var(--ds-space-16);
  font-family: var(--ds-font-text);
  font-size: 16px;
  color: var(--ds-text-primary);
  outline: none;
  width: var(--ds-content-width);
}

/* ========================================
   DIVIDER
   ======================================== */

.ds-divider {
  height: 0;
  border: none;
  border-top: var(--ds-stroke-0-5) solid var(--ds-border-muted);
  margin: 0 var(--ds-space-16);
}

.ds-divider-subtle {
  border-color: var(--ds-border-subtle);
}

/* ========================================
   AVATAR
   ======================================== */

.ds-avatar {
  border-radius: var(--ds-radius-full);
  background: var(--ds-bg-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ds-avatar-24 { width: 24px; height: 24px; }
.ds-avatar-40 { width: 40px; height: 40px; }
.ds-avatar-56 { width: 56px; height: 56px; }
.ds-avatar-64 { width: 64px; height: 64px; }
.ds-avatar-72 { width: 72px; height: 72px; }

.ds-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ds-avatar-initials {
  font-weight: var(--ds-weight-semibold);
  color: var(--ds-text-primary);
}

/* ========================================
   BADGE
   ======================================== */

.ds-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-primary-default);
  color: var(--ds-text-inverse);
  font-size: 11px;
  font-weight: var(--ds-weight-heavy);
}

/* ========================================
   BANNER / MESSAGE
   ======================================== */

.ds-banner {
  display: flex;
  align-items: center;
  gap: var(--ds-space-16);
  padding: var(--ds-space-12) var(--ds-space-16);
  border-radius: var(--ds-radius-12);
  width: var(--ds-content-width);
}

.ds-banner-info {
  background: var(--ds-bg-accent-light);
}

.ds-banner-error {
  background: var(--ds-bg-error-light);
}

.ds-banner-success {
  background: #e8f9e9;
}

.ds-banner-warning {
  background: #fff4e6;
}

.ds-banner-text {
  flex: 1;
  font-size: 14px;
}

/* ========================================
   TOAST
   ======================================== */

.ds-toast {
  display: flex;
  align-items: center;
  gap: var(--ds-space-12);
  padding: var(--ds-space-16);
  border-radius: var(--ds-radius-16);
  background: var(--ds-bg-dark);
  color: var(--ds-text-inverse);
  width: var(--ds-content-width);
  font-size: 14px;
}

/* ========================================
   SWITCH / CHECKBOX / RADIO
   ======================================== */

.ds-switch {
  width: 51px;
  height: 31px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-bg-disabled-light);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.ds-switch.active {
  background: var(--ds-bg-success);
}

.ds-switch::after {
  content: '';
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  box-shadow: var(--ds-elevation-small);
  transition: transform 0.2s;
}

.ds-switch.active::after {
  transform: translateX(20px);
}

.ds-checkbox {
  width: 24px;
  height: 24px;
  border-radius: var(--ds-radius-6);
  border: var(--ds-stroke-2) solid var(--ds-border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ds-checkbox.active {
  background: var(--ds-bg-dark);
  border-color: var(--ds-bg-dark);
  color: var(--ds-text-inverse);
}

/* ========================================
   TAB BAR
   ======================================== */

.ds-tab-bar {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: var(--ds-space-8) 0;
  padding-bottom: 24px;
  background: var(--ds-bg-primary);
  border-top: var(--ds-stroke-0-5) solid var(--ds-border-subtle);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.ds-tab-bar-dark {
  background: var(--ds-bg-dark);
  border-top-color: rgba(255,255,255,0.1);
}

.ds-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.ds-tab-item-label {
  font-size: 10px;
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-tertiary);
}

.ds-tab-item.active .ds-tab-item-label {
  color: var(--ds-text-primary);
}

.ds-tab-item-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   BOTTOM SHEET
   ======================================== */

.ds-bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ds-bg-primary);
  border-radius: var(--ds-radius-20) var(--ds-radius-20) 0 0;
  padding: var(--ds-space-8) var(--ds-space-16) var(--ds-space-32);
  box-shadow: var(--ds-elevation-large);
}

.ds-bottom-sheet-handle {
  width: 36px;
  height: 5px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-bg-disabled-light);
  margin: 0 auto var(--ds-space-16);
}

/* ========================================
   ICON (inline SVG helper)
   ======================================== */

.ds-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ds-icon svg {
  width: 100%;
  height: 100%;
}

.ds-icon-24 { width: 24px; height: 24px; }
.ds-icon-20 { width: 20px; height: 20px; }
.ds-icon-16 { width: 16px; height: 16px; }
.ds-icon-28 { width: 28px; height: 28px; }
.ds-icon-32 { width: 32px; height: 32px; }

/* ========================================
   CIRCULAR BUTTON
   ======================================== */

.ds-circular-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-8);
  width: 76px;
}

.ds-circular-button-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ds-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ds-circular-button-label {
  font-size: 12px;
  font-weight: var(--ds-weight-medium);
  text-align: center;
  color: var(--ds-text-primary);
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.ds-progress {
  height: 4px;
  background: var(--ds-bg-secondary);
  border-radius: var(--ds-radius-full);
  overflow: hidden;
}

.ds-progress-fill {
  height: 100%;
  background: var(--ds-primary-default);
  border-radius: var(--ds-radius-full);
  transition: width 0.3s;
}

/* ========================================
   SHIMMER (loading placeholder)
   ======================================== */

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.ds-shimmer {
  background: linear-gradient(90deg, var(--ds-bg-secondary) 25%, #e8e8e8 50%, var(--ds-bg-secondary) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--ds-radius-8);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Flexbox */
.ds-row { display: flex; flex-direction: row; align-items: center; }
.ds-col { display: flex; flex-direction: column; }
.ds-center { align-items: center; justify-content: center; }
.ds-between { justify-content: space-between; }
.ds-wrap { flex-wrap: wrap; }
.ds-flex-1 { flex: 1; }

/* Gaps */
.ds-gap-0 { gap: 0; }
.ds-gap-2 { gap: var(--ds-space-2); }
.ds-gap-4 { gap: var(--ds-space-4); }
.ds-gap-8 { gap: var(--ds-space-8); }
.ds-gap-10 { gap: var(--ds-space-10); }
.ds-gap-12 { gap: var(--ds-space-12); }
.ds-gap-16 { gap: var(--ds-space-16); }
.ds-gap-20 { gap: var(--ds-space-20); }
.ds-gap-24 { gap: var(--ds-space-24); }
.ds-gap-32 { gap: var(--ds-space-32); }

/* Padding */
.ds-p-0 { padding: 0; }
.ds-p-4 { padding: var(--ds-space-4); }
.ds-p-8 { padding: var(--ds-space-8); }
.ds-p-12 { padding: var(--ds-space-12); }
.ds-p-16 { padding: var(--ds-space-16); }
.ds-p-20 { padding: var(--ds-space-20); }
.ds-px-16 { padding-left: var(--ds-space-16); padding-right: var(--ds-space-16); }
.ds-py-8 { padding-top: var(--ds-space-8); padding-bottom: var(--ds-space-8); }
.ds-py-12 { padding-top: var(--ds-space-12); padding-bottom: var(--ds-space-12); }
.ds-pt-16 { padding-top: var(--ds-space-16); }

/* Width */
.ds-w-full { width: 100%; }
.ds-w-screen { width: var(--ds-screen-width); }
.ds-w-content { width: var(--ds-content-width); }
.ds-w-narrow { width: var(--ds-narrow-width); }

/* Background shortcuts */
.ds-bg-primary { background: var(--ds-bg-primary); }
.ds-bg-secondary { background: var(--ds-bg-secondary); }
.ds-bg-dark { background: var(--ds-bg-dark); }

/* Margin */
.ds-mt-4 { margin-top: var(--ds-space-4); }
.ds-mt-8 { margin-top: var(--ds-space-8); }
.ds-mt-12 { margin-top: var(--ds-space-12); }
.ds-mt-16 { margin-top: var(--ds-space-16); }
.ds-mt-24 { margin-top: var(--ds-space-24); }
.ds-mt-32 { margin-top: var(--ds-space-32); }
.ds-mb-8 { margin-bottom: var(--ds-space-8); }
.ds-mb-16 { margin-bottom: var(--ds-space-16); }
.ds-ml-auto { margin-left: auto; }

/* Safe area spacer */
.ds-safe-top { height: var(--ds-status-bar-height); }
.ds-safe-bottom { height: 34px; }

/* Overflow */
.ds-overflow-hidden { overflow: hidden; }
.ds-overflow-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Position */
.ds-relative { position: relative; }
.ds-absolute { position: absolute; }

/* Border radius shortcuts */
.ds-rounded-8 { border-radius: var(--ds-radius-8); }
.ds-rounded-12 { border-radius: var(--ds-radius-12); }
.ds-rounded-16 { border-radius: var(--ds-radius-16); }
.ds-rounded-20 { border-radius: var(--ds-radius-20); }
.ds-rounded-full { border-radius: var(--ds-radius-full); }

/* ========================================
   SEGMENTED CONTROL
   ======================================== */

.ds-segmented-control {
  display: flex;
  background: var(--ds-bg-secondary);
  border-radius: var(--ds-radius-100);
  padding: 2px;
  width: var(--ds-content-width);
}

.ds-segmented-control-grey {
  background: var(--ds-bg-disabled-light);
}

.ds-segment {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: var(--ds-radius-100);
  font-size: 14px;
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.ds-segment.active {
  background: var(--ds-bg-primary);
  color: var(--ds-text-primary);
  box-shadow: var(--ds-elevation-small);
}

/* Ghost segmented (underline style) */
.ds-segmented-ghost {
  display: flex;
  gap: var(--ds-space-16);
  border-bottom: var(--ds-stroke-0-5) solid var(--ds-border-muted);
}

.ds-segment-ghost {
  padding: var(--ds-space-8) 0;
  font-size: 14px;
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
}

.ds-segment-ghost.active {
  color: var(--ds-text-primary);
  border-bottom-color: var(--ds-border-default);
}

/* ========================================
   ACCORDION
   ======================================== */

.ds-accordion {
  width: var(--ds-content-width);
  border-radius: var(--ds-radius-16);
  overflow: hidden;
}

.ds-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-16);
  cursor: pointer;
  background: var(--ds-bg-primary);
}

.ds-accordion-header-title {
  font-size: 16px;
  font-weight: var(--ds-weight-medium);
}

.ds-accordion-chevron {
  width: 24px;
  height: 24px;
  transition: transform 0.2s;
}

.ds-accordion.open .ds-accordion-chevron {
  transform: rotate(180deg);
}

.ds-accordion-body {
  padding: 0 var(--ds-space-16) var(--ds-space-16);
  display: none;
}

.ds-accordion.open .ds-accordion-body {
  display: block;
}

/* ========================================
   CALENDAR
   ======================================== */

.ds-calendar {
  width: var(--ds-content-width);
}

.ds-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-16) 0;
}

.ds-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--ds-space-4);
  text-align: center;
}

.ds-calendar-weekday {
  font-size: 12px;
  font-weight: var(--ds-weight-medium);
  color: var(--ds-text-secondary);
  padding: var(--ds-space-8) 0;
}

.ds-calendar-day {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  margin: 0 auto;
}

.ds-calendar-day:hover {
  background: var(--ds-bg-secondary);
}

.ds-calendar-day.today {
  font-weight: var(--ds-weight-bold);
}

.ds-calendar-day.selected {
  background: var(--ds-bg-dark);
  color: var(--ds-text-inverse);
}

.ds-calendar-day.empty {
  cursor: default;
}

/* ========================================
   STEPPER
   ======================================== */

.ds-stepper {
  display: flex;
  align-items: center;
  gap: var(--ds-space-16);
}

.ds-stepper-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: var(--ds-stroke-1) solid var(--ds-border-default);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: var(--ds-weight-medium);
}

.ds-stepper-button.disabled {
  border-color: var(--ds-border-disabled);
  color: var(--ds-text-disabled);
  cursor: not-allowed;
}

.ds-stepper-value {
  font-size: 20px;
  font-weight: var(--ds-weight-semibold);
  min-width: 40px;
  text-align: center;
}

/* ========================================
   PINPAD
   ======================================== */

.ds-pinpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ds-space-16);
  width: 264px;
  margin: 0 auto;
}

.ds-pinpad-button {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-family: var(--ds-font-display);
  font-size: 25px;
  font-weight: var(--ds-weight-regular);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  margin: 0 auto;
}

.ds-pinpad-button:active {
  background: var(--ds-bg-secondary);
}

/* Passcode dots */
.ds-passcode {
  display: flex;
  gap: var(--ds-space-16);
  justify-content: center;
}

.ds-passcode-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: var(--ds-stroke-2) solid var(--ds-border-default);
  background: transparent;
  transition: background 0.15s;
}

.ds-passcode-dot.filled {
  background: var(--ds-bg-dark);
}

/* ========================================
   CAROUSEL / PAGE CONTROL
   ======================================== */

.ds-page-control {
  display: flex;
  gap: var(--ds-space-6);
  justify-content: center;
  align-items: center;
}

.ds-page-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ds-bg-disabled-light);
  transition: all 0.2s;
}

.ds-page-dot.active {
  width: 24px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-bg-dark);
}

/* ========================================
   MODAL / DIALOG
   ======================================== */

.ds-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.ds-modal {
  background: var(--ds-bg-primary);
  border-radius: var(--ds-radius-20);
  padding: var(--ds-space-24);
  width: var(--ds-content-width);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-16);
}

.ds-modal-title {
  font-family: var(--ds-font-display);
  font-weight: var(--ds-weight-bold);
  font-size: 20px;
  text-align: center;
}

.ds-modal-text {
  font-size: 14px;
  color: var(--ds-text-secondary);
  text-align: center;
  line-height: 20px;
}

/* ========================================
   AMOUNT INPUT (big number display)
   ======================================== */

.ds-amount-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-8);
  padding: var(--ds-space-24) var(--ds-space-16);
}

.ds-amount-value {
  font-family: var(--ds-font-display);
  font-weight: var(--ds-weight-semibold);
  font-size: 40px;
  line-height: 48px;
  text-align: center;
}

.ds-amount-currency {
  font-size: 14px;
  color: var(--ds-text-secondary);
}

.ds-amount-balance {
  font-size: 14px;
  color: var(--ds-text-secondary);
}

/* ========================================
   LOADER / SPINNER
   ======================================== */

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

.ds-loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ds-bg-secondary);
  border-top-color: var(--ds-primary-default);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.ds-loader-large {
  width: 80px;
  height: 80px;
  border-width: 4px;
}

/* Step indicator */
.ds-step-indicator {
  display: flex;
  gap: var(--ds-space-4);
}

.ds-step-indicator-segment {
  flex: 1;
  height: 4px;
  border-radius: var(--ds-radius-full);
  background: var(--ds-bg-secondary);
}

.ds-step-indicator-segment.completed {
  background: var(--ds-bg-dark);
}

.ds-step-indicator-segment.active {
  background: var(--ds-primary-default);
}

/* ========================================
   RADIOBUTTON
   ======================================== */

.ds-radio {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: var(--ds-stroke-2) solid var(--ds-border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ds-radio.active {
  border-color: var(--ds-bg-dark);
}

.ds-radio.active::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ds-bg-dark);
}

/* ========================================
   SHORTCUTS GRID
   ======================================== */

.ds-shortcuts {
  display: flex;
  gap: var(--ds-space-12);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--ds-space-8) 0;
}

.ds-shortcut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-6);
  min-width: 64px;
  cursor: pointer;
}

.ds-shortcut-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--ds-radius-16);
  background: var(--ds-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-shortcut-label {
  font-size: 10px;
  font-weight: var(--ds-weight-medium);
  text-align: center;
  color: var(--ds-text-primary);
  max-width: 64px;
  line-height: 1.2;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.ds-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-12);
  padding: var(--ds-space-40) var(--ds-space-16);
  text-align: center;
}

.ds-empty-state-icon {
  width: 80px;
  height: 80px;
  opacity: 0.3;
}

.ds-empty-state-title {
  font-size: 16px;
  font-weight: var(--ds-weight-medium);
}

.ds-empty-state-text {
  font-size: 14px;
  color: var(--ds-text-secondary);
  line-height: 20px;
}

/* ========================================
   ACTION BAR (bottom fixed)
   ======================================== */

.ds-action-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--ds-space-16);
  padding-bottom: calc(var(--ds-space-16) + 34px);
  background: var(--ds-bg-primary);
  border-top: var(--ds-stroke-0-5) solid var(--ds-border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-8);
}

/* ========================================
   KEYBOARD (iOS style)
   ======================================== */

.ds-keyboard {
  background: #d1d3d9;
  padding: var(--ds-space-6) var(--ds-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-10);
  width: var(--ds-screen-width);
}

.ds-keyboard-row {
  display: flex;
  justify-content: center;
  gap: var(--ds-space-6);
}

.ds-keyboard-key {
  height: 42px;
  min-width: 32px;
  border-radius: var(--ds-radius-5);
  background: white;
  border: none;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 36px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
  cursor: pointer;
}

.ds-keyboard-key-special {
  background: #adb3bc;
  max-width: 44px;
  font-size: 14px;
  font-weight: var(--ds-weight-medium);
}

.ds-keyboard-key-space {
  max-width: none;
  flex: 4;
}

/* ========================================
   DROPDOWN / SELECT
   ======================================== */

.ds-dropdown {
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  padding: var(--ds-space-6) var(--ds-space-12);
  border-radius: var(--ds-radius-full);
  background: var(--ds-bg-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: var(--ds-weight-medium);
}

.ds-dropdown-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

/* ========================================
   SUMMARY ROW (key-value pair)
   ======================================== */

.ds-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--ds-space-8) 0;
}

.ds-summary-label {
  font-size: 14px;
  color: var(--ds-text-secondary);
}

.ds-summary-value {
  font-size: 14px;
  font-weight: var(--ds-weight-medium);
}

/* ========================================
   SECTION HEADER (label + "see all" link)
   ======================================== */

.ds-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--ds-space-8) 0;
}

.ds-section-title {
  font-family: var(--ds-font-display);
  font-weight: var(--ds-weight-bold);
  font-size: 20px;
}

.ds-section-link {
  font-size: 14px;
  color: var(--ds-text-link);
  cursor: pointer;
}

/* ========================================
   BACKDROP BLUR
   ======================================== */

.ds-backdrop-blur {
  backdrop-filter: blur(var(--ds-blur-background));
  -webkit-backdrop-filter: blur(var(--ds-blur-background));
}

/* ========================================
   GRADIENT CARD HELPERS
   ======================================== */

.ds-gradient-card {
  border-radius: var(--ds-radius-20);
  padding: var(--ds-space-20);
  color: var(--ds-text-inverse);
}

/* ========================================
   COPY LINK / PROMO
   ======================================== */

.ds-copy-link {
  display: flex;
  align-items: center;
  gap: var(--ds-space-8);
  padding: var(--ds-space-8) var(--ds-space-12);
  background: var(--ds-bg-secondary);
  border-radius: var(--ds-radius-12);
  font-size: 14px;
  color: var(--ds-text-link);
  cursor: pointer;
}

/* ========================================
   QR CODE (placeholder frame)
   ======================================== */

.ds-qr-code {
  width: 200px;
  height: 200px;
  border-radius: var(--ds-radius-16);
  background: var(--ds-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: var(--ds-elevation-medium);
}

/* ========================================
   PIE CHART (circular progress)
   ======================================== */

.ds-pie-chart {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-pie-chart-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========================================
   STAT CARD
   ======================================== */

.ds-stat-card {
  background: var(--ds-bg-secondary);
  border-radius: var(--ds-radius-16);
  padding: var(--ds-space-16);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
  min-width: 147px;
}

.ds-stat-value {
  font-family: var(--ds-font-display);
  font-weight: var(--ds-weight-bold);
  font-size: 24px;
}

.ds-stat-label {
  font-size: 12px;
  color: var(--ds-text-secondary);
}
