@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #f1f5f9;
  --surface-raised: rgba(255, 255, 255, .84);
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #0c1e4a;
  --brand-ink: #ffffff;
  --nav: #0f172a;
  --nav-soft: #f8fafc;
  --nav-muted: #64748b;
  --green: #057a55;
  --green-bg: #e9f8f1;
  --amber: #b45309;
  --amber-bg: #fff6df;
  --red: #c24135;
  --red-bg: #fff0ef;
  --blue-bg: #eef2ff;
  --crossref-gray: rgba(216, 210, 196, .8);
  --crossref-yellow: rgba(255, 199, 44, .8);
  --crossref-red: rgba(239, 51, 64, .8);
  --crossref-teal: rgba(1, 118, 152, .8);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 18px 48px rgba(15, 23, 42, .07);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, .04);
  --radius: 8px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: light;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 84% -220px, color-mix(in oklab, var(--brand) 10%, transparent), transparent 62%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 48%, #eef2f7 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.52;
  letter-spacing: 0;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  font-weight: 650;
}

a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(226, 232, 240, .82);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .74);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--line);
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--nav);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 10px 24px rgba(15, 23, 42, .14);
}

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
}

.brand-logo {
  object-fit: contain;
  padding: 0;
}

.brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: .04em;
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
}

.nav-section {
  padding: 18px 18px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 3px;
  padding: 0 10px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 40px;
  width: 100%;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  box-sizing: border-box;
  transition: background .16s ease, color .16s ease;
}

.nav a span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nav a:hover {
  background: color-mix(in oklab, var(--brand) 7%, #ffffff);
  color: var(--ink);
  text-decoration: none;
}

.nav a.active {
  background: #fbbf24;
  color: var(--nav);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .14);
}

.nav a.active span {
  background: color-mix(in oklab, var(--nav) 10%, #ffffff);
  color: var(--nav);
}

.sidebar-footer {
  margin: auto 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-raised);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}

.sidebar-footer span {
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sidebar-footer strong {
  display: block;
  color: var(--ink);
  margin-top: 5px;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0;
}

.main {
  min-width: 0;
  padding: 30px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin: 0 auto 22px;
  max-width: 1180px;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.18;
  font-weight: 750;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
}

.userbox {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.user-pill {
  display: inline-grid;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  box-shadow: var(--shadow-soft);
}

.user-pill strong,
.user-pill small {
  display: block;
  line-height: 1.15;
}

.user-pill strong {
  color: var(--ink);
  font-weight: 650;
}

.user-pill small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.metric-grid,
.split,
.detail-grid,
.panel,
.messages {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  position: relative;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-top-color: var(--metric-accent, var(--brand));
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 12px auto;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--metric-accent, var(--brand));
}

.metric span {
  display: block;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.metric strong {
  display: block;
  margin-top: 9px;
  font-size: 32px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
  color: inherit;
}

.metric:nth-child(1) { --metric-accent: var(--crossref-gray); }
.metric:nth-child(2) { --metric-accent: var(--crossref-yellow); }
.metric:nth-child(3) { --metric-accent: var(--crossref-teal); }
.metric:nth-child(4),
.metric.danger { --metric-accent: var(--crossref-red); }

.split,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(340px, 1fr);
  gap: 18px;
  align-items: start;
}

.journal-detail-grid,
.record-detail-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 18px;
}

.journal-detail-grid > .panel,
.record-detail-grid > .panel {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.journal-summary-panel {
  grid-column: span 9;
  margin-bottom: 0;
}

.record-summary-panel,
.record-doctor-panel {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.crossref-identity-panel {
  grid-column: span 3;
  margin-bottom: 0;
}

.record-full-panel {
  grid-column: 1 / -1;
}

.dashboard-stack {
  display: grid;
  gap: 18px;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-stack > .panel {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.panel {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  backdrop-filter: blur(14px);
}

.panel.narrow { max-width: 760px; }

.panel h2 {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
}

.panel p { margin-top: 0; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head h2 { margin: 0; }

.registry-head {
  align-items: flex-start;
}

.registry-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 8px;
  width: min(560px, 100%);
}

.registry-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}

.user-registry-actions {
  flex-wrap: wrap;
}

.user-registry-actions .button-row {
  justify-content: flex-start;
}

.user-registry-actions .inline-filter {
  margin-left: 0;
}

.registry-count {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.registry-count a {
  color: var(--ink-soft);
}

.mini-button,
.registry-count a:not(.button),
.mini-card-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 9px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  box-shadow: var(--shadow-soft);
}

.mini-button:hover,
.registry-count a:not(.button):hover,
.mini-card-head a:hover {
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  font-weight: inherit;
}

.sort-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.sort-link::after {
  content: "";
}

.sort-link.active.asc::after {
  content: "\25B2";
  color: var(--brand);
  font-size: 10px;
}

.sort-link.active.desc::after {
  content: "\25BC";
  color: var(--brand);
  font-size: 10px;
}

th:first-child { border-top-left-radius: var(--radius); }
th:last-child { border-top-right-radius: var(--radius); }
tbody tr:hover td { background: rgba(12, 30, 74, .035); }
tbody tr:last-child td { border-bottom: 0; }

.button {
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  padding: 9px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 100%;
  box-shadow: var(--shadow-soft);
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .08s ease, box-shadow .16s ease;
}

.button:hover {
  background: var(--surface-soft);
  text-decoration: none;
}

.button:active { transform: translateY(1px); }

.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 10px 22px color-mix(in oklab, var(--brand) 18%, transparent);
}

.button.primary:hover {
  background: color-mix(in oklab, var(--brand) 88%, #000000);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.button-row form {
  margin: 0;
}

.button.ghost {
  background: rgba(255, 255, 255, .80);
  color: var(--ink-soft);
  border-color: var(--line);
}

.registry-count .button {
  min-height: 34px;
  background: var(--surface);
}

.button.danger {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.button.danger:hover {
  background: color-mix(in oklab, var(--red) 88%, #000000);
}

.google-button {
  width: 100%;
  margin: 8px 0 16px;
  background: white;
  color: var(--ink);
}

.google-button::before {
  content: "G";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: #1a73e8;
  font-weight: 900;
}

.email-code-button {
  width: 100%;
  margin-top: 0;
  background: white;
  color: var(--muted);
  border-color: var(--line-strong);
}

.email-code-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
}

.login-guide-button {
  width: 100%;
  margin-top: 10px;
  background: white;
  color: var(--ink-soft);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.login-guide-button:hover {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink);
  text-decoration: none;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.login-divider-compact {
  margin: 16px 0 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status.validation_passed,
.status.submitted,
.status.registered,
.status.accepted,
.status.active,
.status.parsed,
.status.crossref_doi,
.status.crossref_alias,
.status.local_history,
.status.first_submission {
  background: var(--green-bg);
  color: var(--green);
}

.status.validation_failed,
.status.failed,
.status.suspended,
.status.needs_review {
  background: var(--red-bg);
  color: var(--red);
}

.status.uploaded,
.status.pending,
.status.corrected,
.status.resubmitted,
.status.unverified {
  background: var(--amber-bg);
  color: var(--amber);
}

.form-control,
.form-select,
.form-stack input,
.form-stack select,
.form-stack textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: white;
  box-shadow: var(--shadow-soft);
}

.form-control:focus,
.form-select:focus,
.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus {
  outline: 3px solid color-mix(in oklab, var(--brand) 18%, transparent);
  border-color: var(--brand);
}

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

.form-stack label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 650;
}

.form-panel {
  max-width: 920px;
}

.stacked-form {
  display: grid;
  gap: 18px;
}

.form-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: color-mix(in oklab, var(--surface-muted) 55%, #ffffff);
}

.form-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.section-description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

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

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.form-grid label,
.stacked-form label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 650;
}

.form-grid label span,
.stacked-form label span {
  font-size: 12px;
}

.form-field {
  align-self: start;
}

.form-field > span {
  display: flex;
  align-items: flex-end;
  min-height: 18px;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.toggle-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: white;
}

.toggle-line input,
.checkbox-list input {
  width: auto;
  box-shadow: none;
}

.checkbox-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checkbox-list label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: white;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.form-error {
  color: var(--red);
  font-weight: 650;
}

.role-list {
  display: grid;
  gap: 5px;
}

.role-list span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}

.table-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.danger-link {
  color: var(--red);
}

.user-two-line {
  display: grid;
  gap: 2px;
}

.user-two-line strong {
  color: var(--ink);
  font-weight: 750;
}

.user-two-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.file-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.file-hint.error,
.errorlist {
  color: var(--red);
}

.errorlist {
  margin: 4px 0 0;
  padding-left: 18px;
  font-weight: 800;
}

.upload-debug {
  display: grid;
  gap: 3px;
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  background: var(--amber-bg);
  color: var(--amber);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 750;
}

.upload-debug strong {
  color: var(--ink);
}

.checkline {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 700 !important;
}

.checkline input { width: auto; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.journal-summary-grid,
.record-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crossref-identity-grid {
  grid-template-columns: 1fr;
}

.meta-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: color-mix(in oklab, var(--surface-muted) 72%, #ffffff);
  min-width: 0;
}

dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

dd {
  margin: 5px 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-email {
  font-weight: 400;
}

.rank-list {
  display: grid;
  gap: 8px;
}

.rank-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: color-mix(in oklab, var(--surface-muted) 72%, #ffffff);
}

.rank-list span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-weight: 500;
}

.rank-list strong {
  color: var(--brand);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.doi-breakdown-panel .panel-head {
  align-items: flex-start;
}

.doi-breakdown-panel .panel-head p {
  margin: 4px 0 0;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-summary-grid {
  margin-bottom: 18px;
}

.finance-table-actions {
  margin-top: 6px;
  margin-bottom: 10px;
}

.finance-table-wrap {
  margin-top: 6px;
}

.mini-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--surface-muted) 72%, #ffffff);
  padding: 14px;
}

.mini-card h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
}

.mini-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mini-card-head h3 {
  margin: 0;
}

.mini-card-head a {
  flex: 0 0 auto;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.pager a,
.pager span,
.pager strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 8px;
  background: white;
  font-weight: 600;
}

.pager .mini-button {
  min-height: 28px;
}

.pager span {
  opacity: .55;
}

.pager strong {
  color: var(--ink-soft);
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stat-card strong {
  margin-top: 10px;
  color: var(--brand);
  font-size: 32px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1;
}

.stat-card small {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
}

.rank-list.compact div {
  padding: 8px 10px;
}

.inline-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.inline-filter label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.inline-filter select {
  min-width: 210px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.finding-list {
  display: grid;
  gap: 10px;
}

.finding {
  border-left: 4px solid var(--line-strong);
  background: color-mix(in oklab, var(--surface-muted) 72%, #ffffff);
  padding: 12px;
  border-radius: var(--radius);
}

.finding p {
  margin: 5px 0;
  color: var(--ink-soft);
}

.finding small { color: var(--muted); }
.finding.error { border-left-color: var(--red); }
.finding.warning { border-left-color: var(--amber); }
.finding.info { border-left-color: var(--brand); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.actions form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scopus-review-form {
  display: grid;
  grid-template-columns: 170px minmax(260px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.scopus-review-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.metadata-note {
  margin: 10px 0 0;
  font-size: 13px;
}

.raw-response {
  margin-top: 8px;
}

.raw-response summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.raw-response pre {
  max-height: 220px;
  overflow: auto;
  margin: 8px 0 0;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.inline-form.stacked {
  grid-template-columns: 1fr;
}

.muted { color: var(--muted); }

.messages {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.message {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  padding: 12px 14px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.message.success {
  border-color: #b7ebcd;
  background: var(--green-bg);
  color: var(--green);
}

.message.error {
  border-color: #fac5bf;
  background: var(--red-bg);
  color: var(--red);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(780px 420px at 90% -160px, rgba(12, 30, 74, .12), transparent 62%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 100%);
}

.login-panel {
  width: min(440px, calc(100vw - 32px));
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-panel h1 {
  margin: 0 0 16px;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: 0;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  margin-bottom: 24px;
  border-bottom: 0;
  padding: 0;
}

.login-brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: var(--radius);
  background: white;
}

.login-brand-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  padding: 0;
}

.login-brand-mark {
  display: grid;
  place-items: center;
  background: var(--nav);
  color: white;
  font-size: 16px;
  font-weight: 800;
}

.login-brand strong {
  display: block;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.15;
}

.login-brand small { color: var(--muted); }

.login-alt {
  margin: 14px 0 0;
  text-align: center;
}

.guide-body {
  min-height: 100vh;
  background:
    radial-gradient(780px 420px at 92% -170px, rgba(12, 30, 74, .12), transparent 62%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 100%);
  padding: 28px;
}

.guide-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
}

.guide-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.guide-brand:hover {
  text-decoration: none;
}

.guide-brand strong,
.guide-brand small {
  display: block;
}

.guide-brand strong {
  font-size: 15px;
  font-weight: 800;
}

.guide-brand small {
  color: var(--muted);
  font-weight: 500;
}

.guide-hero-text {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: 900px;
}

.guide-hero > .button {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.guide-hero-text h1 {
  margin: 4px 0 8px;
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: 0;
}

.guide-hero-text p {
  margin: 0;
  color: var(--ink-soft);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.guide-card,
.guide-shot,
.guide-faq {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.guide-card {
  padding: 18px;
}

.guide-step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-weight: 800;
  margin-bottom: 12px;
}

.guide-card h2,
.guide-shot h2,
.guide-faq h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.guide-card p,
.guide-card li,
.guide-shot p,
.guide-faq p {
  color: var(--ink-soft);
}

.guide-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.guide-screens {
  display: grid;
  gap: 14px;
}

.guide-shot {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px;
}

.guide-shot img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}

.guide-faq {
  margin-top: 18px;
  padding: 18px;
}

.guide-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-faq h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.guide-faq p {
  margin: 0;
}

.site-footer {
  max-width: 1180px;
  margin: 28px auto 0;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 6fr 4fr 2fr;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.footer-grid section {
  min-width: 0;
}

.footer-grid h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.footer-grid p {
  margin: 0;
}

.footer-grid a {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.footer-logo,
.footer-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: var(--radius);
}

.footer-logo {
  object-fit: contain;
}

.footer-mark {
  display: grid;
  place-items: center;
  background: var(--nav);
  color: white;
  font-weight: 800;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  color: var(--ink);
  font-weight: 750;
}

.footer-copy {
  border-top: 1px solid var(--line);
  padding: 14px 0 24px;
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
  }
  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar-footer { margin-top: 18px; }
  .main { padding: 18px; }
  .split,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .journal-detail-grid,
  .record-detail-grid {
    grid-template-columns: 1fr;
  }

  .journal-summary-panel,
  .crossref-identity-panel,
  .record-summary-panel,
  .record-doctor-panel,
  .record-full-panel {
    grid-column: auto;
  }

  .journal-summary-grid,
  .record-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-card-grid,
  .dashboard-card-grid.two {
    grid-template-columns: 1fr;
  }

  .guide-hero,
  .guide-shot {
    grid-template-columns: 1fr;
  }

  .guide-hero > .button,
  .guide-hero-text {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .guide-grid,
  .guide-faq-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .doi-breakdown-panel .panel-head,
  .inline-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-filter {
    width: 100%;
    margin-left: 0;
  }

  .inline-filter select {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .userbox {
    justify-content: space-between;
    white-space: normal;
  }
  .metric-grid,
  .meta-grid,
  .journal-summary-grid,
  .record-summary-grid {
    grid-template-columns: 1fr;
  }
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .inline-form {
    grid-template-columns: 1fr;
  }
  .scopus-review-form {
    grid-template-columns: 1fr;
  }
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  td,
  th {
    white-space: normal;
    min-width: 120px;
  }
  .guide-body {
    padding: 16px;
  }
  .guide-hero {
    gap: 14px;
  }
  .guide-hero-text h1 {
    font-size: 25px;
  }
}
