/* ── Fonts ────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&family=Space+Mono:wght@400;700&display=swap');

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --green:          #00e676;
  --green-glow:     rgba(0, 230, 118, 0.18);
  --green-border:   rgba(0, 230, 118, 0.14);
  --green-border-h: rgba(0, 230, 118, 0.38);
  --bg:             #060606;
  --surface:        #0d0d0d;
  --surface-2:      #161616;
  --text:           #efefef;
  --text-muted:     rgba(239, 239, 239, 0.44);
  --red:            rgba(255, 65, 65, 0.1);
  --red-border:     rgba(255, 65, 65, 0.22);
  --red-text:       #ff7878;
  --r:              10px;
  --r-sm:           7px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
}

/* ── Dot grid ────────────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(0,230,118,0.065) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}

/* ── Animated glow blobs ─────────────────────────────────────────────────── */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bg-glow::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(ellipse, rgba(0,230,118,0.07) 0%, transparent 65%);
  animation: float1 12s ease-in-out infinite;
}
.bg-glow::after {
  content: '';
  position: absolute;
  bottom: -20%; left: -10%;
  width: 55%; height: 55%;
  background: radial-gradient(ellipse, rgba(0,180,80,0.05) 0%, transparent 65%);
  animation: float2 15s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-4%,5%)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(4%,-5%)} }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.brand {
  position: fixed;
  top: 0; right: 0; left: 0;
  padding: 11px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: ltr;
  gap: 14px;
  z-index: 100;
  background: rgba(6, 6, 6, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--green-border);
  box-shadow: 0 0 40px rgba(0, 230, 118, 0.05);
}

.brand-name {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.5px;
  white-space: nowrap;
  line-height: 1;
  direction: ltr;
  unicode-bidi: isolate;
  text-shadow: 0 0 22px rgba(0, 230, 118, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  -webkit-text-stroke: 0;
}

.brand-name::before { display: none; }

/* ── Page container ──────────────────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: rgba(13, 13, 13, 0.92);
  border: 1px solid var(--green-border);
  border-radius: 16px;
  backdrop-filter: blur(24px);
  padding: 40px;
  position: relative;
  overflow: hidden;
}
/* top edge highlight */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,230,118,0.32), transparent);
  pointer-events: none;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--green);
  color: #040404;
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  box-shadow: 0 4px 22px rgba(0, 230, 118, 0.28);
  letter-spacing: 0.3px;
}
.btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,230,118,0.42); background: #2effa0; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--green);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1.5px solid var(--green-border-h);
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
}
.btn-outline:hover { background: rgba(0,230,118,0.07); border-color: var(--green); box-shadow: 0 0 18px rgba(0,230,118,0.15); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,65,65,0.07);
  color: #ff7070;
  border: 1px solid rgba(255,65,65,0.22);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.18s;
}
.btn-danger:hover { background: rgba(255,65,65,0.14); }

/* ── Form elements ───────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group select {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.07);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  direction: ltr;
  text-align: left;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,230,118,0.1);
}
.form-group input::placeholder { color: rgba(239,239,239,0.18); }
.form-group select option { background: #111; color: var(--text); }

/* ── Step indicator ──────────────────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
  direction: ltr;
}
.step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.77rem;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.3px;
}
.step.active { color: var(--green); }
.step.done   { color: rgba(0,230,118,0.5); }
.step-num {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-family: 'Space Mono', monospace;
  flex-shrink: 0;
}
.step.active .step-num {
  background: var(--green);
  border-color: transparent;
  color: #040404;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(0,230,118,0.45);
}
.step.done .step-num {
  background: rgba(0,230,118,0.1);
  border-color: rgba(0,230,118,0.28);
  color: var(--green);
}
.step-line {
  width: 36px; height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 0 8px;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-error   { background: var(--red); border: 1px solid var(--red-border); color: var(--red-text); }
.alert-success { background: rgba(0,230,118,0.07); border: 1px solid rgba(0,230,118,0.2); color: var(--green); }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(4,4,4,0.3);
  border-top-color: #040404;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Section headings ────────────────────────────────────────────────────── */
.section-title {
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.4px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
  line-height: 1.9;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 24px 0;
}

/* ── Home button ─────────────────────────────────────────────────────────── */
.home-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--green-border);
  border-radius: var(--r-sm);
  padding: 5px 12px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(0,230,118,0.65);
  text-decoration: none;
  transition: all 0.18s;
  white-space: nowrap;
}
.home-btn:hover {
  background: rgba(0,230,118,0.07);
  border-color: rgba(0,230,118,0.38);
  color: var(--green);
}
.home-btn svg { width: 13px; height: 13px; flex-shrink: 0; stroke: currentColor; }

/* ── Icon button (admin topbar) ──────────────────────────────────────────── */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--green-border);
  color: rgba(0,230,118,0.65);
  font-size: 1.2rem;
  cursor: pointer;
  background: none;
  transition: all 0.18s;
  text-decoration: none;
}
.icon-btn:hover { background: rgba(0,230,118,0.08); border-color: rgba(0,230,118,0.38); color: var(--green); }

/* ── Back step button ────────────────────────────────────────────────────── */
.back-step-btn {
  display: flex;
  width: fit-content;
  margin-right: auto;
  direction: ltr;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(240,237,232,0.35);
  text-decoration: none;
  padding: 0;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.back-step-btn:hover { color: rgba(240,237,232,0.75); }
.back-step-btn svg { flex-shrink: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .card { padding: 22px 16px; border-radius: 12px; }
  .section-title { font-size: 1.4rem; }
  .btn-primary { padding: 13px 22px; font-size: 0.97rem; }
  .brand { padding: 11px 16px; }
  .step-line { width: 16px; margin: 0 4px; }
  .step { font-size: 0.7rem; }
}
