.auth-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}
.auth-page .auth-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 36px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.auth-brand {
  display: inline-block;
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -1.5px;
  color: #fff;
  text-decoration: none;
  margin-bottom: 70px;
}
.auth-brand span {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  color: #8fa5c4;
  margin-top: 4px;
}
.auth-story h1 {
  font-size: clamp(30px, 3vw, 43px);
  line-height: 1.17;
  letter-spacing: -1.3px;
  margin: 18px 0;
}
.auth-story > p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 34px;
}
.auth-benefit {
  display: flex;
  gap: 17px;
  margin: 23px 0;
}
.auth-benefit > span {
  color: #80b8ff;
  font-size: 11px;
  padding-top: 3px;
}
.auth-benefit strong {
  font-weight: 600;
}
.auth-benefit p {
  margin: 5px 0 0;
  line-height: 1.6;
  color: #8fa2bd;
  font-size: 12px;
}
.auth-panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 20px 80px #0003;
}
.auth-credit,
.credit-badge {
  display: inline-block;
  color: #b7d7ff;
  background: #142640;
  border: 1px solid #28496b;
  border-radius: 20px;
  padding: 6px 11px;
  font-size: 11px;
}
.auth-panel h2 {
  font-size: 27px;
  margin: 22px 0 10px;
  letter-spacing: -0.7px;
}
.auth-panel > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.auth-panel form {
  margin-top: 25px;
}
.auth-panel label,
.research-setup label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 550;
  color: #d6e1f0;
  letter-spacing: 0;
}
.auth-panel label {
  margin-top: 18px;
}
.auth-panel input,
.research-setup input,
.research-setup select,
.research-setup textarea {
  width: 100%;
  min-width: 0;
  background: #0b1120;
  color: #eff6ff;
  border: 1px solid #33435c;
  border-radius: 7px;
  padding: 12px;
  font: inherit;
  font-size: 13px;
}
.auth-panel input:focus,
.research-setup input:focus,
.research-setup select:focus,
.research-setup textarea:focus {
  outline: 2px solid #609cee;
  outline-offset: 1px;
}
.auth-panel input::placeholder,
.research-setup input::placeholder,
.research-setup textarea::placeholder {
  color: #6f819c;
  opacity: 1;
}
.auth-panel button,
.research-setup button[type="submit"] {
  background: #b8d9ff;
  color: #112137;
  border: 1px solid #b8d9ff;
  border-radius: 7px;
  padding: 13px 20px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.auth-panel button {
  width: 100%;
  margin-top: 22px;
}
.auth-panel button:disabled,
.research-setup button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.auth-panel a {
  color: #a9d0ff;
}
.auth-panel .auth-switch {
  text-align: center;
  margin-top: 24px;
}
.auth-panel .auth-footnote {
  text-align: center;
  font-size: 11px;
  color: #8395b0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  margin-top: 25px;
}
.field-hint {
  margin: 8px 0 0;
  color: #91a2bb;
  font-size: 11px;
  line-height: 1.6;
}
.form-error {
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.6;
}
.form-success {
  color: #a7e6c1;
  font-size: 12px;
  line-height: 1.6;
}
.research-setup {
  padding: 28px;
}
.setup-heading h2 {
  margin: 8px 0 10px;
  font-size: 22px;
  letter-spacing: -0.5px;
}
.setup-heading p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 12px;
  max-width: 650px;
}
.research-setup fieldset {
  padding: 0;
  margin: 25px 0 0;
  border: 0;
  min-width: 0;
}
.research-setup legend {
  padding: 0;
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 16px;
}
.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.setup-grid .full-field {
  grid-column: 1/-1;
}
.research-setup label span {
  color: #8b9ab1;
  font-size: 11px;
  font-weight: 400;
}
.research-setup textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.7;
}
.research-setup .setup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.setup-actions p {
  color: #8fa5c1;
  font-size: 11px;
  line-height: 1.7;
  margin: 0;
}
.credit-state {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 25px;
}
.credit-state h2 {
  font-size: 19px;
  margin: 0 0 8px;
}
.credit-state p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 12px;
}
.credit-state a {
  color: #b0d5ff;
  font-size: 12px;
}
.preview-research-context {
  font-size: 11px;
  color: #93a8c5;
  margin: 9px 0 0;
  line-height: 1.6;
}
.sidebar-bottom strong,
.sidebar-bottom span {
  overflow-wrap: anywhere;
}
body:not(.operator-mode) #settings {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .auth-page .auth-shell {
    display: block;
    padding: 28px 20px;
    max-width: 520px;
  }
  .auth-brand {
    margin-bottom: 30px;
  }
  .auth-story h1 {
    font-size: 31px;
  }
  .auth-story > p {
    margin-bottom: 25px;
  }
  .auth-benefit {
    display: none;
  }
  .auth-panel {
    padding: 25px;
    margin-top: 30px;
  }
  .setup-grid {
    grid-template-columns: 1fr;
  }
  .research-setup {
    padding: 21px;
  }
  .research-setup .setup-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .header-right {
    gap: 9px;
  }
  .credit-badge {
    font-size: 9px;
    padding: 5px 8px;
  }
}

.auth-panel .auth-help {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  font-size: 12px;
}
.auth-panel .auth-text-button {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: #a9d0ff;
  font-size: 12px;
  font-weight: 400;
  text-align: left;
  text-decoration: underline;
}
.confirmation-panel {
  margin-top: 24px;
  color: #b1c1d7;
  font-size: 13px;
  line-height: 1.7;
}
.auth-panel .auth-secondary {
  background: #142640;
  color: #b7d7ff;
  border-color: #28496b;
  margin: 12px 0 16px;
}
