:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
  background: #f5f7fa;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 10px; padding: .85rem 1rem; font-weight: 700; background: #1f5f46; color: white; }
button.secondary { background: #e7ece9; color: #18392e; }
button.compact { padding: .55rem .75rem; font-size: .9rem; }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 9px; padding: .8rem; background: white; color: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid #a7c8b8; border-color: #4d826b; }
label { display: grid; gap: .4rem; margin-bottom: 1rem; font-weight: 650; }
label small { font-weight: 400; }
fieldset { border: 1px solid #d7dee6; border-radius: 10px; padding: 1rem; margin: 0 0 1rem; }
legend { font-weight: 800; padding: 0 .35rem; }
.choice { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .7rem; margin: .8rem 0; font-weight: 500; }
.choice input { width: auto; margin-top: .25rem; }
.appbar, .adminbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; background: white; border-bottom: 1px solid #dce3ea; }
.appbar > div { display: flex; align-items: center; gap: .75rem; }
.app-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.adminbar nav { display: flex; gap: .8rem; flex-wrap: wrap; }
.adminbar a { color: #1f5f46; text-decoration: none; font-weight: 700; }
.network-pill, .pill { display: inline-block; border-radius: 999px; padding: .25rem .55rem; font-size: .8rem; background: #eef2f5; color: #485569; }
.app-main, .admin-main { max-width: 900px; margin: 0 auto; padding: 1rem; }
.admin-main { max-width: 1250px; }
.card { background: white; border: 1px solid #dde4eb; border-radius: 14px; padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.03); margin-bottom: 1rem; }
.card h1, .card h2, .card h3 { margin-top: 0; }
.narrow { max-width: 420px; }
.hidden { display: none !important; }
.notice { padding: .8rem 1rem; border-radius: 10px; background: #eef6f2; margin-bottom: 1rem; }
.notice.error { background: #fff0f0; color: #8b1d1d; }
.notice.success { background: #ecf7ef; color: #1f5f46; }
.language-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.language-grid button { min-height: 58px; }
.context-banner { position: sticky; top: 57px; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #eaf3ee; border: 1px solid #cedfd6; border-radius: 12px; padding: .75rem 1rem; margin-bottom: 1rem; }
.context-banner span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.context-banner strong { display: block; }
.small-note { font-size: .88rem; color: #5c6673; margin: .5rem 0 1rem; }
.stack-buttons { display: grid; gap: .75rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 1rem; }
.summary-heading { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.summary-heading h1 { margin: 0; }
.queue-line { margin-bottom: .75rem; }
.captured-list { display: grid; gap: .75rem; margin-top: 1rem; }
.captured-item { border: 1px solid #dce3ea; border-radius: 10px; padding: .8rem; }
.captured-item strong { display: block; }
.captured-meta { font-size: .86rem; color: #687585; margin-top: .25rem; }
.status-uploaded { color: #1f6b46; font-weight: 700; }
.status-pending { color: #9a5a00; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.pill { text-decoration: none; }
.pill.active { background: #1f5f46; color: white; }
.table-wrap { overflow-x: auto; background: white; border: 1px solid #dde4eb; border-radius: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 900px; }
th, td { text-align: left; vertical-align: top; padding: .7rem; border-bottom: 1px solid #e5e9ee; font-size: .9rem; }
th { background: #f5f7fa; position: sticky; top: 0; }
dl { display: grid; grid-template-columns: minmax(130px, 180px) 1fr; gap: .45rem .8rem; margin: 0; }
dt { font-weight: 800; } dd { margin: 0; overflow-wrap: anywhere; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: .8rem; }
.media-grid img { width: 100%; height: auto; border-radius: 8px; }
.form-row { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; align-items: end; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
@media (max-width: 720px) {
  .review-grid, .form-row { grid-template-columns: 1fr; }
  .appbar { align-items: flex-start; }
  .context-banner { top: 66px; }
  dl { grid-template-columns: 1fr; gap: .1rem; }
  dd { margin-bottom: .6rem; }
}
