:root {
  --bg: #08090d;
  --bg-2: #0e1017;
  --surface: rgba(22, 24, 34, 0.72);
  --surface-solid: #161822;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f5f6fa;
  --muted: #a5a9bb;
  --accent: #ff3b5c;
  --accent-2: #7c5cff;
  --cyan: #35d0d6;
  --ok: #4ec07a;
  --radius: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -10%, rgba(255, 59, 92, 0.18), transparent 38%),
    radial-gradient(circle at 88% 8%, rgba(124, 92, 255, 0.18), transparent 36%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Noto Sans Arabic", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
}
body[dir="rtl"] { font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(8, 9, 13, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand {
  font-size: 24px; font-weight: 900; letter-spacing: 2px; white-space: nowrap;
}
.brand span { color: var(--accent); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-weight: 900; font-size: 15px;
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.35);
}
.nav-links { display: flex; gap: 22px; margin-inline-start: auto; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 600; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 800; font-size: 14px; cursor: pointer; transition: .2s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #ff6b7f); color: #fff; box-shadow: 0 10px 30px rgba(255, 59, 92, 0.3); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.05); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-small { padding: 8px 12px; font-size: 12px; border-radius: 9px; }
.lang-btn { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 9px; padding: 7px 11px; cursor: pointer; font-size: 12px; font-weight: 800; }

.hero { padding: 90px 0 70px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--cyan); font-weight: 800; letter-spacing: 1.5px; font-size: 13px; text-transform: uppercase; }
h1 { font-size: clamp(38px, 5.2vw, 68px); line-height: 1.08; margin: 14px 0 20px; letter-spacing: -1.5px; }
h1 .grad { background: linear-gradient(100deg, var(--accent), var(--accent-2), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 18px; max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.badge { padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 700; }
.hero-visual { position: relative; }
.phone {
  position: relative; margin: 0 auto; width: min(320px, 82%); aspect-ratio: 9 / 18;
  border-radius: 42px; padding: 10px; background: linear-gradient(150deg, #2b2e3b, #0b0c11);
  border: 1px solid rgba(255,255,255,.13); box-shadow: var(--shadow); transform: rotate(3deg);
}
.phone::before { content: ""; position: absolute; inset: 14px; border-radius: 32px; background: linear-gradient(180deg, #171925, #0b0d14); }
.phone-inner { position: relative; z-index: 1; height: 100%; border-radius: 32px; padding: 32px 18px; display: flex; flex-direction: column; gap: 14px; }
.phone-logo { text-align: center; font-weight: 900; font-size: 22px; letter-spacing: 2px; }
.phone-logo span { color: var(--accent); }
.poster { height: 128px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,59,92,.55), rgba(124,92,255,.35)), #1c1f2c; position: relative; overflow: hidden; }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.65), transparent); }
.phone-line { height: 10px; border-radius: 8px; background: rgba(255,255,255,.1); }
.phone-line.short { width: 62%; }
.phone-row { display: flex; gap: 8px; }
.tile { flex: 1; aspect-ratio: 2/3; border-radius: 10px; background: linear-gradient(160deg, #2a2d3d, #141621); }

section { padding: 72px 0; }
.section-head { max-width: 700px; margin-bottom: 36px; }
h2 { font-size: clamp(28px, 3.4vw, 42px); margin: 0 0 12px; letter-spacing: -.6px; }
.section-head p { color: var(--muted); margin: 0; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; backdrop-filter: blur(12px); transition: .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255,59,92,.35); }
.icon-box {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255,59,92,.12); color: var(--accent); font-size: 22px; margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.stat { font-size: 32px; font-weight: 900; margin-bottom: 4px; }
.stat-label { color: var(--muted); font-size: 13px; }

.banner {
  border-radius: 26px; padding: 42px; border: 1px solid rgba(255,59,92,.25);
  background: linear-gradient(120deg, rgba(255,59,92,.14), rgba(124,92,255,.12));
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.banner h2 { margin-bottom: 8px; }
.banner p { color: var(--muted); margin: 0; }

.notice { padding: 14px 18px; border-radius: 12px; background: rgba(53,208,214,.08); border: 1px solid rgba(53,208,214,.25); color: #bfeff1; font-size: 14px; margin: 18px 0; }
.notice.warn { background: rgba(255,180,70,.08); border-color: rgba(255,180,70,.3); color: #ffd9a0; }

footer { border-top: 1px solid var(--border); padding: 40px 0 26px; color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }

/* Forms / admin */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: min(440px, 100%); background: var(--surface-solid); border: 1px solid var(--border); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
input, textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border);
  background: #0d0f16; color: var(--text); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.msg { min-height: 22px; margin-top: 12px; font-size: 13px; }
.msg.err { color: #ff7676; }
.msg.ok { color: var(--ok); }

.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 72px); }
.sidebar { border-inline-end: 1px solid var(--border); padding: 22px 14px; background: rgba(10,11,16,.55); }
.sidebar h4 { margin: 0 0 14px; font-size: 12px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.tab-btn {
  width: 100%; text-align: start; padding: 11px 14px; border-radius: 10px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; font-size: 14px; margin-bottom: 4px;
}
.tab-btn:hover, .tab-btn.active { background: rgba(255,59,92,.12); color: var(--text); }
.admin-main { padding: 28px; min-width: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-head h2 { margin: 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
th, td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; background: rgba(255,255,255,.02); }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.07); }
.pill.ok { background: rgba(78,192,122,.15); color: #8ee0aa; }
.pill.off { background: rgba(255,255,255,.07); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.screen { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px; }
.screen img { width: 100%; height: auto; display: block; border-radius: 10px; background: #000; }
.screen figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 54px; }
  .hero-visual { order: -1; }
  .grid-3, .grid-4, .screens { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { display: flex; gap: 6px; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--border); }
  .tab-btn { width: auto; white-space: nowrap; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .form-grid, .screens { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .banner { padding: 26px; }
}
