:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --border: #dcdde0;
  --text: #1f2328;
  --text-muted: #656d76;
  --accent: #1d4ed8;
  --accent-hover: #1739ad;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", sans-serif;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: 18px;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 6px;
}

label:first-child {
  margin-top: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

@media (min-width: 600px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="url"],
  input[type="file"],
  textarea,
  select {
    font-size: 14px;
  }
}

textarea {
  resize: vertical;
  min-height: 80px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
}

button:hover {
  background: var(--accent-hover);
}

button.secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

.empty {
  color: var(--text-muted);
  font-size: 14px;
  padding: 16px 0;
}

.status-badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
}

.login-page {
  max-width: 360px;
  margin: 100px auto;
}

.need-accordion {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.need-accordion:last-child {
  margin-bottom: 0;
}

.need-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
}

.need-accordion-count {
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.need-accordion-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
}

.need-accordion.open .need-accordion-chevron {
  transform: rotate(180deg);
}

.need-accordion-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  background: var(--bg);
}

.need-accordion.open .need-accordion-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.need-evidence-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}

.need-evidence-row .meta {
  color: var(--text-muted);
  white-space: nowrap;
}

.inline-text-display {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: text;
  min-height: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.inline-text-display:hover,
.inline-text-display:focus {
  border-color: var(--border);
  background: var(--bg);
  outline: none;
}

.inline-text-display.empty {
  color: var(--text-muted);
}

textarea.inline-editable-source {
  resize: none;
  overflow: hidden;
}

.danger-btn {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

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