/* ===========================
   LOGIN PAGE
   =========================== */
html, body.login-body {
  height: 100%;
  margin: 0;
}

.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Left brand panel ── */
.login-brand {
  background: linear-gradient(150deg, var(--navy-dark) 0%, #2a5c42 60%, #1b3d2f 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 48px;
  overflow: hidden;
}
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 70%, rgba(201,162,39,0.12) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-home-link {
  position: absolute;
  top: 32px;
  left: 48px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
.login-home-link svg { width: 16px; height: 16px; }
.login-home-link:hover { color: var(--gold-light); }

.login-brand-content {
  position: relative;
  z-index: 1;
  padding: 40px 0;
  text-align: center;
}

.login-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.login-brand-name {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 14px;
}
.login-brand-tagline {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold-light);
  font-style: italic;
  margin-bottom: 20px;
}
.login-brand-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 340px;
}

.login-brand-footer {
  position: absolute;
  bottom: 32px;
  left: 48px;
  z-index: 1;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}

/* ── Right panel ── */
.login-panel {
  background: var(--off-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  gap: 20px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

/* ── Tabs ── */
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--gray-200);
}
.login-tab {
  padding: 16px;
  border: none;
  background: var(--gray-100);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.login-tab:hover { color: var(--navy); background: var(--white); }
.login-tab.active {
  background: var(--white);
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* ── Pane content ── */
.login-pane { padding: 20px 28px 24px; }

.login-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.login-sub {
  font-size: 0.88rem;
  color: var(--gray-500);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ── Form ── */
.login-form { display: flex; flex-direction: column; gap: 12px; }

.login-pane .form-group input,
.login-pane .form-group select {
  padding: 10px 14px;
}

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; width: 100%; }
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.pw-toggle svg { width: 16px; height: 16px; }
.pw-toggle:hover { color: var(--navy); }

/* ── Feedback messages ── */
.login-error, .login-info {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.login-error {
  background: #fef2f2;
  color: var(--red);
  border: 1px solid #fecaca;
}
.login-info {
  background: #edf7f2;
  color: #1b3d2f;
  border: 1px solid #a8d8bc;
}

/* ── Footer text ── */
.login-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 12px;
  margin-bottom: 0;
}
.link-btn {
  background: none;
  border: none;
  color: var(--navy);
  font-weight: 700;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.link-btn:hover { color: var(--red); }

/* ── Admin hint ── */
.admin-hint {
  font-size: 0.78rem;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.admin-hint code {
  background: var(--gray-200);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--navy);
}

/* ── Google button + divider ── */
.google-btn-wrap {
  margin-bottom: 8px;
}
.google-btn-wrap .g_id_signin {
  margin-bottom: 4px;
}
/* Make Google's iframe full-width of the pane */
.google-btn-wrap iframe {
  width: 100% !important;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 8px;
  color: var(--gray-500);
  font-size: 0.8rem;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .login-split { grid-template-columns: 1fr; }
  .login-brand {
    padding: 56px 28px 24px;
    min-height: auto;
    justify-content: flex-start;
  }
  .login-home-link { top: 20px; left: 28px; }
  .login-brand-footer {
    position: relative;
    bottom: auto;
    left: auto;
    text-align: center;
    margin-top: 16px;
  }
  .login-brand-content { padding: 4px 0 0; }
  .login-brand-name    { font-size: 2.2rem; }
  .login-brand-sub     { display: none; }
  .login-panel { padding: 32px 20px; }
  .login-pane  { padding: 24px 20px 28px; }
}
