/* ──── Login Page ──── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,600&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --navy:      #1a2340;
  --navy-deep: #111827;
  --navy-mid:  #243058;
  --gold:      #c9935a;
  --gold-light:#e0b07a;
  --gold-pale: #f5e8d6;
  --cream:     #faf8f4;
  --white:     #ffffff;
  --border:    #e5e7eb;
  --text-muted:#6b7280;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  background: var(--navy-deep);
}

/* ─── Left Panel ─── */
.login-left {
  flex: 1;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

/* geometric background pattern */
.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(201,147,90,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(201,147,90,.06) 0%, transparent 50%);
}

.login-left::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  border: 1.5px solid rgba(201,147,90,.15);
  border-radius: 50%;
}

.circuit-ring {
  position: absolute;
  bottom: -80px; left: -80px;
  width: 380px; height: 380px;
  border: 1.5px solid rgba(201,147,90,.1);
  border-radius: 50%;
}

.login-brand {
  position: relative;
  text-align: center;
  z-index: 1;
}

.login-logo-wrap {
  width: 120px; height: 120px;
  margin: 0 auto 32px;
  border-radius: 50%;
  border: 2.5px solid rgba(201,147,90,.4);
  padding: 10px;
  background: rgba(201,147,90,.06);
  overflow: hidden;
  animation: logoPulse 4s ease-in-out infinite;
}
.login-logo-wrap img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: contain;
  display: block;
  background: var(--white);
}
/* fallback SVG crest when image not available */
.login-logo-wrap .crest-svg {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy));
}

@keyframes logoPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(201,147,90,.2); }
  50%      { box-shadow: 0 0 0 12px rgba(201,147,90,0); }
}

.login-brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.login-brand h1 span { color: var(--gold); }
.login-brand .tagline {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 10px;
  font-weight: 500;
}

.gold-rule {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 24px auto;
}

.login-brand .motto {
  font-size: .9rem;
  color: rgba(255,255,255,.55);
  font-style: italic;
  max-width: 340px;
  line-height: 1.7;
}
.login-brand .motto strong { color: var(--gold); font-style: normal; font-weight: 600; }

/* features list */
.login-features {
  position: relative;
  z-index: 1;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 340px;
}
.feature-item {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,147,90,.15);
  border-radius: 10px;
  padding: 12px 16px;
  animation: fadeSlide .5s ease both;
}
.feature-item:nth-child(2) { animation-delay: .1s; }
.feature-item:nth-child(3) { animation-delay: .2s; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.feature-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(201,147,90,.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.feature-text .ft { font-size: .82rem; font-weight: 600; color: var(--white); }
.feature-text .fs { font-size: .74rem; color: rgba(255,255,255,.45); }

/* ─── Right Panel ─── */
.login-right {
  width: 460px;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
}

.login-form-header { margin-bottom: 36px; }
.login-form-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
}
.login-form-header p {
  color: var(--text-muted);
  font-size: .875rem;
  margin-top: 6px;
  line-height: 1.6;
}

.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
  letter-spacing: .03em;
}
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.form-control {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  color: var(--navy);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,147,90,.15);
}
.form-control::placeholder { color: #b0b7c3; }

/* password toggle */
.pw-toggle {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--text-muted);
  padding: 2px;
}
.pw-toggle:hover { color: var(--navy); }

/* remember / forgot row */
.form-row-between {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.checkbox-wrap {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--text-muted);
  cursor: pointer;
}
.checkbox-wrap input[type="checkbox"] { accent-color: var(--gold); width: 15px; height: 15px; }
.forgot-link {
  font-size: .8rem;
  color: var(--gold);
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* submit button */
.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--navy);
  color: var(--white);
  border: none; border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  position: relative; overflow: hidden;
}
.btn-login::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(201,147,90,.12) 100%);
  opacity: 0; transition: opacity .2s;
}
.btn-login:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,35,64,.3); }
.btn-login:hover::before { opacity: 1; }
.btn-login:active { transform: translateY(0); }

/* alerts */
.alert {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: .845rem;
  margin-bottom: 20px;
  border-left: 3.5px solid transparent;
  display: flex; gap: 10px; align-items: flex-start;
}
.alert-danger  { background: #fff1f2; border-color: #dc2626; color: #b91c1c; }
.alert-success { background: #f0fdf4; border-color: #16a34a; color: #15803d; }
.alert-info    { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; }
.alert-warning { background: #fffbeb; border-color: #d97706; color: #92400e; }

.login-footer {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted);
}

/* ─── Responsive ─── */
@media (max-width: 860px) {
  body { flex-direction: column; }
  .login-left {
    padding: 40px 32px 32px;
    min-height: auto;
  }
  .login-logo-wrap { width: 80px; height: 80px; margin-bottom: 20px; }
  .login-brand h1 { font-size: 1.8rem; }
  .login-features { display: none; }
  .login-right {
    width: 100%;
    padding: 40px 32px;
  }
}
