:root {
  --ink: #16181d;
  --bg: #fbf8f3;
  --sky: #1f6fe0;
  --line: #ece9e2;
  --font: "Hanken Grotesk", system-ui, sans-serif;
  --disp: "Bricolage Grotesque", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}

a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 480px; margin: 0 auto; padding: 0 24px; }

.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.auth-main { padding: 48px 0 80px; }

.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 50px -30px rgba(20, 26, 48, 0.2);
}

.auth-card h1 {
  font-family: var(--disp);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.auth-lead {
  margin: 0 0 24px;
  color: #54565e;
  font-size: 15px;
}

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

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: #3f4147;
  margin-bottom: 7px;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #e4e1da;
  border-radius: 9px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2382848b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(31, 111, 224, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #b0b2b9;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  min-height: 1.125rem;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  border: 1.5px solid #b8b4ab;
  background: #fff;
  box-shadow: none;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.form-group input[type="checkbox"] {
  border-radius: 4px;
}

.form-group input[type="checkbox"]:checked {
  border-color: var(--sky);
  background: var(--sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
}

.form-group input[type="radio"] {
  border-radius: 50%;
}

.form-group input[type="radio"]:checked {
  border-color: var(--sky);
  background: radial-gradient(circle, var(--sky) 0 38%, #fff 42%);
}

.form-group input[type="checkbox"]:focus-visible,
.form-group input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 111, 224, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-ink:hover { background: #2a2d35; }

.auth-forgot {
  margin: -8px 0 16px;
  font-size: 14px;
  text-align: right;
}

.success {
  padding: 12px 14px;
  border-radius: 9px;
  background: #ecfdf3;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 14px;
  margin-bottom: 16px;
}

.success.hidden { display: none; }

.error {
  color: #b91c1c;
  font-size: 14px;
  margin-bottom: 16px;
}

.error.hidden { display: none; }

.hidden { display: none !important; }

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #54565e;
}

.header-link {
  font-size: 15px;
  font-weight: 600;
  color: #3f4147;
}

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