:root {
  --navy: #102a43;
  --navy-strong: #0b1f33;
  --blue: #1f6feb;
  --blue-soft: #e8f1ff;
  --green: #20a36b;
  --text: #243447;
  --muted: #65758b;
  --line: #d9e2ec;
  --surface: #ffffff;
  --background: #f4f7fb;
  --error: #c2413a;
  --shadow: 0 22px 60px rgba(16, 42, 67, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(232, 241, 255, 0.78), rgba(244, 247, 251, 0.92)),
    var(--background);
}

a {
  color: inherit;
}

.login-page {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 72px;
  padding: 48px 0;
}

.brand-panel {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--navy), var(--blue));
  box-shadow: 0 14px 28px rgba(16, 42, 67, 0.18);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark img {
  display: block;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}

.eyebrow,
.card-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  color: var(--navy-strong);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.brand-description {
  max-width: 620px;
  margin-bottom: 34px;
  color: #40566f;
  font-size: 1.16rem;
  line-height: 1.65;
}

.feature-list {
  display: grid;
  gap: 15px;
  max-width: 460px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 226, 236, 0.86);
  border-radius: 8px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.66);
  font-weight: 700;
}

.feature-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset 0 0 0 5px #ffffff;
}

.form-panel {
  display: flex;
  justify-content: flex-end;
}

.login-card {
  width: min(100%, 440px);
  padding: 38px;
  border: 1px solid rgba(217, 226, 236, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.card-header {
  margin-bottom: 30px;
}

h2 {
  margin-bottom: 0;
  color: var(--navy-strong);
  font-size: 2rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 750;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: #fbfdff;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input::placeholder {
  color: #94a3b8;
}

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

.form-group.has-error input {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(194, 65, 58, 0.1);
}

.error-message {
  min-height: 18px;
  margin: 7px 0 0;
  color: var(--error);
  font-size: 0.84rem;
  line-height: 1.35;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 26px;
  font-size: 0.92rem;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
}

.remember-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.forgot-link {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.login-button {
  position: relative;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy), #174a7c);
  box-shadow: 0 14px 26px rgba(16, 42, 67, 0.2);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(16, 42, 67, 0.24);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.88;
  transform: none;
}

.button-loader {
  display: none;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.login-button.is-loading .button-text {
  display: none;
}

.login-button.is-loading .button-loader {
  display: block;
}

.form-status {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

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

@media (max-width: 860px) {
  .login-page {
    width: min(100% - 32px, 560px);
    grid-template-columns: 1fr;
    gap: 34px;
    align-items: start;
    padding: 34px 0;
  }

  .brand-panel {
    gap: 16px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .brand-description {
    margin-bottom: 24px;
    font-size: 1.02rem;
  }

  .form-panel {
    justify-content: stretch;
  }

  .login-card {
    width: 100%;
    padding: 28px;
  }
}

@media (max-width: 520px) {
  body {
    background: var(--background);
  }

  .login-page {
    width: min(100% - 24px, 420px);
    padding: 24px 0;
  }

  .brand-panel {
    display: block;
  }

  .brand-mark {
    margin-bottom: 18px;
  }

  h1 {
    font-size: 2.7rem;
  }

  h2 {
    font-size: 1.62rem;
  }

  .feature-list {
    gap: 10px;
  }

  .login-card {
    padding: 24px 18px;
    border-radius: 14px;
  }

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