:root{
  --bg:#0b1220;
  --card:#0f172a;
  --panel:#0b1020;
  --stroke:rgba(255,255,255,.10);
  --stroke-strong:rgba(255,255,255,.16);
  --muted:rgba(255,255,255,.72);
  --muted2:rgba(255,255,255,.56);
  --white:#fff;

  --primary:#2563eb;
  --primary2:#1d4ed8;
  --primary-soft:rgba(37,99,235,.18);

  --success:#16a34a;
  --success-soft:rgba(22,163,74,.18);

  --danger:#ef4444;
  --warning:#f59e0b;

  --radius:20px;
  --radius-sm:14px;

  --shadow-lg:0 22px 60px rgba(0,0,0,.28);
  --shadow-md:0 12px 34px rgba(0,0,0,.20);
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,body{
  min-height:100%;
}

body{
  margin:0;
  font-family:"Tajawal",system-ui,-apple-system,Segoe UI,Arial,sans-serif;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(37,99,235,.25), transparent 55%),
    radial-gradient(1200px 700px at 90% 30%, rgba(16,185,129,.16), transparent 60%),
    linear-gradient(180deg, #050814, #0a1222);
  color:var(--white);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* ===== Layout ===== */
.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 18px;
}

.auth-shell{
  width:min(1120px, 100%);
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:18px;
}

/* ===== Left Brand Panel ===== */
.brand-panel{
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  padding:30px;
  position:relative;
  overflow:hidden;
  box-shadow:var(--shadow-lg);
}

.brand-panel::before{
  content:"";
  position:absolute;
  inset:-60px -60px auto auto;
  width:260px;
  height:260px;
  background:radial-gradient(circle at center, rgba(37,99,235,.35), transparent 60%);
  filter:blur(4px);
  pointer-events:none;
}

.brand-panel::after{
  content:"";
  position:absolute;
  inset:auto auto -80px -80px;
  width:260px;
  height:260px;
  background:radial-gradient(circle at center, rgba(16,185,129,.18), transparent 60%);
  filter:blur(8px);
  pointer-events:none;
}

.brand-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  font-weight:700;
  font-size:13px;
  line-height:1;
  backdrop-filter:blur(4px);
}

.brand-title{
  margin-top:16px;
  font-size:30px;
  font-weight:900;
  line-height:1.25;
  letter-spacing:.2px;
}

.brand-sub{
  margin:12px 0 20px;
  color:var(--muted);
  line-height:1.9;
  font-size:15px;
  max-width:60ch;
}

.feature-list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:12px;
}

.feature-list li{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:13px 14px;
  border-radius:16px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  transition:.22s ease;
}

.feature-list li:hover{
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.12);
  transform:translateY(-1px);
}

.feature-icon{
  width:40px;
  height:40px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(37,99,235,.18);
  border:1px solid rgba(37,99,235,.25);
  flex:0 0 auto;
  font-size:18px;
}

.feature-text{
  color:var(--muted);
  font-size:14px;
  line-height:1.75;
}

.feature-text b{
  color:#fff;
}

.footer-links{
  color:var(--muted2);
  font-size:13px;
  line-height:1.8;
}

.footer-links a{
  color:#fff;
  text-decoration:none;
  opacity:.92;
}

.footer-links a:hover{
  opacity:1;
  text-decoration:underline;
}

/* ===== Right Form Card ===== */
.card-panel{
  background:rgba(255,255,255,.06);
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  padding:24px;
  backdrop-filter:blur(10px);
  box-shadow:var(--shadow-md);
}

.card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:4px;
}

.card-head h1{
  margin:0;
  font-size:21px;
  font-weight:900;
  line-height:1.35;
}

.kicker{
  margin:10px 0 16px;
  color:var(--muted);
  font-size:14px;
  line-height:1.8;
}

/* ===== Forms ===== */
.form-label{
  color:#fff;
  font-weight:700;
  font-size:14px;
  margin-bottom:8px;
}

.form-control,
.form-select{
  border-radius:14px !important;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(5,8,20,.55);
  color:#fff;
  padding:12px 13px;
  min-height:48px;
}

.form-control::placeholder{
  color:rgba(255,255,255,.45);
}

.form-control:focus,
.form-select:focus{
  border-color:rgba(37,99,235,.65);
  box-shadow:0 0 0 .2rem rgba(37,99,235,.18);
  background:rgba(5,8,20,.48);
  color:#fff;
}

.form-check{
  padding-right:1.7em;
}

.form-check-input{
  cursor:pointer;
  margin-top:.2em;
}

.form-check-label{
  color:var(--muted);
  cursor:pointer;
}

.form-text{
  color:var(--muted2) !important;
  font-size:12px;
  line-height:1.7;
}

/* ===== Buttons ===== */
.btn{
  border-radius:14px !important;
  padding:12px 14px;
  font-weight:800;
  transition:.2s ease;
}

.btn:disabled{
  opacity:.85;
  cursor:not-allowed;
}

.btn-primary{
  background:linear-gradient(180deg, var(--primary), var(--primary2));
  border:1px solid rgba(37,99,235,.55);
  box-shadow:0 10px 24px rgba(37,99,235,.18);
}

.btn-primary:hover{
  filter:brightness(1.05);
  transform:translateY(-1px);
}

.btn-success{
  background:linear-gradient(180deg, #16a34a, #15803d);
  border:1px solid rgba(22,163,74,.45);
  box-shadow:0 10px 24px rgba(22,163,74,.16);
}

.btn-success:hover{
  filter:brightness(1.04);
  transform:translateY(-1px);
}

.btn-ghost{
  border-radius:12px !important;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:#fff;
}

.btn-ghost:hover{
  background:rgba(255,255,255,.09);
  color:#fff;
  transform:translateY(-1px);
}

/* ===== UI Helpers ===== */
.hr{
  height:1px;
  background:rgba(255,255,255,.10);
  margin:16px 0;
}

.small-links{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  font-size:13px;
  color:var(--muted2);
  line-height:1.8;
}

.small-links a{
  color:#fff;
  text-decoration:none;
}

.small-links a:hover{
  text-decoration:underline;
}

.note{
  margin-top:12px;
  font-size:13px;
  color:var(--muted2);
  line-height:1.8;
}

.note-sm{
  margin-top:6px;
  font-size:12px;
  color:var(--muted2);
  line-height:1.7;
}

.code-pill{
  background:rgba(255,255,255,.12) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.14) !important;
  font-weight:900;
  letter-spacing:1px;
  border-radius:12px 0 0 12px !important;
  min-width:104px;
  justify-content:center;
}

/* ===== Alerts ===== */
.alert{
  border-radius:16px;
  border:none;
  line-height:1.8;
  font-size:14px;
}

.alert ul{
  padding-right:18px;
}

.alert-danger{
  background:rgba(239,68,68,.14);
  color:#fecaca;
}

.alert-success{
  background:rgba(22,163,74,.14);
  color:#bbf7d0;
}

.alert-warning{
  background:rgba(245,158,11,.14);
  color:#fde68a;
}

/* ===== Spinner ===== */
.spin{
  display:inline-block;
  width:14px;
  height:14px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.55);
  border-top-color:#fff;
  margin-right:8px;
  vertical-align:middle;
  animation:sp .8s linear infinite;
}

@keyframes sp{
  to{transform:rotate(360deg)}
}

/* ===== Responsive ===== */
@media (max-width: 992px){
  .auth-shell{
    grid-template-columns:1fr;
  }

  .brand-title{
    font-size:26px;
  }

  .card-panel,
  .brand-panel{
    padding:22px;
  }
}

@media (max-width: 576px){
  .auth-wrap{
    padding:16px;
  }

  .brand-title{
    font-size:24px;
  }

  .card-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .small-links{
    flex-direction:column;
    align-items:flex-start;
  }

  .feature-list li{
    padding:12px;
  }
}