:root {
  --page: #080808;
  --card: #171717;
  --field: #090909;
  --line: #2d2d2d;
  --line-2: #353535;
  --ink: #f7f7f7;
  --muted: #a4a4a4;
  --muted-2: #737373;
  --font: "ABC Oracle", "Figtree", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; }
svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-page {
  min-height: 100vh;
  padding: 48px 18px 24px;
  display: grid;
  justify-items: center;
  align-content: start;
}

.auth-card {
  width: min(640px, 100%);
  padding: 40px 44px 38px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
}

.auth-brand {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border: 1px solid #2e2e2e;
  border-radius: 15px;
  background: #0a0a0a;
  overflow: hidden;
}
.auth-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.auth-heading { text-align: center; }
.auth-heading h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 600;
}
.auth-heading p {
  margin: 12px 0 36px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.015em;
  font-weight: 400;
}

.auth-form { display: grid; gap: 22px; }
.auth-form label,
.password-label-row {
  color: #f0f0f0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
}
.signin-only,
.signup-only { min-width: 0; }
.auth-form > div > label { display: block; margin-bottom: 10px; }

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  outline: 0;
  background: var(--field);
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.auth-form input:focus {
  border-color: #555;
  box-shadow: 0 0 0 3px rgba(255,255,255,.04);
}
.auth-form input::placeholder { color: #777; }

.password-label-row {
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.forgot-link {
  color: #f5f5f5;
  font-size: 16px;
  font-weight: 500;
  text-underline-offset: 5px;
}
.password-shell { position: relative; }
.password-shell input { padding-right: 62px !important; }
.password-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: #282828;
  color: #cfcfcf;
  cursor: pointer;
}
.password-toggle:hover { background: #303030; color: #fff; }
.password-help {
  margin: 9px 0 0;
  color: var(--muted-2);
  font-size: 13px;
}

.remember-row {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted) !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  cursor: pointer;
}
.remember-row input {
  width: 24px;
  height: 24px;
  accent-color: #fff;
}

.turnstile-shell {
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-error {
  margin: -10px 0 0;
  color: #ff8e8e;
  font-size: 14px;
  line-height: 1.45;
}

.auth-submit {
  height: 62px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #171717;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
}
.auth-submit:hover { background: #f0f0f0; }
.auth-submit:disabled { opacity: .65; cursor: wait; }

.divider {
  margin: 34px 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 16px;
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: #303030;
}

.oauth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.oauth-button {
  height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #303030;
  border-radius: 12px;
  background: transparent;
  color: #f5f5f5;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}
.oauth-button strong { font-size: 22px; font-weight: 600; }
.oauth-button:hover { border-color: #4a4a4a; background: #1d1d1d; }
.oauth-button small {
  margin-left: auto;
  color: #717171;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.oauth-button:disabled {
  cursor: default;
  opacity: .55;
}
.oauth-button:disabled:hover {
  border-color: #303030;
  background: transparent;
}

.mode-switch {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
}
.mode-switch button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid #aaa;
  background: transparent;
  color: #f5f5f5;
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
}

.auth-footer {
  margin-top: 28px;
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 16px;
}
.auth-footer a { text-decoration: none; }
.auth-footer a:hover { color: #fff; }

@media (max-width: 760px) {
  .auth-page { padding: 24px 12px 22px; }
  .auth-card { width: 100%; padding: 28px 20px 26px; border-radius: 22px; }
  .auth-brand { width: 50px; height: 50px; margin-bottom: 22px; }
  .auth-brand img { width: 27px; height: 27px; }
  .auth-heading h1 { font-size: 30px; }
  .auth-heading p { margin: 12px 0 30px; font-size: 18px; }
  .auth-form { gap: 20px; }
  .auth-form label,
  .password-label-row { font-size: 18px; }
  .forgot-link { font-size: 16px; }
  .auth-form input[type="text"],
  .auth-form input[type="email"],
  .auth-form input[type="password"] { height: 56px; font-size: 17px; }
  .remember-row { font-size: 17px !important; }
  .remember-row input { width: 23px; height: 23px; }
  .auth-submit { height: 58px; font-size: 18px; }
  .divider { margin: 30px 0 22px; font-size: 16px; }
  .oauth-grid { grid-template-columns: 1fr; }
  .oauth-button { height: 54px; font-size: 17px; }
  .mode-switch { margin-top: 26px; font-size: 18px; text-align: center; }
  .auth-footer { margin-top: 28px; gap: 22px; font-size: 14px; }
}
