:root {
  --kanz-bg: #0B1C2D;
  --kanz-surface: #122A3F;
  --kanz-surface-2: #163550;
  --kanz-border: rgba(212, 175, 55, 0.18);
  --kanz-gold: #D4AF37;
  --kanz-gold-soft: rgba(212, 175, 55, 0.12);
  --kanz-text: #F5F7FA;
  --kanz-muted: #A8B3C2;
  --kanz-danger: #ff7b7b;
  --kanz-success: #26c281;
  --kanz-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --transition: 0.25s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Tajawal", system-ui, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.08), transparent 22%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.04), transparent 18%),
    var(--kanz-bg);
  color: var(--kanz-text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.login-page,
.compact-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
}

.login-shell,
.compact-shell {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 18px;
  align-items: stretch;
}

.login-brand-panel,
.login-card {
  background: linear-gradient(180deg, rgba(18, 42, 63, 0.98), rgba(11, 28, 45, 0.98));
  border: 1px solid var(--kanz-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--kanz-shadow);
}

.login-brand-panel,
.compact-brand-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: auto -70px -70px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 70%);
  pointer-events: none;
}

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: #fff;
}

.brand-kicker {
  display: block;
  color: var(--kanz-muted);
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.85rem;
  color: var(--kanz-gold);
  font-weight: 800;
}

.brand-copy {
  margin-top: 20px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--kanz-gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.15);
  color: var(--kanz-gold);
  font-weight: 700;
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.brand-copy h2 {
  margin: 0 0 12px;
  font-size: 1.65rem;
  line-height: 1.35;
  font-weight: 800;
}

.brand-copy p {
  margin: 0;
  color: var(--kanz-muted);
  line-height: 1.75;
  font-size: 0.98rem;
}

.brand-points,
.compact-points {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.brand-points li {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--kanz-text);
  position: relative;
  padding-right: 36px;
  font-size: 0.96rem;
}

.brand-points li::before {
  content: "✓";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--kanz-gold);
  font-weight: 800;
}

.login-card-wrap {
  display: flex;
}

.login-card,
.compact-card {
  width: 100%;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-head,
.compact-head {
  margin-bottom: 16px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--kanz-gold);
  font-weight: 700;
  font-size: 0.92rem;
}

.card-head h3 {
  margin: 0 0 8px;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
}

.card-head p {
  margin: 0;
  color: var(--kanz-muted);
  line-height: 1.65;
  font-size: 0.96rem;
}

.login-form,
.compact-form {
  display: grid;
  gap: 12px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--kanz-text);
  font-size: 0.98rem;
}

.form-group input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f2437;
  color: var(--kanz-text);
  padding: 0 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-group input::placeholder {
  color: #8191a5;
}

.form-group input:focus {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.08);
  background: #10283d;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-left: 86px;
}

.toggle-password {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  min-width: 68px;
  border: 0;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--kanz-gold);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background var(--transition), transform var(--transition);
}

.toggle-password:hover {
  background: rgba(212, 175, 55, 0.18);
}

.field-error {
  display: block;
  min-height: 14px;
  margin-top: 5px;
  color: var(--kanz-danger);
  font-size: 0.83rem;
  line-height: 1.3;
}

.form-row,
.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.remember-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--kanz-muted);
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
}

.remember-box input {
  accent-color: var(--kanz-gold);
}

.text-link {
  color: var(--kanz-gold);
  font-weight: 700;
  font-size: 0.95rem;
}

.text-link:hover {
  text-decoration: underline;
}

.form-status {
  min-height: 18px;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-status.error {
  color: var(--kanz-danger);
}

.form-status.success {
  color: var(--kanz-success);
}

.submit-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #d4af37, #b9911f);
  color: #0b1c2d;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), filter var(--transition);
}

.submit-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.submit-btn:disabled {
  opacity: 0.8;
  cursor: wait;
}

.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(11, 28, 45, 0.3);
  border-top-color: #0b1c2d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

.submit-btn.loading .btn-loader {
  display: inline-block;
}

.submit-btn.loading .btn-text {
  opacity: 0.9;
}

.card-footer,
.compact-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.card-footer p {
  margin: 0 0 10px;
  color: var(--kanz-muted);
  font-size: 0.95rem;
}

.card-footer p a,
.back-home {
  color: var(--kanz-gold);
  font-weight: 700;
}

.card-footer p a:hover,
.back-home:hover {
  text-decoration: underline;
}

.divider {
  display: flex;
  align-items: center;
  margin: 10px 0;
  gap: 10px;
  color: #A8B3C2;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #1e3a5f;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  color: #222;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
}

.google-login-btn:hover {
  background: #f3f3f3;
  transform: translateY(-1px);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1199px) {
  .login-shell,
  .compact-shell {
    max-width: 1040px;
    gap: 16px;
  }

  .login-brand-panel,
  .compact-brand-panel,
  .login-card,
  .compact-card {
    padding: 22px 18px;
  }

  .brand-copy h2 {
    font-size: 1.5rem;
  }

  .card-head h3 {
    font-size: 1.7rem;
  }
}

@media (max-width: 991px) {
  .login-page,
  .compact-auth-page {
    padding: 18px 12px;
  }

  .login-shell,
  .compact-shell {
    grid-template-columns: 1fr;
    max-width: 700px;
  }

  .login-brand-panel,
  .compact-brand-panel {
    padding: 22px 18px;
    gap: 14px;
  }

  .brand-copy {
    margin-top: 14px;
  }

  .brand-copy h2 {
    font-size: 1.4rem;
  }

  .login-card,
  .compact-card {
    padding: 22px 18px;
  }
}

@media (max-width: 575px) {
  .login-page,
  .compact-auth-page {
    padding: 12px 10px;
    align-items: flex-start;
  }

  .login-brand-panel,
  .login-card {
    border-radius: 20px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand-text h1,
  .card-head h3 {
    font-size: 1.5rem;
  }

  .brand-copy h2 {
    font-size: 1.2rem;
  }

  .brand-copy p,
  .card-head p,
  .brand-points li {
    font-size: 0.92rem;
  }

  .form-group input,
  .submit-btn,
  .google-login-btn {
    min-height: 46px;
  }

  .form-row,
  .compact-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .toggle-password {
    min-width: 62px;
    font-size: 0.84rem;
  }
}

@media (max-height: 760px) and (min-width: 992px) {
  .login-page,
  .compact-auth-page {
    padding: 10px 14px;
  }

  .login-shell,
  .compact-shell {
    gap: 14px;
  }

  .login-brand-panel,
  .compact-brand-panel,
  .login-card,
  .compact-card {
    padding: 18px;
  }

  .brand-copy {
    margin-top: 12px;
  }

  .brand-badge {
    margin-bottom: 10px;
    padding: 6px 12px;
  }

  .brand-copy h2 {
    font-size: 1.35rem;
    margin-bottom: 8px;
  }

  .brand-copy p {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .brand-points,
  .compact-points {
    margin-top: 14px;
    gap: 8px;
  }

  .brand-points li {
    padding: 10px 12px;
    padding-right: 32px;
    font-size: 0.9rem;
  }

  .card-head,
  .compact-head {
    margin-bottom: 12px;
  }

  .card-head h3 {
    font-size: 1.6rem;
    margin-bottom: 6px;
  }

  .card-head p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .login-form,
  .compact-form {
    gap: 10px;
  }

  .form-group label {
    margin-bottom: 6px;
    font-size: 0.92rem;
  }

  .form-group input {
    height: 44px;
  }

  .submit-btn {
    height: 46px;
  }

  .google-login-btn {
    min-height: 44px;
    padding: 10px 12px;
  }

  .divider {
    margin: 8px 0;
  }

  .card-footer,
  .compact-footer {
    margin-top: 12px;
    padding-top: 12px;
  }

  .card-footer p {
    margin-bottom: 8px;
    font-size: 0.9rem;
  }
}
