/* =============================================================
   فزعة تيك — نظام الدخول (النسخة الداكنة/التقنية)
   لوحة الألوان:
     --bg        : #070C16   خلفية داكنة جداً
     --panel     : #0D1526   خلفية اللوحات
     --card      : #121B30   خلفية البطاقات والحقول
     --card-brd  : #1E2C47   حدود خفيفة
     --neon      : #8CE64B   أخضر نيون (العنصر الأساسي)
     --neon-dim  : #4E9A2F
     --text      : #EAF2E9
     --text-dim  : #93A0B5
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@500;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --bg: #070C16;
  --panel: #0A1120;
  --card: #121B30;
  --card-soft: #0E1526;
  --card-brd: #1E2C47;
  --neon: #8CE64B;
  --neon-strong: #A6F566;
  --neon-dim: #4E9A2F;
  --text: #EAF2E9;
  --text-dim: #93A0B5;
  --danger: #E5636B;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  background: var(--bg);
  color: var(--text);
}

body { display: flex; min-height: 100vh; }

.screen {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* ---------- زر اللغة العائم ---------- */
.lang-switch {
  position: absolute;
  top: 24px;
  left: 32px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--card-brd);
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
}
.lang-switch svg { width: 16px; height: 16px; opacity: .7; }

/* ---------- اللوحة اليمنى: الهوية والمزايا ---------- */
.brand-panel {
  flex: 1.15;
  position: relative;
  background: var(--panel);
  overflow: hidden;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
}

.brand-panel::before {
  /* شبكة نقطية تقنية خفيفة */
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(140,230,75,.16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 70% at 20% 20%, black 40%, transparent 90%);
  pointer-events: none;
}

.brand-panel::after {
  /* توهج أخضر أسفل يسار */
  content: '';
  position: absolute;
  bottom: -180px;
  left: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140,230,75,.35), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.brand-logo {
  z-index: 1;
  max-width: 240px;
  margin-bottom: 34px;
}
.brand-logo img { width: 100%; display: block; }

.brand-hero {
  z-index: 1;
}

.brand-hero h1 {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 34px;
  margin: 0 0 10px;
}

.brand-hero p {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 30px;
}

.feature-list {
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(18,27,48,.7);
  border: 1px solid var(--card-brd);
  border-radius: 12px;
  padding: 14px 18px;
  backdrop-filter: blur(6px);
}

.feature-row .txt strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 3px;
}
.feature-row .txt span {
  font-size: 12.5px;
  color: var(--text-dim);
}

.feature-row .icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(140,230,75,.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-row .icon svg { width: 19px; height: 19px; stroke: var(--neon); }

.badge-row {
  z-index: 1;
  display: flex;
  gap: 22px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.badge-row .badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.badge-row .badge svg { width: 15px; height: 15px; stroke: var(--neon); }

/* ---------- اللوحة اليسرى: بطاقة تسجيل الدخول ---------- */
.form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-soft);
  border: 1px solid var(--card-brd);
  border-radius: 18px;
  padding: 38px 34px 30px;
  box-shadow: 0 30px 70px rgba(0,0,0,.45);
}

.auth-card .card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.auth-card .card-logo img { height: 52px; }

.auth-card h2 {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 21px;
  text-align: center;
  margin: 0 0 6px;
}

.auth-card .sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 26px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap svg.icon-lead {
  position: absolute;
  right: 14px;
  width: 17px;
  height: 17px;
  stroke: var(--text-dim);
  pointer-events: none;
}

.field input {
  width: 100%;
  padding: 12px 42px 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-brd);
  background: var(--card);
  color: var(--text);
  font-size: 14.5px;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  outline: none;
  transition: border-color .15s ease;
}

.field input#customerId {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .5px;
}

.field input::placeholder { color: #5B6980; }

.field input:focus {
  border-color: var(--neon-dim);
  box-shadow: 0 0 0 3px rgba(140,230,75,.12);
}

.toggle-pass {
  position: absolute;
  left: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
}
.toggle-pass svg { width: 17px; height: 17px; stroke: var(--text-dim); }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
  font-size: 13px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
}
.remember-me input {
  width: 15px;
  height: 15px;
  accent-color: var(--neon);
}

.row-between a {
  color: var(--neon);
  text-decoration: none;
}
.row-between a:hover { text-decoration: underline; }

.submit-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--neon);
  color: #06210A;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
}
.submit-btn:hover { background: var(--neon-strong); }
.submit-btn:active { transform: scale(.98); }
.submit-btn[disabled] { background: #35452F; color: #7C8A76; cursor: not-allowed; }

.card-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
}
.card-footer a { color: var(--neon); text-decoration: none; }
.card-footer a:hover { text-decoration: underline; }

.version-tag {
  text-align: center;
  margin-top: 22px;
  font-size: 11.5px;
  color: #4A5871;
}

.error-box {
  display: none;
  background: rgba(229,99,107,.1);
  border: 1px solid rgba(229,99,107,.3);
  color: var(--danger);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  line-height: 1.6;
}
.error-box.show { display: block; }

/* ---------- خطوة كود التحقق ---------- */
#verifyStep { display: none; }

.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0 8px;
  direction: ltr;
}
.otp-inputs input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--card-brd);
  background: var(--card);
  color: var(--text);
}
.otp-inputs input:focus {
  outline: none;
  border-color: var(--neon-dim);
  box-shadow: 0 0 0 3px rgba(140,230,75,.12);
}

.verify-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 4px;
}
.verify-note strong { color: var(--text); }

.resend-row {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}
.resend-row button {
  background: none;
  border: none;
  color: var(--neon);
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}
.resend-row button[disabled] { color: #4A5871; cursor: default; }

.back-link {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- استجابة للجوال ---------- */
@media (max-width: 900px) {
  .screen { flex-direction: column; }
  .brand-panel { padding: 34px 24px; }
  .feature-list { display: none; }
  .brand-hero h1 { font-size: 24px; }
  .form-panel { padding: 24px 16px 48px; }
  .lang-switch { top: 16px; left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
