@import url("./tokens.css");

.auth-page {
  min-height: 100vh;
  color: var(--text-on-dark);
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgb(56 189 248 / 0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgb(45 212 191 / 0.08), transparent 50%),
    radial-gradient(circle at 50% 100%, rgb(15 23 42 / 0.9), var(--canvas));
}

.auth-shell {
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vh, 3.5rem);
}

.auth-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-on-dark);
}

.auth-mark,
.app-mark {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
}

.auth-mark-bar,
.app-mark-bar {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--series-hosting), var(--accent-sky));
}

.app-mark-bar:nth-child(1),
.auth-mark-bar:nth-child(1) { height: 10px; }
.app-mark-bar:nth-child(2),
.auth-mark-bar:nth-child(2) { height: 16px; }
.app-mark-bar:nth-child(3),
.auth-mark-bar:nth-child(3) { height: 12px; }

.auth-brand {
  color: var(--text-on-dark);
  letter-spacing: -0.02em;
}

.auth-top-divider {
  width: 1px;
  height: 14px;
  background: rgb(255 255 255 / 0.15);
}

.auth-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr minmax(300px, 420px);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.auth-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 16ch;
}

.auth-hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  line-height: 1.65;
  color: var(--muted-on-dark);
  max-width: 46ch;
  margin: 0 0 1.75rem;
}

.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-benefits li {
  font-size: 0.9375rem;
  color: rgb(226 232 240 / 0.92);
  padding-left: 1.25rem;
  position: relative;
  max-width: 48ch;
}

.auth-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-sky);
}

.auth-benefits strong {
  color: var(--text-on-dark);
  font-weight: 700;
}

.auth-preview {
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  background: rgb(255 255 255 / 0.03);
  margin-bottom: 1.5rem;
  max-width: 420px;
}

.auth-preview-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-on-dark);
  margin-bottom: 1rem;
}

.auth-preview-total {
  color: var(--text-on-dark);
  font-weight: 700;
}

.auth-preview-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.8125rem;
  color: var(--muted-on-dark);
}

.auth-preview-track {
  height: 8px;
  background: rgb(255 255 255 / 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.auth-preview-track i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: var(--series-hosting);
}

.auth-preview-track i.auth-preview-ai { background: var(--series-questions); }
.auth-preview-track i.auth-preview-helper { background: var(--series-helper); }

.auth-disclaimer {
  font-size: 0.8125rem;
  color: var(--muted-on-dark);
  max-width: 46ch;
  margin: 0;
}

.auth-panel-inner {
  border-radius: 20px;
  border: 1px solid rgb(255 255 255 / 0.12);
  background: rgb(255 255 255 / 0.06);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  box-shadow: 0 24px 48px rgb(0 0 0 / 0.35);
}

.auth-panel-inner h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.auth-panel-sub {
  margin: 0 0 1.5rem;
  color: var(--muted-on-dark);
  font-size: 0.9375rem;
}

.field-dark label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(226 232 240 / 0.9);
  margin-bottom: 0.4rem;
}

.field-dark {
  margin-bottom: 1rem;
}

.field-dark input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgb(255 255 255 / 0.14);
  background: rgb(2 6 23 / 0.55);
  color: var(--text-on-dark);
}

.field-dark input:focus {
  outline: none;
  border-color: rgb(56 189 248 / 0.65);
  box-shadow: 0 0 0 3px rgb(56 189 248 / 0.18);
}

.password-field {
  position: relative;
  display: flex;
  align-items: stretch;
}

.password-field input {
  padding-right: 4.75rem;
  position: relative;
  z-index: 0;
}

.password-field input:-webkit-autofill,
.password-field input:-webkit-autofill:hover,
.password-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-on-dark);
  caret-color: var(--text-on-dark);
  transition: background-color 9999s ease-out 0s;
  box-shadow: 0 0 0 1000px rgb(2 6 23 / 0.92) inset;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  z-index: 2;
  transform: translateY(-50%);
  padding: 0.4rem 0.65rem;
  border: 1px solid rgb(56 189 248 / 0.55);
  border-radius: 6px;
  background: rgb(15 23 42 / 0.95);
  color: #7dd3fc;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

.password-toggle:hover {
  background: rgb(30 41 59 / 0.98);
  border-color: rgb(125 211 252 / 0.85);
  color: #e0f2fe;
}

.password-toggle:focus-visible {
  outline: 2px solid rgb(56 189 248 / 0.85);
  outline-offset: 2px;
}

.btn-auth {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.btn-auth:hover {
  transform: translateY(-1px);
}

.auth-page .form-error {
  color: var(--error);
  font-size: 0.875rem;
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
}

@media (max-width: 960px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-preview {
    max-width: none;
  }
}
