:root {
  --bg: #05060d;
  --bg2: rgba(255, 255, 255, .06);
  --card: rgba(255, 255, 255, .07);
  --card2: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .14);
  --glass-blur: blur(22px) saturate(160%);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
  --text: #eef1f7;
  --muted: #aab3c8;
  --accent: #ffc93c;
  --accent2: #ff9a1f;
  --blue: #5aa9ff;
  --ok: #3ddc97;
  --warn: #ffb44a;
  --bad: #ff6b6b;
  --radius: 16px;
  --font: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #05060d; }
body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
html::before { content: ""; position: fixed; inset: 0; z-index: -2; background: linear-gradient(160deg, #070815 0%, #0b0d1f 45%, #05060d 100%); }
body::before, body::after {
  content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(90px); pointer-events: none; opacity: .7;
}
body::before { width: 460px; height: 460px; top: -120px; inset-inline-end: -100px; background: radial-gradient(circle, #ffb800, rgba(255, 140, 0, 0) 70%); animation: drift 18s ease-in-out infinite alternate; }
body::after { width: 520px; height: 520px; bottom: -160px; inset-inline-start: -140px; background: radial-gradient(circle, #3b82ff, rgba(120, 60, 255, 0) 70%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(40px, 50px) scale(1.12); } }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 8px 16px 40px; flex: 1; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(10, 12, 24, .45);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.1rem; color: var(--accent); letter-spacing: .2px; }
.brand span { color: var(--text); }
.nav { display: flex; gap: 6px; margin-inline-start: auto; align-items: center; }
.nav a, .nav button {
  background: none; border: 0; cursor: pointer;
  padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: .95rem;
}
.nav a:hover, .nav button:hover, .nav a.on { color: var(--text); background: rgba(255, 255, 255, .10); }
.langs { display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.langs button { background: none; border: 0; cursor: pointer; padding: 4px 10px; border-radius: 999px; font-size: .8rem; color: var(--muted); }
.langs button.on { background: var(--accent); color: #1a1300; font-weight: 700; }

/* ---------- hero ---------- */
.hero { padding: 54px 0 22px; text-align: center; }
.hero h1 {
  margin: 0 0 12px; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.2; font-weight: 800;
  background: linear-gradient(120deg, #fff 30%, var(--accent) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0 auto 22px; max-width: 560px; color: var(--muted); font-size: 1.05rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: pointer; font-weight: 700; transition: transform .08s, background .15s, border-color .15s;
}
.btn:hover { border-color: rgba(255, 255, 255, .35); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1300; border-color: transparent; box-shadow: 0 6px 24px rgba(255, 170, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.wa { background: #1fa855; border-color: transparent; color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.btn[disabled] { opacity: .7; cursor: wait; }

/* ---------- plans ---------- */
.sec-title { margin: 34px 0 14px; font-size: 1.35rem; font-weight: 800; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: hidden;
}
.plan.mid { border-color: rgba(255, 201, 60, .55); background: linear-gradient(180deg, rgba(255, 201, 60, .16), rgba(255, 255, 255, .06) 60%); box-shadow: 0 10px 50px rgba(255, 170, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .25); }
.plan .gb { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.plan .gb small { font-size: 1rem; color: var(--muted); font-weight: 600; margin-inline-start: 6px; }
.plan .price { font-size: 1.25rem; color: var(--accent); font-weight: 800; }
.plan .price small { color: var(--muted); font-weight: 500; font-size: .9rem; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--muted); font-size: .95rem; }
.plan li::before { content: "⚡"; margin-inline-end: 8px; font-size: .8em; }
.plan .btn { margin-top: auto; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 18px; }
.step::before {
  counter-increment: s; content: counter(s);
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #1a1300; font-weight: 800; margin-bottom: 10px;
}
.step h3 { margin: 0 0 4px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }
.note { margin-top: 22px; color: var(--muted); font-size: .9rem; text-align: center; }

/* ---------- forms ---------- */
.auth { max-width: 420px; margin: 40px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.auth h2 { margin: 0 0 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: .9rem; }
.field input, .field select {
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 201, 60, .15); }
.err { color: var(--bad); font-size: .92rem; min-height: 1.3em; margin: 0 0 10px; }
.alt { margin-top: 16px; color: var(--muted); font-size: .95rem; text-align: center; }
.alt a { color: var(--accent); font-weight: 700; }

/* ---------- account ---------- */
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 12px; font-size: 1.1rem; }
.picker { display: flex; gap: 8px; flex-wrap: wrap; }
.picker .btn { flex: 1 1 130px; flex-direction: column; gap: 2px; }
.picker .btn small { color: var(--muted); font-weight: 500; }
.order { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; display: grid; gap: 12px; }
.order .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order .title { font-weight: 800; font-size: 1.1rem; }
.order .meta { color: var(--muted); font-size: .9rem; }
.badge { padding: 3px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; border: 1px solid; }
.badge.pending { color: var(--warn); border-color: rgba(255, 180, 74, .4); background: rgba(255, 180, 74, .08); }
.badge.active { color: var(--ok); border-color: rgba(61, 220, 151, .4); background: rgba(61, 220, 151, .08); }
.badge.rejected, .badge.expired { color: var(--bad); border-color: rgba(255, 107, 107, .4); background: rgba(255, 107, 107, .08); }
.copybox { display: flex; gap: 8px; }
.copybox input { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; direction: ltr; text-align: left; font-size: .85rem; color: var(--muted); }
.apps { display: flex; gap: 8px; flex-wrap: wrap; }
.bar { height: 8px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.usage { color: var(--muted); font-size: .88rem; display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.empty { color: var(--muted); text-align: center; padding: 26px 0; }
.created { border-color: rgba(61, 220, 151, .5); background: linear-gradient(180deg, rgba(61, 220, 151, .16), rgba(255, 255, 255, .05)); }

/* ---------- admin ---------- */
.tbl { display: grid; gap: 10px; }
.tr { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.tr .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- glass ---------- */
.plan, .step, .auth, .panel, .order, .tr, .langs {
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.plan, .step, .order, .tr { transition: transform .2s, border-color .2s, background .2s; }
.plan:hover, .step:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .10); }
.plan::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 38%); }

/* ---------- misc ---------- */
.foot { text-align: center; background: rgba(255,255,255,.03); color: var(--muted); font-size: .85rem; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.toast {
  position: fixed; inset-inline: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 420px;
  background: rgba(20, 24, 40, .7); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; text-align: center;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; z-index: 50;
}
.toast.show { opacity: 1; transform: none; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: sp .8s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .top { gap: 6px; padding-inline: 10px; }
  .brand span { display: none; }
  .nav { min-width: 0; gap: 2px; }
  .nav a[href="#/"] { display: none; }
  .nav a, .nav button { padding: 7px 8px; font-size: .85rem; white-space: nowrap; }
  .langs button { padding: 4px 7px; font-size: .72rem; white-space: nowrap; }
  .hero { padding-top: 34px; }
  .auth { margin-top: 18px; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
