/* ============================================================
   NEW VYRO — Login Page Styles (Standalone)
   الملف: assets/css/login.css
   خاص بصفحة login.php بس — مستقل تمامًا
   ============================================================ */

/* ===== Design Tokens ===== */
:root {
  --black: #111111;
  --lime: #C6F542;
  --lime-dark: #A8D42E;
  --lime-soft: #E8FBA8;
  --gray-dark: #292929;
  --off-white: #F5F5F5;
  --border: #E7E7E7;
  --border-strong: #D4D4D4;
  --text: #111111;
  --text-light: #4A4A4A;
  --text-muted: #737373;
  --success: #16A34A;
  --success-soft: #DCFCE7;
  --danger: #DC2626;
  --danger-soft: #FEE2E2;
  --shadow-md: 0 6px 18px rgba(17,17,17,.08);
  --shadow-lg: 0 16px 40px rgba(17,17,17,.12);
  --r: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --t: 220ms cubic-bezier(.4,0,.2,1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-light);
  background: #F5F5F5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-weight: 800; color: var(--text); line-height: 1.25; }
::selection { background: var(--lime); color: var(--black); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 4px; }

/* ===== Background Decoration ===== */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
}
.bg-blob-1 {
  top: -120px;
  inset-inline-end: -100px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(198,245,66,.55), transparent 70%);
}
.bg-blob-2 {
  bottom: -140px;
  inset-inline-start: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(198,245,66,.35), transparent 70%);
}

/* ===== Topbar ===== */
.auth-topbar {
  position: relative;
  z-index: 5;
  padding: 16px 0;
}
.auth-topbar-inner {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform var(--t);
}
.brand:hover { transform: translateY(-1px); }
.brand-logo {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  flex-shrink: 0;
  transition: transform var(--t);
}
.brand:hover .brand-logo { transform: scale(1.05); }
.brand-mark {
  width: 46px; height: 46px;
  background: var(--black);
  color: var(--lime);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 8px; height: 8px;
  background: var(--lime);
  border-radius: 50%;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--text);
  min-height: 42px;
  transition: all var(--t);
  text-decoration: none;
}
.back-home:hover {
  background: var(--black);
  color: var(--lime);
  border-color: var(--black);
  transform: translateY(-2px);
}
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--black);
  border: 1.5px solid var(--black);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--lime);
  min-height: 42px;
  transition: all var(--t);
  text-decoration: none;
}
.lang-switcher:hover {
  background: var(--lime);
  color: var(--black);
  border-color: var(--lime);
  transform: translateY(-2px);
}

/* ===== Main Wrap ===== */
.auth-wrap {
  position: relative;
  z-index: 5;
  max-width: 1280px;
  margin-inline: auto;
  padding: 0 clamp(16px, 3vw, 28px) clamp(30px, 5vw, 60px);
}
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3.5vw, 38px);
  min-height: clamp(560px, 75vh, 720px);
}

/* ===== Brand Side ===== */
.brand-side {
  background: var(--black);
  color: #fff;
  border-radius: 24px;
  padding: clamp(28px, 4.5vw, 48px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.brand-side::before {
  content: "";
  position: absolute;
  top: -120px;
  inset-inline-end: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(198,245,66,.22), transparent 70%);
  pointer-events: none;
}
.brand-side::after {
  content: "";
  position: absolute;
  bottom: -160px;
  inset-inline-start: -140px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(198,245,66,.14), transparent 70%);
  pointer-events: none;
}
.brand-side-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.brand-side-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-size: .72rem;
  font-weight: 800;
  color: var(--black);
  background: var(--lime);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 22px;
  box-shadow: 0 8px 20px rgba(198,245,66,.45);
}
.brand-side h1 {
  color: #fff;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 14px;
  font-weight: 900;
}
.brand-side-lead {
  font-size: clamp(.86rem, 1.7vw, .96rem);
  line-height: 1.9;
  color: rgba(255,255,255,.72);
  margin-bottom: 26px;
  max-width: 480px;
}
.brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: auto;
}
.brand-feature {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  transition: all var(--t);
}
.brand-feature:hover {
  background: rgba(198,245,66,.06);
  border-color: rgba(198,245,66,.3);
  transform: translateX(-4px);
}
.brand-feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(198,245,66,.14);
  color: var(--lime);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: .9rem;
  flex-shrink: 0;
}
.brand-feature-text strong {
  display: block;
  color: #fff;
  font-size: .88rem;
  margin-bottom: 2px;
  font-weight: 800;
}
.brand-feature-text p {
  font-size: .76rem;
  color: rgba(255,255,255,.6);
  line-height: 1.55;
}

/* ===== Form Side ===== */
.form-side {
  background: #fff;
  border-radius: 24px;
  padding: clamp(24px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

/* ===== Tabs (روابط بين login/register) ===== */
.auth-tabs {
  display: flex;
  background: var(--off-white);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 12px 18px;
  min-height: 46px;
  font-family: 'Cairo', sans-serif;
  font-size: .88rem;
  font-weight: 800;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color var(--t);
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  background: none;
  border: 0;
}
a.auth-tab:hover { color: var(--black); }
.auth-tab.active { color: var(--black); }
span.auth-tab { cursor: default; }
.auth-tab i { font-size: .82rem; }

.auth-tab-indicator {
  position: absolute;
  top: 5px;
  bottom: 5px;
  inset-inline-start: 5px;
  width: calc(50% - 5px);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(17,17,17,.1);
  transition: transform .38s cubic-bezier(.4,0,.2,1);
  z-index: 1;
  pointer-events: none;
}
/* مؤشر التاب لصفحة الدخول — الوضع الافتراضي بدون transform */
[dir="rtl"] .auth-tab-indicator[data-pos="login"] { transform: translateX(0); }
[dir="ltr"] .auth-tab-indicator[data-pos="login"] { transform: translateX(0); }

/* ===== Form Head ===== */
.form-head { margin-bottom: 20px; }
.form-head h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  margin-bottom: 6px;
  font-weight: 900;
}
.form-head p {
  color: var(--text-muted);
  font-size: clamp(.82rem, 1.7vw, .9rem);
}

/* ===== Fields ===== */
.field { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: .8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.field-input {
  width: 100%;
  padding: 14px 46px 14px 18px;
  border: 1.5px solid var(--border);
  background: var(--off-white);
  border-radius: 14px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  transition: all var(--t);
  min-height: 52px;
  font-family: 'Cairo', sans-serif;
}
.field-input::placeholder { color: var(--text-muted); font-weight: 500; }
.field-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--black);
  box-shadow: 0 0 0 4px rgba(198,245,66,.35);
}
.field-input.error {
  border-color: var(--danger);
  background: var(--danger-soft);
}
.field-icon {
  position: absolute;
  inset-inline-start: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: .9rem;
  z-index: 2;
}
.field-input-wrap .field-input { padding-inline-start: 48px; }

.pw-toggle {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: .86rem;
  transition: all var(--t);
  background: none;
  border: 0;
}
.pw-toggle:hover { background: var(--border); color: var(--text); }

/* ===== Checkbox (تفضلني مسجل) ===== */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: .82rem;
  color: var(--text-light);
  font-weight: 600;
  line-height: 1.6;
}
.checkbox-row input { display: none; }
.checkbox-box {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--border-strong);
  background: #fff;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--t);
}
.checkbox-box i {
  font-size: .65rem;
  color: transparent;
  transition: color var(--t);
}
.checkbox-row input:checked ~ .checkbox-box {
  background: var(--black);
  border-color: var(--black);
}
.checkbox-row input:checked ~ .checkbox-box i { color: var(--lime); }

/* ===== Row Between (ذكرني | نسيت الباسورد) ===== */
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 20px;
  flex-wrap: wrap;
}
.forgot-link {
  font-size: .8rem;
  font-weight: 800;
  color: var(--black);
  transition: color var(--t);
}
.forgot-link:hover { color: var(--lime-dark); text-decoration: underline; }

/* ===== Submit Button ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: 'Cairo', sans-serif;
  font-size: .9rem;
  font-weight: 800;
  padding: 14px 24px;
  min-height: 52px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t);
  width: 100%;
  text-decoration: none;
}
.btn i { transition: transform var(--t); font-size: .92rem; }
.btn:hover i { transform: scale(1.12); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn--primary {
  background: var(--lime);
  color: var(--black);
  border-color: var(--lime);
  box-shadow: 0 6px 18px rgba(198,245,66,.4);
}
.btn--primary:hover:not(:disabled) {
  background: var(--lime-dark);
  border-color: var(--lime-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(198,245,66,.5);
}
.btn.loading .btn-text,
.btn.loading > i:not(.btn-loader) { display: none; }
.btn.loading .btn-loader { display: block; }
.btn-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(17,17,17,.25);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Switch Line (رابط "لسه معندكش حساب؟") ===== */
.switch-line {
  text-align: center;
  margin-top: 20px;
  font-size: .84rem;
  color: var(--text-muted);
  font-weight: 600;
}
.switch-line a {
  color: var(--black);
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--t);
  display: inline-block;
  text-decoration: none;
  font-family: 'Cairo', sans-serif;
  font-size: .84rem;
}
.switch-line a:hover {
  background: var(--lime);
  color: var(--black);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(160px);
  background: var(--black);
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  z-index: 300;
  opacity: 0;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
  max-width: calc(100vw - 32px);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast i { color: var(--lime); font-size: .95rem; }
.toast.toast--error i { color: #FCA5A5; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .auth-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 20px;
  }
  .brand-side {
    padding: clamp(24px, 5vw, 36px);
    border-radius: 20px;
  }
  .brand-side h1 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); }
  .brand-side-lead { margin-bottom: 20px; }
  .brand-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .form-side { border-radius: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .brand-features { grid-template-columns: 1fr; }
  .auth-tab i { display: none; }
  .topbar-actions { width: 100%; }
  .back-home, .lang-switcher { flex: 1; justify-content: center; }
}