:root {
  --navy: #0a1628;
  --teal: #00c4a0;
  --cream: #f5f0e8;
  --cream-2: #ede7d9;
  --text: #1a2a42;
  --muted: #6b7a92;
  --danger: #c43636;
  --white: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--cream);
  background-image: radial-gradient(ellipse 72% 60% at 48% 20%, #d4f5ee 0%, transparent 68%),
    radial-gradient(ellipse 40% 34% at 84% 82%, #e9e0f2 0%, transparent 60%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(980px, 92vw);
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 240, 232, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cream-2);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  color: var(--navy);
}

.brand-img {
  height: 58px;
  width: auto;
  display: block;
}

.brand-tag {
  font-size: 0.6rem;
  color: #62748f;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-left: 8px;
}

.link {
  color: #34435b;
  font-weight: 600;
}

.link:hover {
  color: var(--navy);
}

.auth {
  display: grid;
  place-items: center;
  padding: 48px 0 72px;
}

.card {
  width: min(480px, 96vw);
  border-radius: 18px;
  border: 1px solid var(--cream-2);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 44px rgba(10, 22, 40, 0.12);
  padding: 22px;
}

.card-head h1 {
  margin: 0 0 8px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2rem, 5vw, 2.35rem);
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.card-head p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.alert {
  border: 1px solid rgba(196, 54, 54, 0.28);
  background: rgba(196, 54, 54, 0.08);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field span {
  display: block;
  font-size: 0.95rem;
  color: #34435b;
  margin: 0 0 8px;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 12px 13px;
  border-radius: 10px;
  border: 1px solid #d6cdbb;
  background: #fffcf8;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder {
  color: #8b99ad;
}

.field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 196, 160, 0.14);
}

.password-wrap {
  position: relative;
}

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

.icon-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #d6cdbb;
  background: #ffffff;
  color: #3f5470;
  cursor: pointer;
}

.icon-btn:hover {
  background: #f5f7fb;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #506481;
  font-size: 0.95rem;
}

.check input {
  accent-color: #00c4a0;
}

.small-link {
  color: #445b79;
  font-weight: 600;
}

.small-link:hover {
  color: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  margin-top: 2px;
  background: var(--teal);
  color: var(--navy);
  font-size: 1rem;
}

.btn-primary:hover {
  opacity: 0.9;
}

.foot {
  margin: 6px 0 0;
  color: #556b89;
  font-size: 0.95rem;
}

.foot a {
  color: var(--navy);
  font-weight: 700;
}

.foot a:hover {
  text-decoration: underline;
}

.fineprint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .brand-img {
    height: 48px;
  }

  .brand-tag {
    display: none;
  }

  .auth {
    padding-top: 28px;
  }

  .card {
    padding: 18px 16px;
  }
}
