/* ========== VARIABLES ========== */
:root {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --text: #ffffff;
  --text-secondary: #b0b0b8;
  --text-tertiary: #9a9aa6;
  --accent: #0a84ff;
  --accent-light: rgba(10,132,255,0.12);
  --green: #30d158;
  --green-light: rgba(48,209,88,0.12);
  --red: #ff453a;
  --red-light: rgba(255,69,58,0.12);
  --yellow: #ffd60a;
  --yellow-light: rgba(255,214,10,0.12);
  --blue: #0a84ff;
  --blue-light: rgba(10,132,255,0.12);
  --border: rgba(255,255,255,0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 64px;
}

/* ========== LIGHT THEME ========== */
:root[data-theme="light"] {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #e5e5ea;
  --surface-3: #d1d1d6;
  --text: #000000;
  --text-secondary: #3c3c43;
  --text-tertiary: #636366;
  --accent: #007aff;
  --accent-light: rgba(0,122,255,0.1);
  --green: #34c759;
  --green-light: rgba(52,199,89,0.1);
  --red: #ff3b30;
  --red-light: rgba(255,59,48,0.1);
  --yellow: #ff9f0a;
  --yellow-light: rgba(255,159,10,0.1);
  --blue: #007aff;
  --blue-light: rgba(0,122,255,0.1);
  --border: rgba(0,0,0,0.08);
}
:root[data-theme="light"] .bottom-nav {
  background: rgba(255,255,255,0.92);
  border-top-color: rgba(0,0,0,0.1);
}
:root[data-theme="light"] .balance-card {
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.65) 100%), url('/img/banner.webp') center/cover no-repeat;
  border-color: rgba(0,0,0,0.06);
}
:root[data-theme="light"] .gate { background: var(--bg); }
:root[data-theme="light"] .sheet-handle { background: var(--surface-3); }
:root[data-theme="light"] .sheet-close { background: var(--surface-2); color: var(--text); }
:root[data-theme="light"] .field-input { background: var(--surface-2); border-color: var(--border); }
:root[data-theme="light"] .order-note { background: rgba(0,0,0,0.03); }

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  height: 100%;
  font: 400 16px/1.4 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior: none;
}

/* ========== GATE ========== */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}
.gate-content { text-align: center; max-width: 280px; }
.gate-icon { color: var(--text-tertiary); margin-bottom: 20px; }
.gate h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.gate p { color: var(--text-secondary); font-size: 15px; }

/* ========== UTILITY ========== */
.hidden { display: none !important; }

/* ========== APP SHELL ========== */
.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ========== SCREENS ========== */
.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
}
.screen.active { display: flex; }

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}
.screen-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ========== BALANCE CARD ========== */
.balance-card {
  margin: 4px 20px 20px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%), url('/img/banner.webp') center/cover no-repeat;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.balance-label { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.balance-sub { font-size: 15px; color: #fff; margin-top: 2px; opacity: 0.85; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.balance-hint { margin-top: 12px; font-size: 14px; color: #fff; padding: 8px 12px; background: rgba(255,255,255,0.15); backdrop-filter: blur(4px); border-radius: var(--radius-xs); display: inline-block; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }

/* ========== LOADING ========== */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 14px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--surface-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== PRODUCT LIST ========== */
.product-list { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }

.product-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
  cursor: pointer;
}
.product-item:active { background: var(--surface-2); }

.product-icon-wrap {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}

.product-info { flex: 1; min-width: 0; }
.product-name { font-size: 16px; font-weight: 600; line-height: 1.2; }
.product-desc { font-size: 13px; color: var(--text); opacity: 0.7; margin-top: 2px; }

.product-price-col { text-align: right; flex-shrink: 0; }
.product-price { font-size: 16px; font-weight: 700; }
.product-per { font-size: 11px; color: var(--text); opacity: 0.6; margin-top: 1px; }

.product-add {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 20px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: transform 0.1s; line-height: 1;
}
.product-add:active { transform: scale(0.9); }

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(28,28,30,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid rgba(255,255,255,0.1);
  z-index: 50;
}

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; color: var(--text-tertiary);
  font-size: 10px; font-weight: 500; cursor: pointer;
  padding: 6px 12px; -webkit-tap-highlight-color: transparent; transition: color 0.15s;
}
.nav-item.active { color: var(--accent); }
.nav-item svg { transition: color 0.15s; }
.nav-item.active svg { stroke: var(--accent); }

.nav-icon-wrap { position: relative; }
.nav-badge {
  position: absolute; top: -6px; right: -10px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ========== CART SCREEN ========== */
.cart-content { flex: 1; padding: 0 20px; }
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center; color: var(--text-tertiary);
}
.empty-state p { font-size: 18px; font-weight: 600; color: var(--text); opacity: 0.8; margin-top: 16px; }
.empty-state span { font-size: 14px; color: var(--text); opacity: 0.6; margin-top: 4px; }

.cart-items { display: flex; flex-direction: column; gap: 1px; }
.cart-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-bottom: 0.5px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 16px; font-weight: 600; }
.cart-item-sub { font-size: 13px; color: var(--text); opacity: 0.7; margin-top: 2px; }

.cart-qty {
  display: flex; align-items: center; gap: 0;
  background: var(--surface); border-radius: var(--radius-xs); overflow: hidden;
}
.cart-qty button {
  width: 34px; height: 34px; border: none; background: transparent;
  color: var(--accent); font-size: 18px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cart-qty button:active { background: var(--surface-2); }
.cart-qty .qty-val { width: 30px; text-align: center; font-size: 15px; font-weight: 600; }

.cart-item-price { font-size: 16px; font-weight: 700; min-width: 70px; text-align: right; }

.cart-footer {
  position: sticky; bottom: calc(var(--nav-height) + var(--safe-bottom));
  padding: 16px 20px; background: var(--bg); border-top: 0.5px solid var(--border);
}
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 15px; }
.cart-total-value { font-size: 22px; font-weight: 700; }

/* ========== PROFILE SCREEN ========== */
.profile-card {
  margin: 0 20px 16px; padding: 20px;
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
}
.profile-avatar-row { display: flex; align-items: center; gap: 14px; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-light); display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--accent);
}
.profile-name { font-size: 20px; font-weight: 700; }
.profile-username { font-size: 14px; color: var(--text-secondary); margin-top: 1px; }
.profile-id { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; font-family: 'SF Mono', monospace; }

/* ========== PHONE INFO ========== */
.phone-info-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 14px 16px;
}
.phone-info-row {
  display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500;
}
.phone-info-row svg { color: var(--text-secondary); flex-shrink: 0; }

/* ========== GAME PROFILES ========== */
.game-profiles-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

.game-profile-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.game-profile-card:active { background: var(--surface-2); }
.game-profile-card.selected { border-color: var(--accent); }

.gp-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-light); display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.gp-info { flex: 1; min-width: 0; }
.gp-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.gp-detail { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.gp-default-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: var(--accent-light); color: var(--accent);
  font-size: 10px; font-weight: 700; text-transform: uppercase;
}

.btn-outline {
  width: 100%; padding: 12px 16px;
  border-radius: var(--radius-sm); border: 1px dashed var(--border);
  background: transparent; color: var(--accent);
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  -webkit-tap-highlight-color: transparent;
}
.btn-outline:active { background: var(--surface); }

/* ========== PROFILE MENU ========== */
.profile-section { padding: 0 20px; margin-bottom: 20px; }
.section-label {
  font-size: 13px; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px;
}
.profile-menu {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border); overflow: hidden;
}
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.12s; color: var(--text);
  border-bottom: 0.5px solid var(--border);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--surface-2); }
.menu-item span { flex: 1; font-size: 16px; }
.menu-item .chevron { color: var(--text-tertiary); margin-left: auto; }
.menu-item svg:first-child { color: var(--text-secondary); flex-shrink: 0; }
.theme-label { font-size: 14px; color: var(--accent); font-weight: 500; margin-left: auto; }

/* ========== BUTTONS ========== */
.btn-primary {
  width: 100%; padding: 16px; border-radius: var(--radius-sm); border: none;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 600;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: opacity 0.12s;
  text-align: center; text-decoration: none; display: block;
}
.btn-primary:active { opacity: 0.8; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  width: 100%; padding: 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 17px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn-secondary:active { background: var(--surface-2); }

.btn-link {
  background: none; border: none; color: var(--accent);
  font-size: 15px; font-weight: 600; cursor: pointer;
  padding: 8px 0; text-align: center; width: 100%;
}

/* ========== MODAL / SHEET ========== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none; display: flex; align-items: flex-end; justify-content: center;
}
.modal.open { pointer-events: auto; }

.modal-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.25s;
}
.modal.open .modal-overlay { opacity: 1; }

.modal-sheet {
  position: relative; width: 100%; max-width: 500px; max-height: 90vh;
  background: var(--surface); border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
}
.modal.open .modal-sheet { transform: translateY(0); }
.modal-sheet-sm { max-height: 60vh; }

.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--surface-3); margin: 8px auto 0; }

.sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
}
.sheet-header h3 { font-size: 20px; font-weight: 700; }
.sheet-close {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: var(--surface-3); color: var(--text); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1;
}
.sheet-body { padding: 0 20px 24px; }

.modal-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }

/* ========== FORM FIELDS ========== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.field-input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 16px; font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
.field-input:focus { border-color: var(--accent); }
.field-input::placeholder { color: var(--text-tertiary); }
.field-error .field-input { border-color: var(--red); }
.field-error .field-label { color: var(--red); }

.code-input {
  font-size: 24px; font-weight: 700; text-align: center; letter-spacing: 8px;
  font-family: 'SF Mono', monospace;
}

.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; cursor: pointer; color: var(--text);
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px; accent-color: var(--accent);
}

.resend-timer {
  text-align: center; font-size: 13px; color: var(--text-tertiary); padding: 8px 0;
}

/* ========== PAYMENT METHOD MODAL ========== */
.payment-summary {
  background: var(--bg); border-radius: var(--radius-xs); padding: 12px;
  margin-bottom: 16px; font-size: 14px;
}
.payment-summary-row { display: flex; justify-content: space-between; padding: 2px 0; }
.payment-summary-label { color: var(--text-secondary); }
.payment-summary-value { font-weight: 600; }

.payment-methods { display: flex; flex-direction: column; gap: 8px; }

.payment-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--bg); border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background 0.12s;
  text-align: left; width: 100%; color: var(--text);
}
.payment-btn:active { background: var(--surface-2); }

.payment-btn-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0; color: #fff;
}
.sbp-icon { background: linear-gradient(135deg, #3b82f6, #8b5cf6); font-size: 11px; font-weight: 800; }
.sber-icon { background: #21a038; }
.tbank-icon { background: #ffdd2d; color: #333; }
.vtb-icon { background: #002882; }
.mts-icon { background: #e30611; }

.payment-btn-text { flex: 1; }
.payment-btn-name { font-size: 16px; font-weight: 600; }
.payment-btn-desc { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

/* ========== SBP BANK PICKER ========== */
.sbp-bank-list {
  max-height: 300px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.sbp-bank-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-xs);
  cursor: pointer; transition: background 0.12s;
  border: none; background: none; width: 100%; text-align: left; color: var(--text);
}
.sbp-bank-item:active { background: var(--surface-2); }
.sbp-bank-logo {
  width: 32px; height: 32px; border-radius: 8px; object-fit: contain;
  background: var(--surface-2);
}
.sbp-bank-name { font-size: 15px; }

/* ========== PAYMENT STATUS ========== */
.payment-status-content { text-align: center; padding: 12px 0; }

.status-spinner-wrap { margin-bottom: 20px; }
.status-spinner {
  width: 48px; height: 48px; margin: 0 auto;
  border: 4px solid var(--surface-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.status-icon-wrap {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
}
.status-icon-wrap.success { background: var(--green); }
.status-icon-wrap.error { background: var(--red); }

.status-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.status-timer {
  font-size: 15px; font-weight: 600; color: var(--accent);
  margin-bottom: 8px; font-variant-numeric: tabular-nums;
}
.status-timer.expired { color: var(--red); }
.status-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }

.qr-wrap { margin: 16px auto; }
.qr-image {
  width: 200px; height: 200px; border-radius: 12px;
  background: #fff; padding: 8px; display: block; margin: 0 auto;
}
.qr-hint { font-size: 13px; color: var(--text-tertiary); margin-top: 10px; }

.deep-link-btn { margin-top: 12px; }

/* ========== DASHBOARD / ORDERS ========== */
.orders-content { padding: 0 20px; }

.dashboard-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 16px;
  text-align: center;
}
.stat-label { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 700; }

.order-list { display: flex; flex-direction: column; gap: 10px; }

.order-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 14px 16px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.order-card:active { background: var(--surface-2); }

.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.order-card-id { font-size: 13px; font-weight: 600; color: var(--text-secondary); font-family: 'SF Mono', monospace; }
.order-card-date { font-size: 12px; color: var(--text-tertiary); }

.order-card-items { font-size: 14px; color: var(--text); margin-bottom: 8px; line-height: 1.4; }

.order-card-footer { display: flex; justify-content: space-between; align-items: center; }
.order-card-total { font-size: 17px; font-weight: 700; }

/* ========== STATUS BADGES ========== */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
}
.status-badge::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
}
.status-badge.status-pending { background: var(--blue-light); color: var(--blue); }
.status-badge.status-pending::before { background: var(--blue); }
.status-badge.status-success { background: var(--green-light); color: var(--green); }
.status-badge.status-success::before { background: var(--green); }
.status-badge.status-error { background: var(--red-light); color: var(--red); }
.status-badge.status-error::before { background: var(--red); }
.status-badge.status-waiting { background: var(--yellow-light); color: var(--yellow); }
.status-badge.status-waiting::before { background: var(--yellow); }

/* ========== ORDER TABS & FILTERS ========== */
.orders-tabs {
  display: flex; gap: 4px; margin-bottom: 12px;
  background: var(--surface); border-radius: var(--radius-xs); padding: 3px;
  border: 1px solid var(--border);
}
.orders-tab {
  flex: 1; padding: 8px 12px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-secondary);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
}
.orders-tab.active { background: var(--accent); color: #fff; }

.orders-day-filters {
  display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap;
}
.day-filter-btn {
  padding: 6px 12px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-secondary);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.12s; -webkit-tap-highlight-color: transparent;
}
.day-filter-btn.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

/* ========== PAYABLE ORDER ========== */
.order-card.payable { border-color: var(--accent); border-style: solid; }
.order-pay-hint {
  font-size: 12px; color: var(--accent); font-weight: 600;
  margin-top: 8px; text-align: center;
}

/* ========== ORDER DETAIL (expanded) ========== */
.order-detail {
  margin-top: 10px; padding-top: 10px;
  border-top: 0.5px solid var(--border);
  display: none;
}
.order-card.expanded .order-detail { display: block; }

.order-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; font-size: 13px;
}
.order-detail-label { color: var(--text-tertiary); }
.order-detail-value { font-weight: 500; }

.order-detail-items { margin-top: 8px; }
.order-detail-item {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: 13px;
  border-bottom: 0.5px solid var(--border);
}
.order-detail-item:last-child { border-bottom: none; }

/* ========== SUCCESS ========== */
.success-body { text-align: center; padding: 32px 20px; }
.success-check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--green);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.success-body h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.success-id { font-size: 14px; color: var(--text-secondary); font-family: 'SF Mono', monospace; margin-bottom: 4px; }
.success-text { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; }

/* ========== INFO SCREEN ========== */
.info-content { padding: 0 20px; }
.info-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.info-step {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px;
  background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.step-text { font-size: 15px; line-height: 1.45; color: var(--text); padding-top: 3px; }
.info-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 16px;
}
.info-card-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.info-card p { font-size: 14px; line-height: 1.5; color: var(--text-secondary); margin-bottom: 8px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card strong { color: var(--text); font-weight: 600; }

/* ========== PROFILE PICKER ========== */
.profile-picker-list { display: flex; flex-direction: column; gap: 8px; }

.profile-picker-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--bg); border-radius: var(--radius-xs);
  border: 1px solid var(--border); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background 0.12s;
}
.profile-picker-item:active { background: var(--surface-2); }
.profile-picker-item.selected { border-color: var(--accent); background: var(--accent-light); }

/* ========== BODY LOCK ========== */
body.locked { overflow: hidden; }

/* ========== VERIFIED BADGE ========== */
.verified-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--green-light); border-radius: var(--radius-sm);
  border: 1px solid rgba(48,209,88,0.2);
}
.verified-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.verified-title { font-size: 15px; font-weight: 600; color: var(--green); }
.verified-phone { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ========== EMAIL ========== */
.email-card {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border); padding: 14px 16px;
}
.email-input-row {
  display: flex; align-items: center; gap: 10px;
}
.email-input-row svg:first-child { color: var(--text-secondary); flex-shrink: 0; }
.email-input {
  flex: 1; padding: 8px 0; border: none; background: transparent;
  color: var(--text); font-size: 15px; font-family: inherit; outline: none;
  min-width: 0;
}
.email-input::placeholder { color: var(--text-tertiary); }
.email-save-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity 0.12s;
}
.email-save-btn:active { opacity: 0.7; }
.email-save-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.email-save-btn.saved { background: var(--green); }
.email-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 8px; line-height: 1.4; }
.email-status { font-size: 13px; margin-top: 6px; font-weight: 500; }
.email-status.success { color: var(--green); }
.email-status.error { color: var(--red); }

/* ========== KYC BANNER ========== */
.kyc-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--yellow-light); border-radius: var(--radius-sm);
  border: 1px solid rgba(255,214,10,0.2);
}
.kyc-banner-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--yellow); color: #000;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kyc-banner-title { font-size: 15px; font-weight: 600; }
.kyc-banner-desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ========== KYC UPLOAD ========== */
.kyc-upload-item { margin-bottom: 16px; }
.kyc-upload-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; margin-bottom: 4px;
}
.kyc-upload-num {
  width: 24px; height: 24px; 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;
}
.kyc-upload-item.uploaded .kyc-upload-num { background: var(--green); }
.kyc-upload-hint {
  font-size: 12px; color: var(--text-tertiary); margin-bottom: 8px; line-height: 1.4;
  padding-left: 34px;
}
.kyc-upload-area {
  position: relative; border-radius: var(--radius-xs);
  border: 1.5px dashed var(--border); overflow: hidden;
  transition: border-color 0.2s;
}
.kyc-upload-item.uploaded .kyc-upload-area { border-color: var(--green); border-style: solid; }
.kyc-upload-item.uploading .kyc-upload-area { border-color: var(--accent); }
.kyc-upload-item.error .kyc-upload-area { border-color: var(--red); }
.kyc-file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2;
  width: 100%; height: 100%;
}
.kyc-upload-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 20px; color: var(--text-tertiary); font-size: 14px;
}
.kyc-upload-preview {
  position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden;
}
.kyc-upload-preview img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.kyc-upload-status {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.kyc-upload-item.uploaded .kyc-upload-status {
  background: var(--green); color: #fff;
}
.kyc-upload-item.uploading .kyc-upload-status {
  background: var(--accent); color: #fff;
}
.kyc-upload-item.error .kyc-upload-status {
  background: var(--red); color: #fff;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 0; background: transparent; }

/* ========== ANIMATION ========== */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.product-item { animation: fade-in 0.3s ease both; }
.product-item:nth-child(1) { animation-delay: 0.03s; }
.product-item:nth-child(2) { animation-delay: 0.06s; }
.product-item:nth-child(3) { animation-delay: 0.09s; }
.product-item:nth-child(4) { animation-delay: 0.12s; }
.product-item:nth-child(5) { animation-delay: 0.15s; }
.product-item:nth-child(6) { animation-delay: 0.18s; }

@keyframes added-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.85); }
  100% { transform: scale(1); }
}
.product-add.added {
  background: var(--green);
  animation: added-pulse 0.25s ease;
}
