:root {
  --green: #10b981;
  --green-dark: #047857;
  --ink: #373943;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --red: #b91c1c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Inter, system-ui, sans-serif; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 20px; background: #fff; border-bottom: 2px solid var(--green); }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.who { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--muted); }
main { max-width: 960px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 24px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 0 0 12px; }
a { color: var(--green-dark); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 0 0 16px; }
.narrow { max-width: 420px; margin: 40px auto; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.full { grid-column: 1 / -1; }
label { display: block; font-size: 14px; font-weight: 600; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px; font: inherit; font-weight: 400; color: inherit; background: #fff; border: 1px solid #d1d5db; border-radius: 6px; }
input[type=checkbox] { display: inline; width: auto; margin: 0 6px 0 0; }
input.small { width: 90px; margin: 0; }
fieldset { border: 0; padding: 0; margin: 12px 0 0; }
legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 4px; }
.check { font-weight: 400; margin: 4px 0; }
.check.end { align-self: end; padding-bottom: 8px; }
button, .button { display: inline-block; padding: 8px 14px; font: inherit; color: var(--ink); background: #fff; border: 1px solid #d1d5db; border-radius: 6px; cursor: pointer; text-decoration: none; }
.primary { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }
.link { padding: 0; color: var(--green-dark); background: none; border: 0; text-decoration: underline; }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { margin: 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.card .table-wrap { border: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 13px; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.tag { padding: 2px 8px; font-size: 13px; color: var(--green-dark); background: #d1fae5; border-radius: 10px; white-space: nowrap; }
.tag.concept { color: #92400e; background: #fef3c7; }
.notice { padding: 10px 14px; border-radius: 6px; background: #d1fae5; }
.notice.error { color: var(--red); background: #fee2e2; }
.notice ul { margin: 0; padding-left: 18px; }
.hint { font-size: 14px; color: var(--muted); font-weight: 400; }
.line { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line .wide { grid-column: span 6; }
.line-total { grid-column: span 2; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; font-size: 14px; }
.line label:not(.wide) { grid-column: span 1; }
.line [hidden] { display: none; }
.sum { text-align: right; margin: 12px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.docs { margin: 0; padding-left: 18px; }
.pdf { width: 100%; height: 80vh; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 640px) {
  .line { grid-template-columns: 1fr 1fr; }
  .line .wide, .line-total { grid-column: span 2; }
}
