/* Aligned with 260508 / 260425 shared researcher theme (styles.shared-theme + admin-shell). */

:root {
  --bg: #262626;
  --fg: #f2f2f2;
  --muted: #a3a3a3;
  --primary: #1677ff;
  --surface: #2f2f2f;
  --surface-2: #3a3a3a;
  --border: #444;
  --researcher-auth-column-max: 42rem;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: clamp(14px, 3.6vw, 16px);
  line-height: 1.45;
}

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.page--stack {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page.researcher-page {
  max-width: 1100px;
  width: 100%;
  min-width: 0;
  padding-top: 24px;
}

.researcher-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
}

.researcher-header__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
}

.researcher-header h1 {
  margin: 0;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.15;
  min-width: 0;
}

.page.researcher-page > #authCard,
.page.researcher-page > .report-auth-hint-wrap {
  width: 100%;
  max-width: min(100%, var(--researcher-auth-column-max));
  margin-inline: auto;
  box-sizing: border-box;
}

.panel {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

.panel > h2 {
  margin-bottom: 8px;
}

.auth-lead {
  margin: 0 0 14px;
}

.auth-sso-block {
  margin-bottom: 4px;
}

.auth-subheading {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.hint-text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.hint-text.is-error,
.hint-text.error {
  color: #ff9c9c;
}

.hint-text.is-ok,
.hint-text.ok {
  color: #86efac;
}

.stack {
  display: grid;
  gap: 14px;
}

.grid-form {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.grid-form label {
  display: grid;
  gap: 6px;
  color: var(--fg);
  font-size: 14px;
}

input {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid #4a4a4a;
  background: var(--surface-2);
  color: var(--fg);
  font: inherit;
  font-size: max(16px, 1em);
  padding: 8px 10px;
}

input:focus {
  outline: 2px solid rgba(22, 119, 255, 0.45);
  outline-offset: 1px;
}

.btn {
  min-height: 44px;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--surface-2);
  color: var(--fg);
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--fg);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.hr {
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.report-auth-hint-wrap {
  margin-top: 12px;
  max-width: min(100%, var(--researcher-auth-column-max));
}

.report-auth-readonly-hint {
  text-align: center;
  word-break: break-all;
}

@media (max-width: 480px) {
  .page {
    padding: 14px 14px 32px;
  }
}
