/* ─── Gemini Show — geminishow.shop ──────────────────────
   Dark, card-based, RTL, Vazirmatn. No frameworks. */

:root {
  --bg: #0b0b12;
  --bg-soft: #12121d;
  --card: #161624;
  --card-border: #26263a;
  --text: #e8e8f2;
  --muted: #9a9ab0;
  --primary: #8b5cf6;
  --primary-strong: #a78bfa;
  --primary-dim: rgba(139, 92, 246, 0.14);
  --success: #34d399;
  --success-dim: rgba(52, 211, 153, 0.14);
  --error: #f87171;
  --error-dim: rgba(248, 113, 113, 0.12);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.12);
  --running: #60a5fa;
  --running-dim: rgba(96, 165, 250, 0.14);
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, 0.12), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(96, 165, 250, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1 { font-size: 1.45rem; font-weight: 800; margin: 0 0 8px; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; }
p { margin: 0 0 12px; }
a { color: var(--primary-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
b { font-weight: 700; }
code, pre { direction: ltr; display: inline-block; font-family: ui-monospace, 'Cascadia Code', Menlo, monospace; background: var(--bg-soft); border: 1px solid var(--card-border); border-radius: 8px; padding: 1px 8px; font-size: 0.88em; }
pre { display: block; padding: 12px 14px; white-space: pre-wrap; }
[hidden] { display: none !important; }

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 28px 18px 60px;
  flex: 1;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 22px;
  border-top: 1px solid var(--card-border);
}

/* ─── Top nav ─── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 18, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}
.topnav-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 18px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand b { color: var(--primary-strong); font-weight: 900; }
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
}
.nav-links { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-link.active { color: var(--primary-strong); background: var(--primary-dim); font-weight: 600; }
.nav-admin { color: var(--warn); }
.nav-side { display: flex; align-items: center; gap: 10px; }
.user-chip { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--card-border);
  color: var(--text);
  border-radius: 10px;
  font-size: 1.1rem;
  padding: 4px 12px;
  cursor: pointer;
}

/* ─── Cards & grids ─── */
.card {
  background: linear-gradient(180deg, var(--card), var(--bg-soft));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card-narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

.page-head { margin-bottom: 22px; }
.page-head h1 { margin-bottom: 2px; }
.page-head .muted { margin: 0; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  border: 1px solid transparent;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5); }
.btn-ghost { background: var(--bg-soft); color: var(--text); border-color: var(--card-border); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--card-border); justify-content: space-between; }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-dim); }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.btn-sm { padding: 5px 12px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ─── Forms ─── */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.field-error { color: var(--error); font-size: 0.82rem; }
.input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 11px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}
.input-ltr { direction: ltr; text-align: left; }
.copy-row { display: flex; gap: 10px; align-items: stretch; margin: 10px 0; }
.copy-row .input { flex: 1; }
.copy-row .btn { flex-shrink: 0; }

/* ─── Flash messages ─── */
.flash {
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-weight: 500;
  border: 1px solid;
}
.flash-success { background: var(--success-dim); border-color: rgba(52, 211, 153, 0.35); color: var(--success); }
.flash-error { background: var(--error-dim); border-color: rgba(248, 113, 113, 0.35); color: var(--error); }
.flash-warn { background: var(--warn-dim); border-color: rgba(251, 191, 36, 0.35); color: var(--warn); }

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid;
}
.badge-success { background: var(--success-dim); border-color: rgba(52, 211, 153, 0.4); color: var(--success); }
.badge-error { background: var(--error-dim); border-color: rgba(248, 113, 113, 0.4); color: var(--error); }
.badge-running { background: var(--running-dim); border-color: rgba(96, 165, 250, 0.4); color: var(--running); }
.badge-pending { background: var(--warn-dim); border-color: rgba(251, 191, 36, 0.4); color: var(--warn); }
.badge-muted { background: rgba(154, 154, 176, 0.12); border-color: rgba(154, 154, 176, 0.3); color: var(--muted); }

/* ─── Progress bar ─── */
.progress {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  height: 22px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6d28d9, var(--primary-strong));
  border-radius: 999px;
  transition: width 0.6s ease;
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ─── Hero / landing ─── */
.hero { text-align: center; padding: 48px 0 36px; }
.hero-badge {
  display: inline-block;
  background: var(--primary-dim);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--primary-strong);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 { font-size: 2.3rem; font-weight: 900; line-height: 1.5; margin-bottom: 14px; }
.grad {
  background: linear-gradient(90deg, var(--primary-strong), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { color: var(--muted); max-width: 620px; margin: 0 auto 26px; }
.hero-stats { display: flex; justify-content: center; gap: 36px; margin-bottom: 30px; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { text-align: center; margin-bottom: 0; }
.feature-icon { font-size: 1.9rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* ─── Stat cards ─── */
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  margin-bottom: 0;
}
.stat-icon { font-size: 1.6rem; }
.stat-num { font-size: 1.7rem; font-weight: 900; }
.stat-label { color: var(--muted); font-size: 0.85rem; }
.stat .stat-num { font-size: 1.5rem; font-weight: 900; display: block; }
.stat .stat-label { color: var(--muted); font-size: 0.8rem; }

/* ─── Key-value lists ─── */
.kv { list-style: none; margin: 0; padding: 0; }
.kv li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--card-border);
}
.kv li:last-child { border-bottom: none; }
.kv li span { color: var(--muted); }

/* ─── Orders ─── */
.order-row {
  display: block;
  color: var(--text);
  margin-bottom: 0;
}
.order-row:hover { text-decoration: none; border-color: var(--primary); }
.order-main { display: flex; flex-direction: column; }
.order-gmail { font-weight: 700; font-family: ui-monospace, Menlo, monospace; }
.order-side { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.order-step { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.order-error { margin-top: 10px; color: var(--error); font-size: 0.9rem; }
.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--running);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(96, 165, 250, 0); }
}

/* ─── Payments / invoices ─── */
.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--card-border);
}
.pay-row:last-child { border-bottom: none; }
.pay-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.invoice-amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  border: 1px dashed rgba(139, 92, 246, 0.5);
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0;
}
.invoice-amount-num { font-size: 1.8rem; font-weight: 900; color: var(--primary-strong); }
.invoice-amount-unit { color: var(--muted); }
.countdown {
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 14px 0 6px;
  color: var(--warn);
}
.invoice-status {
  text-align: center;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.invoice-status.done { color: var(--success); font-weight: 700; }
.invoice-status.failed { color: var(--error); font-weight: 700; }

/* ─── Login ─── */
.login-card { margin-top: 40px; }
.login-logo { font-size: 2.6rem; margin-bottom: 6px; }
.login-status {
  margin: 18px 0 6px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ─── Spinner ─── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--card-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Pager / misc ─── */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}
.empty-icon { font-size: 2.4rem; margin-bottom: 8px; }
.help-body { white-space: pre-wrap; line-height: 2; }
.help-body pre { white-space: pre-wrap; }
.help-body a { word-break: break-all; }

/* ─── Responsive ─── */
@media (max-width: 760px) {
  .grid-2, .grid-3, .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .hero-stats { gap: 22px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    flex-direction: column;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--card-border);
    padding: 10px 18px 16px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .nav-side { margin-right: auto; }
  .user-chip { display: none; }
  .pay-row { flex-direction: column; align-items: flex-start; }
  .pay-row-side { align-items: flex-start; flex-direction: row; gap: 10px; }
}
