/* WaveTV — design system */
:root {
  --bg: #0B0F1A;
  --bg-2: #0f1424;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-solid: #121829;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #E7EAF3;
  --text-2: #A3ABC2;
  --text-3: #6B7390;
  --violet: #7C3AED;
  --cyan: #06B6D4;
  --grad: linear-gradient(135deg, #7C3AED 0%, #06B6D4 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 58, 237, .22), rgba(6, 182, 212, .14));
  --green: #22C55E;
  --amber: #F59E0B;
  --red: #EF4444;
  --blue: #60A5FA;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, .6);
  --shadow-glow: 0 10px 40px -12px rgba(124, 58, 237, .55);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 260px;
  color-scheme: dark;
}
html[lang="ar"] { --font: 'Cairo', 'Inter', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(124, 58, 237, .18), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(6, 182, 212, .12), transparent 60%),
    radial-gradient(700px 600px at 50% 120%, rgba(124, 58, 237, .10), transparent 60%);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(124, 58, 237, .45); }
.mono, code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .02em; }
[dir="rtl"] .mono, [dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Icons ---------- */
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-lg { width: 22px; height: 22px; }
.ic-xl { width: 28px; height: 28px; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: var(--shadow-glow); }
.logo-mark svg { width: 18px; height: 18px; fill: #fff; stroke: none; }
html[dir="rtl"] .logo-mark svg { transform: scaleX(-1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .25s, opacity .2s;
  white-space: nowrap; user-select: none;
}
.btn:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .24); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible, .input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.1); box-shadow: 0 14px 44px -10px rgba(124, 58, 237, .75); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .35); color: #FCA5A5; }
.btn-danger:hover { background: rgba(239, 68, 68, .22); border-color: rgba(239, 68, 68, .5); }
.btn-success { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .35); color: #86EFAC; }
.btn-success:hover { background: rgba(34, 197, 94, .2); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.btn-block { width: 100%; }
.btn .spinner { width: 16px; height: 16px; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, select.input, textarea.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: rgba(10, 14, 26, .6); color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
select.input { appearance: none; padding-inline-end: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A3ABC2' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 16px; background-position: right 12px center; }
[dir="rtl"] select.input { background-position: left 12px center; }
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: rgba(255, 255, 255, .24); }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124, 58, 237, .18); background: rgba(10, 14, 26, .85); }
.input.lg { height: 54px; font-size: 17px; }
.input-icon { position: relative; }
.input-icon .ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-inline-start: 42px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: rgba(255, 255, 255, .14); position: relative; transition: background .25s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked + .track { background: var(--grad); }
.switch input:checked + .track::after { transform: translateX(18px); }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-18px); }

.seg { display: inline-flex; padding: 4px; gap: 4px; background: rgba(10, 14, 26, .6); border: 1px solid var(--border); border-radius: 12px; }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; transition: background .2s, color .2s; }
.seg button.on { background: var(--grad); color: #fff; }
.seg button:not(.on):hover { color: var(--text); background: var(--surface-2); }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025));
  border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.card-body { padding: 22px; }
.glow-border { position: relative; }
.glow-border::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: .8; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-active { color: #4ADE80; background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .25); }
.b-trial { color: #67E8F9; background: rgba(6, 182, 212, .12); border-color: rgba(6, 182, 212, .25); }
.b-expired { color: #FCD34D; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .25); }
.b-blocked { color: #FCA5A5; background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .28); }
.b-violet { color: #C4B5FD; background: rgba(124, 58, 237, .16); border-color: rgba(124, 58, 237, .3); }
.b-gray { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 1000; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(18, 24, 41, .92); border: 1px solid var(--border-strong); box-shadow: var(--shadow); backdrop-filter: blur(14px); animation: toastIn .35s var(--ease); font-size: 14px; }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast .ic { margin-top: 1px; }
.toast.success .ic { color: var(--green); }
.toast.error .ic { color: var(--red); }
.toast.info .ic { color: var(--cyan); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- Modal & Drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 500; background: rgba(3, 6, 14, .6); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.overlay.open { opacity: 1; }
.modal { position: fixed; z-index: 501; top: 50%; left: 50%; width: min(520px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow: auto; transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform .3s var(--ease), opacity .25s; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.modal.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 22px 22px; flex-wrap: wrap; }
.drawer { position: fixed; z-index: 501; top: 0; bottom: 0; inset-inline-end: 0; width: min(560px, 100vw); background: var(--surface-solid); border-inline-start: 1px solid var(--border-strong); box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .7); transform: translateX(100%); transition: transform .35s var(--ease); display: flex; flex-direction: column; }
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.open { transform: translateX(0) !important; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; font-size: 17px; }
.drawer-body { flex: 1; overflow: auto; padding: 22px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: start; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
[lang="ar"] .tbl th { letter-spacing: 0; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, .045); vertical-align: middle; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .03); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .actions { text-align: end; white-space: nowrap; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--text-3); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); flex-wrap: wrap; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--border); color: #C4B5FD; }
.empty h4 { margin: 0 0 6px; color: var(--text); font-size: 16px; }
.empty p { margin: 0 auto; max-width: 340px; font-size: 14px; }

/* ---------- Lang switch ---------- */
.lang { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(10, 14, 26, .6); border: 1px solid var(--border); }
.lang button { border: 0; background: transparent; color: var(--text-2); font-size: 12px; font-weight: 700; height: 28px; min-width: 36px; padding: 0 8px; border-radius: 7px; cursor: pointer; transition: all .2s; }
.lang button.on { background: var(--surface-2); color: #fff; box-shadow: inset 0 0 0 1px var(--border-strong); }

/* ---------- Public site ---------- */
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.nav { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); background: rgba(11, 15, 26, .7); border-bottom: 1px solid var(--border); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 14px; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.on { color: var(--text); background: var(--surface-2); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; }
@media (max-width: 880px) {
  .nav-links { position: fixed; top: 70px; inset-inline: 0; flex-direction: column; align-items: stretch; padding: 14px 20px 20px; background: rgba(11, 15, 26, .97); border-bottom: 1px solid var(--border); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all .25s var(--ease); }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; }
  .nav-burger { display: inline-flex; }
  .nav-right .btn-hide-sm { display: none; }
}

.hero { padding: 90px 0 70px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); margin-bottom: 22px; }
[dir="rtl"] .eyebrow { padding: 6px 6px 6px 12px; }
.eyebrow b { padding: 2px 10px; border-radius: 99px; background: var(--grad); color: #fff; font-size: 12px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.05; margin: 0 0 20px; letter-spacing: -.035em; font-weight: 800; }
[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.3; }
.hero p.lead { font-size: 18px; color: var(--text-2); max-width: 560px; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; margin-top: 30px; color: var(--text-3); font-size: 13px; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .ic { color: var(--cyan); width: 16px; height: 16px; }

.tv { position: relative; aspect-ratio: 16/10; border-radius: 22px; padding: 10px; background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03)); border: 1px solid var(--border-strong); box-shadow: 0 40px 100px -30px rgba(124, 58, 237, .5), 0 0 0 1px rgba(0, 0, 0, .3); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.tv-screen { position: relative; height: 100%; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 120% at 0% 0%, #1b1240 0%, #0c1222 55%, #06202a 100%); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-align: center; padding: 20px; }
.tv-screen .tv-label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); }
.tv-screen .tv-mac { font-size: clamp(18px, 2.6vw, 28px); font-weight: 800; }
.tv-screen .tv-key { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; letter-spacing: .3em; }
.tv-screen .tv-row { display: flex; gap: 30px; }
.tv-glow { position: absolute; width: 60%; height: 60%; border-radius: 50%; background: var(--grad); filter: blur(80px); opacity: .25; }
.tv-stand { width: 30%; height: 10px; margin: 14px auto 0; border-radius: 0 0 10px 10px; background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .02)); }

.section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .kicker { color: var(--cyan); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
[lang="ar"] .section-head .kicker { letter-spacing: 0; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); margin: 10px 0 12px; letter-spacing: -.025em; line-height: 1.15; }
[lang="ar"] .section-head h2 { letter-spacing: 0; line-height: 1.4; }
.section-head p { color: var(--text-2); margin: 0; font-size: 17px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 26px; transition: transform .3s var(--ease), border-color .3s; }
.feature:hover { transform: translateY(-4px); border-color: rgba(124, 58, 237, .45); }
.feature .f-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid rgba(124, 58, 237, .3); color: #C4B5FD; margin-bottom: 16px; }
.feature h3 { margin: 0 0 8px; font-size: 17px; }
.feature p { margin: 0; color: var(--text-2); font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 28px; position: relative; }
.step-n { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: 18px; margin-bottom: 16px; box-shadow: var(--shadow-glow); }
.step h3 { margin: 0 0 8px; font-size: 18px; }
.step p { margin: 0; color: var(--text-2); font-size: 14px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { padding: 30px; display: flex; flex-direction: column; }
.plan.featured { background: linear-gradient(180deg, rgba(124, 58, 237, .16), rgba(6, 182, 212, .06)); }
.plan h3 { margin: 0; font-size: 15px; color: var(--text-2); font-weight: 600; }
.plan .price { font-size: 34px; font-weight: 800; margin: 10px 0 6px; letter-spacing: -.02em; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: center; color: var(--text-2); font-size: 14px; }
.plan li .ic { color: var(--green); width: 16px; height: 16px; }
.plan .tag { position: absolute; top: 18px; inset-inline-end: 18px; }

.cta-band { padding: 46px; display: flex; align-items: center; justify-content: space-between; gap: 30px; background: var(--grad-soft); flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.02em; }
.cta-band p { margin: 0; color: var(--text-2); }

.footer { padding: 40px 0; border-top: 1px solid var(--border); margin-top: 40px; color: var(--text-3); font-size: 13px; }
.footer-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

@media (max-width: 960px) {
  .hero { padding: 50px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .features, .steps, .plans { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .cta-band { padding: 28px; }
}
@media (min-width: 641px) and (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }

/* Centered auth pages */
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(440px, 100%); padding: 34px; }
.auth-card h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.auth-card .sub { margin: 0 0 26px; color: var(--text-2); }
.auth-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; margin-bottom: 20px; box-shadow: var(--shadow-glow); }
.auth-icon .ic { color: #fff; }
.form-error { display: none; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .3); color: #FCA5A5; font-size: 14px; margin-bottom: 14px; }
.form-error.show { display: flex; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Manage page */
.page { padding: 40px 0 60px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.dev-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; overflow: hidden; }
.dev-hero > div { padding: 20px 22px; border-inline-end: 1px solid var(--border); }
.dev-hero > div:last-child { border-inline-end: 0; }
.dev-hero .k { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 6px; }
[lang="ar"] .dev-hero .k { letter-spacing: 0; }
.dev-hero .v { font-size: 17px; font-weight: 700; }
@media (max-width: 800px) { .dev-hero { grid-template-columns: 1fr 1fr; } .dev-hero > div:nth-child(2) { border-inline-end: 0; } .dev-hero > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); } }

.pl-list { display: grid; gap: 12px; }
.pl-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--border); transition: border-color .2s, background .2s, transform .2s var(--ease); animation: rise .35s var(--ease) both; }
.pl-item:hover { border-color: rgba(124, 58, 237, .4); background: rgba(124, 58, 237, .05); }
.pl-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--grad-soft); color: #C4B5FD; border: 1px solid rgba(124, 58, 237, .25); }
.pl-ic.x { color: #67E8F9; border-color: rgba(6, 182, 212, .3); }
.pl-main { flex: 1; min-width: 0; }
.pl-name { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pl-url { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: start; }
[dir="rtl"] .pl-url { text-align: right; }
.pl-actions { display: flex; gap: 6px; flex: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Dashboard layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px; border-inline-end: 1px solid var(--border); background: rgba(9, 12, 22, .75); backdrop-filter: blur(20px); z-index: 200; }
.sidebar .logo { padding: 6px 10px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); padding: 14px 12px 6px; }
[lang="ar"] .side-label { letter-spacing: 0; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: 14px; transition: background .2s, color .2s; position: relative; cursor: pointer; border: 0; background: transparent; width: 100%; text-align: start; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.on { background: var(--grad-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .35); }
.side-link.on::before { content: ''; position: absolute; inset-inline-start: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--grad); }
.side-link.on .ic { color: #C4B5FD; }
.side-foot { border-top: 1px solid var(--border); padding-top: 14px; display: grid; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; color: #fff; }
.user-chip .n { font-weight: 700; font-size: 14px; line-height: 1.2; }
.user-chip .r { font-size: 12px; color: var(--text-3); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 68px; padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(11, 15, 26, .72); backdrop-filter: blur(16px); }
.topbar h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.topbar .burger { display: none; }
.content { padding: 28px; flex: 1; animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.view { display: none; }
.view.on { display: block; animation: fadeIn .35s var(--ease); }
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: none !important; box-shadow: 0 0 80px rgba(0, 0, 0, .7); }
  .topbar .burger { display: inline-flex; }
  .content { padding: 18px; }
  .topbar { padding: 0 16px; }
}
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 150; display: none; }
.scrim.on { display: block; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { padding: 18px 20px; position: relative; overflow: hidden; transition: transform .25s var(--ease), border-color .25s; }
.stat:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.stat .s-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat .s-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.stat .s-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); }
.stat .s-val { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat::after { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; inset-inline-end: -40px; bottom: -60px; background: var(--c, var(--violet)); filter: blur(50px); opacity: .18; }
.s-violet { --c: #7C3AED; } .s-violet .s-ic { color: #C4B5FD; background: rgba(124, 58, 237, .16); }
.s-green { --c: #22C55E; } .s-green .s-ic { color: #4ADE80; background: rgba(34, 197, 94, .14); }
.s-cyan { --c: #06B6D4; } .s-cyan .s-ic { color: #67E8F9; background: rgba(6, 182, 212, .14); }
.s-amber { --c: #F59E0B; } .s-amber .s-ic { color: #FCD34D; background: rgba(245, 158, 11, .14); }
.s-blue { --c: #3B82F6; } .s-blue .s-ic { color: #93C5FD; background: rgba(59, 130, 246, .14); }
.s-pink { --c: #EC4899; } .s-pink .s-ic { color: #F9A8D4; background: rgba(236, 72, 153, .14); }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
@media (max-width: 1200px) { .dash-grid { grid-template-columns: 1fr; } }

.chart { width: 100%; height: 260px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.chart .axis-label { fill: var(--text-3); font-size: 11px; }
.chart .dot { fill: #fff; stroke: var(--violet); stroke-width: 2; opacity: 0; transition: opacity .15s; }
.chart .dot.on { opacity: 1; }
.chart-tip { position: absolute; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: rgba(18, 24, 41, .95); border: 1px solid var(--border-strong); font-size: 12px; white-space: nowrap; transform: translate(-50%, -115%); opacity: 0; transition: opacity .15s; box-shadow: var(--shadow); }
.chart-tip.on { opacity: 1; }
.chart-tip b { font-size: 15px; display: block; }
.chart-line { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input-icon { flex: 1; min-width: 200px; max-width: 360px; }

.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; align-items: center; padding: 12px 22px; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.feed-item:last-child { border-bottom: 0; }
.feed-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); flex: none; color: #C4B5FD; }
.feed-main { flex: 1; min-width: 0; font-size: 14px; }
.feed-time { font-size: 12px; color: var(--text-3); white-space: nowrap; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.kv > div { background: var(--surface-solid); padding: 12px 14px; }
.kv .k { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.kv .v { font-weight: 600; font-size: 14px; word-break: break-word; }
.section-t { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin: 26px 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
[lang="ar"] .section-t { letter-spacing: 0; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-key { font-size: 28px; font-weight: 800; letter-spacing: .2em; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .settings-grid { grid-template-columns: 1fr; } }

.credit-hero { padding: 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg, rgba(124, 58, 237, .25), rgba(6, 182, 212, .12)); flex-wrap: wrap; }
.credit-hero .big { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.plan-opt { position: relative; padding: 16px; border-radius: 14px; border: 1px solid var(--border-strong); background: rgba(10, 14, 26, .5); cursor: pointer; transition: all .2s; }
.plan-opt:hover { border-color: rgba(255, 255, 255, .3); }
.plan-opt input { position: absolute; opacity: 0; }
.plan-opt.on { border-color: var(--violet); background: rgba(124, 58, 237, .12); box-shadow: 0 0 0 4px rgba(124, 58, 237, .15); }
.plan-opt .po-name { font-weight: 700; }
.plan-opt .po-cost { font-size: 13px; color: var(--text-2); }

.lookup { padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px dashed var(--border-strong); margin-bottom: 16px; font-size: 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.skeleton { background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.dropzone { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 24px; text-align: center; color: var(--text-2); cursor: pointer; transition: all .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--violet); background: rgba(124, 58, 237, .07); }
.progress { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 12px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }

@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .card-head, .card-body { padding: 16px; }
  .tbl th, .tbl td { padding: 11px 12px; }
  .action-grid { grid-template-columns: 1fr; }
  .plan-pick { grid-template-columns: 1fr; }
  .page-title h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* inline icon alignment */
.card-head h3, .plan-opt .po-name { display: flex; align-items: center; gap: 8px; }
.dropzone > .ic { margin: 0 auto; }
@media (max-width: 640px) { .stat .s-val { font-size: 26px; } .stat { padding: 16px; } }

/* Multi-plan pricing grid */
.plans { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.plans .plan { padding: 24px 22px; }
.plans .plan .price { font-size: 30px; }
.plans .plan ul { margin: 16px 0 22px; }
.plan-trial { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; flex-wrap: wrap; }
.plan-trial .f-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid rgba(124, 58, 237, .3); color: #C4B5FD; flex: none; }
@media (max-width: 960px) { .plans { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }
/* plan picker (admin/reseller) */
.plan-pick { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.plan-opt .po-cost { margin-top: 2px; }
.plan-opt.best::after { content: '★'; position: absolute; top: 10px; inset-inline-end: 12px; color: #C4B5FD; font-size: 12px; }
/* bulk bar + checkboxes */
.tbl .chk { width: 40px; padding-inline-end: 0; }
.cb { width: 18px; height: 18px; accent-color: var(--violet); cursor: pointer; vertical-align: middle; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, rgba(124, 58, 237, .14), rgba(6, 182, 212, .06)); animation: fadeIn .25s var(--ease); }
.bulk-bar .count { font-weight: 700; margin-inline-end: auto; }
.plan-bars { display: grid; gap: 12px; padding: 18px 22px; }
.plan-bar .pb-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.plan-bar .pb-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.plan-bar .pb-track > i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .8s var(--ease); }
.price-tbl td { padding: 8px 10px; }
.price-tbl .input { height: 38px; }
.b-pending { color: #C4B5FD; background: rgba(124, 58, 237, .16); border-color: rgba(124, 58, 237, .38); }
.b-pending::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.nav-badge { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; box-shadow: 0 4px 14px -4px rgba(124, 58, 237, .8); }
.s-pending { --c: #A855F7; } .s-pending .s-ic { color: #D8B4FE; background: rgba(168, 85, 247, .16); }
.stat.attention { border-color: rgba(168, 85, 247, .5); box-shadow: 0 0 0 1px rgba(168, 85, 247, .25), var(--shadow); }
.free-hero { grid-column: 1 / -1; padding: 40px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; background: linear-gradient(135deg, rgba(124, 58, 237, .2), rgba(6, 182, 212, .1)); }
.free-hero h3 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 10px; letter-spacing: -.02em; line-height: 1.15; }
[lang="ar"] .free-hero h3 { letter-spacing: 0; line-height: 1.4; }
.free-hero .free-price { font-size: 56px; font-weight: 800; line-height: 1; }
.free-steps { display: grid; gap: 12px; margin: 20px 0 24px; padding: 0; list-style: none; }
.free-steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.free-steps .n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
@media (max-width: 860px) { .free-hero { grid-template-columns: 1fr; padding: 26px; } }
.btn-wa { background: #25D366; border-color: transparent; color: #062b14; box-shadow: 0 10px 30px -12px rgba(37, 211, 102, .7); }
.btn-wa:hover { background: #2fe072; border-color: transparent; }
.row-act { opacity: .0; transition: opacity .15s; }
.tbl tbody tr:hover .row-act, .tbl tbody tr .row-act.show { opacity: 1; }
@media (hover: none) { .row-act { opacity: 1; } }
.plans { grid-template-columns: repeat(auto-fit, minmax(200px, 280px)); justify-content: center; }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }
.free-hero .logo-mark svg { width: 44px; height: 44px; fill: none; stroke: #fff; stroke-width: 1.8; }

/* ---------------- FAQ ---------------- */
.faq-wrap { max-width: 880px; }
.faq-search { position: relative; margin: 0 auto 18px; }
.faq-search > svg { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-3); pointer-events: none; }
.faq-search .input { height: 56px; padding-inline-start: 48px; font-size: 16px; border-radius: 16px; }
.faq-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 34px; }
.faq-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 14px; transition: all .2s var(--ease); }
.faq-chip svg { width: 16px; height: 16px; }
.faq-chip:hover { color: var(--text); border-color: transparent; background: var(--grad-soft); }
.faq-cat { margin-bottom: 34px; scroll-margin-top: 90px; }
.faq-cat-h { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 0 0 14px; }
.faq-cat-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; box-shadow: var(--shadow-glow); }
.faq-cat-ic svg { width: 19px; height: 19px; }
.faq-item { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); margin-bottom: 10px; transition: border-color .2s var(--ease), background .2s var(--ease); }
.faq-item:hover { border-color: var(--border-strong); }
.faq-item[open] { background: var(--surface-2); border-color: rgba(124, 58, 237, .45); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 600; font-size: 16px; color: var(--text); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chev { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); transition: transform .25s var(--ease); }
.faq-chev svg { width: 18px; height: 18px; }
.faq-item[open] .faq-chev { transform: rotate(180deg); color: #fff; background: var(--grad); }
.faq-a { padding: 0 20px 20px; color: var(--text-2); line-height: 1.75; font-size: 15px; }
.faq-a a { color: var(--cyan); font-weight: 600; }
.faq-a b { color: var(--text); }
.faq-a code { direction: ltr; unicode-bidi: embed; padding: 2px 8px; border-radius: 6px; background: rgba(6, 182, 212, .12); color: var(--cyan); font-size: 14px; }
@media (max-width: 640px) { .faq-item summary { padding: 15px 16px; font-size: 15px; } .faq-a { padding: 0 16px 16px; } }

/* Show/hide button inside secret inputs */
.input-icon .input-eye { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--text-3); cursor: pointer; }
.input-icon .input-eye:hover, .input-icon .input-eye.on { color: var(--text); background: var(--surface-2); }
.input-icon .input-eye svg { width: 18px; height: 18px; }
.input-icon:has(.input-eye) .input { padding-inline-end: 50px; }
.badge svg { width: 12px; height: 12px; vertical-align: -1px; }
