:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --navy: #172b4d;
  --navy-dark: #0b1f3a;
  --line: #d8dee7;
  --background: #f4f6f8;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(23, 43, 77, 0.055), transparent 25rem),
    radial-gradient(circle at 90% 70%, rgba(107, 127, 158, 0.08), transparent 28rem),
    var(--background);
}

button,
input {
  font: inherit;
}

.auth-captcha {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

header,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: linear-gradient(145deg, #243b62, #142846);
  box-shadow: 0 5px 12px rgba(23, 43, 77, 0.18);
}

svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.back-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

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

main {
  display: grid;
  min-height: calc(100vh - 180px);
  padding: 42px 20px 70px;
  place-items: center;
}

.auth-wrap {
  width: min(430px, 100%);
}

.auth-intro {
  margin-bottom: 24px;
  text-align: center;
}

.auth-intro .eyebrow {
  margin: 0 0 9px;
  color: #637491;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 40px);
  letter-spacing: -0.045em;
}

.auth-intro > p:last-child {
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.auth-card {
  padding: 28px;
  border: 1px solid #dfe4eb;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(15, 31, 55, 0.09);
}

.field {
  margin-bottom: 16px;
}

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

label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 650;
}

.field-row a {
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.input-wrap {
  position: relative;
}

.input-wrap > svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  color: #8993a4;
  pointer-events: none;
  transform: translateY(-50%);
}

.input-wrap input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  border: 1px solid #c8d0dc;
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  transition: 150ms ease;
}

.input-wrap input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(23, 43, 77, 0.1);
}

.input-wrap input::placeholder {
  color: #9aa3b1;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #7b8798;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--navy);
  background: #f1f4f8;
}

.password-toggle svg {
  width: 17px;
}

.password-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.check-row input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--navy);
}

.check-row a {
  color: var(--navy);
  font-weight: 600;
}

.submit-button {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--navy);
  box-shadow: 0 5px 14px rgba(23, 43, 77, 0.2);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: 150ms ease;
}

.submit-button:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
}

.dashboard-logout {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--navy);
  background: white;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.dashboard-card h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.dashboard-card ul {
  margin: 0 0 24px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}

.dashboard-upload-link {
  display: block;
  text-align: center;
  text-decoration: none;
}

.submit-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.secondary-button {
  width: 100%;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--navy);
  background: white;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.form-heading {
  margin-bottom: 22px;
}

.form-heading h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-message {
  margin: 14px 0 0;
  padding: 10px 11px;
  border: 1px solid #d8e1ec;
  border-radius: 9px;
  color: #46566d;
  background: #f4f7fa;
  font-size: 11px;
  line-height: 1.45;
}

.form-message[data-type="error"] {
  border-color: #f1d0d0;
  color: #9b2c2c;
  background: #fff5f5;
}

.form-message[data-type="success"] {
  border-color: #bfe3cb;
  color: #166534;
  background: #f0fdf4;
}

.auth-switch {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.auth-switch a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 22px 0 28px;
  border-top: 1px solid #dfe4eb;
  color: #7b8798;
  font-size: 11px;
}

footer nav {
  display: flex;
  gap: 14px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  main {
    padding-top: 25px;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: 16px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
