/* ============================================================
   SAYACTAK CLIENT PORTAL — PREMIUM REDESIGN
   Designer: Expert UI/UX
   Strategy: Compact centered desktop, Instagram-style mobile nav
   ============================================================ */

/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --ct-bg: #f0f2f7;
  --ct-surface: #ffffff;
  --ct-border: #e4e8f0;
  --ct-shadow: 0 2px 16px rgba(20, 32, 64, .07);
  --ct-shadow-lg: 0 8px 40px rgba(20, 32, 64, .13);

  --ct-navy: #1b2a52;
  --ct-navy-2: #0f1a36;
  --ct-blue: #2563eb;
  --ct-blue-hover: #1d4ed8;
  --ct-blue-light: #eff6ff;
  --ct-teal: #0d9488;
  --ct-teal-light: #f0fdfa;
  --ct-amber: #d97706;
  --ct-amber-light: #fffbeb;
  --ct-red: #dc2626;

  --ct-ink: #111827;
  --ct-ink-2: #374151;
  --ct-ink-soft: #6b7280;
  --ct-ink-faint: #9ca3af;

  --ct-radius-sm: 10px;
  --ct-radius: 16px;
  --ct-radius-lg: 22px;

  /* Desktop content max-width — balanced and readable */
  --ct-max-w: 1100px;

  /* Mobile nav height */
  --ct-mob-nav: 72px;
}

/* ─── GLOBAL RESETS ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.client-body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100%;
}

body.client-body {
  background: var(--ct-bg);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ct-ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ─────────────────────────────────────────────────── */
.client-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 64px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ct-border);
  /* Full-width container with inner padding */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(16px, 3vw, 40px);
}

.client-brand {
  flex-shrink: 0;
}

.client-brand .brand {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.client-brand .brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* Desktop nav pills — centered with flexible width */
.client-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #f1f3f7;
  border-radius: 12px;
  padding: 4px;
  /* Allow nav to shrink if screen is tight */
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}

.client-nav a {
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ct-ink-soft);
  white-space: nowrap;
  transition: background .15s, color .15s;
  /* Allow link to shrink if necessary */
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-nav a:hover {
  color: var(--ct-ink-2);
  background: rgba(255, 255, 255, .7);
}

.client-nav a.active {
  background: #ffffff;
  color: var(--ct-navy);
  font-weight: 700;
  box-shadow: 0 1px 8px rgba(20, 32, 64, .12);
}

/* User section in header */
.client-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  justify-content: flex-end;
  min-width: 0;
}

.client-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ct-navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.client-name {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.3;
}

.client-name b {
  font-size: 13px;
  font-weight: 700;
  color: var(--ct-ink);
}

.client-name .mini-note {
  font-size: 11px;
  color: var(--ct-ink-soft);
}

/* Language tabs */
.language-tabs {
  display: flex;
  align-items: center;
  background: #f1f3f7;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}

.language-tabs button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  color: #6e7688;
  cursor: pointer;
  transition: background .15s;
}

.language-tabs button.active {
  background: #fff;
  color: var(--ct-navy);
  box-shadow: 0 2px 8px rgba(31, 42, 68, .08);
}

/* ─── MAIN CONTENT AREA ─────────────────────────────────────────────── */
.client-main {
  max-width: var(--ct-max-w);
  margin: 0 auto;
  padding: 28px 32px 120px;
  /* Ensure content never clips the sides */
  min-width: 0;
}




/* ─── TOP LINE (greeting + balance chip) ───────────────────────── */
.client-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  /* allow wrap if viewport very narrow */
}

.client-greeting h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0 0 3px;
  color: var(--ct-ink);
}

.client-greeting p {
  color: var(--ct-ink-soft);
  margin: 0;
  font-size: 13px;
}

/* Balance chip — premium accent */
.balance-chip {
  background: linear-gradient(135deg, var(--ct-navy) 0%, var(--ct-navy-2) 100%);
  color: #fff;
  border-radius: var(--ct-radius);
  padding: 13px 20px;
  min-width: 160px;
  text-align: right;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(15, 26, 54, .22);
}

.balance-chip small {
  display: block;
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.balance-chip strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}

/* ─── TWO-COLUMN GRID ────────────────────────────────────────────────── */
.client-grid {
  display: grid;
  /* Main content slightly wider than sidebar, both have generous min */
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: start;
}

/* ─── PANELS ─────────────────────────────────────────────────── */
.client-panel {
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  padding: 22px;
  box-shadow: var(--ct-shadow);
}

.client-panel h2 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--ct-ink);
}

.client-panel .desc {
  font-size: 12px;
  color: var(--ct-ink-soft);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ─── AMOUNT / VOLUME PRESETS ────────────────────────────────── */
.amount-presets,
.volume-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.amount-btn,
.volume-btn {
  border: 1.5px solid var(--ct-border);
  background: #fafbfe;
  border-radius: var(--ct-radius-sm);
  padding: 11px 6px;
  font-weight: 700;
  font-size: 12px;
  color: var(--ct-ink-2);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
}

.amount-btn:hover,
.volume-btn:hover {
  border-color: var(--ct-blue);
  background: var(--ct-blue-light);
  color: var(--ct-blue);
}

.amount-btn.active,
.volume-btn.active {
  background: var(--ct-navy);
  color: #fff;
  border-color: var(--ct-navy);
  transform: scale(1.02);
}

/* ─── SECURE NOTE ────────────────────────────────────────────── */
.secure-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--ct-radius-sm);
  background: #f8f9fc;
  color: var(--ct-ink-soft);
  font-size: 11px;
  margin-top: 14px;
  border: 1px solid #eceff5;
}

/* ─── TRANSACTION LIST ───────────────────────────────────────── */
.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.transaction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f6;
}

.transaction:last-child {
  border: 0;
}

.transaction-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ct-teal-light);
  color: var(--ct-teal);
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}

.transaction-icon.debit {
  background: #fef2f2;
  color: var(--ct-red);
}

.transaction .meta {
  flex: 1;
  min-width: 0;
}

.transaction .meta b {
  display: block;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transaction .meta small {
  font-size: 10px;
  color: var(--ct-ink-faint);
}

.transaction .amount {
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.transaction .amount.credit {
  color: var(--ct-teal);
}

.transaction .amount.debit {
  color: var(--ct-red);
}

/* ─── WALLET HERO ────────────────────────────────────────────── */
.wallet-hero {
  background: linear-gradient(135deg, var(--ct-navy) 0%, #2a3f6f 100%);
  color: #fff;
  border-radius: var(--ct-radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(15, 26, 54, .22);
}

.wallet-hero::before {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 28px solid rgba(255, 255, 255, .06);
  right: -35px;
  top: -50px;
}

.wallet-hero::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 20px solid rgba(255, 255, 255, .04);
  right: -15px;
  bottom: -40px;
}

.wallet-hero small {
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.wallet-hero strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  margin: 6px 0;
  letter-spacing: -.02em;
}

.wallet-hero .wallet-number {
  font-size: 9px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .35);
  text-transform: uppercase;
}

/* ─── QUICK LINKS ────────────────────────────────────────────── */
.quick-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.quick-link {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
  padding: 14px;
  background: var(--ct-surface);
  display: flex;
  gap: 10px;
  align-items: center;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  cursor: pointer;
}

.quick-link:hover {
  border-color: var(--ct-blue);
  box-shadow: 0 4px 16px rgba(37, 99, 235, .1);
  transform: translateY(-1px);
}

.quick-link i {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ct-blue-light);
  display: grid;
  place-items: center;
  color: var(--ct-blue);
  font-size: 14px;
  flex-shrink: 0;
}

.quick-link b {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ct-ink);
}

.quick-link small {
  font-size: 10px;
  color: var(--ct-ink-faint);
  line-height: 1.3;
}

/* ─── GATEWAY GRID ───────────────────────────────────────────── */
.gateway-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.gateway-card {
  border: 1.5px solid var(--ct-border);
  background: #fafbfe;
  border-radius: var(--ct-radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.gateway-card:hover {
  border-color: var(--ct-blue);
}

.gateway-card.active {
  border: 2px solid var(--ct-blue);
  background: var(--ct-blue-light);
}

.gateway-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f0f2f8;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 10px;
  color: var(--ct-navy);
  flex-shrink: 0;
}

.gateway-card small {
  display: block;
  color: var(--ct-ink-soft);
  font-size: 10px;
}

/* ─── ORDER SUMMARY ──────────────────────────────────────────── */
.order-summary {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
  padding: 14px;
  margin-top: 14px;
  background: #fafbfe;
}

.order-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
  padding: 6px 0;
  color: var(--ct-ink-2);
}

.order-row.total {
  border-top: 1.5px solid var(--ct-border);
  margin-top: 6px;
  padding-top: 12px;
  font-weight: 800;
  font-size: 14px;
  color: var(--ct-ink);
}

/* ─── FLOW / TANK PANEL ──────────────────────────────────────── */
.flow-panel {
  min-height: 440px;
  display: flex;
  flex-direction: column;
}

.flow-visual {
  flex: 1;
  min-height: 210px;
  border-radius: var(--ct-radius);
  background: linear-gradient(180deg, #f0f6ff 0%, #e6f0ff 100%);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin: 14px 0;
}

.tank {
  width: 150px;
  height: 175px;
  border: 6px solid var(--ct-navy);
  border-top: 0;
  border-radius: 0 0 32px 32px;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.tank-water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  transition: height .8s ease;
}

.tank-water::before {
  content: '';
  position: absolute;
  left: -15%;
  top: -9px;
  width: 130%;
  height: 17px;
  border-radius: 50%;
  background: #93c5fd;
  animation: wave 2.3s linear infinite;
}

.flow-running .tank-water::before {
  animation-duration: 1s;
}

@keyframes wave {
  0% {
    transform: translateX(-3%);
  }

  50% {
    transform: translateX(3%);
  }

  100% {
    transform: translateX(-3%);
  }
}

.flow-drop {
  position: absolute;
  top: 20px;
  width: 9px;
  height: 20px;
  border-radius: 50% 50% 55% 55%;
  background: #3b82f6;
  opacity: 0;
}

.flow-running .flow-drop {
  opacity: 1;
  animation: drop .8s infinite;
}

@keyframes drop {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  100% {
    transform: translateY(100px);
    opacity: 0;
  }
}

.flow-reading {
  text-align: center;
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  color: var(--ct-navy);
}

.flow-reading strong {
  font-size: 21px;
  font-weight: 800;
}

.flow-reading small {
  display: block;
  font-size: 10px;
  color: var(--ct-ink-soft);
}

.flow-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.flow-stat {
  background: #f5f7fc;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.flow-stat small {
  display: block;
  color: var(--ct-ink-faint);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}

.flow-stat b {
  font-size: 12px;
  font-weight: 800;
  color: var(--ct-ink);
}

.action-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.action-pair .btn {
  min-height: 44px;
  font-size: 13px;
}

/* ─── MOBILE NAV — INSTAGRAM STYLE ─────────────────────────── */
.client-mobile-nav {
  display: none;
  /* hidden on desktop */
}

/* ─── IYZICO EMBED ────────────────────────────────────────── */
.iyzico-hide-header {
  overflow: hidden;
  margin-top: 14px;
  border-radius: 12px;
}

.iyzico-hide-header #iyzipay-checkout-form {
  margin-top: -62px;
  margin-bottom: -10px;
}

/* ─── TOAST ─────────────────────────────────────────────────── */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 28px;
  z-index: 2000;
}

.app-toast {
  background: var(--ct-navy);
  color: #fff;
  border-radius: 12px;
  padding: 13px 16px;
  box-shadow: 0 12px 35px rgba(16, 24, 40, .2);
  min-width: 220px;
  margin-top: 8px;
  animation: slideUp .22s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(14px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ─── HISTORY PAGE ───────────────────────────────────────────── */
.history-card {
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--ct-shadow);
  max-width: 100%;
  box-sizing: border-box;
}

.hc-header,
.hc-body {
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}

/* ─── DAY/CUSTOM PILLS ───────────────────────────────────────── */
.day-tabs,
.custom-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.day-tabs button,
.custom-pills button {
  border: 1.5px solid var(--ct-border);
  background: var(--ct-surface);
  border-radius: 9px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ct-ink-soft);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}

.day-tabs button:hover,
.custom-pills button:hover {
  border-color: var(--ct-blue);
  color: var(--ct-blue);
}

.day-tabs button.active,
.custom-pills button.active {
  background: var(--ct-navy);
  color: #fff;
  border-color: var(--ct-navy);
}

/* ─── FUNDING STATUS BADGES (Schedule Page) ─────────────────── */
/* Replaces Bootstrap badge to fix overflow on narrow screens    */
.funding-status-badge {
  display: inline-block;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
  /* key: allow text to wrap */
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.funding-status-badge .funding-shortfall-amount {
  font-size: 10.5px;
  font-weight: 600;
  opacity: .88;
  display: block;
  margin-top: 1px;
}

.funding-status-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.funding-status-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.funding-status-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.funding-status-neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Shortfall alert — full width, wrapping */
#summaryShortfallAlert,
#chipBalanceStatusAlert,
.alert-danger,
.alert-success,
.alert-warning {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere;
}

/* Budget summary card columns — prevent badge overflow */
#weeklyBudgetSummaryCard .col-md-3 {
  min-width: 0;
  overflow: hidden;
}

#summaryFundingBadge {
  max-width: 100%;
  overflow: hidden;
}

/* Schedule card funding badge placement */
.schedule-card .col-md-6.text-md-end {
  min-width: 0;
}

/* ─── TABLE RESPONSIVE ───────────────────────────────────────── */
.table-responsive {
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — INTERMEDIATE (≤ 1100px)
   Tighten lateral padding on smaller desktops
   ──────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {

  /* clamp() in .client-header handles padding automatically */
  .client-main {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Grid: keep two columns but more balanced */
  .client-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET (≤ 900px)
   ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .client-nav {
    display: none;
  }

  .client-header {
    /* Simplified flex for tablet: logo + user only */
    padding: 0 16px;
    height: 58px;
    gap: 12px;
  }

  .client-main {
    padding: 18px 14px 96px;
    max-width: 100%;
  }

  .client-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .client-topline {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }

  .client-greeting h1 {
    font-size: 20px;
  }

  .balance-chip {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
  }

  .balance-chip small {
    margin-bottom: 0;
  }

  /* ── Modern Premium Bottom Nav Bar ── */
  .client-mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    overflow: visible;
  }

  .client-mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    padding: 4px 2px;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
  }

  .client-mobile-nav a i {
    font-size: 19px;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .client-mobile-nav a span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.2s ease, font-weight 0.2s ease;
  }

  /* Active Navigation Items */
  .client-mobile-nav a.active {
    color: #0284c7;
    font-weight: 600;
  }

  .client-mobile-nav a.active i {
    transform: scale(1.12);
    color: #0284c7;
  }

  /* Active Indicator Pill/Dot */
  .client-mobile-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 16px;
    height: 3px;
    border-radius: 4px;
    background: #0284c7;
    transition: all 0.2s ease;
  }

  /* Center Action Button (Water Droplet / Commande) */
  .client-mobile-nav a.nav-center-action {
    position: relative;
  }

  .client-mobile-nav a.nav-center-action .nav-center-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }

  .client-mobile-nav a.nav-center-action .nav-center-icon i {
    font-size: 18px;
    color: inherit;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .client-mobile-nav a.nav-center-action:active .nav-center-icon {
    transform: scale(0.92);
  }

  /* Active state for center icon ONLY when on /order */
  .client-mobile-nav a.nav-center-action.active .nav-center-icon {
    background: #e0f2fe;
    color: #0284c7;
  }

  .client-mobile-nav a.nav-center-action.active .nav-center-icon i {
    color: #0284c7 !important;
    transform: scale(1.12);
  }

  /* Language dropdown repositioned */
  .language-tabs.client-language {
    position: fixed;
    top: auto;
    bottom: calc(var(--ct-mob-nav) + 8px);
    right: 16px;
    box-shadow: var(--ct-shadow-lg);
    display: none;
    z-index: 400;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--ct-border);
  }

  .language-tabs.client-language.mobile-show {
    display: flex;
  }

  .client-user .client-name {
    display: none;
  }

  /* toast goes above nav */
  .toast-stack {
    right: 14px;
    bottom: calc(var(--ct-mob-nav) + 10px);
    left: 14px;
  }

  .app-toast {
    min-width: 0;
  }
}

/* ─── WALLET FORM ENHANCEMENTS ───────────────────────────────── */
.topup-input-group {
  border-radius: var(--ct-radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.topup-input-group .input-group-text {
  min-width: 64px;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  background: #f8fafc;
  border: 1.5px solid var(--ct-border);
  border-right: 0;
  color: var(--ct-blue);
}

.topup-input-group .form-control {
  min-height: 52px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ct-navy);
  border: 1.5px solid var(--ct-border);
  letter-spacing: -0.5px;
}

.topup-input-group .form-control:focus {
  border-color: var(--ct-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.reference-input-group {
  border-radius: var(--ct-radius-sm);
  overflow: hidden;
}

.reference-input-group .input-group-text {
  background: #f8fafc;
  border: 1.5px solid var(--ct-border);
  border-right: 0;
  padding: 0 14px;
}

.reference-input-group .form-control {
  min-height: 48px;
  font-size: 15px;
  border: 1.5px solid var(--ct-border);
}

.reference-input-group .form-control:focus {
  border-color: var(--ct-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE (≤ 520px)
   ──────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .client-panel {
    padding: 16px 14px;
    border-radius: 14px;
  }

  .gateway-grid {
    grid-template-columns: 1fr;
  }

  /* 2x2 grid on mobile for balanced touch targets */
  .amount-presets,
  .volume-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .amount-btn,
  .volume-btn {
    min-height: 48px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
  }

  /* Form inputs font-size >= 16px to prevent iOS Safari auto-zoom */
  input.form-control,
  select.form-select {
    font-size: 16px !important;
  }

  .topup-input-group .form-control {
    font-size: 22px !important;
    min-height: 50px;
  }

  .topup-input-group .input-group-text {
    min-height: 50px;
  }

  /* Mobile transaction list wrapping */
  .transaction {
    padding: 10px 0;
    gap: 10px;
  }

  .transaction .meta b {
    white-space: normal;
    word-break: break-word;
    font-size: 12.5px;
    line-height: 1.35;
  }

  .transaction .meta small {
    font-size: 11px;
  }

  .transaction .amount {
    font-size: 13.5px;
  }

  .flow-stats {
    grid-template-columns: 1fr 1fr;
  }

  .flow-stat:last-child {
    grid-column: span 2;
  }

  .tank {
    width: 130px;
    height: 155px;
  }

  .quick-link-grid {
    grid-template-columns: 1fr;
  }

  .action-pair {
    grid-template-columns: 1fr;
  }

  .client-header {
    height: 54px;
  }

  .client-brand .brand img {
    height: 32px;
  }

  .client-greeting h1 {
    font-size: 18px;
  }

  .day-tabs button,
  .custom-pills button {
    font-size: 11px;
    padding: 6px 10px;
  }
}