:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f6f8fb;
  color: #1f2937;
}

body {
  margin: 0;
  background: #f6f8fb;
}

.topbar {
  background: #0b5aa9;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar h1 {
  margin: 0;
}

.topbar p {
  margin: 0.3rem 0 0;
}

.auth-inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.auth-inline input,
.auth-inline button {
  width: auto;
  min-width: 140px;
  margin-top: 0;
}


.auth-gate {
  margin: 1rem;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 1rem;
}

.hidden-by-auth {
  display: none;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
}

.tab-btn {
  width: auto;
  background: #334155;
}

.tab-btn.active {
  background: #0b5aa9;
}

main {
  padding: 0 1rem 1rem;
}

.page {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.page.active {
  display: grid;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 1rem;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

input,
select,
textarea,
button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.4rem;
  padding: 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.actions,
.row,
.doc-actions,
.split-2,
.split-3 {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.split-2 > label,
.split-3 > label {
  flex: 1;
  min-width: 220px;
}

button {
  background: #0b5aa9;
  color: #fff;
  border: none;
  cursor: pointer;
}

button.secondary {
  background: #475569;
}

button.danger {
  background: #b91c1c;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hint {
  color: #475569;
}

.report-output {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 0.8rem;
  min-height: 140px;
  overflow-x: auto;
  white-space: pre-wrap;
}

.doc-item {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.doc-item pre {
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.75rem;
  overflow-x: auto;
}

.hidden {
  display: none;
}

.file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #e2e8f0;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}

.file-label input {
  margin-top: 0;
}
