/* AzTok - Azerbaijan TikTok Clone */
:root {
  --az-blue: #0092BC;
  --az-red: #EF3340;
  --az-green: #509E2F;
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a28;
  --card: #161622;
  --border: rgba(255,255,255,0.08);
  --text: #ffffff;
  --text-muted: #888899;
  --text-dim: #aaaabb;
  --primary: #0092BC;
  --danger: #EF3340;
  --success: #509E2F;
  --gold: #FFD700;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* ── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--az-blue); border-radius: 2px; }

/* ── SPINNER ───────────────────────────────── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--az-blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ─────────────────────────────────── */
#toast-container {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  width: 90%; max-width: 360px;
}
.toast {
  padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: #fff; display: flex; align-items: center; gap: 10px;
  animation: toastIn .3s ease; pointer-events: all;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.toast.success { background: linear-gradient(135deg, #509E2F, #3a7a20); }
.toast.error   { background: linear-gradient(135deg, #EF3340, #b52028); }
.toast.info    { background: linear-gradient(135deg, #0092BC, #006e8e); }
.toast.out     { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform: translateY(-16px) scale(.95); } to { opacity:1; transform: none; } }
@keyframes toastOut { to   { opacity:0; transform: translateY(-16px) scale(.95); } }

/* ── BUTTONS ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-size: 15px; font-weight: 700;
  border: none; cursor: pointer; transition: .2s; outline: none;
}
.btn-primary { background: linear-gradient(135deg, var(--az-blue), #006e8e); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-danger  { background: linear-gradient(135deg, var(--az-red), #b52028); color: #fff; }
.btn-success { background: linear-gradient(135deg, var(--az-green), #3a7a20); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-full    { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn .spinner { width: 18px; height: 18px; border-width: 2px; margin: 0; }

/* ── FORMS ─────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.form-hint  { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

input, select, textarea {
  width: 100%; padding: 12px 16px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 15px; outline: none;
  transition: border-color .2s; font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--az-blue); }
select option { background: var(--bg3); }
textarea { resize: vertical; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  cursor: pointer; font-size: 18px; color: var(--text-muted);
}

/* ── MODAL ─────────────────────────────────── */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 500; backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
.modal-box {
  background: var(--bg2); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 540px; max-height: 85vh;
  overflow-y: auto; animation: slideUp .3s ease;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--bg2); z-index: 1;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: var(--bg3); border: none; color: var(--text-muted);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 16px;
}

/* ── BOTTOM NAV ────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 60px; background: rgba(10,10,15,.95);
  display: flex; align-items: center; justify-content: space-around;
  border-top: 1px solid var(--border); z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
  backdrop-filter: blur(12px);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); font-size: 10px; font-weight: 600;
  cursor: pointer; padding: 6px; flex: 1; min-width: 0; transition: color .2s;
  position: relative;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--az-blue); }
.nav-upload .upload-btn {
  width: 44px; height: 44px; background: linear-gradient(135deg, var(--az-blue), var(--az-red));
  border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px;
}
.nav-upload .upload-btn svg { width: 24px; height: 24px; color: #fff; }
.nav-badge {
  position: absolute; top: 2px; right: 50%; transform: translateX(160%);
  background: var(--az-red); color: #fff; font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; padding: 0 3px;
}

/* ── AUTH PAGE ─────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-hero {
  position: relative; height: 180px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.auth-flag-bg { position: absolute; inset: 0; display: flex; flex-direction: column; }
.flag-stripe { flex: 1; opacity: .25; }
.flag-stripe.blue   { background: var(--az-blue); }
.flag-stripe.red    { background: var(--az-red); }
.flag-stripe.green  { background: var(--az-green); }
.auth-logo-wrap { position: relative; z-index: 1; text-align: center; }
.auth-logo {
  font-size: 3rem; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--az-blue), #fff, var(--az-green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-tagline { color: rgba(255,255,255,.8); font-size: 13px; margin-top: 4px; }
.user-stats-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 16px; background: var(--bg2); font-size: 13px; color: var(--text-dim);
}
.user-stats-bar strong { color: var(--az-blue); }
.auth-tabs {
  display: flex; background: var(--bg2); border-bottom: 1px solid var(--border);
}
.auth-tab {
  flex: 1; text-align: center; padding: 14px; font-size: 15px; font-weight: 700;
  color: var(--text-muted); cursor: pointer; transition: .2s; position: relative;
}
.auth-tab.active { color: var(--az-blue); }
.auth-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 2px; background: var(--az-blue); border-radius: 1px;
}
.auth-form-wrap { padding: 20px 20px 0; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-footer {
  margin-top: auto; padding: 20px; text-align: center;
  color: var(--text-muted); font-size: 12px; line-height: 1.8;
}
.auth-footer .site-name { font-weight: 700; color: var(--az-blue); font-size: 14px; }

/* ── GIFT GRID ─────────────────────────────── */
.gifts-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px;
}
.gift-item {
  background: var(--bg3); border-radius: 12px; padding: 12px 8px;
  text-align: center; cursor: pointer; transition: .2s; border: 1.5px solid var(--border);
}
.gift-item:active { transform: scale(.95); border-color: var(--az-blue); }
.gift-icon  { font-size: 28px; margin-bottom: 4px; }
.gift-name  { font-size: 11px; color: var(--text-dim); margin-bottom: 2px; }
.gift-price { font-size: 12px; font-weight: 700; color: var(--gold); }

/* ── COMMENT ITEM ──────────────────────────── */
.comment-item {
  display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.comments-list { max-height: 50vh; overflow-y: auto; }
.comment-input-wrap {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--bg2);
}
.comment-input-wrap input { flex: 1; }
.comment-input-wrap button {
  background: var(--az-blue); color: #fff; border: none; border-radius: 10px;
  padding: 0 16px; font-weight: 700; cursor: pointer;
}

/* ── EXPLORE ───────────────────────────────── */
.explore-page { padding-bottom: 70px; }
.explore-search {
  padding: 12px 16px; position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.search-input-wrap { position: relative; }
.search-input-wrap input { padding-left: 44px; background: var(--bg3); }
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.explore-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px;
}
.explore-item { aspect-ratio: 9/16; position: relative; overflow: hidden; cursor: pointer; background: var(--bg3); }
.explore-item img, .explore-item video { width: 100%; height: 100%; object-fit: cover; }
.explore-item .views {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px; display: flex; align-items: center; gap: 3px;
}
.explore-user-grid {
  display: flex; flex-direction: column; gap: 1px; padding: 8px 0;
}
.explore-user-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  cursor: pointer; transition: background .15s;
}
.explore-user-item:hover { background: var(--bg2); }

/* ── LIVE PAGE ─────────────────────────────── */
.live-page { padding-bottom: 70px; }
.live-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
.live-card {
  border-radius: var(--radius); overflow: hidden; position: relative;
  background: var(--bg3); aspect-ratio: 9/16; cursor: pointer;
}
.live-card-thumb { width: 100%; height: 100%; object-fit: cover; }
.live-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,.8));
  padding: 10px;
}
.live-card-badge {
  background: var(--az-red); color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px; display: inline-block; margin-bottom: 4px;
}
.live-card-info { position: absolute; bottom: 10px; left: 10px; right: 10px; }
.live-card-name { color: #fff; font-weight: 700; font-size: 14px; }
.live-card-viewers { color: rgba(255,255,255,.8); font-size: 12px; }
.live-card-gifts { color: var(--gold); font-size: 12px; font-weight: 700; }
.start-live-btn {
  margin: 16px; padding: 14px; background: linear-gradient(135deg, var(--az-red), var(--az-blue));
  border: none; border-radius: var(--radius); color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; width: calc(100% - 32px); display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ── MESSAGES PAGE ─────────────────────────── */
.messages-page { padding-bottom: 70px; }
.conv-list { display: flex; flex-direction: column; }
.conv-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s;
  position: relative;
}
.conv-item:hover { background: var(--bg2); }
.conv-avatar-wrap { position: relative; flex-shrink: 0; }
.conv-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.online-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 12px; height: 12px; background: #4caf50; border-radius: 50%;
  border: 2px solid var(--bg);
}
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 700; font-size: 15px; margin-bottom: 3px; display: flex; align-items: center; gap: 6px; }
.conv-last { color: var(--text-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.conv-time { color: var(--text-muted); font-size: 11px; }
.conv-unread {
  background: var(--az-blue); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; padding: 0 4px;
}

/* ── CONVERSATION PAGE ─────────────────────── */
.conv-page { display: flex; flex-direction: column; height: 100vh; }
.conv-header {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.conv-header-back {
  background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; padding: 4px;
}
.conv-header-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.conv-header-name { font-weight: 700; font-size: 15px; }
.conv-header-status { font-size: 12px; color: var(--az-green); }
.conv-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg-bubble-wrap { display: flex; align-items: flex-end; gap: 6px; }
.msg-bubble-wrap.mine { flex-direction: row-reverse; }
.msg-bubble-wrap .bubble-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-bubble {
  max-width: 72%; padding: 10px 14px; border-radius: 18px;
  font-size: 14px; line-height: 1.5; position: relative;
}
.msg-bubble.theirs { background: var(--bg3); color: var(--text); border-bottom-left-radius: 4px; }
.msg-bubble.mine   { background: linear-gradient(135deg, var(--az-blue), #006e8e); color: #fff; border-bottom-right-radius: 4px; }
.msg-meta { font-size: 10px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.msg-meta.mine { justify-content: flex-end; }
.read-mark { font-size: 12px; }
.read-mark.read { color: var(--az-blue); }
.msg-audio { display: flex; align-items: center; gap: 8px; }
.msg-audio button { background: var(--az-blue); border: none; border-radius: 50%; width: 32px; height: 32px; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.msg-file { display: flex; align-items: center; gap: 8px; }
.msg-file-icon { font-size: 24px; }
.msg-gift { text-align: center; }
.msg-gift-icon { font-size: 36px; }
.msg-gift-name { font-size: 13px; color: var(--gold); font-weight: 700; }
.conv-input-bar {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px;
  background: var(--bg2); border-top: 1px solid var(--border);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.conv-input-bar textarea {
  flex: 1; border-radius: 20px; padding: 10px 16px; max-height: 100px;
  resize: none; font-size: 14px; background: var(--bg3);
}
.conv-action-btn {
  width: 40px; height: 40px; background: var(--bg3); border: none; border-radius: 50%;
  color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; transition: .15s;
}
.conv-action-btn:hover { background: var(--az-blue); color: #fff; }
.conv-send-btn {
  width: 40px; height: 40px; background: var(--az-blue); border: none; border-radius: 50%;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.emoji-panel {
  display: none; padding: 10px; background: var(--bg2); border-top: 1px solid var(--border);
  font-size: 22px; display: flex; flex-wrap: wrap; gap: 8px; max-height: 150px; overflow-y: auto;
}
.emoji-panel.hidden { display: none !important; }
.emoji-btn { cursor: pointer; padding: 2px; border-radius: 4px; }
.emoji-btn:hover { background: var(--bg3); }

/* ── PROFILE PAGE ──────────────────────────── */
.profile-page { padding-bottom: 70px; }
.profile-header {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  padding: 20px 16px 10px;
}
.profile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.profile-avatar-wrap { position: relative; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--az-blue); }
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0; background: var(--az-blue); border: none;
  border-radius: 50%; width: 24px; height: 24px; color: #fff; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.profile-info { flex: 1; }
.profile-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.profile-username { color: var(--text-muted); font-size: 14px; }
.vip-badge { background: linear-gradient(135deg, var(--gold), #ff8c00); color: #000; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.official-badge { color: var(--az-blue); font-size: 18px; }
.profile-stats { display: flex; gap: 4px; margin-bottom: 12px; }
.profile-stat { flex: 1; text-align: center; background: var(--bg3); border-radius: 10px; padding: 10px 4px; }
.profile-stat-num { font-size: 18px; font-weight: 800; color: var(--az-blue); }
.profile-stat-label { font-size: 11px; color: var(--text-muted); }
.profile-bio { color: var(--text-dim); font-size: 14px; line-height: 1.6; padding: 0 0 12px; }
.profile-actions { display: flex; gap: 8px; margin-bottom: 4px; }
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); }
.profile-tab { flex: 1; text-align: center; padding: 12px; color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 600; }
.profile-tab.active { color: var(--az-blue); border-bottom: 2px solid var(--az-blue); }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.profile-grid-item { aspect-ratio: 1; overflow: hidden; cursor: pointer; position: relative; }
.profile-grid-item img, .profile-grid-item video { width: 100%; height: 100%; object-fit: cover; }

/* ── BALANCE PAGE ──────────────────────────── */
.balance-page { padding: 16px 16px 80px; }
.balance-card {
  background: linear-gradient(135deg, var(--az-blue), #006e8e);
  border-radius: 18px; padding: 24px; margin-bottom: 20px; position: relative; overflow: hidden;
}
.balance-card::before {
  content: '₼'; position: absolute; right: -10px; top: -20px;
  font-size: 120px; font-weight: 900; color: rgba(255,255,255,.08);
}
.balance-label { color: rgba(255,255,255,.8); font-size: 13px; margin-bottom: 4px; }
.balance-amount { font-size: 36px; font-weight: 900; color: #fff; }
.balance-earnings { color: rgba(255,255,255,.8); font-size: 13px; margin-top: 8px; }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.receipt-preview { max-width: 200px; border-radius: 8px; margin-top: 8px; display: none; }
.vip-packages-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.vip-pkg-card {
  background: var(--bg3); border-radius: var(--radius); padding: 16px;
  border: 1.5px solid var(--border); cursor: pointer; transition: .2s;
  display: flex; align-items: center; justify-content: space-between;
}
.vip-pkg-card:hover { border-color: var(--gold); }
.vip-pkg-name { font-weight: 700; font-size: 16px; color: var(--gold); }
.vip-pkg-days { font-size: 12px; color: var(--text-muted); }
.vip-pkg-features { font-size: 12px; color: var(--text-dim); margin-top: 4px; line-height: 1.6; }
.vip-pkg-price { font-size: 22px; font-weight: 900; color: var(--az-blue); }

/* ── VIP PAGE ──────────────────────────────── */
.vip-page { padding-bottom: 80px; }
.vip-hero {
  background: linear-gradient(135deg, #1a1100, #2a1a00);
  padding: 40px 20px 30px; text-align: center;
  border-bottom: 1px solid rgba(255,215,0,.2);
}
.vip-crown { font-size: 56px; margin-bottom: 8px; }
.vip-title { font-size: 28px; font-weight: 900; color: var(--gold); }
.vip-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 6px; }

/* ── UPLOAD PAGE ───────────────────────────── */
.upload-page { padding: 16px 16px 80px; }
.upload-zone {
  border: 2px dashed var(--az-blue); border-radius: 18px; padding: 40px 20px;
  text-align: center; cursor: pointer; transition: .2s; background: rgba(0,146,188,.05);
  margin-bottom: 20px;
}
.upload-zone.drag-over { border-color: var(--gold); background: rgba(255,215,0,.05); }
.upload-zone-icon { font-size: 48px; margin-bottom: 12px; }
.upload-zone-text { color: var(--text-dim); font-size: 14px; }
.upload-preview { width: 100%; max-height: 300px; border-radius: var(--radius); object-fit: cover; margin-bottom: 16px; }

/* ── SETTINGS PAGE ─────────────────────────── */
.settings-page { padding-bottom: 70px; }
.settings-section { padding: 16px; }
.settings-group { background: var(--card); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background .15s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--bg3); }
.settings-item-left { display: flex; align-items: center; gap: 12px; }
.settings-item-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.settings-item-label { font-size: 15px; font-weight: 600; }
.settings-item-sub { font-size: 12px; color: var(--text-muted); }
.settings-item-arrow { color: var(--text-muted); font-size: 18px; }
.settings-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--bg2);
}
.settings-header h2 { font-size: 18px; font-weight: 700; }
.settings-back { background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

/* ── PAGE HEADER ───────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 50;
}
.page-header h1 { font-size: 18px; font-weight: 700; }

/* ── UTILITY ───────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.p-16  { padding: 16px; }
.flex  { display: flex; }
.gap-8 { gap: 8px; }
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  background: var(--bg3); border-radius: 20px; font-size: 12px; font-weight: 600;
}
.chip-blue  { background: rgba(0,146,188,.2);  color: var(--az-blue); }
.chip-red   { background: rgba(239,51,64,.2);  color: var(--az-red); }
.chip-gold  { background: rgba(255,215,0,.2);  color: var(--gold); }
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* ── TOGGLE SWITCH ─────────────────────────── */
.toggle-switch { position: relative; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--bg3); border-radius: 13px;
  cursor: pointer; transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; bottom: 3px; left: 3px; transition: .3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--az-blue); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ── RESPONSIVE ────────────────────────────── */
@media (min-width: 540px) {
  body { max-width: 540px; margin: 0 auto; }
  .bottom-nav { max-width: 540px; left: 50%; transform: translateX(-50%); }
  #toast-container { max-width: 480px; }
}
