:root {
  --navy-950: #07112c;
  --navy-800: #102453;
  --blue-600: #2364ee;
  --blue-500: #3477ff;
  --paper: #fffefa;
  --surface: #f6f8fc;
  --ink: #11192d;
  --muted: #697287;
  --line: #dfe4ee;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --success: #067647;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(500px, 0.9fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(36px, 5vw, 76px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 24%, rgba(82, 144, 255, 0.58), transparent 30%),
    radial-gradient(circle at 16% 82%, rgba(59, 102, 204, 0.35), transparent 28%),
    linear-gradient(142deg, var(--navy-950), var(--navy-800));
}

.brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -260px;
  bottom: -260px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 75px rgba(255, 255, 255, 0.025), 0 0 0 150px rgba(255, 255, 255, 0.018);
}

.brand,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: inherit;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
  background: var(--blue-500);
  border-radius: 13px;
  box-shadow: 0 9px 28px rgba(29, 89, 225, 0.36);
}

.brand-message {
  max-width: 660px;
  margin-block: 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-600);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-message .eyebrow {
  color: #a8c5ff;
}

.brand-message h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(3.3rem, 6vw, 6.4rem);
  font-weight: 720;
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.brand-message > p:last-child {
  max-width: 520px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.65;
}

.brand-footer {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

.login-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 48px clamp(28px, 6vw, 96px);
  background: var(--paper);
}

.login-card {
  width: min(100%, 470px);
}

.mobile-brand {
  display: none;
  margin-bottom: 48px;
}

.login-card h2,
.platform-card h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.intro {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.alert {
  margin-top: 24px;
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  border: 1px solid;
  border-radius: 12px;
}

.alert-error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: #f5b9b4;
}

.login-form {
  display: grid;
  gap: 21px;
  margin-top: 30px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 750;
}

.field input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:hover {
  border-color: #c5cedc;
}

.field input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(52, 119, 255, 0.12);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 92px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 6px;
  color: var(--blue-600);
  font-size: 0.75rem;
  font-weight: 750;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  transform: translateY(-50%);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  font-weight: 800;
  border-radius: 13px;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--blue-600);
  border: 1px solid var(--blue-600);
  box-shadow: 0 12px 28px rgba(35, 100, 238, 0.22);
}

.primary-button:hover {
  background: #1956d6;
  box-shadow: 0 15px 32px rgba(35, 100, 238, 0.28);
  transform: translateY(-1px);
}

.secondary-button {
  color: var(--blue-600);
  background: #fff;
  border: 1px solid #b9cdfd;
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0);
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 28px;
  padding: 16px;
  color: #465069;
  background: var(--surface);
  border-radius: 13px;
}

.security-note > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 900;
  background: #d1fadf;
  border-radius: 50%;
}

.security-note p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(52, 119, 255, 0.3);
  outline-offset: 3px;
}

.platform-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(52, 119, 255, 0.17), transparent 34rem),
    var(--surface);
}

.platform-card {
  width: min(100%, 760px);
  padding: clamp(32px, 6vw, 64px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(7, 17, 44, 0.1);
}

.platform-card .intro {
  max-width: 560px;
}

.account-summary {
  display: grid;
  gap: 8px;
  margin: 32px 0;
  padding: 20px;
  background: var(--surface);
  border-radius: 16px;
}

.account-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-summary strong {
  font-size: 1.1rem;
}

.logout-form {
  display: flex;
}

@media (max-width: 920px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    display: none;
  }

  .login-panel {
    min-height: 100svh;
    padding: 30px 24px 50px;
  }

  .mobile-brand {
    display: inline-flex;
  }
}

@media (max-width: 520px) {
  .login-panel {
    align-items: start;
    padding-inline: 19px;
  }

  .login-card h2,
  .platform-card h1 {
    font-size: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
