/* Login Page — Split Layout - Light Theme */
:root {
  --gold: #c9a227;
  --gold-light: #f5ecd3;
  --navy: #1a2332;
  --bg: #f8fafc;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Cairo", sans-serif;
  min-height: 100vh;
  direction: rtl;
  background: var(--bg);
}
a {
  text-decoration: none;
  color: inherit;
}

/* Auth Loading */
.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--gold-light), #fff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.auth-loading-logo {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: none;
}
.auth-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Main Wrapper */
.login-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Brand Panel - Light Theme */
.brand-panel {
  display: none;
  width: 50%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--gold-light) 0%,
    #fff9e6 50%,
    #f8fafc 100%
  );
}
.brand-decoration {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.12);
}
.brand-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
.brand-logo {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  margin-bottom: 32px;
  box-shadow: none;
}
.brand-heading {
  color: var(--navy);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}
.brand-name {
  font-size: 44px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), #d4a84b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.brand-tagline {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 48px;
}
.brand-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 300px;
}
.feature-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: right;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: var(--gold);
}
.feature-title {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
.feature-desc {
  color: var(--text-muted);
  font-size: 13px;
}

/* Form Side */
.form-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #f8fafc;
}

/* Mobile Logo */
.mobile-logo {
  text-align: center;
  margin-bottom: 32px;
}
.mobile-logo-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 12px;
  box-shadow: none;
}
.mobile-logo-text {
  color: #1a2332;
  font-size: 16px;
  font-weight: 600;
}

/* Login Card */
.login-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}
.login-heading {
  color: #1a2332;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.login-subtitle {
  color: #64748b;
  font-size: 16px;
  margin-bottom: 32px;
}

/* Form */
.login-form .form-group {
  margin-bottom: 20px;
}
.login-form label {
  display: block;
  color: #374151;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}
.login-form .input-wrap {
  position: relative;
}
.input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #9ca3af;
  pointer-events: none;
}
.login-form input {
  width: 100%;
  padding: 16px 48px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  color: #1a2332;
  font-size: 16px;
  outline: none;
  font-family: "Cairo", sans-serif;
  transition: all 0.2s;
}
.login-form input:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(212, 168, 75, 0.1);
}
.login-form input::placeholder {
  color: #9ca3af;
}
.toggle-pw {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 18px;
}

/* 2FA */
.twofa-section {
  display: none;
}
.twofa-input {
  text-align: center !important;
  letter-spacing: 8px;
  font-size: 20px !important;
  padding: 16px !important;
}

/* Submit */
.login-btn {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--gold), #c4903a);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Cairo", sans-serif;
  margin-top: 8px;
  box-shadow: 0 8px 20px rgba(212, 168, 75, 0.4);
  transition: all 0.2s;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 168, 75, 0.5);
}
.login-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Error */
.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
  text-align: center;
}

/* Notice */
.admin-notice {
  text-align: center;
  margin-top: 24px;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 10px;
  color: #64748b;
  font-size: 13px;
}

/* Copyright */
.copyright {
  margin-top: 24px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

/* Desktop: show brand panel, hide mobile logo */
@media (min-width: 1024px) {
  .brand-panel {
    display: flex;
  }
  .mobile-logo {
    display: none;
  }
}
