:root {
  color-scheme: light;
  --text: #142033;
  --muted: #66758f;
  --line: #d9e1ef;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --primary: #0b6bcb;
  --primary-dark: #084f9b;
  --accent: #10a37f;
  --danger: #c9363f;
  --shadow: 0 24px 70px rgba(15, 36, 65, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #edf3f9;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(11, 107, 203, 0.18), transparent 34%),
    linear-gradient(315deg, rgba(16, 163, 127, 0.16), transparent 32%),
    #edf3f9;
}

button,
input {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.shell {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(340px, 430px);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px;
  color: #ffffff;
  background:
    linear-gradient(rgba(8, 30, 55, 0.18), rgba(8, 30, 55, 0.28)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='920' height='920' viewBox='0 0 920 920'%3E%3Crect width='920' height='920' fill='%230d3f72'/%3E%3Cg opacity='.32'%3E%3Cpath d='M0 190C130 96 233 91 351 177c127 92 243 82 366-31 77-71 143-97 203-99v873H0Z' fill='%2310a37f'/%3E%3Cpath d='M0 438c119-92 236-104 353-36 142 83 251 71 366-36 74-69 141-102 201-111v665H0Z' fill='%230b6bcb'/%3E%3Cpath d='M0 654c116-52 222-44 319 24 130 90 267 87 410-9 67-45 130-72 191-81v332H0Z' fill='%23ffffff'/%3E%3C/g%3E%3Cg opacity='.16' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M92 186h716M92 306h716M92 426h716M92 546h716M92 666h716M210 82v756M360 82v756M510 82v756M660 82v756'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark,
.mobile-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #0b294b;
  background: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.metric {
  min-height: 102px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.metric-wide {
  grid-column: span 2;
}

.metric span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.metric strong {
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(28px, 5vw, 54px);
  background: var(--panel);
}

.card-head {
  margin-bottom: 8px;
}

.mobile-mark {
  display: none;
  margin-bottom: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.field {
  display: grid;
  gap: 8px;
  color: #2a3850;
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 15px;
  color: var(--text);
  background: var(--panel-strong);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus {
  border-color: rgba(11, 107, 203, 0.72);
  box-shadow: 0 0 0 4px rgba(11, 107, 203, 0.12);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 96px;
}

.ghost-button {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 36px;
  min-width: 78px;
  border: 0;
  border-radius: 9px;
  color: var(--primary);
  background: #ecf5ff;
  cursor: pointer;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.row a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.alert {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(201, 54, 63, 0.28);
  border-radius: 12px;
  color: var(--danger);
  background: rgba(201, 54, 63, 0.08);
  font-size: 14px;
  line-height: 1.45;
}

.submit {
  position: relative;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(11, 107, 203, 0.26);
}

.submit:disabled {
  cursor: wait;
  opacity: 0.82;
}

.spinner {
  width: 18px;
  height: 18px;
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.submit.is-loading .spinner {
  display: block;
}

.fineprint {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

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

@media (max-width: 820px) {
  .page {
    padding: 18px;
  }

  .shell {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 22px;
  }

  .visual {
    display: none;
  }

  .mobile-mark {
    display: grid;
  }

  .card {
    min-height: calc(100vh - 36px);
  }
}

@media (max-width: 460px) {
  .card {
    padding: 26px 20px;
  }

  .row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .row a {
    white-space: normal;
  }

  .ghost-button {
    min-width: 70px;
    font-size: 13px;
  }

  .password-wrap input {
    padding-right: 88px;
  }
}
