:root {
  --navy: #102338;
  --navy-light: #1a3b58;
  --blue: #1170b0;
  --blue-dark: #0c568a;
  --green: #5fb536;
  --text: #102338;
  --muted: #667085;
  --border: #dfe5ec;
  --surface: #ffffff;
  --background: #f3f7fa;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  color: var(--text);
  background: var(--background);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

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

.auth-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(430px, 1.05fr);
  min-height: 100vh;
}

.auth-layout.single {
  display: grid;
  grid-template-columns: 1fr;
  background:
    radial-gradient(circle at 15% 20%, rgba(95, 181, 54, 0.1), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(17, 112, 176, 0.12), transparent 32%),
    var(--background);
}

.auth-brand-panel {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 100vh;
  padding: 64px;
  color: #ffffff;
  background:
    radial-gradient(circle at 10% 10%, rgba(95, 181, 54, 0.34), transparent 30%),
    linear-gradient(145deg, var(--navy), #0a1a2a 75%);
}

.auth-brand-panel::after {
  position: absolute;
  right: -130px;
  bottom: -180px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.025),
    0 0 0 140px rgba(255, 255, 255, 0.018);
  content: "";
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.auth-brand-mark,
.auth-mobile-brand span {
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 14px 36px rgba(17, 112, 176, 0.35);
  font-weight: 800;
}

.auth-brand-mark {
  width: 62px;
  height: 62px;
  margin-bottom: 34px;
  border-radius: 19px;
  font-size: 28px;
}

.auth-eyebrow {
  color: #9add79;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.auth-eyebrow.blue {
  color: var(--blue);
}

.auth-brand-content h1 {
  max-width: 510px;
  margin-top: 18px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.auth-brand-content > p:not(.auth-eyebrow) {
  max-width: 490px;
  margin-top: 24px;
  color: #b8c7d5;
  font-size: 16px;
  line-height: 1.7;
}

.auth-brand-content img {
  width: min(360px, 85%);
  margin-top: 48px;
  padding: 13px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
}

.auth-form-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 42px;
}

.auth-card {
  width: min(440px, 100%);
}

.activation-card {
  padding: 46px;
  border: 1px solid rgba(16, 35, 56, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(16, 35, 56, 0.12);
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 11px;
  margin-bottom: 38px;
}

.auth-mobile-brand.visible {
  display: flex;
}

.auth-mobile-brand span {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.auth-mobile-brand strong {
  letter-spacing: 0.08em;
}

.auth-card h2 {
  margin-top: 10px;
  font-size: 36px;
  letter-spacing: -0.035em;
}

.auth-intro {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.auth-form {
  margin-top: 34px;
}

.auth-form label {
  display: block;
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(17, 112, 176, 0.11);
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 78px;
}

.password-control button {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  color: var(--blue-dark);
  background: #edf6fc;
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 12px 25px rgba(17, 112, 176, 0.22);
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
  box-shadow: 0 15px 30px rgba(17, 112, 176, 0.28);
  transform: translateY(-1px);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.form-message {
  display: none;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.form-message.visible {
  display: block;
}

.form-message.error {
  color: var(--danger);
  background: #fff0ee;
}

.form-message.success {
  color: #287814;
  background: #edf9e8;
}

.auth-security-note {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding: 14px;
  border: 1px solid #dcefd3;
  border-radius: 11px;
  color: #4f6850;
  background: #f5fbf2;
  font-size: 11px;
  line-height: 1.5;
}

.auth-security-note span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green);
  font-size: 10px;
}

.password-rules {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.auth-progress {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 28px;
  padding: 14px;
  border-radius: 10px;
  color: var(--blue-dark);
  background: #edf6fc;
  font-size: 13px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(17, 112, 176, 0.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.auth-return {
  display: block;
  margin-top: 24px;
  color: var(--blue);
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.auth-inline-link {
  display: block;
  width: max-content;
  margin: 9px 0 0 auto;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.auth-inline-link:hover,
.auth-inline-link:focus-visible,
.auth-return:hover,
.auth-return:focus-visible {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

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

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

  .auth-brand-panel {
    display: none;
  }

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

  .auth-form-panel {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .auth-form-panel {
    align-items: start;
    padding-top: 34px;
  }

  .activation-card {
    padding: 30px 22px;
    border-radius: 18px;
  }

  .auth-card h2 {
    font-size: 31px;
  }
}
