/* =====================================
   Red × Black — Luxe Login (RTL Ready)
   ===================================== */

:root{
  --bg:#0a0a0c; --bg-2:#0f0f13;
  --panel:#141418cc; --panel-2:#17171bd8; --card:#1c1c22;
  --red:#ef4444; --red-2:#b91c1c; --red-soft:#f87171;
  --text:#f4eaea; --muted:#cfb4b4;
  --line:rgba(255,255,255,.10);
  --ring:0 0 0 3px rgba(239,68,68,.22);
  --shadow:0 30px 80px rgba(0,0,0,.55);
  --radius-lg:22px; --radius:14px;
}

html[dir="rtl"] body{
  font-family:"Cairo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(239,68,68,.18), transparent 45%),
    radial-gradient(1000px 600px at 15% -20%, rgba(185,28,28,.15), transparent 50%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  min-height:100dvh;
}
body::before{
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:
    linear-gradient(transparent 31px, rgba(255,0,0,.05) 32px),
    linear-gradient(90deg, transparent 31px, rgba(255,0,0,.05) 32px);
  background-size:32px 32px;
  mask-image: radial-gradient(1200px 700px at 50% -20%, rgba(0,0,0,.96), rgba(0,0,0,0));
}

/* حاوية عليا */
.auth-wrap{ position:relative; z-index:1; width:min(1200px, 92%); margin-inline:auto; padding-block: clamp(20px, 4vw, 42px); }

/* الشريط العلوي */
.site-top{ display:flex; justify-content:flex-start; align-items:center; margin-bottom: clamp(14px, 3vw, 26px); }
.brand{ display:inline-flex; align-items:center; gap:.6rem; text-decoration:none; color:var(--text); font-weight:900; }
.brand-mark{ width:14px; height:14px; border-radius:999px; background: radial-gradient(circle at 30% 30%, #fff, var(--red) 45%, var(--red-2) 70%); box-shadow: 0 0 18px rgba(239,68,68,.6); }
.brand-name{ background: linear-gradient(90deg, var(--red), var(--red-2)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; letter-spacing:.2px; }

/* الشبكة الرئيسية */
.auth-grid{ display:grid; grid-template-columns: 1.25fr 1fr; gap: clamp(16px, 3vw, 28px); }

/* بانِل دعائية */
.hero-card{
  position:relative;
  border:1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
  overflow: clip;
  min-height: 440px;
}
.hero-bg{
  position:absolute; inset:-1px; z-index:0;
  background:
    radial-gradient(900px 380px at 110% -20%, rgba(239,68,68,.22), transparent 60%),
    radial-gradient(700px 320px at -10% 120%, rgba(185,28,28,.22), transparent 65%);
  filter: blur(2px);
}
.hero-content{
  position:relative; z-index:1;
  padding: clamp(18px, 3vw, 28px);
  display:grid; gap: clamp(10px, 1.8vw, 16px);
}
.hero-title{
  font-size: clamp(24px, 3.6vw, 36px);
  line-height: 1.2;
  letter-spacing:.4px; margin: 4px 0 2px;
  text-shadow: 0 0 18px rgba(239,68,68,.22);
}
.hero-text{ color:var(--muted); margin:0; }
.hero-bullets{ list-style:none; margin: 8px 0 0; padding:0; display:grid; gap:8px; }
.hero-bullets .dot{
  display:inline-block; width:8px; height:8px; border-radius:999px; margin-inline-start:6px;
  background: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,.16);
}
.hero-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.ghost-btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:.5rem; padding:.8rem 1rem; border-radius:12px;
  border:1px solid var(--line); background:rgba(255,255,255,.02);
  color:var(--text); text-decoration:none; font-weight:800;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.ghost-btn:hover{ transform:translateY(-2px); border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.06); }
.ghost-accent{ border-color: rgba(239,68,68,.45); }

/* بطاقة تسجيل الدخول */
.login-card{
  border:1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.4vw, 24px);
  display:grid; gap:12px;
}
.card-head{ text-align:center; }
.card-title{
  margin: 6px 0 2px;
  font-size: clamp(20px, 3vw, 26px);
  background: linear-gradient(90deg, var(--red), var(--red-2));
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color: transparent;
  letter-spacing:.3px;
}
.card-sub{ color:var(--muted); margin:0; }

.form{ display:grid; gap:12px; margin-top:6px; }
.form-row{ display:grid; gap:8px; }
label{ font-weight:800; letter-spacing:.2px }

.input-wrap{ position:relative; display:flex; align-items:center; }
.input-wrap input{
  width:100%;
  background:#0f0f13; color:#fff3f3;
  border:1px solid var(--line); border-radius: 12px;
  padding: .9rem 3.2rem .9rem 1rem;
  transition: border-color .14s ease, box-shadow .14s ease, transform .06s ease;
}
.input-wrap input::placeholder{ color:#cfaeae; }
.input-wrap input:focus{
  outline:none; border-color: rgba(239,68,68,.55);
  box-shadow: var(--ring), inset 0 0 0 1px rgba(255,255,255,.04);
  transform: translateY(-1px);
}

/* أيقونة ثابتة (للإيميل مثلاً) */
.input-ico{
  position:absolute; inset-inline-end:.7rem;
  width:22px; height:22px; opacity:.82; color:#f2c2c2;
  display:grid; place-items:center;
  pointer-events:none;
}

/* زر إظهار/إخفاء — خصوصية أعلى لتفادي أي تعارض */
.input-wrap .btn-eye{
  position:absolute; inset-inline-end:.5rem; top:50%; transform:translateY(-50%);
  width:36px; height:36px; border-radius:8px;
  display:grid; place-items:center;
  color:#f2c2c2; background:transparent; border:1px solid transparent; cursor:pointer;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
  z-index:3; pointer-events:auto;
}
.input-wrap .btn-eye:hover{ background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.25); }
.input-wrap .btn-eye.on{ color:#fff; border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.12); }
.input-wrap .btn-eye svg{ pointer-events:none; }

/* ميتا */
.form-meta{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap; color:var(--muted);
}
.chk{ display:inline-flex; align-items:center; gap:.5rem; font-weight:700; }
.chk input{ inline-size: 16px; block-size: 16px; accent-color: var(--red); }
.link-muted{ color:#e7baba; text-decoration: underline dotted; }
.link-muted:hover{ color:#fff; }

/* زر الدخول */
.btn-primary{
  display:inline-flex; align-items:center; justify-content:center;
  gap:.55rem; padding: 1rem 1rem; border-radius: 12px; border:0; cursor:pointer;
  color:#fff; font-weight:900; letter-spacing:.2px;
  background: linear-gradient(135deg, var(--red), var(--red-2));
  box-shadow: 0 18px 38px rgba(239,68,68,.30);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
.btn-primary:hover{ transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 24px 48px rgba(239,68,68,.34); }
.btn-primary:active{ transform: translateY(0); }
.btn-primary:focus-visible{ outline: none; box-shadow: var(--ring); }

.form-foot{ text-align:center; color:var(--muted); }
.form-foot a{ color:#ffd0d0; text-decoration: underline dotted; }
.card-foot{ text-align:center; color:var(--muted); }

/* الإشعار */
.notification{
  position:fixed; inset-inline-start:50%; top:72%;
  transform:translateX(-50%);
  z-index:3000; display:none;
  min-width:280px; max-width:min(92vw,560px);
  padding:.9rem 1.1rem; border-radius:12px; border:1px solid var(--line);
  background:linear-gradient(135deg, var(--red), var(--red-2));
  color:#fff; font-weight:900; text-align:center;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
  animation: notifIn .22s ease-out;
}
.notification.error{
  background:linear-gradient(135deg, #ff4b5c, #8a1323);
}
@keyframes notifIn{
  from{ opacity:0; transform:translate(-50%,-14px) }
  to  { opacity:1; transform:translate(-50%,0) }
}

/* تأثيرات دخول وهزّة خطأ */
@keyframes pop { from { transform: translateY(6px); opacity:.6; } to { transform: translateY(0); opacity:1; } }
.hero-card, .login-card { animation: pop .25s ease-out both; }

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.shake { animation: shake .42s cubic-bezier(.36,.07,.19,.97) both; }

/* تجاوب */
@media (max-width: 980px){
  .auth-grid{ grid-template-columns: 1fr; }
  .hero-card{ order:2; }
  .login-card{ order:1; }
}
@media (max-width: 520px){
  .login-card, .hero-card{ border-radius: 16px; }
  .btn-primary{ padding:.9rem 1rem }
}
