/* ============================================================
   HesapMarket — Fragment-style Dark UI
   Font: Poppins + Montserrat
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --bg-primary:    #0A0B0F;
  --bg-secondary:  #111318;
  --bg-card:       #14161C;
  --bg-input:      #1A1D25;
  --bg-hover:      #1E2029;
  --border:        rgba(255, 255, 255, 0.07);
  --border-light:  rgba(255, 255, 255, 0.04);
  --accent:        #2172E5;
  --accent-hover:  #1960CC;
  --accent-dim:    rgba(33, 114, 229, 0.15);
  --success:       #34C759;
  --success-dim:   rgba(52, 199, 89, 0.15);
  --warning:       #FF9F0A;
  --warning-dim:   rgba(255, 159, 10, 0.15);
  --danger:        #FF3B30;
  --danger-dim:    rgba(255, 59, 48, 0.15);
  --text-primary:  #FFFFFF;
  --text-sec:      rgba(255, 255, 255, 0.55);
  --text-muted:    rgba(255, 255, 255, 0.3);
  --text-dim:      rgba(255, 255, 255, 0.15);
  --glass-bg:      rgba(255, 255, 255, 0.04);
  --glass-border:  rgba(255, 255, 255, 0.08);
  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     20px;
  --nav-height:    64px;
  --safe-bottom:   env(safe-area-inset-bottom, 0px);
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Anti-leak: disable selection and context menu */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Allow text selection only in forms */
input, textarea, [contenteditable] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

img { pointer-events: none; }

/* ─── App Shell ──────────────────────────────────────────── */
.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Splash Screen ──────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.splash-logo svg,
.splash-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}
.splash-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.splash-loader {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.splash-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: splash-bounce 1.2s ease-in-out infinite;
}
.splash-dot:nth-child(2) { animation-delay: 0.2s; }
.splash-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes splash-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}

/* ─── App Content ────────────────────────────────────────── */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.app-content::-webkit-scrollbar { display: none; }

/* ─── Bottom Navigation ──────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(10, 11, 15, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 100;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 8px 4px;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-btn:active { opacity: 0.7; }
.nav-btn.active  { color: var(--accent); }

.nav-icon { display: flex; align-items: center; }
.nav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ─── Page Loader ────────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 15, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}
.loader-spinner {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Page Container ─────────────────────────────────────── */
.page {
  padding: 0;
  animation: page-in 0.22s ease;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ─── Page Header ────────────────────────────────────────── */
.page-header {
  padding: 20px 16px 12px;
  position: sticky;
  top: 0;
  background: rgba(10, 11, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10;
  border-bottom: 1px solid var(--border-light);
}
.page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.page-sub {
  font-size: 12px;
  color: var(--text-sec);
  margin-top: 3px;
}
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Section ────────────────────────────────────────────── */
.section {
  padding: 16px;
}
.section + .section {
  padding-top: 0;
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-inner {
  padding: 16px;
}

/* ─── Listing Card ───────────────────────────────────────── */
.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 10px;
}
.listing-card:active { background: var(--bg-hover); border-color: var(--border-light); }

.listing-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.listing-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}
.listing-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.listing-meta {
  flex: 1;
  min-width: 0;
}
.listing-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-category {
  font-size: 11px;
  color: var(--text-sec);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-verified   { background: var(--success-dim); color: var(--success); }
.badge-pending    { background: var(--warning-dim); color: var(--warning); }
.badge-sold       { background: var(--bg-hover);    color: var(--text-sec); }
.badge-rejected   { background: var(--danger-dim);  color: var(--danger); }
.badge-active     { background: var(--accent-dim);  color: var(--accent); }
.badge-category   { background: var(--bg-input);    color: var(--text-sec); }

.listing-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stat-item {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}
.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.listing-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.listing-price-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary   { background: var(--accent);   color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-success   { background: var(--success);  color: #fff; }
.btn-danger    { background: var(--danger);   color: #fff; }
.btn-secondary { background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border); }
.btn-ghost     { background: transparent;     color: var(--text-sec); border: 1px solid var(--border); }
.btn-block     { width: 100%; }
.btn-sm        { padding: 8px 14px; font-size: 12px; }
.btn-lg        { padding: 15px 24px; font-size: 14px; border-radius: var(--radius); }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-sec);
  margin-bottom: 8px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-select option { background: var(--bg-card); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}
.form-error {
  font-size: 11px;
  color: var(--danger);
  margin-top: 6px;
}

/* ─── Upload Box ─────────────────────────────────────────── */
.upload-box {
  background: var(--bg-input);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.upload-box:hover { border-color: var(--accent); }
.upload-box.has-file { border-color: var(--success); border-style: solid; }
.upload-icon { margin-bottom: 8px; color: var(--text-muted); }
.upload-text { font-size: 13px; color: var(--text-sec); }
.upload-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
input[type="file"] { display: none; }

/* ─── Search ─────────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 12px;
}
.search-bar input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px 11px 40px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ─── Category Filter ────────────────────────────────────── */
.category-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.category-scroll::-webkit-scrollbar { display: none; }
.cat-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sec);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.cat-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Wallet ─────────────────────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, #1a2a4a 0%, #0f1b35 100%);
  border: 1px solid rgba(33, 114, 229, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 16px;
}
.balance-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.balance-amount {
  font-family: 'Montserrat', sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.balance-currency {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
}
.wallet-address-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.wallet-address-text {
  flex: 1;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: var(--text-sec);
  word-break: break-all;
  line-height: 1.5;
}
.copy-btn {
  flex-shrink: 0;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-sec);
  font-size: 11px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:active { background: var(--accent-dim); color: var(--accent); }
.qr-wrap {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  display: flex;
}
.qr-wrap img { width: 160px; height: 160px; display: block; }

/* ─── Network Tabs ───────────────────────────────────────── */
.network-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.net-tab {
  padding: 10px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sec);
  font-family: 'Poppins', sans-serif;
}
.net-tab.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ─── Transaction List ───────────────────────────────────── */
.tx-list { display: flex; flex-direction: column; gap: 2px; }
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.tx-item + .tx-item { margin-top: 2px; }
.tx-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tx-icon.deposit    { background: var(--success-dim); color: var(--success); }
.tx-icon.purchase   { background: var(--danger-dim);  color: var(--danger); }
.tx-icon.sale       { background: var(--accent-dim);  color: var(--accent); }
.tx-icon.refund     { background: var(--warning-dim); color: var(--warning); }
.tx-icon.commission { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.tx-meta { flex: 1; min-width: 0; }
.tx-desc { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 700; white-space: nowrap; }
.tx-amount.pos { color: var(--success); }
.tx-amount.neg { color: var(--danger); }

/* ─── Profile ────────────────────────────────────────────── */
.profile-hero {
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name  { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.profile-uname { font-size: 13px; color: var(--text-sec); margin-top: 2px; }
.profile-balance-chip {
  margin-top: 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(33, 114, 229, 0.3);
  border-radius: 20px;
  padding: 7px 18px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Settings List ──────────────────────────────────────── */
.settings-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.settings-item + .settings-item { border-top: 1px solid var(--border-light); }
.settings-item:active { background: var(--bg-hover); }
.settings-item-left { display: flex; align-items: center; gap: 12px; }
.settings-item-icon {
  width: 36px; height: 36px;
  background: var(--bg-input);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sec);
  flex-shrink: 0;
}
.settings-item-label { font-size: 13px; font-weight: 500; }
.settings-item-sub   { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.settings-item-right { color: var(--text-muted); }
.settings-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 16px 16px 8px;
}

/* ─── Sell Flow ──────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.cat-card:active { border-color: var(--accent); background: var(--accent-dim); }
.cat-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.cat-card-name { font-size: 12px; font-weight: 600; text-align: center; }

.cat-tg    { background: rgba(33, 114, 229, 0.15); color: #2172E5; }
.cat-ig    { background: rgba(225, 48, 108, 0.15); color: #E1306C; }
.cat-tw    { background: rgba(255,255,255, 0.08);  color: #ffffff; }
.cat-tt    { background: rgba(255, 0, 80, 0.12);   color: #FF0050; }
.cat-gm    { background: rgba(66, 133, 244, 0.15); color: #4285F4; }
.cat-yt    { background: rgba(255, 0, 0, 0.15);    color: #FF0000; }
.cat-oth   { background: rgba(255,255,255, 0.06);  color: var(--text-sec); }

/* Verify steps */
.verify-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: 12px;
}
.verify-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.verify-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.verify-step-title { font-size: 14px; font-weight: 600; }
.verify-step-hint  { font-size: 12px; color: var(--text-sec); line-height: 1.6; }
.verified-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--success-dim);
  border: 1px solid rgba(52, 199, 89, 0.3);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 16px;
}

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: modal-in 0.25s ease;
}
@keyframes modal-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: sheet-in 0.3s cubic-bezier(0.32,0.72,0,1);
  padding-bottom: calc(24px + var(--safe-bottom));
}
@keyframes sheet-in {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 12px auto 20px;
}
.modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 700;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.modal-body { padding: 0 20px; }
.modal-footer { padding: 16px 20px 0; display: flex; gap: 10px; }
.modal-footer .btn { flex: 1; }

/* ─── Toast ──────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 360px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.success { border-color: rgba(52, 199, 89, 0.4); color: var(--success); }
.toast.error   { border-color: rgba(255, 59, 48, 0.4); color: var(--danger); }
.toast.info    { border-color: rgba(33, 114, 229, 0.4); color: var(--accent); }
.toast.hiding  { animation: toast-out 0.3s ease forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ─── Info Rows ──────────────────────────────────────────── */
.info-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 13px;
}
.info-row + .info-row { border-top: 1px solid var(--border-light); }
.info-row-label { color: var(--text-sec); font-size: 12px; }
.info-row-value { font-weight: 500; text-align: right; max-width: 60%; word-break: break-word; }

/* ─── Listing Detail ─────────────────────────────────────── */
.detail-hero {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.detail-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.detail-avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}
.detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.3; }
.detail-desc  { font-size: 13px; color: var(--text-sec); line-height: 1.6; margin-top: 12px; }
.detail-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: sticky;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  z-index: 5;
}
.detail-price { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}
.empty-icon { color: var(--text-dim); margin-bottom: 4px; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-sec); }
.empty-sub   { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ─── Divider ────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ─── Page Content ───────────────────────────────────────── */
.page-content-inner { padding: 16px; }
.page-html-content { font-size: 13px; color: var(--text-sec); line-height: 1.7; }
.page-html-content h1,
.page-html-content h2,
.page-html-content h3 { color: var(--text-primary); font-weight: 600; margin: 16px 0 8px; }
.page-html-content p  { margin-bottom: 10px; }
.page-html-content ul,
.page-html-content ol { padding-left: 20px; margin-bottom: 10px; }
.page-html-content li { margin-bottom: 4px; }

/* ─── Language Picker ────────────────────────────────────── */
.lang-options { display: flex; gap: 8px; }
.lang-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sec);
  transition: all 0.2s;
}
.lang-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ─── Scroll to top helper ───────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  right: 16px;
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sec);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 50;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }

/* ─── Skeleton Loading ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
  border-radius: 6px;
}
@keyframes skeleton-shine {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}
.skel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.skel-line { height: 12px; margin-bottom: 10px; }
.skel-title { width: 60%; height: 14px; }
.skel-sub   { width: 40%; height: 11px; }
.skel-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 12px 0; }
.skel-stat  { height: 50px; border-radius: 8px; }
.skel-footer { display: flex; justify-content: space-between; align-items: center; }
.skel-price { width: 100px; height: 20px; }
.skel-btn   { width: 80px; height: 34px; border-radius: 8px; }

/* ─── Error Boundary ─────────────────────────────────────── */
.error-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  gap: 12px;
  text-align: center;
  padding: 24px;
}
.error-screen svg { color: var(--danger); }
.error-screen h3  { font-size: 16px; font-weight: 600; }
.error-screen p   { font-size: 13px; color: var(--text-sec); }

/* ─── Utilities ──────────────────────────────────────────── */
.text-center { text-align: center; }
.text-sec    { color: var(--text-sec); }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16  { padding: 16px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }

/* ─── Responsive adjustments ─────────────────────────────── */
@media (max-width: 360px) {
  .listing-stats { grid-template-columns: repeat(3,1fr); }
  .category-grid { grid-template-columns: repeat(2,1fr); }
}
