/* Structural and established component rules. Brand/theme values live in tokens.css. */
@layer foundation.base {

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
button, input, select { font-family: inherit; border: none; outline: none; background: none; }
button { cursor: pointer; }
a { color: var(--primary-text); text-decoration: underline; text-underline-offset: 2px; }

.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
}
:root[data-theme="dark"] .app { background: var(--bg); }

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card);
}
:root[data-theme="dark"] .topbar { background: var(--card); }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  box-shadow: 0 7px 18px -10px rgba(var(--primary-rgb), .8);
}
.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  position: relative;
}
.icon-btn .badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: #E53935;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* Screens */
.screens { flex: 1; padding-bottom: calc(var(--nav-h) + 16px); }
.screen { display: none; padding: 8px 16px 24px; animation: fadeIn .28s var(--ease); }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 12px 0 20px;
  color: var(--ink);
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}

/* Phone input */
.phone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.phone-row .flag-ico {
  font-size: 20px;
  color: var(--green);
}
.phone-prefix {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  white-space: nowrap;
}
.phone-row input {
  flex: 1;
  min-height: 44px;
  font-size: 16px;
  color: var(--ink);
  min-width: 0;
}
.phone-row input::placeholder { color: var(--ink-3); }

/* Amount exchange */
.exchange-card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  margin-bottom: 10px;
  position: relative;
}
.amount-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 48px;
}
.amount-row input {
  min-height: 44px;
  font-size: 32px;
  font-weight: 600;
  text-align: right;
  color: var(--ink);
  width: 100%;
  max-width: 160px;
  letter-spacing: -0.02em;
}
.amount-row input::placeholder { color: var(--ink-3); }
.currency-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-2);
  border-radius: var(--r-pill);
  padding: 8px 12px 8px 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  flex-shrink: 0;
}
.currency-pill img, .currency-pill .flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}
.swap-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin: 8px auto;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease);
}
.swap-btn:active { transform: rotate(180deg); }
.rate-line {
  font-size: 13px;
  color: var(--ink-2);
  margin: 6px 4px 16px;
}

/* Terms */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.4;
}
.terms-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  margin-top: 1px;
  flex-shrink: 0;
}
.terms-row a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-block: -12px;
}

/* Primary button */
.btn-primary {
  width: 100%;
  height: 54px;
  border-radius: var(--r-pill);
  background: var(--btn-disabled);
  color: var(--btn-text-disabled);
  font-size: 17px;
  font-weight: 600;
  transition: background .2s, color .2s, transform .15s;
  margin-top: 8px;
}
.btn-primary.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), .28);
}
.btn-primary.active:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.7; pointer-events: none; }

.btn-blue {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(43, 109, 229, 0.3);
}
.btn-blue:active { transform: scale(0.98); }

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--nav-h);
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 30;
  box-shadow: 0 -4px 24px rgba(28, 26, 23, 0.05);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  border-radius: 14px;
  transition: color .2s, background .2s;
}
.nav-item svg { width: 24px; height: 24px; }
.nav-item.active {
  color: var(--green);
  background: var(--gold);
}

/* Services list */
.service-list { display: flex; flex-direction: column; gap: 10px; }
.service-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-align: left;
  width: 100%;
  transition: transform .15s;
}
.service-item:active { transform: scale(0.98); }
.service-item .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-2);
  display: grid;
  place-items: center;
  color: var(--green);
  flex-shrink: 0;
}
.service-item .txt { flex: 1; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.service-item .chev { color: var(--ink-3); }

/* Profile */
.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  position: relative;
}
.avatar .cam {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 20px; height: 20px;
  background: #F5C518;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  border: 2px solid #fff;
}
.profile-info h3 { font-size: 16px; font-weight: 700; }
.profile-info p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.profile-info .id { font-size: 12px; color: var(--ink-3); }

.settings-list { display: flex; flex-direction: column; gap: 8px; }
.setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  text-align: left;
  color: var(--ink);
}
.setting-row .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-2);
  display: grid;
  place-items: center;
  color: var(--ink-2);
}
.setting-row .txt { flex: 1; }
.setting-row .txt strong { display: block; font-size: 15px; font-weight: 600; }
.setting-row .txt span { font-size: 13px; color: var(--ink-2); }
.setting-row .chev { color: var(--ink-3); }

/* Payment / Confirm screens */
.back-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.back-header button {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}
.back-header h2 { font-size: 18px; font-weight: 700; }

.info-list { font-size: 14px; }
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--ink-2); }
.info-row .val { font-weight: 600; }

.pay-methods { margin-top: 16px; }
.pay-methods h3 { font-size: 15px; margin-bottom: 10px; color: var(--ink-2); }
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  margin-bottom: 8px;
  cursor: pointer;
}
.pay-method.selected { border-color: var(--primary); background: var(--green-soft); }
.pay-method .pm-ico { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; }
.pay-method .pm-txt { flex: 1; }
.pay-method .pm-txt strong { display: block; font-size: 14px; }
.pay-method .pm-txt span { font-size: 12px; color: var(--ink-2); }
.pay-method input { accent-color: var(--blue); width: 18px; height: 18px; }

/* Progress / Success */
.progress-wrap {
  text-align: center;
  padding: 40px 20px;
}
.progress-circle {
  width: 100px; height: 100px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 3px solid var(--line);
  display: grid;
  place-items: center;
  position: relative;
}
.progress-circle.spin::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--blue);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.steps { text-align: left; max-width: 260px; margin: 24px auto 0; }
.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-3);
}
.step.done { color: var(--green); }
.step.active { color: var(--blue); font-weight: 600; }
.step .dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.step.done .dot { background: var(--green); border-color: var(--green); color: #fff; }

.success-screen {
  text-align: center;
  padding: 48px 20px;
}
.success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--current);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  font-size: 36px;
  box-shadow: 0 8px 28px rgba(var(--success-rgb), .28);
}

/* Dil we görnüş saýlawlary */
.settings-sheet h3 { text-align: center; margin: 0 0 14px; color: var(--ink); }
.choice-row {
  width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; margin-bottom: 8px; border-radius: 14px; background: var(--bg-2);
  color: var(--ink); font-size: 15px; font-weight: 650; border: 1px solid transparent;
}
.choice-row.selected { border-color: var(--horizon); background: var(--green-soft); }
.choice-check { opacity: 0; color: var(--horizon); font-weight: 800; }
.choice-row.selected .choice-check { opacity: 1; }
.close-settings { display: block; margin: 14px auto 0; text-decoration: underline; }
.auth-link { display: block; margin: 14px auto 0; color: var(--horizon); text-decoration: underline; font-weight: 600; }

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select { color: var(--ink); }
:root[data-theme="dark"] .bottom-nav,
:root[data-theme="dark"] .overlay .sheet,
:root[data-theme="dark"] .notif-panel { background: var(--card); border-color: var(--line); }
:root[data-theme="dark"] .phone-row,
:root[data-theme="dark"] .exchange-card,
:root[data-theme="dark"] .pay-method,
:root[data-theme="dark"] .service-item,
:root[data-theme="dark"] .setting-row,
:root[data-theme="dark"] .upload-zone { background: var(--card); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .pay-method.selected { background: var(--green-soft); border-color: var(--horizon); }
:root[data-theme="dark"] .hist-badge.success { background: #123B2D; color: #7CE7B5; }
:root[data-theme="dark"] .hist-badge.pending { background: #3A3015; color: #F8D978; }
.success-screen h2 { font-size: 22px; margin-bottom: 6px; }
.success-screen p { color: var(--ink-2); font-size: 14px; margin-bottom: 24px; }

/* QR payment */
.qr-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.qr-amount {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.qr-meta { font-size: 13px; color: var(--ink-3); margin-bottom: 20px; }
.qr-box {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  margin: 0 auto 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.qr-box img, .qr-box canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.qr-hint { font-size: 13px; color: var(--ink-2); }

/* Upload check */
.upload-zone {
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  padding: 28px 16px;
  text-align: center;
  color: var(--ink-2);
  margin: 12px 0;
  cursor: pointer;
}
.upload-zone:hover { border-color: var(--green); background: var(--green-soft); }
.upload-zone .up-ico { font-size: 28px; margin-bottom: 8px; color: var(--green); }

/* Auth overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 23, 0.45);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.overlay.show { display: flex; }
.sheet {
  background: var(--card);
  width: 100%;
  max-width: 430px;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 32px;
  animation: slideUp .3s var(--ease);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h2 { font-size: 20px; margin-bottom: 16px; text-align: center; }
.sheet .field {
  margin-bottom: 12px;
}
.sheet .field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.sheet .field input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: var(--bg);
  padding: 0 14px;
  font-size: 16px;
  border: 1px solid var(--line);
}
.sheet .tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.sheet .tabs button {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg);
}
.sheet .tabs button.active {
  background: var(--green);
  color: #fff;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 200;
  max-width: 90%;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Splash */
.splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity .4s, visibility .4s;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash img { width: 88px; height: 88px; border-radius: 50%; }

/* Utility */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.text-center { text-align: center; }
.muted { color: var(--ink-2); font-size: 13px; }

/* History */
.hist-item {
  background: var(--card);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.hist-item .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.hist-item .amt { font-weight: 700; font-size: 16px; }
.hist-item .meta { font-size: 12px; color: var(--ink-2); }
.hist-badge {
  font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.hist-badge.pending { background: #FEF3C7; color: #92400E; }
.hist-badge.success { background: #D1FAE5; color: #065F46; }
.hist-badge.failed, .hist-badge.cancelled { background: #FEE2E2; color: #991B1B; }

.hist-badge.confirmed { background: #CCFBF1; color: #0F766E; }

/* Note / urgent */
.note-card { margin-bottom: 14px; padding: 14px 16px; }
.note-card textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 56px;
  outline: none;
  background: var(--bg);
  color: var(--ink);
}
.note-card textarea:focus { border-color: var(--horizon); }
.urgent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.urgent-row input { width: 16px; height: 16px; accent-color: var(--coral); }

/* Notifications */
.notif-panel {
  position: absolute;
  top: 56px;
  right: 12px;
  left: 12px;
  max-width: 400px;
  margin-left: auto;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
}
.notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--card);
}
.notif-head button { font-size: 16px; color: var(--ink-2); padding: 4px 8px; }
.notif-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.notif-item:last-child { border-bottom: none; }
.notif-item .nt { font-weight: 600; margin-bottom: 2px; }
.notif-item .nm { color: var(--ink-2); font-size: 12px; }
.icon-btn .badge.hidden { display: none; }

/* Legal docs */
.legal-card h3 {
  font-size: 15px;
  margin: 16px 0 6px;
  color: var(--navy);
}
.legal-card h3:first-child { margin-top: 0; }
.legal-card p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.terms-row input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.terms-row.ready {
  border: 1px solid rgba(var(--primary-rgb), .25);
  background: var(--green-soft);
}

}

/* Feature-specific enhancements intentionally follow the structural foundation. */
@layer foundation.enhancements {

/* —— Mobil UI polish + özboluşly ikonkalar —— */
.app {
  max-width: 430px;
  box-shadow: 0 0 0 1px rgba(var(--navy-rgb), .06), 0 20px 50px rgba(var(--navy-rgb), .08);
}

.top-bar {
  padding: 10px 14px 8px;
  backdrop-filter: blur(12px);
  background: rgba(247, 249, 255, 0.92);
  border-bottom: 1px solid rgba(var(--navy-rgb), .06);
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid rgba(var(--navy-rgb), .08);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(var(--navy-rgb), .06);
  transition: transform .15s ease, background .15s;
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { display: block; }

.page-title {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 8px 0 16px;
}

.phone-row {
  border-radius: 16px;
  padding: 4px 14px;
  min-height: 54px;
  box-shadow: 0 2px 12px rgba(var(--navy-rgb), .04);
  border: 1.5px solid rgba(var(--navy-rgb), .08);
}
.flag-ico.ico-svg {
  display: flex;
  align-items: center;
  color: var(--primary);
}
.flag-ico.ico-svg svg { display: block; }

.exchange-card {
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: 0 4px 20px rgba(var(--navy-rgb), .06);
  border: 1px solid rgba(var(--navy-rgb), .06);
}
.swap-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--primary-dark), var(--primary));
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), .26);
}
.swap-btn svg { color: currentColor; }
.currency-pill {
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.btn-primary {
  border-radius: 16px;
  height: 52px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: none;
}
.btn-primary.active {
  background: var(--primary);
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), .3);
}
.btn-primary.active:active { transform: scale(0.98); }

.bottom-nav {
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0));
  border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(var(--navy-rgb), .06);
  box-shadow: 0 -8px 30px rgba(var(--navy-rgb), .06);
}
.nav-item {
  border-radius: 14px;
  padding: 8px 6px;
  gap: 4px;
  color: #8B93B0;
  transition: color .2s, background .2s;
}
.nav-item svg { width: 24px; height: 24px; }
.nav-item.active {
  color: var(--primary-dark);
  background: rgba(var(--primary-rgb), .08);
  font-weight: 700;
}
.nav-item span { font-size: 12px; }

.service-item, .menu-item {
  border-radius: 16px;
  min-height: 58px;
  border: 1px solid rgba(var(--navy-rgb), .06);
  box-shadow: 0 2px 10px rgba(var(--navy-rgb), .04);
  transition: transform .15s;
}
.service-item:active, .menu-item:active { transform: scale(0.98); }
.service-item .ico, .menu-item .ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ico-svg svg { display: block; color: inherit; }

.profile-card {
  border-radius: 20px;
  background: var(--navy);
  box-shadow: 0 12px 32px rgba(var(--navy-rgb), .28);
}
.avatar {
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.card {
  border-radius: 18px;
  border: 1px solid rgba(var(--navy-rgb), .06);
  box-shadow: 0 2px 14px rgba(var(--navy-rgb), .05);
}

.pay-method {
  border-radius: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.pay-method.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.upload-zone {
  border-radius: 16px;
  border: 2px dashed rgba(var(--primary-rgb), .25);
  background: rgba(var(--primary-rgb), .03);
}
.up-ico.ico-svg { color: var(--primary); }

.progress-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--primary);
}
.progress-circle.spin svg {
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #10B981, #34D399);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35);
}

.screens { padding-bottom: 12px; }

.note-card textarea {
  border-radius: 14px;
  min-height: 64px;
}

@media (max-width: 380px) {
  .page-title { font-size: 20px; }
  .exchange-card { padding: 14px 12px; }
}
.contact-list { display: flex; flex-direction: column; gap: 10px; }
.contact-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 14px;
  background: var(--bg-2, #F0F3FF);
  text-decoration: none; color: inherit;
  border: 1px solid rgba(var(--navy-rgb), .06);
}
.contact-row .ct { font-weight: 700; font-size: 14px; }
.contact-row .cm { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.contact-row .ico { color: var(--primary); }

.favorites-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -4px 0 12px;
}
.favorite-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; font-size: 12px; }
.favorite-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  overflow: hidden;
}
.favorite-chip button { border: 0; background: transparent; color: var(--ink); padding: 6px 9px; cursor: pointer; }
.favorite-chip [data-fav-delete] { color: var(--danger); padding-left: 2px; font-size: 16px; }
.mini-action, .text-action {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--primary-text);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.mini-action.danger { color: var(--danger); }
.text-action { border: 0; padding: 5px; background: transparent; }
.history-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.hist-badge.refunded { background: #EDE9FE; color: #6D28D9; }
.balance-summary { display: flex; justify-content: space-between; margin-bottom: 12px; }
.ledger-item .row { gap: 12px; }
.ledger-amount { font-weight: 800; white-space: nowrap; }
.ledger-amount.positive { color: #059669; }
.ledger-amount.negative { color: var(--danger); }
.attach-btn {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 20px;
  cursor: pointer;
}
.support-image-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--bg-2);
  font-size: 12px;
}
.support-image-preview button { border: 0; background: transparent; color: var(--danger); font-size: 20px; }
.support-chat-image { display: block; max-width: 220px; max-height: 220px; border-radius: 10px; margin-bottom: 6px; object-fit: cover; }
.notif-item.unread { border-left: 3px solid var(--primary); background: rgba(var(--primary-rgb), .06); }
.verify-card { padding: 24px; }
.verify-card h3 { text-align: center; margin: 10px 0 22px; }
.verify-ok, .verify-bad {
  width: 70px;
  height: 70px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 36px;
  font-weight: 800;
}
.verify-ok { background: #10B981; }
.verify-bad { background: var(--danger); }

[data-theme="dark"] .hist-badge.refunded { background: #34285E; color: #C4B5FD; }

}

/* Tölegim AI + operator goldaw */
.support-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
}
.support-mode-tab {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.support-mode-tab.active {
  background: var(--card);
  color: var(--primary-text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}
.ai-safety-note,
.operator-support-note {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(var(--primary-rgb), .07);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.ai-support-chat,
.operator-support-chat {
  min-height: 280px;
  max-height: 360px;
  overflow: auto;
  margin-bottom: 10px;
  padding: 14px;
}
.ai-message {
  display: flex;
  margin-bottom: 10px;
}
.ai-message.user { justify-content: flex-end; }
.ai-message.assistant { justify-content: flex-start; }
.ai-message .bubble {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ai-message.user .bubble {
  background: var(--green-soft);
  color: var(--ink);
  border-bottom-right-radius: 5px;
}
.ai-message.assistant .bubble {
  background: var(--bg-2);
  color: var(--ink);
  border-bottom-left-radius: 5px;
}
.ai-message.pending .bubble { color: var(--muted); }
.ai-quick-questions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 0 10px;
  scrollbar-width: none;
}
.ai-quick-questions::-webkit-scrollbar { display: none; }
.ai-quick-questions button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--primary-text);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.support-composer {
  display: flex;
  gap: 8px;
  align-items: center;
}
.support-composer input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  padding: 0 14px;
  font-size: 15px;
  background: var(--card);
  color: var(--ink);
}
.support-composer input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}
.support-composer .btn-primary {
  width: auto;
  min-width: 70px;
  height: 48px;
  padding: 0 16px;
  margin: 0;
}

/* Programma ýüklemek — Android / iOS / PWA */
.install-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.install-hero img {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
}
.install-hero h3 { margin: 3px 0 4px; font-size: 18px; }
.install-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.install-kicker { color: var(--primary-text); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.install-native-note {
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary-text);
  font-size: 12px;
  font-weight: 800;
}
.install-card {
  position: relative;
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.install-card.recommended { border-color: rgba(var(--primary-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .08); }
.install-card.recommended::before {
  content: 'Maslahat berilýär';
  position: absolute;
  top: -8px;
  right: 14px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .03em;
}
.install-card-head { display: flex; align-items: center; gap: 10px; }
.install-card-head > div:nth-child(2) { flex: 1; min-width: 0; }
.install-card-head h3 { margin: 0; font-size: 15px; }
.install-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.install-os-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 18px;
  font-weight: 950;
}
.install-os-icon.android { background: #E8F8EF; color: #168B4A; }
.install-os-icon.ios { background: #EEF2F7; color: #111827; font-size: 22px; }
.install-os-icon.pwa { background: rgba(var(--primary-rgb), .1); color: var(--primary-text); }
.install-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.install-copy { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.install-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.install-action {
  width: 100%;
  min-height: 44px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.disabled-link { opacity: .52; cursor: not-allowed; pointer-events: auto; }
.install-status { margin-top: 9px; color: var(--muted); font-size: 10px; text-align: center; }
.ios-steps { display: grid; gap: 10px; margin-top: 13px; scroll-margin-top: 16px; }
.ios-step { display: flex; gap: 10px; align-items: flex-start; }
.ios-step > span {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary-text);
  font-size: 11px;
  font-weight: 950;
}
.ios-step strong { font-size: 12px; }
.ios-step p { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.install-security { margin: 2px 0 8px; padding: 13px 14px; }
.install-security strong { font-size: 12px; }
.install-security p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
[data-theme="dark"] .install-os-icon.android { background: rgba(22, 139, 74, .16); color: #78E0A7; }
[data-theme="dark"] .install-os-icon.ios { background: #222936; color: #F8FAFC; }
@media (max-width: 390px) {
  .install-actions { grid-template-columns: 1fr; }
}


/* Password visibility control: keeps existing field layout and only adds an eye action. */
.password-field { position: relative; }
.password-field > input { width: 100%; padding-right: 48px; }
.password-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
}
.password-toggle:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .3); outline-offset: 1px; }


.qr-missing {
  width: 100%;
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg-2);
  border-radius: 12px;
}
@media (max-width: 640px) {
  .qr-box { width: min(78vw, 300px); height: min(78vw, 300px); }
  .qr-missing { min-height: min(70vw, 260px); }
}

/* v16.5 Tölegim semantic icon system */
.tl-icon-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.tl-icon{width:1.15em;height:1.15em;display:inline-block;vertical-align:-.16em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tl-tab-icon{margin-right:7px}
.tl-inline-icon{margin-right:6px}
.quick-icon .tl-icon,.setting-row .ico .tl-icon{width:20px;height:20px}
.attach-btn .tl-icon,.upload-primary .tl-icon{width:18px;height:18px}

.tl-choice-icon{margin-right:8px;width:18px;height:18px}
