:root {
  --login-navy: #0a1628;
  --login-navy-soft: #112040;
  --login-gold: #c9923a;
  --login-gold-light: #e8b060;
  --login-surface: rgba(255, 255, 255, 0.96);
  --login-border: rgba(10, 22, 40, 0.1);
  --login-muted: #6b7a90;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(201, 146, 58, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(17, 32, 64, 0.14), transparent 30%),
    linear-gradient(135deg, #f8f5ee 0%, #efe7d8 100%);
}

.login-page {
  min-height: 100vh;
  padding: 32px 20px 24px;
  display: grid;
  align-content: center;
}

.login-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 0.95fr);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(10, 22, 40, 0.14);
}

.login-brand-panel {
  position: relative;
  padding: 56px 48px;
  background:
    radial-gradient(circle at top right, rgba(232, 176, 96, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(10, 22, 40, 0.98) 0%, rgba(17, 32, 64, 0.96) 100%);
  color: #fff;
  display: flex;
  align-items: flex-end;
  min-height: 620px;
}

.login-brand-mark {
  position: absolute;
  inset: 32px 32px auto auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  border: 1px solid rgba(201, 146, 58, 0.14);
  background: radial-gradient(circle, rgba(201, 146, 58, 0.12) 0%, transparent 70%);
}

.login-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.login-brand-logo-wrap {
  display: flex;
  justify-content: flex-start;
  min-height: 72px;
  margin-bottom: 1.6rem;
}

.login-brand-logo {
  width: 220px;
  height: 68px;
  object-fit: contain;
  object-position: left center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.login-brand-logo.is-visible {
  opacity: 1;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgba(201, 146, 58, 0.12);
  border: 1px solid rgba(201, 146, 58, 0.2);
  color: var(--login-gold-light);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.login-brand-copy h1 {
  margin: 0 0 1rem;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
}

.login-brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.85;
  font-size: 0.96rem;
}

.login-card {
  background: var(--login-surface);
  padding: 48px 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backdrop-filter: blur(16px);
}

.login-header {
  margin-bottom: 24px;
}

.login-logo-fallback {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-brand-logo-wrap .logo-text {
  color: #fff;
}

.login-brand-logo-wrap .logo-text span {
  color: rgba(255, 255, 255, 0.68);
}

.login-header h2 {
  margin: 0 0 0.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--login-navy);
}

.login-header p {
  margin: 0;
  color: var(--login-muted);
  line-height: 1.7;
}

.login-body {
  display: grid;
  gap: 18px;
}

.error-message {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(180, 35, 24, 0.16);
  background: rgba(255, 245, 245, 0.96);
  color: #842029;
  font-size: 0.92rem;
}

.form-group {
  margin-bottom: 16px;
}

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

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px 14px 48px;
  border-radius: 16px;
  border: 1px solid var(--login-border);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  color: var(--login-navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-wrapper input:focus {
  outline: none;
  border-color: rgba(201, 146, 58, 0.6);
  box-shadow: 0 0 0 4px rgba(201, 146, 58, 0.12);
  background: #fff;
}

.input-wrapper input::placeholder {
  color: #8c9aad;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--login-gold);
  pointer-events: none;
}

.input-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.login-btn {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(201, 146, 58, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--login-gold-light) 0%, var(--login-gold) 100%);
  color: var(--login-navy);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 28px rgba(201, 146, 58, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(201, 146, 58, 0.26);
}

.login-btn:disabled {
  opacity: 0.76;
  cursor: not-allowed;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(10, 22, 40, 0.18);
  border-top-color: var(--login-navy);
  animation: spin 0.7s linear infinite;
}

.login-footer {
  text-align: center;
  margin-top: 18px;
  color: #7b889b;
  font-size: 0.82rem;
}

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

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: auto;
    padding: 44px 32px;
  }

  .login-card {
    padding: 38px 28px 32px;
  }
}

@media (max-width: 520px) {
  .login-page {
    padding: 16px 14px 20px;
  }

  .login-brand-panel,
  .login-card {
    padding-left: 20px;
    padding-right: 20px;
  }

  .login-brand-logo {
    width: 190px;
    height: 60px;
  }
}
