
:root {
  --q-green: #3BAA35;
  --q-green-dark: #1E6B1A;
  --q-green-light: #e8f5e8;
  --q-text: #222;
  --q-muted: #6b6b6b;
  --q-border: #e2e8f0;
  --q-bg: #f4f6f8;
  --q-white: #fff;
  --q-red: #dc3545;
  --q-red-bg: #fef2f2;
  --q-warn-bg: #fef3c7;
  --q-warn-text: #92400e;
  --q-radius: 10px;
}

* { box-sizing: border-box; }

.q-body {
  margin: 0;
  background: var(--q-bg);
  color: var(--q-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.q-wrap { max-width: 820px; margin: 0 auto; padding: 20px 16px 48px; }

.q-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.q-logo { width: auto; height: auto; max-width: 180px; max-height: 64px; }
.q-head-meta h1 { margin: 0; font-size: 1.35rem; }
.q-head-meta p { margin: 2px 0 0; color: var(--q-muted); font-size: 0.9rem; }

.q-card {
  background: var(--q-white);
  border: 1px solid var(--q-border);
  border-radius: var(--q-radius);
  padding: 20px;
  margin-bottom: 16px;
}
.q-card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.q-card h2:not(:first-child) { margin-top: 24px; }
.q-center { text-align: center; }
.q-intro { margin: 0; }

.q-banner {
  padding: 14px 16px; margin-bottom: 16px;
  border-radius: var(--q-radius); font-size: 0.92rem; line-height: 1.5;
}
.q-banner-ok { background: var(--q-green-light); color: var(--q-green-dark); }
.q-banner-warn { background: var(--q-warn-bg); color: var(--q-warn-text); }

.q-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.q-parties p { margin: 0; font-size: 0.92rem; }
.q-label {
  margin: 0 0 4px !important;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--q-muted);
}

.q-variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.q-variant {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 14px; min-height: 88px;
  border: 2px solid var(--q-border); border-radius: var(--q-radius);
  background: var(--q-white); cursor: pointer; text-align: left;
  font-family: inherit; font-size: 1rem; color: var(--q-text);
}
.q-variant:hover { border-color: var(--q-green); }
.q-variant.is-active { border-color: var(--q-green); background: var(--q-green-light); }
.q-variant-key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--q-green); color: var(--q-white); font-size: 0.8rem; font-weight: 700;
}
.q-variant-label { font-weight: 600; font-size: 0.92rem; }
.q-variant-total { font-size: 1.05rem; font-weight: 700; color: var(--q-green-dark); }

.q-variant-panel { display: none; }
.q-variant-panel.is-active { display: block; }

.q-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.q-table th {
  text-align: left; padding: 8px 6px; border-bottom: 2px solid var(--q-border);
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--q-muted);
}
.q-table td { padding: 10px 6px; border-bottom: 1px solid var(--q-border); font-size: 0.92rem; vertical-align: top; }
.q-num { text-align: right; white-space: nowrap; }
.q-table em { color: var(--q-muted); font-style: normal; font-size: 0.85em; }
.q-optional.is-uit { opacity: 0.45; }

.q-check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.q-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--q-green); }

.q-totals { margin-top: 14px; margin-left: auto; max-width: 340px; }
.q-total-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 0.92rem; }
.q-total-final {
  margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--q-border);
  font-size: 1.12rem; font-weight: 700; color: var(--q-green-dark);
}

.q-conditions p { margin: 0 0 8px; font-size: 0.92rem; }

.q-field { margin-bottom: 16px; }
.q-field label { display: block; margin-bottom: 5px; font-size: 0.86rem; font-weight: 600; }
.q-field input[type="text"] {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--q-border); border-radius: var(--q-radius);
  font-family: inherit; font-size: 16px;    
}
.q-field input[type="text"]:focus { outline: none; border-color: var(--q-green); }

.q-signature {
  display: block; width: 100%; height: 200px;
  border: 2px dashed var(--q-border); border-radius: var(--q-radius);
  background: var(--q-white);
  touch-action: none;
  cursor: crosshair;
}

.q-signature-preview {
  display: block;
  width: 100%;
  max-width: 520px;
  max-height: 220px;
  background: var(--q-white);
  border: 1px solid var(--q-border);
  border-radius: var(--q-radius);
  padding: 12px;
  box-sizing: border-box;
}

.q-signature-meta { margin-top: 8px; font-size: 0.82rem; color: var(--q-gray, #667); line-height: 1.5; }

.q-accept-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

.q-btn {
  display: inline-block; padding: 14px 26px; min-height: 48px;
  border: none; border-radius: var(--q-radius);
  font-family: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer; text-decoration: none; text-align: center;
}
.q-btn-primary { background: var(--q-green); color: var(--q-white); }
.q-btn-primary:hover { background: var(--q-green-dark); }
.q-btn-primary:disabled { opacity: 0.6; cursor: default; }
.q-btn-secondary { background: var(--q-white); color: var(--q-green-dark); border: 2px solid var(--q-green); }
.q-btn-link {
  border: none; background: none; padding: 10px 4px; min-height: 44px;
  color: var(--q-muted); font-family: inherit; font-size: 0.9rem;
  text-decoration: underline; cursor: pointer;
}

.q-reject {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--q-border);
}
.q-reject textarea {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--q-border); border-radius: var(--q-radius);
  font-family: inherit; font-size: 16px;    
  resize: vertical;
}
.q-reject textarea:focus { outline: none; border-color: var(--q-green); }

.q-msg { margin: 12px 0 0; font-size: 0.9rem; }
.q-msg-fout { color: var(--q-red); background: var(--q-red-bg); padding: 10px 12px; border-radius: var(--q-radius); }

.q-foot { margin-top: 24px; text-align: center; color: var(--q-muted); font-size: 0.82rem; }

.q-variant:focus-visible, .q-btn:focus-visible, .q-btn-link:focus-visible,
.q-check input:focus-visible, .q-field input:focus-visible {
  outline: 3px solid var(--q-green-dark); outline-offset: 2px;
}


@media (max-width: 600px) {
  .q-wrap { padding: 16px 12px 40px; }
  .q-card { padding: 16px; }
  .q-parties { grid-template-columns: 1fr; gap: 16px; }
  .q-logo { max-width: 140px; max-height: 52px; }

  .q-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .q-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--q-border); }
  .q-table td { display: flex; justify-content: space-between; gap: 12px; border: none; padding: 3px 0; text-align: left; }
  .q-table td[data-label]::before {
    content: attr(data-label);
    font-size: 0.78rem; color: var(--q-muted); flex: 0 0 auto;
  }
  .q-table td:first-child { display: block; font-weight: 600; margin-bottom: 4px; }
  .q-table td:first-child::before { content: none; }

  .q-totals { max-width: none; }
  .q-accept-actions { flex-direction: column; align-items: stretch; }
  .q-accept-actions .q-btn { width: 100%; }
}

@media print {
  .q-body { background: var(--q-white); }
  .q-accept, .q-btn, .q-btn-link, .q-variants { display: none !important; }
  .q-card { border: none; padding: 0; margin-bottom: 18px; }
  .q-variant-panel { display: block !important; }
}

@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/caveat-latin.woff2') format('woff2');
}
.sig-hand {
  display: inline-block;
  font-family: 'Caveat', "Segoe Script", "Segoe Print", cursive;
  font-weight: 600;
  font-size: 1.9em;
  line-height: 1.15;
}

.q-wrap-smal { max-width: 600px; }
.q-logo-los { display: block; max-width: 150px; margin: 0 0 18px; }
.q-melding-titel { margin: 0 0 12px; font-size: 1.3rem; line-height: 1.3; }
.q-wrap-smal .q-card > p { margin: 0 0 10px; }
.q-wrap-smal .q-card > p:last-child { margin-bottom: 0; }
.q-melding-intro { margin: 0 0 16px; color: var(--q-muted); font-size: 0.95rem; }
.q-melding textarea {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--q-border); border-radius: var(--q-radius);
  font-family: inherit; font-size: 16px;    
  resize: vertical;
}
.q-melding textarea:focus { outline: none; border-color: var(--q-green); }
.q-melding textarea:disabled, .q-melding input:disabled { background: var(--q-bg); color: var(--q-muted); }
.q-melding textarea:focus-visible { outline: 3px solid var(--q-green-dark); outline-offset: 2px; }
.q-optional-label { font-weight: 400; color: var(--q-muted); }
.q-melding .q-btn[hidden] { display: none; }    
.q-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.q-msg-ok { color: var(--q-green-dark); background: var(--q-green-light); padding: 10px 12px; border-radius: var(--q-radius); }
.q-melding-alt {
  margin: 18px 0 0 !important; padding-top: 14px;
  border-top: 1px solid var(--q-border);
  color: var(--q-muted); font-size: 0.9rem;
}
.q-melding-alt a, .q-banner a { color: inherit; font-weight: 600; }

@media (max-width: 600px) {
  .q-melding .q-btn { width: 100%; }
  .q-melding-titel { font-size: 1.15rem; }
}
@media print {
  .q-melding, .q-melding-kaart { display: none !important; }
}
