:root {
  --kb-ink: #172744;
  --kb-slate: #5f718d;
  --kb-paper: #f4f8fc;
  --kb-surface: #ffffff;
  --kb-line: #d8e4f2;
  --kb-primary: #2869df;
  --kb-accent: #2869df;
}

body.auth-body {
  min-height: 100dvh;
  margin: 0;
  color: var(--kb-ink);
  background: radial-gradient(circle at 12% 8%, rgba(40,105,223,.14), transparent 30%), radial-gradient(circle at 87% 90%, rgba(140,184,255,.16), transparent 28%), var(--kb-paper);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.auth-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: min(760px, calc(100dvh - 56px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  overflow: hidden;
  border: 1px solid var(--kb-line);
  border-radius: 30px;
  box-shadow: 0 24px 64px rgba(27,55,98,.12);
  background: var(--kb-surface);
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  padding: clamp(32px, 5vw, 72px);
  color: #f8fbff;
  background: linear-gradient(140deg, #17345f, #245293 57%, #2d67b9);
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.brand-panel::before { width: 470px; height: 470px; right: -180px; top: -180px; background: rgba(255,255,255,.08); }
.brand-panel::after { width: 270px; height: 270px; left: -120px; bottom: -120px; border: 1px solid rgba(255,255,255,.22); }
.brand-panel > * { position: relative; z-index: 1; }
.brand-logo { width: min(240px, 62%); height: auto; object-fit: contain; filter: drop-shadow(0 14px 26px rgba(0,0,0,.23)); }
.brand-panel .eyebrow, .brand-panel .pill { width: fit-content; margin-bottom: 14px; padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); color: #dce6ff; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.brand-panel h1 { max-width: 590px; margin: 0 0 16px; color: #fff; font-size: clamp(2rem, 4vw, 4.1rem); line-height: 1.02; letter-spacing: -.055em; }
.brand-panel p { max-width: 540px; margin: 0; color: #d9e4ff; line-height: 1.7; font-size: 1.03rem; }
.feature-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 10px; color: #eef4ff; font-size: .95rem; }
.feature-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ffc5ae; box-shadow: 0 0 0 5px rgba(255,197,174,.14); }
.auth-highlights { display: flex; gap: 12px; flex-wrap: wrap; }
.info-chip { min-width: 180px; flex: 1; padding: 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(255,255,255,.08); }
.info-chip strong { display: block; margin-bottom: 6px; }
.muted-text { color: #d6e2ff; font-size: .86rem; line-height: 1.4; }

.login-card {
  align-self: center;
  width: min(100%, 480px);
  margin: 18px auto;
  padding: clamp(30px, 5vw, 56px);
  color: var(--kb-ink);
  border: 1px solid #e2ebf6;
  border-radius: 20px;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(27,55,98,.06) !important;
}
.login-header { margin-bottom: 26px; }
.login-header h2 { margin: 8px 0; font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.045em; }
.login-header p { margin: 0; color: var(--kb-slate); line-height: 1.6; }
.login-card label { margin: 16px 0 7px; color: #344159; font-weight: 700; font-size: .88rem; }
.login-card input { width: 100%; min-height: 48px; margin: 0 0 12px; padding: 13px 14px; border: 1px solid var(--kb-line) !important; border-radius: 13px; color: var(--kb-ink); background: #fff !important; box-shadow: none; }
.login-card input:focus { outline: 3px solid rgba(49,89,217,.15); border-color: var(--kb-primary) !important; }
.login-card button { min-height: 48px; margin: 8px 0; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--kb-primary), #1f59bd) !important; box-shadow: 0 10px 20px rgba(40,105,223,.18); transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.login-card button:hover { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(49,89,217,.25); filter: brightness(1.04); }
.login-card button:active { transform: translateY(0); }
.tab-actions, .auth-switch { display: flex; gap: 6px; padding: 5px; margin: 0 0 28px; border: 1px solid var(--kb-line); border-radius: 14px; background: #f3f6fb; }
.tab-actions button, .auth-switch a { flex: 1; min-height: 38px; margin: 0; padding: 9px 10px; border: 0; border-radius: 9px; color: #526078; background: transparent !important; box-shadow: none; font-size: .82rem; font-weight: 800; text-align: center; text-decoration: none; }
.tab-actions button:hover, .auth-switch a:hover { color: var(--kb-primary); background: #fff !important; transform: none; box-shadow: 0 3px 10px rgba(23,37,84,.08); }
.auth-switch a.is-current { color: #fff; background: var(--kb-primary) !important; box-shadow: 0 4px 12px rgba(40,105,223,.18); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; font-size: .9rem; }
.auth-links a { color: var(--kb-primary); text-decoration: none; font-weight: 700; }
.error-text, .success-text { min-height: 22px; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; color: #a12424; background: #fff0f0; font-size: .88rem; line-height: 1.45; }
.success-text { color: #176743; background: #eafaf1; }
.error-text:empty, .success-text:empty { display: none; }
.hidden { display: none !important; }

@media (max-width: 820px) {
  .auth-shell { width: min(100% - 24px, 560px); grid-template-columns: 1fr; margin: 12px auto; border-radius: 24px; }
  .brand-panel { min-height: 260px; padding: 32px 28px; }
  .brand-panel h1 { font-size: 2.15rem; }
  .brand-panel .feature-list, .auth-highlights { display: none; }
  .login-card { padding: 30px 24px 34px; }
}

@media (max-width: 430px) {
  .tab-actions { gap: 2px; padding: 3px; }
  .tab-actions button { padding-inline: 4px; font-size: .72rem; }
  .auth-links { flex-direction: column; }
}
