.login-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.13), transparent 30rem),
    linear-gradient(145deg, var(--bg), var(--surface-2));
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.login-brand-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: linear-gradient(160deg, #0b1730, #10203a 55%, #123a34);
  color: #fff;
}

.login-brand-side-image {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.login-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login-brand-content {
  max-width: 440px;
}

.login-brand-fallback {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 48px;
  text-align: center;
  z-index: 1;
}

.login-brand-content .brand-mark {
  display: grid;
  width: 120px;
  height: 120px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #34d399, #38bdf8);
  color: #10203a;
  font-weight: 900;
  font-size: 1.2rem;
}

.login-brand-content h1 {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 900;
}

.login-brand-content > p {
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.7;
}

.login-feature-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 0.92rem;
}

.login-feature-list li::before {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.18);
}

.login-form-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px 24px;
}

.login-card {
  width: min(400px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card-header {
  margin-bottom: 22px;
  text-align: center;
}

.login-card-header .brand-mark.small {
  display: none;
}

.login-card-header h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 900;
}

.login-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 700;
}

.login-field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.login-field label {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
}

.login-field input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
}

.login-field input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.field-error {
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.86rem;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.login-forgot {
  color: var(--primary);
  font-weight: 800;
}

.login-submit {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  font-size: 0.98rem;
  cursor: pointer;
}

.login-submit:hover {
  background: var(--primary-strong);
}

.login-hint {
  margin: 16px 0 0;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  direction: ltr;
}

.login-footer {
  color: var(--muted);
  font-size: 0.8rem;
}

.denied-shell {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
}

.denied-shell .brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #34d399, #38bdf8);
  color: #10203a;
  font-weight: 900;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-brand-side {
    padding: 32px 24px;
    min-height: 220px;
  }

  .login-brand-side-image {
    min-height: 200px;
  }

  .login-feature-list {
    display: none;
  }
}

@media (max-width: 520px) {
  .login-brand-side {
    padding: 24px 18px;
    min-height: 180px;
  }

  .login-brand-side-image {
    min-height: 160px;
  }

  .login-brand-content h1 {
    font-size: 1.5rem;
  }

  .login-brand-fallback {
    padding: 24px 18px;
  }
}

/* ===================== نسخة ذهبية/كحلية (Gold theme) ===================== */

:root {
  --gold: #c9a35c;
  --gold-light: #e6c98a;
  --navy-deep: #0c1220;
  --navy-panel: #10182c;
}

.login-body-gold {
  background: #f5f1ea;
}

.login-shell-gold {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  min-height: 100vh;
  align-items: stretch;
}

.login-brand-side-gold {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 40px 44px;
  background:
    radial-gradient(circle at 15% 0%, rgba(201, 163, 92, 0.12), transparent 40%),
    linear-gradient(150deg, #0c1220, #10182c 55%, #101a1a);
  color: #fff;
  overflow: hidden;
}

.login-brand-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.login-brand-header h1 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--gold-light);
}

.login-brand-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.login-logo-mark {
  padding: 8px 16px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  color: var(--gold-light);
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
}

.login-hero-frame {
  border-radius: 16px;
  overflow: hidden;
  min-height: 260px;
  max-height: 320px;
}

.login-hero-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login-feature-grid,
.login-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.feature-tile {
  padding: 14px 12px;
  border: 1px solid rgba(201, 163, 92, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.feature-tile .feature-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(201, 163, 92, 0.15);
  font-size: 1.1rem;
}

.feature-tile b {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-light);
  font-size: 0.85rem;
}

.feature-tile small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
  line-height: 1.4;
}

.stat-tile {
  padding: 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.stat-tile .stat-icon {
  display: block;
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.stat-tile strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
}

.stat-tile small {
  display: block;
  margin: 2px 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}

.stat-tile em {
  color: #4ade80;
  font-size: 0.68rem;
  font-style: normal;
}

.login-trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-trust-row > div {
  text-align: center;
}

.login-trust-row span {
  display: block;
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.login-trust-row b {
  display: block;
  color: var(--gold-light);
  font-size: 0.78rem;
  margin-bottom: 2px;
}

.login-trust-row small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  line-height: 1.4;
}

.login-form-side-gold {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 24px;
  background: #f5f1ea;
}

.login-card-gold {
  width: min(400px, 100%);
  padding: 34px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(20, 20, 20, 0.08);
}

.login-card-gold .login-card-header {
  margin-bottom: 22px;
  text-align: center;
}

.login-card-gold .login-card-header h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1a2e;
}

.login-card-gold .login-card-header p {
  margin: 0;
  color: #8a8a95;
  font-size: 0.88rem;
}

.login-field-gold {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.login-field-gold label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1a1a2e;
}

.login-field-gold .input-wrap {
  position: relative;
}

.login-field-gold input {
  width: 100%;
  min-height: 48px;
  padding: 0 42px 0 16px;
  border: 1px solid #e6e2d8;
  border-radius: 12px;
  background: #faf9f6;
  color: #1a1a2e;
  font: inherit;
  box-sizing: border-box;
}

.login-field-gold input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.login-field-gold .input-icon {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b7b2a3;
  font-size: 0.95rem;
  pointer-events: none;
}

.toggle-eye {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.6;
}

.login-row-gold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.login-remember-gold {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b6b78;
  font-weight: 700;
}

.login-forgot-gold {
  color: var(--gold);
  font-weight: 800;
}

.login-submit-gold {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a2340, #0c1220);
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
}

.login-submit-gold:hover {
  filter: brightness(1.1);
}

.login-divider {
  position: relative;
  margin: 20px 0;
  text-align: center;
  color: #b7b2a3;
  font-size: 0.82rem;
}

.login-divider::before,
.login-divider::after {
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #eae6db;
  content: "";
}

.login-divider::before { inset-inline-start: 0; }
.login-divider::after { inset-inline-end: 0; }

.login-admin-btn {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #e6e2d8;
  border-radius: 12px;
  background: #fff;
  color: #1a1a2e;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
}

.login-hint-gold {
  margin: 16px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: #faf9f6;
  color: #8a8a95;
  font-size: 0.78rem;
  text-align: center;
  direction: ltr;
}

.login-footer-gold {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  color: #9a968a;
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 980px) {
  .login-shell-gold {
    grid-template-columns: 1fr;
  }

  .login-feature-grid,
  .login-stats-grid,
  .login-trust-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
