:root {
  --bg: #0d0f12;
  --card: rgba(255,255,255,.03);
  --card-hover: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.07);
  --text: #ffffff;
  --muted: #9ca3af;
  --accent: #10b981;
  --accent2: #06b6d4;
  --red: #ef4444;
}
* { box-sizing: border-box; }
html { direction: rtl; }
body {
  margin: 0;
  font-family: 'Vazirmatn', 'Vazir', Tahoma, -apple-system, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px),
    radial-gradient(ellipse 80% 50% at 20% -5%, rgba(16,185,129,0.11) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(6,182,212,0.07) 0%, transparent 60%);
  background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

.screen { display: none; }
.screen.active { display: block; }

/* ── bottom fade shadow (top edge is handled by the solid header itself) ── */
.bottom-shadow {
  position: fixed; left: 0; right: 0; bottom: 0; height: 26px; z-index: 40; pointer-events: none;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
}

.spinner {
  width: 32px; height: 32px; margin: 100px auto;
  border: 3px solid rgba(16,185,129,.2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── glass-card (same tokens as the website) ── */
.glass-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  border-radius: 16px;
}
.card.center { text-align: center; padding: 28px 20px; margin: 80px 14px 0; }
.card .icon { font-size: 38px; margin-bottom: 10px; }
.card h2 { margin: 0 0 8px; font-size: 16px; }
.card p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0 0 16px; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg,#10b981,#06b6d4); color: #fff;
  text-decoration: none; padding: 10px 22px; border-radius: 12px;
  font-size: 13px; font-weight: bold; border: none; cursor: pointer;
  box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

.text-gradient {
  background-image: linear-gradient(135deg,#10b981 0%,#06b6d4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── header + hamburger ── */
.app-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); font-size: 16px; cursor: pointer;
}
.header-title { font-weight: bold; font-size: 15px; color: #fff; }

/* ── sidebar drawer ── */
.backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  z-index: 45; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.backdrop.show { opacity: 1; pointer-events: auto; }
.sidebar {
  position: fixed; top: 0; right: 0; height: 100%; width: 240px; z-index: 50;
  background: rgba(13,15,18,.96); backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  transform: translateX(105%); transition: transform .3s ease;
  padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
}
.sidebar.show { transform: translateX(0); }
.sidebar-brand { font-weight: bold; font-size: 15px; margin-bottom: 14px; padding: 0 6px; }
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 10px; font-size: 13px;
  color: var(--muted); cursor: pointer; transition: all .15s ease;
}
.sidebar-item i { width: 16px; text-align: center; flex-shrink: 0; }
.sidebar-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar-item.active { background: rgba(16,185,129,.12); color: #fff; border: 1px solid rgba(16,185,129,.2); }

/* ── content ── */
.app-content { padding: 16px 14px 40px; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.hint { color: var(--muted); font-size: 13px; text-align: center; padding: 40px 0; }
.section-title { color: var(--muted); font-size: 12px; font-weight: bold; margin: 18px 4px 8px; }
.section-title:first-child { margin-top: 14px; }

.progress-track { background: rgba(255,255,255,.06); border-radius: 20px; height: 8px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg,#10b981,#06b6d4); border-radius: 20px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 15px; display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.row .name { font-weight: bold; font-size: 13px; }
.row .sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.badge { font-size: 10px; padding: 4px 10px; border-radius: 20px; font-weight: bold; flex-shrink: 0; }
.badge.green { background: rgba(16,185,129,.12); color: #34d399; border: 1px solid rgba(16,185,129,.2); }
.badge.red { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.2); }
.badge.gray { background: rgba(156,163,175,.12); color: var(--muted); border: 1px solid rgba(156,163,175,.2); }

/* ── profile ── */
.profile-card { padding: 18px; margin-bottom: 12px; }
.profile-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.profile-row:last-child { border-bottom: none; }
.profile-row .label { color: var(--muted); font-size: 12px; }
.profile-row .value { font-weight: bold; font-size: 13px; }
