:root {
  --page-bg: #f6f6f6;
  --surface: #ffffff;
  --border: #d7d7d7;
  --text: #333333;
  --muted: #707070;
  --link: #0079c2;
  --button: #0a9d2d;
  --button-dark: #087b23;
  --focus: rgba(0, 121, 194, 0.2);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  color: var(--text);
  background: var(--page-bg);
}

a {
  color: var(--link);
}

.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #007bbd;
  text-decoration: none;
}

.brand-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  background:
    linear-gradient(135deg, transparent 44%, #007bbd 45% 58%, transparent 59%),
    linear-gradient(0deg, #007bbd, #007bbd);
  clip-path: polygon(50% 0%, 66% 18%, 66% 38%, 100% 38%, 100% 60%, 66% 60%, 66% 100%, 34% 100%, 34% 60%, 0% 60%, 0% 38%, 34% 38%, 34% 18%);
}

.brand-text {
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-shell {
  min-height: calc(100vh - 92px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 56px 24px 40px;
}

.signin-card {
  width: min(100%, 452px);
  padding: 34px 34px 40px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.signin-card h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #5e5e5e;
}

.divider {
  height: 1px;
  margin: 26px 0 32px;
  background: #dddddd;
}

.signup-copy {
  margin: 0 0 32px;
  font-size: 17px;
  line-height: 1.5;
}

.signup-copy a {
  font-weight: 700;
  text-decoration: underline;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span:first-child {
  font-size: 13px;
  font-weight: 400;
  color: #3f3f3f;
}

.field input {
  width: 100%;
  height: 56px;
  padding: 0 15px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: #fff;
  font: inherit;
  color: var(--text);
}

.field input:focus {
  outline: none;
  border-color: #96bdd8;
  box-shadow: 0 0 0 3px var(--focus);
}

.password-wrap {
  position: relative;
  display: block;
}

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

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9699a3;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 40px;
  font-size: 14px;
}

.checkbox input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--link);
}

.submit-button {
  width: 100%;
  min-height: 61px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--button), var(--button-dark));
  color: #fff;
  font: inherit;
  font-size: 21px;
  font-weight: 700;
  cursor: pointer;
}

.submit-button:hover {
  filter: brightness(1.02);
}

.submit-button:focus-visible,
.signup-copy a:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.status-message {
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.status-message.is-error {
  color: #b42318;
}

.status-message.is-success {
  color: #067647;
}

.dialog {
  position: relative;
  width: min(92vw, 390px);
  padding: 32px 28px 28px;
  border: 1px solid #d8e7dc;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(10, 157, 45, 0.1), transparent 42%),
    #ffffff;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18);
  text-align: center;
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.dialog-success h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.15;
  color: #0f172a;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: #475467;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  background: rgba(15, 23, 42, 0.1);
}

.dialog-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #23c55e, #159947);
  box-shadow: 0 12px 28px rgba(21, 153, 71, 0.28);
}

.dialog-icon svg {
  width: 36px;
  height: 36px;
  fill: #ffffff;
}

.dialog-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #15803d;
}

.dialog-copy {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
  color: #475467;
}

.dialog-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 48px;
  padding: 0 22px;
  background: linear-gradient(180deg, var(--button), var(--button-dark));
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(10, 157, 45, 0.24);
}

.dialog-action:hover {
  filter: brightness(1.03);
}

.dialog-close:focus-visible,
.dialog-action:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .topbar {
    height: 78px;
    padding: 0 20px;
  }

  .brand-text {
    font-size: 24px;
  }

  .page-shell {
    min-height: auto;
    padding: 32px 16px;
  }

  .signin-card {
    padding: 24px 20px 28px;
  }

  .signup-copy {
    font-size: 15px;
  }

  .submit-button {
    min-height: 56px;
    font-size: 18px;
  }

  .dialog {
    padding: 28px 20px 22px;
    border-radius: 20px;
  }

  .dialog-success h2 {
    font-size: 24px;
  }
}
