:root {
  --verve: #5F6F52;
  --verve-dark: #4a5840;
  --verve-light: #eef0e9;
  --bg: #E0D5C1;
  --ink: #222;
  --muted: #5a5a55;
  --border: #c4b9a4;
  --error: #b3261e;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.45; }
.wrap { max-width: 820px; margin: 0 auto; padding: 24px 20px 80px; }
header.brand { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; gap: 16px; }
header.brand .logo { height: 64px; width: auto; max-width: 220px; object-fit: contain; mix-blend-mode: multiply; }
header.brand .tag-block { text-align: right; }
header.brand .tag { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
header.brand .tag-sub { font-size: 13px; color: var(--verve); font-weight: 600; margin-top: 2px; }

.progress { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.progress .step { flex: 1; min-width: 70px; padding: 8px 6px 10px; text-align: center; border-radius: 6px; background: #d4c8b1; color: var(--muted); border: 1px solid transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.2; }
.progress .step .num { font-size: 16px; font-weight: 700; }
.progress .step .lbl { font-size: 10.5px; opacity: 0.95; }
.progress .step.active { background: var(--verve); color: white; }
.progress .step.done { background: var(--verve-light); color: var(--verve-dark); border-color: var(--verve); }

h2.section-title { color: var(--verve); margin: 0 0 6px; font-size: 22px; }
p.section-sub { margin: 0 0 20px; color: var(--muted); font-size: 13px; }

.card { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 22px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .row, .row.three { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="date"], .field input[type="number"], .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font: inherit; background: white; color: var(--ink);
}
.field textarea { min-height: 70px; resize: vertical; }
.field.required > label::after { content: " *"; color: var(--verve); }
.field .help { font-size: 11px; color: var(--muted); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.field .err { color: var(--error); font-size: 12px; display: none; }
.field.invalid .err { display: block; }

.inline-choices { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.inline-choices label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); font-weight: normal; text-transform: none; letter-spacing: 0; cursor: pointer; }

.checks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 640px) { .checks-grid { grid-template-columns: 1fr 1fr; } }
.checks-grid label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: normal; text-transform: none; letter-spacing: 0; padding: 6px; border: 1px solid var(--border); border-radius: 6px; background: #fbfbf9; cursor: pointer; }

.subgroup { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin: 14px 0; background: #fbfbf9; }
.subgroup h3 { margin: 0 0 10px; font-size: 14px; color: var(--verve-dark); }

.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.actions.top { margin-top: 0; margin-bottom: 14px; }
button { font: inherit; padding: 11px 18px; border-radius: 7px; border: 1px solid var(--verve); background: var(--verve); color: white; cursor: pointer; font-weight: 600; }
button.secondary { background: white; color: var(--verve); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.sig-canvas { width: 100%; height: 130px; background: white; border: 1px dashed var(--border); border-radius: 6px; touch-action: none; }
.sig-row { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.sig-row button { padding: 6px 12px; font-size: 12px; }

.upload-list { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
.upload-list li { padding: 4px 0; color: var(--muted); }

.doc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.doc-row { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 8px; background: #fbfbf9; flex-wrap: wrap; transition: border-color .15s, background .15s; }
.doc-row .doc-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 220px; }
.doc-row .doc-label { font-size: 14px; color: var(--ink); font-weight: 500; }
.doc-row .doc-label .req { color: var(--verve); }
.doc-row .doc-status { font-size: 12px; color: var(--muted); }
.doc-row .doc-status.ok { color: var(--verve-dark); font-weight: 600; }
.doc-row .doc-status .check { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--verve); color: white; text-align: center; line-height: 16px; font-size: 11px; margin-right: 4px; }
.doc-row .doc-actions { display: flex; gap: 6px; }
.doc-row .doc-actions button { padding: 7px 14px; font-size: 13px; }

.doc-row .doc-progress { height: 4px; background: #eceae3; border-radius: 2px; overflow: hidden; margin-top: 6px; opacity: 0; transition: opacity .15s; }
.doc-row.uploading .doc-progress { opacity: 1; }
.doc-row .doc-progress-bar { height: 100%; width: 0%; background: var(--verve); transition: width .15s ease-out; }

.doc-row.drag-over { border-color: var(--verve); border-style: solid; background: var(--verve-light); }
.doc-row.success { border-style: solid; border-color: var(--verve); }
.doc-row.uploading { border-style: solid; }

.doc-files { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.doc-file { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--verve-dark); background: white; border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; }
.doc-file .doc-file-remove { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 0 6px; font-size: 14px; line-height: 1; }
.doc-file .doc-file-remove:hover { color: var(--error); }

.popi { font-size: 13px; max-height: 240px; overflow: auto; border: 1px solid var(--border); padding: 12px; border-radius: 6px; background: #fbfbf9; }
.popi p { margin: 0 0 8px; }

.thanks { text-align: center; padding: 60px 20px; }
.thanks h2 { color: var(--verve); }

.bar { position: fixed; left: 0; right: 0; bottom: 0; background: white; border-top: 1px solid var(--border); padding: 10px 16px; display: flex; justify-content: center; }
.bar-inner { max-width: 820px; width: 100%; display: flex; justify-content: space-between; gap: 12px; }
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--verve-dark); color: white; padding: 10px 16px; border-radius: 6px; font-size: 13px; opacity: 0; transition: opacity .25s; pointer-events: none; }
.toast.show { opacity: 1; }
