/* ═══════════════════════════════════════════════════════════════════
   TootimX Design System — Single Source of Truth
   Brand: #26A7DE  |  Flat / Apple HIG style  |  v3.0
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
* { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter',
    'Helvetica Neue', Arial, sans-serif !important;
    box-shadow: none !important; text-shadow: none !important; }
::-webkit-scrollbar { display: none; }

/* ── Icon Font Overrides (MUST come after the * selector) ───────── */
.material-symbols-outlined,
.material-symbols-outlined * {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-icons,
.material-icons * {
  font-family: 'Material Icons' !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* ── Base ──────────────────────────────────────────────────────── */
body {
  background: #F2F2F7;
  color: #1C1C1E;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* ── Page Container ────────────────────────────────────────────── */
.page-wrap {
  max-width: 480px;
  margin: 0 auto;
  background: #F2F2F7;
  min-height: 100vh;
  position: relative;
}

/* ── Typography Scale ──────────────────────────────────────────── */
.tx-largetitle { font-size: 34px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.06; color: #1C1C1E; }
.tx-title1     { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;  color: #1C1C1E; }
.tx-title2     { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; color: #1C1C1E; }
.tx-title3     { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;  color: #1C1C1E; }
.tx-headline   { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: #1C1C1E; }
.tx-body       { font-size: 17px; font-weight: 400; letter-spacing: -0.01em;  line-height: 1.5; color: #1C1C1E; }
.tx-callout    { font-size: 16px; font-weight: 400; letter-spacing: -0.008em; line-height: 1.4; color: #3C3C43; }
.tx-subhead    { font-size: 15px; font-weight: 400; letter-spacing: -0.006em; line-height: 1.4; color: #3C3C43; }
.tx-footnote   { font-size: 13px; font-weight: 400; letter-spacing: -0.004em; line-height: 1.4; color: rgba(60,60,67,0.6); }
.tx-caption    { font-size: 12px; font-weight: 400; letter-spacing: 0.004em;  line-height: 1.3; color: rgba(60,60,67,0.6); }
.tx-label      { font-size: 11px; font-weight: 600; letter-spacing: 0.06em;   line-height: 1.2; color: rgba(60,60,67,0.5); text-transform: uppercase; }

/* ── Utility Colour & Weight ───────────────────────────────────── */
.text-brand     { color: #26A7DE !important; }
.text-primary   { color: #1C1C1E !important; }
.text-secondary { color: rgba(60,60,67,0.7) !important; }
.text-tertiary  { color: rgba(60,60,67,0.4) !important; }
.text-success   { color: #34C759 !important; }
.text-warning   { color: #FF9500 !important; }
.text-danger    { color: #FF3B30 !important; }
.bg-page        { background: #F2F2F7 !important; }
.bg-card        { background: #FFFFFF !important; }
.bg-brand       { background: #26A7DE !important; }
.fw-bold        { font-weight: 700 !important; }
.fw-semibold    { font-weight: 600 !important; }
.fw-medium      { font-weight: 500 !important; }

/* ── Navigation Bar (sub-pages: title centred + back left) ──────── */
.nav-bar {
  position: sticky; top: 0; z-index: 100;
  height: 44px;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(60,60,67,0.18);
  flex-shrink: 0;
}
.nav-bar__title {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.02em; color: #1C1C1E; text-align: center;
}
.nav-bar__back {
  position: absolute; left: 16px;
  display: flex; align-items: center; gap: 4px;
  color: #26A7DE; font-size: 17px; font-weight: 400;
  letter-spacing: -0.01em;
  cursor: pointer; background: none; border: none;
  padding: 0; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.nav-bar__back svg {
  width: 12px; height: 20px;
  stroke: #26A7DE; stroke-width: 2.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.nav-bar__back:active { opacity: 0.6; }
.nav-bar__action {
  position: absolute; right: 16px;
  color: #26A7DE; font-size: 17px; font-weight: 400;
  cursor: pointer; background: none; border: none; padding: 0;
  -webkit-tap-highlight-color: transparent; min-height: 44px;
}

/* ── Page Header (main/dashboard: large title) ───────────────────── */
.page-header {
  position: sticky; top: 0; z-index: 100;
  background: #FFFFFF;
  padding: 12px 20px 16px;
  border-bottom: 1px solid rgba(60,60,67,0.18);
  flex-shrink: 0;
}
.page-header__eyebrow {
  font-size: 12px; font-weight: 500;
  color: rgba(60,60,67,0.5);
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 4px;
}
.page-header__title {
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; color: #1C1C1E;
}

/* ── Splash Header (login/auth pages) ───────────────────────────── */
.splash-header {
  background: #26A7DE;
  padding: 60px 32px 48px;
  text-align: center;
}
.splash-header__logo {
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.18);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.splash-header__title {
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.04em; color: #FFFFFF;
}
.splash-header__subtitle {
  font-size: 15px; color: rgba(255,255,255,0.75);
  letter-spacing: -0.01em; margin-top: 6px;
}

/* ── Form Body (white panel below splash) ───────────────────────── */
.form-body {
  background: #FFFFFF;
  border-radius: 24px 24px 0 0;
  margin-top: -20px;
  padding: 28px 20px 40px;
  min-height: 60vh;
}

/* ── Cards ───────────────────────────────────────────────────────── */
.card, .card-section {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.07);
  overflow: hidden;
}
.card-row {
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(60,60,67,0.1);
}
.card-row:last-child { border-bottom: none; }

/* ── Section Layout ──────────────────────────────────────────────── */
.section { padding: 0 20px; margin-top: 32px; }
.section-title {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(60,60,67,0.5);
  margin-bottom: 10px; padding: 0 4px;
}
.section-gap { height: 24px; }
.separator { height: 1px; background: rgba(60,60,67,0.12); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px;
  background: #26A7DE; color: #FFFFFF;
  font-size: 17px; font-weight: 600; letter-spacing: -0.02em;
  border-radius: 12px; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s; text-decoration: none;
}
.btn-primary:active { opacity: 0.82; transform: scale(0.985); }

.btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px;
  background: rgba(60,60,67,0.08); color: #1C1C1E;
  font-size: 17px; font-weight: 600; letter-spacing: -0.02em;
  border-radius: 12px; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: opacity 0.15s;
}
.btn-secondary:active { opacity: 0.7; }

.btn-text {
  color: #26A7DE; font-size: 17px; font-weight: 400;
  background: none; border: none; cursor: pointer; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.btn-text:active { opacity: 0.6; }

/* ── Inputs ──────────────────────────────────────────────────────── */
.input-field {
  width: 100%; height: 48px;
  background: rgba(118,118,128,0.12);
  border: none; border-radius: 10px;
  padding: 0 16px;
  font-size: 16px; color: #1C1C1E;
  outline: none; -webkit-appearance: none; appearance: none;
  letter-spacing: -0.01em;
}
.input-field::placeholder { color: rgba(60,60,67,0.4); }
.input-field:focus { background: rgba(118,118,128,0.16); }

.input-label {
  font-size: 13px; font-weight: 500;
  color: rgba(60,60,67,0.6); letter-spacing: -0.004em;
  margin-bottom: 6px; display: block;
}
.input-group { margin-bottom: 16px; }

/* ── OTP Cells ───────────────────────────────────────────────────── */
.otp-input {
  width: 52px; height: 56px;
  background: rgba(118,118,128,0.12);
  border: none; border-radius: 12px;
  text-align: center;
  font-size: 24px; font-weight: 700; color: #1C1C1E;
  outline: none; -webkit-appearance: none;
}
.otp-input:focus { background: rgba(38,167,222,0.12); }

/* ── Pills & Tags ────────────────────────────────────────────────── */
.pill-tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 12px;
  background: rgba(38,167,222,0.1); color: #26A7DE;
  font-size: 13px; font-weight: 500;
  border-radius: 20px; white-space: nowrap;
}
.pill-tag--gray   { background: rgba(60,60,67,0.08);  color: #3C3C43; }
.pill-tag--green  { background: rgba(52,199,89,0.12);  color: #1A7A32; }
.pill-tag--amber  { background: rgba(255,159,10,0.12); color: #A05C00; }
.pill-tag--red    { background: rgba(255,59,48,0.10);  color: #C0392B; }

/* ── Filter Chips ────────────────────────────────────────────────── */
.filter-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 14px 20px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.filter-chip {
  display: inline-flex; align-items: center;
  height: 32px; padding: 0 14px;
  background: rgba(60,60,67,0.08); color: #3C3C43;
  font-size: 14px; font-weight: 500;
  border-radius: 20px; white-space: nowrap;
  cursor: pointer; border: none;
  transition: background 0.15s; letter-spacing: -0.01em;
}
.filter-chip.active { background: #26A7DE; color: #FFFFFF; }
.filter-chip:active { opacity: 0.7; }

/* ── Icon Box ─────────────────────────────────────────────────────── */
.icon-box {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(38,167,222,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #26A7DE;
}
.icon-box--green  { background: rgba(52,199,89,0.12);  color: #1A7A32; }
.icon-box--amber  { background: rgba(255,159,10,0.12); color: #A05C00; }
.icon-box--red    { background: rgba(255,59,48,0.10);  color: #C0392B; }
.icon-box--purple { background: rgba(175,82,222,0.10); color: #7B2FBE; }
.icon-box--gray   { background: rgba(60,60,67,0.08);   color: #3C3C43; }

/* ── Progress Steps ──────────────────────────────────────────────── */
.step-bar { display: flex; align-items: center; padding: 16px 20px; }
.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(60,60,67,0.2); flex-shrink: 0;
}
.step-dot.active, .step-dot.done { background: #26A7DE; }
.step-line { flex: 1; height: 2px; background: rgba(60,60,67,0.1); }
.step-line.done { background: #26A7DE; }

/* ── Bottom Navigation ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid rgba(60,60,67,0.15);
  display: flex; justify-content: space-around; align-items: flex-end;
  padding: 10px 0 24px;
  z-index: 1200;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  flex: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: none; border: none; padding: 0; text-decoration: none;
}
.nav-item .material-symbols-outlined {
  font-size: 26px; color: rgba(60,60,67,0.4);
  font-variation-settings: 'FILL' 0;
}
.nav-item__label {
  font-size: 10px; font-weight: 500;
  color: rgba(60,60,67,0.4); letter-spacing: -0.01em;
}
.nav-item.active .material-symbols-outlined {
  color: #26A7DE; font-variation-settings: 'FILL' 1;
}
.nav-item.active .nav-item__label { color: #26A7DE; font-weight: 600; }

/* QR centre button */
.nav-qr { position: relative; top: -10px; }
.nav-qr__btn {
  width: 54px; height: 54px;
  background: #26A7DE; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.nav-qr__btn .material-symbols-outlined {
  font-size: 26px; color: #fff !important;
  font-variation-settings: 'FILL' 1 !important;
}

/* Content padding so page scrolls above bottom nav */
.pb-nav { padding-bottom: 100px; }

/* ── Stat Numbers ─────────────────────────────────────────────────── */
.stat-number { font-size: 28px; font-weight: 700; letter-spacing: -0.04em; color: #1C1C1E; line-height: 1; }
.stat-label  { font-size: 13px; color: rgba(60,60,67,0.5); letter-spacing: -0.004em; margin-top: 3px; }

/* ── Scroll Content ──────────────────────────────────────────────── */
.scroll-content { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ── Legacy status-bar hide ──────────────────────────────────────── */
.status-bar { display: none !important; }

/* ── Focus ───────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid #26A7DE; outline-offset: 2px; }

/* ═══════════════════════════════════════════════════════════════════
   Additions for user/merchant/mall views (card sub-parts, forms, pills)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Card sub-parts ──────────────────────────────────────────────── */
.card-row__body  { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-row__trail { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* ── Brand card (hero / balance card) ─────────────────────────────── */
.card--brand {
  background: linear-gradient(135deg, #26A7DE 0%, #1285BF 100%);
  color: #FFFFFF;
  border: none;
}
.card--brand .tx-caption,
.card--brand .tx-footnote,
.card--brand .tx-subhead,
.card--brand .tx-title1,
.card--brand .tx-title2,
.card--brand .tx-headline { color: #FFFFFF; }

/* ── Form layout helpers ─────────────────────────────────────────── */
.form-group  { margin-bottom: 14px; }
.form-label  {
  display: block;
  font-size: 12px; font-weight: 600;
  color: rgba(60,60,67,0.6);
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 6px;
}
.form-input {
  width: 100%; height: 48px;
  background: rgba(118,118,128,0.12);
  border: 1.5px solid transparent; border-radius: 12px;
  padding: 0 14px; font-size: 15px; color: #1C1C1E;
  outline: none; -webkit-appearance: none; appearance: none;
  letter-spacing: -0.01em;
  transition: background 0.15s, border-color 0.15s;
}
.form-input:focus { background: #fff; border-color: #26A7DE; }
.form-input[type="file"] { padding: 10px 14px; height: auto; line-height: 1.4; }
textarea.form-input { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.4; resize: vertical; }
select.form-input { height: 48px; padding-right: 32px; background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 10px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path fill='%238e8e93' d='M5 7L1.5 3.5h7z'/></svg>"); }

/* ── Pill variants (naming aligned with views) ───────────────────── */
.pill-tag--default { background: rgba(60,60,67,0.08); color: #3C3C43; }
.pill-tag--success { background: rgba(52,199,89,0.12);  color: #1A7A32; }
.pill-tag--warning { background: rgba(255,159,10,0.12); color: #A05C00; }
.pill-tag--danger  { background: rgba(255,59,48,0.10);  color: #C0392B; }
.pill-tag--blue,
.pill-tag--brand   { background: rgba(38,167,222,0.10); color: #26A7DE; }

/* ── Filter chip extras ──────────────────────────────────────────── */
.filter-chip--active { background: #26A7DE !important; color: #FFFFFF !important; }
.filter-chip-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 0; margin: 0;
  -ms-overflow-style: none; scrollbar-width: none;
}
.filter-chip-row::-webkit-scrollbar { display: none; }
.filter-chip {
  text-decoration: none;
  /* repeat display rules from .filter-chip in case an <a> inherits link styles */
}

/* ── Text helpers referenced by views ────────────────────────────── */
.btn-text.text-danger { color: #FF3B30; }
.text-muted           { color: rgba(60,60,67,0.5) !important; }

/* ── Ensure card-row gracefully wraps icon + body + trail ────────── */
.card-row { min-height: 56px; }
.card-row > * { flex-shrink: 0; }
.card-row > .card-row__body { flex-shrink: 1; }

/* ── Small utility spacing helpers used in views ─────────────────── */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ── Input group (legacy login/register) ─────────────────────────── */
.input-group { margin-bottom: 14px; }
.input-group .input-label { margin-bottom: 6px; }

/* ── Tap feedback for interactive cards ──────────────────────────── */
a.card-row:active, a.card:active, button.card:active { opacity: 0.85; }

/* ── pb-nav safety (repeat in case not applied to body) ──────────── */
.pb-nav { padding-bottom: 120px; }

/* ── Page wrap shouldn't force a single column view to break at >480 */
@media (min-width: 500px) {
  .page-wrap { box-shadow: 0 0 0 1px rgba(0,0,0,0.04); }
}

/* ── Bottom nav safe-area on iOS (viewport-fit=cover) ────────────── */
.bottom-nav { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

/* ── Leaflet stacking guard ───────────────────────────────────────
   Leaflet's default panes/controls use z-index values up to 800. Without a
   local stacking context they can cover the fixed bottom navigation when a
   map scrolls under it. Keep every map self-contained and below app chrome. */
.leaflet-container {
  position: relative;
  z-index: 1;
  isolation: isolate;
}
.leaflet-top,
.leaflet-bottom {
  z-index: 20 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM SYSTEM v4 — Apple-style, brand #26A7DF, big/bold/techy.
   Everything below is additive and must not break existing views.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Design tokens ───────────────────────────────────────────────── */
:root {
  --tx-brand:          #26A7DF;
  --tx-brand-600:      #1F8DC0;
  --tx-brand-700:      #0F6DA0;
  --tx-brand-800:      #0C5D8A;
  --tx-brand-tint-04:  rgba(38,167,223,0.04);
  --tx-brand-tint-08:  rgba(38,167,223,0.08);
  --tx-brand-tint-12:  rgba(38,167,223,0.12);
  --tx-brand-tint-18:  rgba(38,167,223,0.18);
  --tx-ink:            #0A1628;
  --tx-ink-1:          #1C1C1E;
  --tx-ink-2:          rgba(28,28,30,0.7);
  --tx-ink-3:          rgba(60,60,67,0.55);
  --tx-ink-4:          rgba(60,60,67,0.38);
  --tx-page:           #F2F4F8;
  --tx-surface:        #FFFFFF;
  --tx-hairline:       rgba(15,23,42,0.08);
  --tx-success:        #34C759;
  --tx-warning:        #FF9500;
  --tx-danger:         #FF3B30;
  --tx-shadow-sm:      0 4px 12px rgba(15,23,42,0.04);
  --tx-shadow-md:      0 12px 28px rgba(15,23,42,0.08);
  --tx-shadow-lg:      0 20px 44px rgba(15,23,42,0.10);
  --tx-shadow-brand:   0 10px 24px rgba(38,167,223,0.28);
  --tx-radius-lg:      22px;
  --tx-radius-xl:      28px;
  --tx-radius-2xl:     36px;
  --tx-grad-brand:     linear-gradient(135deg, #26A7DF 0%, #1F8DC0 50%, #0F6DA0 100%);
  --tx-grad-brand-deep:linear-gradient(160deg, #26A7DF 0%, #1285BF 55%, #0C5D8A 100%);
  --tx-grad-hero:
    radial-gradient(120% 80% at 85% -10%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 55%),
    radial-gradient(80% 60% at 0% 110%, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 60%),
    linear-gradient(155deg, #26A7DF 0%, #1285BF 55%, #0C5D8A 100%);
  --tx-grad-success:   linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  --tx-grad-warm:      linear-gradient(135deg, #FF9500 0%, #FF5E3A 100%);
}

body.tx-premium,
.tx-premium { background: var(--tx-page); color: var(--tx-ink-1); }

/* ── Premium Hero (drop into any page) ───────────────────────────── */
.tx-hero {
  position: relative; overflow: hidden;
  padding: 64px 28px 72px;
  color: #fff;
  background: var(--tx-grad-hero);
  border-radius: 0 0 var(--tx-radius-2xl) var(--tx-radius-2xl);
}
.tx-hero::before {
  content:''; position:absolute; top:-80px; right:-60px; width:260px; height:260px; border-radius:50%;
  background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 70%);
  pointer-events:none;
}
.tx-hero--compact { padding: 44px 24px 52px; border-radius: 0 0 28px 28px; }
.tx-hero__back {
  display:inline-flex; align-items:center; gap:6px;
  color:#fff; font-size:15px; font-weight:500; text-decoration:none; margin-bottom:22px; opacity:.92;
}
.tx-hero__back svg { width:14px; height:20px; fill:none; stroke:#fff; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.tx-hero__eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.82); margin-bottom: 12px;
}
.tx-hero__title {
  font-size: 44px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; margin: 0;
  color: #FFFFFF;
}
.tx-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #fff 0%, #A7E1F8 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.tx-hero__title--lg { font-size: 52px; line-height: 0.98; }
.tx-hero__title--md { font-size: 34px; letter-spacing: -0.035em; }
.tx-hero__subtitle {
  font-size: 16px; line-height: 1.5; margin: 12px 0 0;
  color: rgba(255,255,255,0.86); max-width: 340px;
}
.tx-hero__badge {
  width: 64px; height: 64px; border-radius: 20px;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px; color:#fff;
}
.tx-hero__badge .material-symbols-outlined { font-size: 32px; color:#fff; font-variation-settings:'FILL' 1; }

/* Inverted hero — soft tint instead of saturated gradient (for profile/wallet) */
.tx-hero--soft {
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(38,167,223,0.18) 0%, rgba(38,167,223,0) 70%),
    #FFFFFF;
  color: var(--tx-ink-1);
  border-bottom: 1px solid var(--tx-hairline);
  border-radius: 0;
}
.tx-hero--soft .tx-hero__title,
.tx-hero--soft .tx-hero__subtitle,
.tx-hero--soft .tx-hero__back { color: var(--tx-ink-1); }
.tx-hero--soft .tx-hero__back svg { stroke: var(--tx-brand); }
.tx-hero--soft .tx-hero__eyebrow { color: var(--tx-brand); }

/* ── Premium lift-card (floats above hero) ──────────────────────── */
.tx-lift {
  margin: -40px 16px 0;
  background: #fff;
  border-radius: var(--tx-radius-lg);
  padding: 22px;
  box-shadow: var(--tx-shadow-lg);
  position: relative; z-index: 2;
  border: 1px solid rgba(255,255,255,0.8);
}
/* FIX-626k: when .tx-lift follows a normal section (e.g. an info banner
   inserted between the hero and the lift card on /user/personal-ads/new),
   cancel the negative top margin — otherwise the lift card overlaps the
   banner's bottom text and clips it. The negative-pull-into-hero look only
   makes sense when the immediately preceding sibling IS the hero. */
.tx-section + .tx-lift {
  margin-top: 16px;
}

/* ── Glass card (backdrop blur) ─────────────────────────────────── */
.tx-glass {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--tx-radius-lg);
}

/* ── KPI Grid (stat cards) ──────────────────────────────────────── */
.tx-kpi-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tx-kpi-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tx-kpi {
  background: #fff; border-radius: 18px; padding: 16px 18px;
  box-shadow: var(--tx-shadow-sm); border: 1px solid var(--tx-hairline);
}
.tx-kpi__label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tx-ink-3); margin-bottom: 6px;
}
.tx-kpi__value {
  font-size: 28px; font-weight: 800; letter-spacing: -0.025em; color: var(--tx-ink-1); line-height: 1;
}
.tx-kpi__value small {
  font-size: 12px; font-weight: 600; color: var(--tx-brand); margin-left: 4px; letter-spacing: 0;
}
.tx-kpi__delta {
  margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--tx-success);
  display: inline-flex; align-items: center; gap: 2px;
}
.tx-kpi__delta--down { color: var(--tx-danger); }
.tx-kpi--brand {
  background: var(--tx-grad-brand); color: #fff; border: none;
  box-shadow: var(--tx-shadow-brand);
}
.tx-kpi--brand .tx-kpi__label { color: rgba(255,255,255,0.8); }
.tx-kpi--brand .tx-kpi__value { color: #fff; }
.tx-kpi--brand .tx-kpi__value small { color: #fff; opacity: 0.85; }

/* ── Premium list item (replaces card-row in upgraded views) ────── */
.tx-list {
  background: #fff; border-radius: var(--tx-radius-lg);
  border: 1px solid var(--tx-hairline);
  overflow: hidden;
}
.tx-list-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  text-decoration: none; color: inherit;
  position: relative;
}
.tx-list-item + .tx-list-item { border-top: 1px solid var(--tx-hairline); }
.tx-list-item__thumb {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  background: var(--tx-brand-tint-08); color: var(--tx-brand);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tx-list-item__thumb--img { background-size: cover; background-position: center; }
.tx-list-item__thumb .material-symbols-outlined { font-size: 26px; color: inherit; }
.tx-list-item__body { flex: 1; min-width: 0; }
.tx-list-item__title {
  font-size: 16px; font-weight: 700; letter-spacing: -0.015em; color: var(--tx-ink-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-list-item__meta { font-size: 13px; color: var(--tx-ink-2); margin-top: 2px; }
.tx-list-item__sub  { font-size: 12px; color: var(--tx-ink-3); margin-top: 2px; }
.tx-list-item__trail { margin-left: auto; text-align: right; flex-shrink: 0; }
.tx-list-item__chev {
  color: var(--tx-ink-4); font-size: 22px;
}
.tx-list-item:active { background: rgba(0,0,0,0.03); }

/* Thumb palette variants */
.tx-list-item__thumb--success { background: rgba(52,199,89,0.14); color: #1A7A32; }
.tx-list-item__thumb--warning { background: rgba(255,159,10,0.14); color: #A05C00; }
.tx-list-item__thumb--danger  { background: rgba(255,59,48,0.12);  color: #C0392B; }
.tx-list-item__thumb--gray    { background: rgba(60,60,67,0.10);   color: #3C3C43; }
.tx-list-item__thumb--grad    { background: var(--tx-grad-brand); color:#fff; }

/* ── Banner card (full-bleed image + gradient overlay) ──────────── */
/* Used as <a class="tx-banner"> on /user/campaigns and similar — must
   reset browser-default link underline + purple visited color (the
   bug screenshot showed unstyled blue/underlined "Demo Campaign" /
   "test" / chip text because we forgot to suppress link defaults). */
.tx-banner {
  position: relative; border-radius: var(--tx-radius-lg); overflow: hidden;
  color: #fff; min-height: 160px;
  background: #0C5D8A;
  box-shadow: var(--tx-shadow-md);
  text-decoration: none;
}
.tx-banner, .tx-banner:visited, .tx-banner:hover, .tx-banner:active { color: #fff; }
.tx-banner * { text-decoration: none; }
.tx-banner__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: 0;
}
.tx-banner__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}
.tx-banner__body {
  position: relative; z-index: 2; padding: 20px; min-height: inherit;
  display: flex; flex-direction: column; justify-content: flex-end;
  height: 100%;
}
.tx-banner__title    { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color:#fff; margin:0 0 4px; }
.tx-banner__sub      { font-size: 13px; color: rgba(255,255,255,0.85); margin:0; }
.tx-banner__chip {
  position:absolute; top:14px; left:14px; z-index:3;
  display:inline-flex; align-items:center; gap:4px;
  height:26px; padding:0 10px;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
  border-radius: 14px; color:#fff; font-size:11px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase;
}

/* Small-media banner (for horizontal scroll feeds) */
.tx-banner--sm { min-height: 120px; border-radius: 18px; }
.tx-banner--sm .tx-banner__title { font-size: 17px; }

/* ── Horizontal scroll rail ─────────────────────────────────────── */
.tx-rail {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 20px 4px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none; scrollbar-width: none;
}
.tx-rail::-webkit-scrollbar { display: none; }
.tx-rail > * { scroll-snap-align: start; flex-shrink: 0; }

/* ── Premium buttons ────────────────────────────────────────────── */
.tx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  border: 0; border-radius: 16px;
  font-family: inherit; font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: transform .08s, box-shadow .18s, background .18s, opacity .15s;
}
.tx-btn:active { transform: scale(0.985); }
.tx-btn--primary {
  background: var(--tx-grad-brand); color: #fff;
  box-shadow: var(--tx-shadow-brand);
}
.tx-btn--primary:hover { box-shadow: 0 14px 30px rgba(38,167,223,0.34); }
.tx-btn--secondary {
  background: rgba(38,167,223,0.08); color: var(--tx-brand);
}
.tx-btn--ghost {
  background: rgba(60,60,67,0.06); color: var(--tx-ink-1);
}
.tx-btn--white {
  background: #fff; color: var(--tx-brand); box-shadow: var(--tx-shadow-md);
}
.tx-btn--danger {
  background: linear-gradient(135deg, #FF5E3A 0%, #FF3B30 100%); color: #fff;
  box-shadow: 0 8px 18px rgba(255,59,48,0.28);
}
.tx-btn--wa {
  background: var(--tx-grad-success); color: #fff;
  box-shadow: 0 10px 22px rgba(37,211,102,0.3);
}
.tx-btn--block { width: 100%; }
.tx-btn--lg    { min-height: 58px; font-size: 17px; border-radius: 18px; }
.tx-btn--sm    { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }

/* ── Premium inputs (floating-label style) ──────────────────────── */
.tx-field { position: relative; margin-bottom: 14px; }
.tx-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--tx-ink-3); letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 8px;
}
.tx-field__wrap { position: relative; display: flex; align-items: center; }
.tx-field__wrap .material-symbols-outlined {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--tx-ink-4); font-size: 20px; pointer-events: none;
}
.tx-field input,
.tx-field textarea,
.tx-field select {
  width: 100%; min-height: 52px;
  padding: 14px 16px 14px 46px;
  background: var(--tx-page);
  border: 1.5px solid transparent; border-radius: 14px;
  font-family: inherit; font-size: 16px; color: var(--tx-ink-1);
  outline: none; -webkit-appearance: none; appearance: none;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.tx-field--plain input, .tx-field--plain textarea, .tx-field--plain select { padding-left: 16px; }
.tx-field input:focus,
.tx-field textarea:focus,
.tx-field select:focus {
  background: #fff; border-color: var(--tx-brand);
  box-shadow: 0 0 0 4px rgba(38,167,223,0.14);
}
.tx-field textarea { min-height: 110px; resize: vertical; padding-top: 14px; padding-bottom: 14px; }

/* ── Flash messages (banners inside content) ────────────────────── */
.tx-flash {
  padding: 12px 14px; border-radius: 14px;
  font-size: 14px; font-weight: 500; line-height: 1.45;
  display: flex; align-items: flex-start; gap: 10px;
}
.tx-flash .material-symbols-outlined { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.tx-flash--info  { background: rgba(38,167,223,0.1);  color: #0F6DA0; }
.tx-flash--warn  { background: rgba(255,159,10,0.12); color: #A05C00; }
.tx-flash--err   { background: rgba(255,59,48,0.1);   color: #C0392B; }
.tx-flash--ok    { background: rgba(52,199,89,0.12);  color: #1A7A32; }

/* ── Segmented control (iOS style) ──────────────────────────────── */
.tx-segmented {
  display: flex; gap: 2px; padding: 3px;
  background: var(--tx-page); border-radius: 12px;
  border: 1px solid var(--tx-hairline);
}
.tx-segmented > a, .tx-segmented > button {
  flex: 1; padding: 8px 10px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--tx-ink-2);
  text-align: center; text-decoration: none; background: transparent;
  border: 0; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
.tx-segmented > .active, .tx-segmented > [aria-current="page"] {
  background: #fff; color: var(--tx-brand);
  box-shadow: 0 2px 6px rgba(15,23,42,0.06);
}

/* ── Premium section heading ────────────────────────────────────── */
.tx-section { padding: 0 20px; margin-top: 28px; }
.tx-section + .tx-section { margin-top: 28px; }
.tx-section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 12px;
}
.tx-section__title {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--tx-ink-1); margin: 0;
}
.tx-section__link {
  font-size: 14px; font-weight: 600; color: var(--tx-brand); text-decoration: none;
  display: inline-flex; align-items: center; gap: 2px;
}

/* ── Empty state ────────────────────────────────────────────────── */
.tx-empty {
  padding: 40px 20px; text-align: center;
}
.tx-empty .material-symbols-outlined {
  font-size: 48px; color: var(--tx-ink-4); margin-bottom: 12px;
  display: inline-block;
}
.tx-empty h3 { font-size: 17px; font-weight: 700; color: var(--tx-ink-1); margin: 0 0 4px; }
.tx-empty p  { font-size: 14px; color: var(--tx-ink-2); margin: 0; max-width: 280px; display: inline-block; }

/* ── Stepper (onboarding progress) ──────────────────────────────── */
.tx-stepper { display: flex; align-items: center; gap: 6px; }
.tx-stepper__dot {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--tx-hairline);
}
.tx-stepper__dot.active, .tx-stepper__dot.done { background: var(--tx-brand); }

/* ── Avatar ─────────────────────────────────────────────────────── */
.tx-avatar {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  background: var(--tx-brand-tint-12); color: var(--tx-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; flex-shrink: 0;
}
.tx-avatar--lg { width: 72px; height: 72px; font-size: 26px; border-radius: 24px; }
.tx-avatar--grad { background: var(--tx-grad-brand); color: #fff; }
.tx-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Sticky bottom CTA bar ──────────────────────────────────────── */
.tx-sticky-cta {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 20px));
  background: linear-gradient(180deg, rgba(242,244,248,0) 0%, var(--tx-page) 30%, var(--tx-page) 100%);
  z-index: 150;
}
.tx-sticky-cta__inner { display: flex; gap: 10px; }

/* ── Divider with label ─────────────────────────────────────────── */
.tx-divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0;
}
.tx-divider::before, .tx-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--tx-hairline);
}
.tx-divider span {
  font-size: 12px; font-weight: 600; color: var(--tx-ink-3);
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* ── Icon-chip (little rounded icon, various tones) ─────────────── */
.tx-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
}
.tx-chip--brand   { background: var(--tx-brand-tint-12); color: var(--tx-brand); }
.tx-chip--success { background: rgba(52,199,89,0.14); color: #1A7A32; }
.tx-chip--warning { background: rgba(255,159,10,0.14); color: #A05C00; }
.tx-chip--danger  { background: rgba(255,59,48,0.12);  color: #C0392B; }
.tx-chip--dark    { background: rgba(10,22,40,0.85);   color: #fff; }
.tx-chip--light   { background: rgba(60,60,67,0.08);   color: #3C3C43; }

/* ── Progress bar ───────────────────────────────────────────────── */
.tx-progress {
  height: 8px; background: var(--tx-hairline); border-radius: 4px; overflow: hidden;
}
.tx-progress__fill {
  height: 100%; background: var(--tx-grad-brand); border-radius: 4px;
  transition: width .3s ease;
}

/* ── Big money display ──────────────────────────────────────────── */
.tx-money {
  font-size: 44px; font-weight: 800; letter-spacing: -0.035em;
  color: var(--tx-ink-1); line-height: 1;
}
.tx-money__unit { font-size: 15px; font-weight: 700; color: var(--tx-brand); margin-left: 6px; letter-spacing: 0; }
.tx-money--inverse { color: #fff; }
.tx-money--inverse .tx-money__unit { color: rgba(255,255,255,0.85); }

/* ── Safe-area top (for pages using hero) ───────────────────────── */
/* Mobile-first cap: every merchant + user portal page using tx-page-premium
   stays at 480px wide on desktop instead of stretching to full PC width.
   Reported 2026-05-05 — many subpages were rendering as full-width on PC. */
.tx-page-premium {
  min-height: 100vh;
  background: var(--tx-page);
  padding-bottom: 120px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Sticky CTA + bottom nav stack: when both are present (subscription page
   and similar), the CTA must sit ABOVE the nav, not on top of it. The nav
   is ~76px tall (12px top + 26px icon + label + 24px safe-area pad). */
.tx-sticky-cta { bottom: 76px !important; }
/* And the page itself needs enough bottom padding so the last content row
   isn't covered by sticky CTA + bottom nav stacked together (~150px). */
.tx-page-premium--with-cta { padding-bottom: 200px; }

/* ── Responsive nudge ───────────────────────────────────────────── */
@media (max-width: 360px) {
  .tx-hero__title, .tx-hero__title--lg { font-size: 36px; }
  .tx-money { font-size: 38px; }
}
