* {
  box-sizing: border-box;
}

:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2a27;
  background: #f4f6f5;
}

body {
  margin: 0;
}

button, input, select, textarea {
  font: inherit;
}

.app-header {
  background: #2f5d50;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.brand-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.98);
  padding: 8px;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
  border: 1px solid rgba(255,255,255,.8);
}

.brand-block > div {
  min-width: 0;
}

.app-header h1 {
  margin: 0;
  font-size: 1.35rem;
}

.app-header p {
  margin: .25rem 0 0;
  opacity: .9;
}

.tabs {
  display: flex;
  overflow-x: auto;
  background: white;
  border-bottom: 1px solid #d7dfdc;
}

.tab {
  border: 0;
  background: transparent;
  color: #1f2a27;
  padding: 1rem;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0;
}

.tab.active {
  border-bottom: 3px solid #2f5d50;
  font-weight: 700;
}

main {
  max-width: 1050px;
  margin: 0 auto;
  padding: 1rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hidden {
  display: none !important;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card, .panel, .list-item, .notice, .signature-note {
  background: white;
  border: 1px solid #d7dfdc;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.card {
  padding: 1rem;
}

.card .label {
  display: block;
  color: #5d6d67;
  margin-bottom: .35rem;
}

.card strong {
  font-size: 2rem;
}

.panel {
  margin-top: 1rem;
  padding: 1rem;
}

.section-heading,
.wizard-header,
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.section-heading h2,
.section-heading p {
  margin-bottom: .3rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid h3,
.form-grid button,
.form-grid .wide,
fieldset.wide {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #aebbb6;
  border-radius: 8px;
  padding: .75rem;
  background: white;
}

textarea {
  resize: vertical;
}

fieldset {
  border: 1px solid #cbd5d1;
  border-radius: 10px;
  padding: .85rem;
  margin: 0;
}

legend {
  font-weight: 700;
  padding: 0 .35rem;
}

.check-row {
  flex-direction: row;
  align-items: flex-start;
  gap: .55rem;
  font-weight: 400;
  margin: .35rem 0;
}

.check-row input {
  width: auto;
  margin-top: .15rem;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .2rem 1rem;
}

button {
  border: 0;
  border-radius: 8px;
  background: #2f5d50;
  color: white;
  padding: .75rem 1rem;
  cursor: pointer;
}

button.secondary {
  background: white;
  color: #2f5d50;
  border: 1px solid #9eb1aa;
}

button.subtle {
  padding: .5rem .75rem;
}

button.danger {
  background: #a33b3b;
}

.list {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.list-item {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.list-item h3 {
  margin: 0 0 .4rem;
}

.list-item p {
  margin: .2rem 0;
  color: #53625d;
}

.item-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.notice {
  margin-top: 1rem;
  padding: 1rem;
  background: #fff8dd;
}

.empty {
  color: #64716d;
}

.wizard {
  padding: 1.25rem;
}

.step-counter {
  color: #5d6d67;
  font-size: .9rem;
}

.wizard-header h3 {
  margin: .3rem 0 0;
}

.progress-track {
  height: 8px;
  background: #dbe3e0;
  border-radius: 999px;
  overflow: hidden;
  margin: 1rem 0 1.25rem;
}

.progress-bar {
  height: 100%;
  width: 10%;
  background: #2f5d50;
  transition: width .2s ease;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1.25rem;
}

.validation-message {
  margin-top: 1rem;
  padding: .85rem;
  border-radius: 8px;
  background: #ffe9e9;
  color: #7c1f1f;
  border: 1px solid #e8bcbc;
}

.signature-note {
  padding: 1rem;
  background: #fff8dd;
}

dialog {
  width: min(900px, calc(100% - 2rem));
  max-height: 90vh;
  overflow: auto;
  border: 0;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}

dialog::backdrop {
  background: rgba(0,0,0,.45);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .75rem;
}

.detail-block {
  border: 1px solid #d7dfdc;
  border-radius: 10px;
  padding: .85rem;
  background: #fafbfb;
}

.detail-block.wide {
  grid-column: 1 / -1;
}

.detail-block h3 {
  margin-top: 0;
}

.detail-row {
  margin: .45rem 0;
}

.detail-row strong {
  display: block;
  color: #2f5d50;
  margin-bottom: .15rem;
}

@media (max-width: 700px) {
  .cards,
  .form-grid,
  .detail-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .app-header,
  .section-heading,
  .wizard-header,
  .dialog-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    width: 70px;
    height: 70px;
    padding: 6px;
  }

  .list-item {
    flex-direction: column;
  }

  .wizard-actions {
    flex-wrap: wrap;
  }
}


.dog-sections {
  display: grid;
  gap: 1rem;
}

.dog-card {
  border: 2px solid #c8d5d0;
  border-radius: 12px;
  padding: 1rem;
  background: #fbfcfc;
}

.dog-card h4 {
  margin: 0 0 1rem;
  color: #2f5d50;
  font-size: 1.1rem;
}

.dog-card .form-grid {
  margin: 0;
}

.info-box {
  padding: .85rem 1rem;
  border-radius: 9px;
  background: #eaf2ef;
  border: 1px solid #bfd0ca;
}

.dog-name-heading {
  font-weight: 700;
}


.donation-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: white;
  border: 1px solid #d7dfdc;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.donation-panel h3 {
  margin: 0 0 .35rem;
}

.donation-panel p {
  margin: 0;
  color: #53625d;
}

.donation-button {
  min-width: 130px;
  font-size: 1.05rem;
  font-weight: 700;
}

.donation-dialog {
  width: min(780px, calc(100% - 2rem));
}

.donation-content {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.qr-section,
.bank-details {
  border: 1px solid #d7dfdc;
  border-radius: 12px;
  padding: 1rem;
  background: #fafbfb;
}

.qr-section {
  text-align: center;
}

.donation-qr {
  display: block;
  width: min(100%, 300px);
  height: auto;
  margin: 0 auto 1rem;
  background: white;
  border-radius: 10px;
}

.bank-details h3 {
  margin-top: 0;
}

.bank-row {
  padding: .8rem 0;
  border-bottom: 1px solid #d7dfdc;
}

.bank-row span {
  display: block;
  color: #5d6d67;
  margin-bottom: .25rem;
}

.bank-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}

.copy-status {
  min-height: 1.25rem;
  margin-bottom: 0;
  color: #2f5d50;
  font-weight: 700;
}

.donation-legal-note {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: 9px;
  background: #fff8dd;
  border: 1px solid #eadb9d;
  font-size: .95rem;
}

@media (max-width: 700px) {
  .donation-panel,
  .donation-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .donation-button {
    width: 100%;
  }
}


.header-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .header-actions {
    width: 100%;
  }

  .header-actions button {
    flex: 1 1 180px;
  }
}


.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-actions-inline {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.pass-item {
  align-items: stretch;
}

.pass-main {
  flex: 1 1 auto;
  min-width: 0;
}

.pass-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.pass-badge {
  display: inline-block;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: #e8f1ee;
  color: #2f5d50;
  font-weight: 700;
  white-space: nowrap;
}

.pass-badge.exhausted {
  background: #f4dddd;
  color: #8a2929;
}

.pass-progress-track {
  height: 10px;
  background: #dce4e1;
  border-radius: 999px;
  overflow: hidden;
  margin: .8rem 0;
}

.pass-progress-bar {
  height: 100%;
  background: #2f5d50;
  width: 0;
}

.pass-progress-bar.low {
  background: #a36a23;
}

.pass-progress-bar.empty {
  background: #a33b3b;
}

.pass-balance {
  font-weight: 700;
  color: #2f5d50 !important;
}

.pass-history {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #d7dfdc;
}

.pass-history summary {
  cursor: pointer;
  font-weight: 700;
  color: #2f5d50;
}

.pass-history ul {
  margin: .6rem 0 0;
  padding-left: 1.25rem;
}

.pass-actions {
  align-content: flex-start;
  max-width: 210px;
}

.pass-actions button {
  width: 100%;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .pass-heading-row {
    flex-direction: column;
  }

  .pass-actions {
    max-width: none;
    width: 100%;
  }
}


.pass-dog-option {
  padding: .7rem .8rem;
  border: 1px solid #cbd5d1;
  border-radius: 9px;
  background: white;
  cursor: pointer;
}

.pass-dog-option:hover {
  background: #f1f6f4;
}

.pass-dog-option:has(input:checked) {
  border-color: #2f5d50;
  background: #e8f1ee;
}


.cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-item {
  align-items: stretch;
}

.report-main {
  flex: 1 1 auto;
  min-width: 0;
}

.report-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.report-badge {
  display: inline-block;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: #e8f1ee;
  color: #2f5d50;
  font-weight: 700;
  white-space: nowrap;
}

.report-badge.warning {
  background: #fff0d8;
  color: #8a5a14;
}

.report-badge.urgent {
  background: #f4dddd;
  color: #8a2929;
}

.report-photo {
  display: block;
  max-width: 260px;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d7dfdc;
  margin-top: .8rem;
}

.report-actions {
  max-width: 180px;
}

.report-actions button {
  width: 100%;
}

.photo-preview-wrap {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.photo-preview {
  max-width: 300px;
  max-height: 260px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #d7dfdc;
  background: white;
}

.report-detail-photo {
  display: block;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid #d7dfdc;
}

@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .report-heading-row {
    flex-direction: column;
  }

  .report-actions {
    max-width: none;
    width: 100%;
  }
}


.cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.invoice-visit-list {
  display: grid;
  gap: .65rem;
}

.invoice-visit-option {
  border: 1px solid #cbd5d1;
  border-radius: 10px;
  padding: .8rem;
  background: white;
}

.invoice-visit-option.selected {
  border-color: #2f5d50;
  background: #eaf2ef;
}

.invoice-visit-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.invoice-visit-details {
  margin-top: .55rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}

.compact-grid {
  margin-top: .5rem;
}

.invoice-summary-box {
  border: 2px solid #bfd0ca;
  border-radius: 12px;
  padding: 1rem;
  background: #f7faf9;
}

.invoice-summary-box h3 {
  margin-top: 0;
}

.invoice-calc-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0;
  border-bottom: 1px solid #d7dfdc;
}

.invoice-calc-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 0;
  padding-top: .75rem;
}

.invoice-item {
  align-items: stretch;
}

.invoice-main {
  flex: 1 1 auto;
  min-width: 0;
}

.invoice-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.invoice-total {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2f5d50;
  white-space: nowrap;
}

.invoice-actions {
  max-width: 170px;
}

.invoice-actions button {
  width: 100%;
}

.invoice-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.invoice-detail-table th,
.invoice-detail-table td {
  border-bottom: 1px solid #d7dfdc;
  padding: .65rem;
  text-align: left;
  vertical-align: top;
}

.invoice-detail-table th:last-child,
.invoice-detail-table td:last-child {
  text-align: right;
}

@media (max-width: 1200px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .invoice-visit-details {
    grid-template-columns: 1fr;
  }

  .invoice-heading-row,
  .invoice-visit-head {
    flex-direction: column;
  }

  .invoice-actions {
    max-width: none;
    width: 100%;
  }

  .invoice-detail-table {
    font-size: .9rem;
  }
}


.invoice-document-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #d7dfdc;
  border-radius: 12px;
  background: #fafbfb;
  margin-bottom: 1rem;
}

.invoice-document-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  background: white;
  border-radius: 12px;
  border: 1px solid #d7dfdc;
  padding: 6px;
  flex: 0 0 auto;
}

.invoice-document-header h3 {
  margin: 0 0 .3rem;
  color: #2f5d50;
}

.invoice-document-header p {
  margin: .2rem 0;
  color: #53625d;
}

@media (max-width: 700px) {
  .invoice-document-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


.invoice-sheet {
  background: white;
  border: 1px solid #d7dfdc;
  border-radius: 14px;
  padding: 1.25rem;
}

.invoice-sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.invoice-brand-block {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.invoice-brand-logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border: 1px solid #d7dfdc;
  border-radius: 12px;
  background: white;
  padding: 6px;
}

.invoice-brand-text h3 {
  margin: 0 0 .35rem;
  color: #2f5d50;
}

.invoice-brand-text p {
  margin: .15rem 0;
  color: #53625d;
}

.invoice-title-block {
  text-align: right;
}

.invoice-title-block h2 {
  margin: 0 0 .4rem;
  color: #2f5d50;
  letter-spacing: .02em;
}

.invoice-title-block p {
  margin: .18rem 0;
  color: #53625d;
}

.invoice-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.invoice-panel {
  border: 1px solid #d7dfdc;
  border-radius: 12px;
  padding: 1rem;
  background: #fafbfb;
}

.invoice-panel h4 {
  margin: 0 0 .75rem;
  color: #2f5d50;
}

.invoice-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .3rem 0;
  border-bottom: 1px solid #e2e8e5;
}

.invoice-kv-row:last-child {
  border-bottom: 0;
}

.invoice-kv-row span:first-child {
  color: #53625d;
}

.invoice-payment-box {
  margin-top: 1rem;
}

.invoice-payment-box strong {
  color: #2f5d50;
}

.invoice-total-box {
  margin-top: 1rem;
  margin-left: auto;
  width: min(360px, 100%);
  border: 1px solid #d7dfdc;
  border-radius: 12px;
  padding: .75rem 1rem;
  background: #fafbfb;
}

.invoice-total-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0;
  border-bottom: 1px solid #e2e8e5;
}

.invoice-total-row:last-child {
  border-bottom: 0;
}

.invoice-total-row.grand-total {
  font-size: 1.08rem;
  font-weight: 700;
  color: #2f5d50;
  padding-top: .7rem;
}

.invoice-legal-note {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border: 1px solid #d7dfdc;
  border-radius: 10px;
  background: #f7faf9;
}

.invoice-legal-note p {
  margin: .35rem 0;
}

@media (max-width: 860px) {
  .invoice-sheet-header,
  .invoice-brand-block {
    flex-direction: column;
  }

  .invoice-title-block {
    text-align: left;
  }

  .invoice-top-grid {
    grid-template-columns: 1fr;
  }
}


/* Factuurweergave naar voorbeeld INV-006 */
.invoice-example {
  background: #fff;
  color: #45484d;
  padding: 30px 28px 22px;
  border: 1px solid #dfe2e5;
  border-radius: 4px;
  font-family: Arial, Helvetica, sans-serif;
}

.invoice-example-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
  min-height: 150px;
}

.invoice-example-logo {
  width: 100px;
  height: 78px;
  object-fit: contain;
  object-position: left top;
}

.invoice-example-title {
  text-align: right;
}

.invoice-example-title h2 {
  margin: 0 0 4px;
  font-size: 27px;
  color: #3f4247;
}

.invoice-example-title p {
  margin: 2px 0;
  font-size: 16px;
}

.invoice-example-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  margin: 8px 16px 28px;
}

.invoice-example-party h3 {
  margin: 0 0 12px;
  font-size: 21px;
  color: #3f4247;
}

.invoice-example-party p {
  margin: 2px 0;
  font-size: 16px;
  line-height: 1.25;
}

.invoice-example-payment {
  background: #f5f6f7;
  padding: 18px 14px 16px;
  margin-bottom: 25px;
}

.invoice-example-payment h3 {
  margin: 0 0 18px;
  font-size: 20px;
}

.invoice-example-payment-grid {
  display: grid;
  grid-template-columns: 1.2fr .95fr 1.45fr .65fr;
  gap: 18px;
}

.invoice-example-payment-cell span {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.invoice-example-payment-cell strong {
  display: block;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.invoice-example-payment-cell.amount strong {
  font-size: 28px;
}

.invoice-example-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 28px;
}

.invoice-example-table thead th {
  background: #45484d;
  color: white;
  padding: 14px 12px;
  font-size: 14px;
  text-align: left;
}

.invoice-example-table thead th:nth-child(n+2),
.invoice-example-table tbody td:nth-child(n+2) {
  text-align: right;
}

.invoice-example-table tbody td {
  padding: 12px;
  border-bottom: 0;
  vertical-align: top;
  font-size: 14px;
}

.invoice-example-totals {
  width: 76%;
  margin-left: auto;
  background: #f5f6f7;
  padding: 18px 0 0;
}

.invoice-example-total-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 0 36px 14px;
  font-size: 17px;
  font-weight: 700;
}

.invoice-example-tax-note {
  padding: 0 36px 18px;
  font-size: 15px;
  line-height: 1.35;
}

.invoice-example-grand-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  background: #45484d;
  color: white;
  padding: 17px 36px;
  font-size: 17px;
  font-weight: 700;
}

.invoice-example-footer {
  margin-top: 80px;
  font-size: 14px;
  line-height: 1.35;
}

.invoice-example-page {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .invoice-example {
    padding: 20px 14px;
  }

  .invoice-example-top,
  .invoice-example-parties,
  .invoice-example-payment-grid {
    grid-template-columns: 1fr;
  }

  .invoice-example-title {
    text-align: left;
  }

  .invoice-example-parties {
    gap: 24px;
    margin-inline: 0;
  }

  .invoice-example-totals {
    width: 100%;
  }

  .invoice-example-table {
    font-size: 12px;
  }

  .invoice-example-table thead th,
  .invoice-example-table tbody td {
    padding: 9px 6px;
  }
}


.invoice-visit-option {
  cursor: default;
}

.invoice-visit-head {
  cursor: pointer;
}

.invoice-visit-head input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}


.invoice-number-field {
  display: grid;
  align-content: start;
  gap: .45rem;
}

.invoice-auto-number-row {
  margin-top: 0;
}

.field-help {
  display: block;
  color: #61706b;
  line-height: 1.35;
}


.cards {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.payment-preview {
  margin: .75rem 0 0;
  padding: .75rem .9rem;
  border: 1px solid #cbd5d1;
  border-radius: 9px;
  background: #f7faf9;
  font-weight: 700;
  color: #2f5d50;
}

.invoice-status-badge {
  display: inline-block;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
}

.invoice-status-draft {
  background: #e9ecef;
  color: #495057;
}

.invoice-status-sent {
  background: #dceaf7;
  color: #24557a;
}

.invoice-status-partial {
  background: #fff0d8;
  color: #8a5a14;
}

.invoice-status-paid {
  background: #dff0e6;
  color: #2f6a45;
}

.invoice-status-overdue {
  background: #f4dddd;
  color: #8a2929;
}

.invoice-status-cancelled {
  background: #ececec;
  color: #666;
  text-decoration: line-through;
}

.invoice-payment-summary {
  font-weight: 700;
  color: #2f5d50 !important;
}

.invoice-overdue-warning {
  border-left: 5px solid #a33b3b;
  background: #fff7f7;
}

@media (max-width: 1350px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .cards {
    grid-template-columns: 1fr;
  }
}


/* Correctie dashboardkaarten */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)) !important;
  gap: .75rem;
  align-items: stretch;
}

.card {
  min-width: 0;
  overflow: hidden;
  padding: .85rem .7rem;
}

.card .label {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
  font-size: .86rem;
  min-height: 2.25rem;
}

.card strong {
  display: block;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.1;
  font-size: 1.05rem;
}

@media (max-width: 1200px) {
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
  }

  .card .label {
    font-size: .82rem;
  }

  .card strong {
    font-size: 1rem;
  }
}

@media (max-width: 760px) {
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)) !important;
  }
}


/* Ruimer en rustiger dashboard */
#dashboard {
  max-width: 1120px;
  margin: 0 auto;
}

#dashboard > h2 {
  margin-bottom: 1.1rem;
  font-size: 1.55rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.card {
  min-height: 112px;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 3px 10px rgba(35, 64, 55, .08);
}

.card .label {
  min-height: auto;
  font-size: .9rem;
  line-height: 1.3;
  color: #62716c;
  margin-bottom: .65rem;
}

.card strong {
  font-size: 1.55rem;
  line-height: 1;
  color: #244f43;
  letter-spacing: -.02em;
}

#outstandingAmount {
  font-size: 1.35rem;
}

#dashboard .panel {
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 3px 10px rgba(35, 64, 55, .06);
  margin-bottom: 1rem;
}

#dashboard .panel h3 {
  margin-top: 0;
  margin-bottom: .45rem;
}

#dashboard .notice {
  border-radius: 12px;
  padding: 1rem 1.1rem;
  line-height: 1.45;
}

@media (max-width: 1050px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .card {
    min-height: 104px;
  }
}

@media (max-width: 460px) {
  .cards {
    grid-template-columns: 1fr !important;
  }
}


.invoice-dialog-actions {
  gap: 1rem;
  align-items: center;
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  body * {
    visibility: hidden !important;
  }

  #invoiceDialog,
  #invoiceDialog * {
    visibility: visible !important;
  }

  #invoiceDialog {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: white !important;
    overflow: visible !important;
  }

  #invoiceDialog::backdrop,
  #invoiceDialog .dialog-header {
    display: none !important;
  }

  #invoiceDialogContent {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .invoice-example {
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: none !important;
  }

  .invoice-example-footer {
    margin-top: 35mm !important;
  }

  .invoice-example-table {
    page-break-inside: auto;
  }

  .invoice-example-table tr,
  .invoice-example-payment,
  .invoice-example-parties,
  .invoice-example-totals {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .invoice-legal-note {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}


.reminder-settings {
  margin-bottom: 1rem;
}

.reminder-document {
  background: white;
  border: 1px solid #dfe2e5;
  padding: 28px;
  color: #41464b;
  font-family: Arial, Helvetica, sans-serif;
}

.reminder-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.reminder-logo {
  width: 100px;
  height: 80px;
  object-fit: contain;
  object-position: left top;
}

.reminder-company p,
.reminder-recipient p {
  margin: .15rem 0;
  line-height: 1.35;
}

.reminder-title {
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
  color: #2f5d50;
}

.reminder-summary {
  border-collapse: collapse;
  width: 100%;
  margin: 1.3rem 0;
}

.reminder-summary th,
.reminder-summary td {
  padding: .7rem;
  border-bottom: 1px solid #d7dfdc;
  text-align: left;
}

.reminder-summary th:last-child,
.reminder-summary td:last-child {
  text-align: right;
}

.reminder-payment-box {
  background: #f5f6f7;
  border-left: 5px solid #2f5d50;
  padding: 1rem 1.1rem;
  margin: 1.2rem 0;
}

.reminder-signature {
  margin-top: 2rem;
}

@media print {
  #reminderDialog,
  #reminderDialog * {
    visibility: visible !important;
  }

  #reminderDialog {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: white !important;
    overflow: visible !important;
  }

  #reminderDialog::backdrop,
  #reminderDialog .dialog-header,
  #reminderDialog .reminder-settings {
    display: none !important;
  }

  #reminderDialogContent {
    margin: 0 !important;
    padding: 0 !important;
  }

  .reminder-document {
    border: 0 !important;
    padding: 0 !important;
  }
}


.reminder-settings button {
  margin-top: .75rem;
}

.reminder-history-list {
  margin: .75rem 0 1rem;
  padding-left: 1.25rem;
}

.reminder-history-list li {
  margin: .3rem 0;
}


.dashboard-followup-panel {
  margin-top: 1.5rem;
}

.followup-list {
  display: grid;
  gap: 1rem;
}

.followup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid #dfe5e2;
  border-radius: 14px;
  background: #fff;
}

.followup-card.is-overdue {
  border-left: 6px solid #9d2f2f;
}

.followup-card.is-warning {
  border-left: 6px solid #b36b00;
}

.followup-card.is-current {
  border-left: 6px solid #2f5d50;
}

.followup-main h3 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
}

.followup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .9rem;
  margin-top: .5rem;
  font-size: .92rem;
}

.followup-step {
  margin-top: .65rem;
  font-weight: 700;
}

.followup-history {
  margin-top: .4rem;
  font-size: .88rem;
  color: #5e6662;
}

.followup-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 185px;
}

.followup-empty {
  padding: 1rem;
  border: 1px dashed #ccd6d1;
  border-radius: 12px;
  color: #5e6662;
  background: #fafbfa;
}

.followup-alert {
  padding: .6rem .75rem;
  border-radius: 9px;
  background: #fff4e6;
  font-size: .9rem;
}

.followup-alert.danger {
  background: #fdecec;
  color: #7c1f1f;
  font-weight: 700;
}

@media (max-width: 760px) {
  .followup-card {
    grid-template-columns: 1fr;
  }

  .followup-actions {
    min-width: 0;
  }
}


.followup-artumo-summary {
  margin-top: .55rem;
  padding: .65rem .75rem;
  border-radius: 9px;
  background: #f3f6f5;
  font-size: .9rem;
}

.followup-artumo-summary strong {
  color: #2f5d50;
}


.evidence-upload-panel {
  margin-bottom: 1rem;
}

.evidence-status {
  margin-top: .45rem;
  font-weight: 700;
}

.evidence-status.complete {
  color: #2f5d50;
}

.evidence-status.missing {
  color: #922f2f;
}

.evidence-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.evidence-file-meta {
  font-size: .9rem;
  color: #5e6662;
}

.artumo-package-note {
  margin-top: .45rem;
  font-size: .86rem;
  color: #5e6662;
}

@media (max-width: 650px) {
  .evidence-file-item {
    grid-template-columns: 1fr;
  }
}


.invoice-actions,
.form-actions-inline {
  flex-wrap: wrap;
}

.artumo-send-invoice,
.artumo-primary {
  background: #6c4228;
  color: #fff;
  border-color: #6c4228;
}

.artumo-send-invoice:hover,
.artumo-primary:hover {
  background: #56341f;
  border-color: #56341f;
}

.artumo-send-invoice:disabled,
.artumo-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.invoice-artumo-indicator {
  margin: 0 0 1rem;
  padding: .8rem 1rem;
  border-left: 5px solid #6c4228;
  border-radius: 8px;
  background: #f8f2ee;
  font-weight: 700;
}

@media (max-width: 650px) {
  .invoice-actions button,
  .invoice-dialog-actions .form-actions-inline button {
    width: 100%;
  }
}


.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem;
}

.compact-backup-btn {
  font-size: .82rem;
  padding: .55rem .7rem;
}

.backup-status-notice {
  margin: 0 0 1.25rem;
  padding: .85rem 1rem;
  border-left: 5px solid #2f5d50;
  border-radius: 10px;
  background: #eef5f2;
  line-height: 1.45;
}

.backup-progress {
  opacity: .7;
  pointer-events: none;
}

@media (max-width: 760px) {
  .header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .header-actions button {
    flex: 1 1 100%;
  }
}


.dashboard-dossier-panel {
  margin-top: 1.5rem;
}

.dossier-control-list {
  display: grid;
  gap: 1rem;
}

.dossier-control-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid #dfe5e2;
  border-radius: 14px;
  background: #fff;
}

.dossier-control-card.complete {
  border-left: 6px solid #2f5d50;
}

.dossier-control-card.incomplete {
  border-left: 6px solid #a33b32;
}

.dossier-control-card h3 {
  margin: 0 0 .35rem;
}

.dossier-document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .8rem;
}

.dossier-document-status {
  padding: .65rem .7rem;
  border-radius: 10px;
  font-size: .88rem;
  line-height: 1.3;
}

.dossier-document-status.present {
  background: #edf5f1;
  color: #245346;
}

.dossier-document-status.missing {
  background: #fdeeed;
  color: #842d27;
}

.dossier-start-status {
  margin-top: .75rem;
  font-weight: 700;
}

.dossier-start-status.allowed {
  color: #245346;
}

.dossier-start-status.blocked {
  color: #842d27;
}

.dossier-control-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 190px;
}

@media (max-width: 850px) {
  .dossier-document-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .dossier-control-card {
    grid-template-columns: 1fr;
  }

  .dossier-control-actions {
    min-width: 0;
  }
}


/* Dashboard-layoutcorrectie */
#dashboard > .donation-panel,
#dashboard > .dashboard-dossier-panel,
#dashboard > .dashboard-followup-panel,
#dashboard > .panel,
#dashboard > .notice {
  width: 100%;
  box-sizing: border-box;
}

.dashboard-dossier-panel,
.dashboard-followup-panel {
  min-width: 0;
}

.dossier-control-card,
.followup-card {
  width: 100%;
  box-sizing: border-box;
}

.dossier-control-card > div,
.followup-main {
  min-width: 0;
}

.dossier-control-card h3,
.followup-card h3,
.dossier-document-status,
.followup-meta,
.followup-history,
.followup-alert {
  overflow-wrap: anywhere;
  word-break: normal;
}

.dossier-document-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.followup-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

@media (max-width: 900px) {
  .dossier-document-grid,
  .followup-meta {
    grid-template-columns: 1fr;
  }
}


.visit-dossier-status {
  box-sizing: border-box;
  padding: .85rem 1rem;
  border-radius: 10px;
  line-height: 1.45;
}

.visit-dossier-status.neutral {
  border: 1px dashed #c7cfcb;
  background: #fafbfa;
  color: #5f6763;
}

.visit-dossier-status.complete {
  border-left: 5px solid #2f5d50;
  background: #edf5f1;
  color: #245346;
  font-weight: 700;
}

.visit-dossier-status.incomplete {
  border-left: 5px solid #a33b32;
  background: #fdeeed;
  color: #842d27;
}

.visit-dossier-status .visit-dossier-title {
  display: block;
  margin-bottom: .25rem;
  font-weight: 700;
}

.visit-dossier-status .visit-dossier-exception {
  display: block;
  margin-top: .35rem;
  font-size: .9rem;
}

.visit-dossier-status button {
  margin-top: .65rem;
}


.signature-dialog {
  width: min(1040px, calc(100vw - 2rem));
}

.signature-settings {
  margin-bottom: 1rem;
}

.signature-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
}

.signature-registration {
  margin-top: 1rem;
  padding: .75rem .9rem;
  border-radius: 9px;
  background: #f3f6f5;
}

.initials-canvas-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 1rem;
}

.initial-canvas-card,
.signature-canvas-card {
  padding: .8rem;
  border: 1px solid #dce3df;
  border-radius: 12px;
  background: #fafbfa;
}

.initial-canvas-card h4 {
  margin: 0 0 .55rem;
}

.drawing-canvas {
  display: block;
  width: 100%;
  height: 145px;
  border: 2px dashed #aebbb5;
  border-radius: 9px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

#fullSignatureCanvas {
  height: 210px;
}

.initial-canvas-card button,
.signature-canvas-card button {
  margin-top: .55rem;
}

.signature-legal-note {
  margin-top: 1rem;
  padding: .8rem;
  border-left: 4px solid #8a6b34;
  background: #fff8e8;
  font-size: .9rem;
}

.sign-customer {
  background: #2f5d50;
  border-color: #2f5d50;
  color: #fff;
}

@media (max-width: 850px) {
  .initials-canvas-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .initials-canvas-list,
  .signature-url-row {
    grid-template-columns: 1fr;
  }
}


.verification-dialog {
  width: min(860px, calc(100vw - 2rem));
}

.verification-checklist {
  display: grid;
  gap: .45rem;
}

.verification-result-preview {
  margin: 1rem 0;
  padding: .85rem 1rem;
  border-radius: 10px;
  font-weight: 700;
}

.verification-result-preview.complete {
  background: #edf5f1;
  color: #245346;
  border-left: 5px solid #2f5d50;
}

.verification-result-preview.incomplete {
  background: #fdeeed;
  color: #842d27;
  border-left: 5px solid #a33b32;
}

.evidence-verification-badge {
  display: inline-block;
  margin-top: .4rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}

.evidence-verification-badge.verified {
  background: #e4f1eb;
  color: #245346;
}

.evidence-verification-badge.pending {
  background: #fff4dd;
  color: #805300;
}

.evidence-verification-badge.incomplete {
  background: #fde4e1;
  color: #842d27;
}

.dossier-document-status.unverified {
  background: #fff4dd;
  color: #805300;
}

.customer-flow-launch{background:#2f5d50;color:#fff;border-color:#2f5d50}.customer-flow-dialog{width:min(980px,calc(100vw - 1.5rem));max-height:calc(100vh - 1.5rem);padding:0;border:0;border-radius:20px;overflow:auto}.customer-flow-header{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.25rem;background:#fff;border-bottom:1px solid #e1e7e4}.customer-flow-brand{display:flex;gap:.8rem;align-items:center}.customer-flow-brand img{width:58px;height:58px;object-fit:contain}.customer-flow-brand h2,.customer-flow-brand p{margin:0}.customer-flow-progress{height:10px;background:#e5ebe8}.customer-flow-progress div{height:100%;width:25%;background:#2f5d50;transition:.2s}.customer-flow-labels{display:grid;grid-template-columns:repeat(4,1fr);padding:.75rem 1.25rem;background:#f7f9f8;text-align:center;font-size:.85rem}.customer-flow-labels span.active{font-weight:700;color:#2f5d50}#customerFlowForm{padding:1.25rem}.customer-flow-step{display:none}.customer-flow-step.active{display:block}.customer-flow-card{padding:1.3rem;border:1px solid #dfe6e2;border-radius:16px}.customer-flow-card h3{margin-top:0}.cf-dog{padding:1rem;margin-bottom:1rem;border:1px solid #dce4e0;border-radius:14px;background:#f9fbfa}.cf-dog-head{display:flex;justify-content:space-between;align-items:center}.cf-services{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin:1rem 0}.cf-services label{display:flex;gap:.75rem;padding:1rem;border:1px solid #dce4e0;border-radius:14px}.cf-services span{display:grid;gap:.2rem}.cf-services small{color:#65706a}.cf-docs{display:grid;gap:.75rem;margin:1rem 0}.cf-docs>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem;padding:1rem;border:1px solid #dce4e0;border-radius:12px}.cf-docs span{color:#65706a}.cf-notice{margin-top:1rem;padding:.85rem;border-left:5px solid #8a6b34;background:#fff8e8}.customer-flow-actions{position:sticky;bottom:0;display:flex;justify-content:space-between;gap:.75rem;margin:1.25rem -1.25rem -1.25rem;padding:1rem 1.25rem;background:#fff;border-top:1px solid #e1e7e4}.cf-review-block{padding:1rem;margin-bottom:.75rem;border-radius:12px;background:#f3f6f5}@media(max-width:700px){.cf-services{grid-template-columns:1fr}.cf-docs>div{grid-template-columns:1fr}.customer-flow-actions{flex-wrap:wrap}.customer-flow-actions button{flex:1 1 100%}.customer-flow-labels{font-size:.7rem}}

.application-card { border-left: 6px solid #2f5d50; }
.application-card.waiting { border-left-color: #b77716; }
.application-card.rejected { border-left-color: #9d2f2f; opacity: .78; }
.application-status { display:inline-block; margin-top:.4rem; padding:.28rem .55rem; border-radius:999px; font-size:.8rem; font-weight:700; background:#e6f1ec; color:#245346; }
.application-status.waiting { background:#fff4dd; color:#805300; }
.application-status.rejected { background:#fde4e1; color:#842d27; }
.application-correction-preview { white-space:pre-wrap; padding:1rem; border-left:5px solid #8a6b34; background:#fff8e8; border-radius:10px; }
.application-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.application-summary > div { padding:1rem; background:#f5f8f6; border-radius:12px; }
@media(max-width:720px){.application-summary{grid-template-columns:1fr;}}


.customer-correction-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr);
  gap: 1rem;
  align-items: center;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid #e2e8e5;
  background: #f7f9f8;
}

.customer-correction-entry p {
  margin: .2rem 0 0;
  color: #66716b;
  font-size: .9rem;
}

.customer-correction-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
}

.customer-correction-mode {
  grid-column: 1 / -1;
  padding: .7rem .85rem;
  border-left: 5px solid #b77716;
  border-radius: 9px;
  background: #fff4dd;
  color: #704900;
  font-weight: 700;
}

.application-correction-code {
  margin-top: .65rem;
  padding: .6rem .75rem;
  border-radius: 9px;
  background: #f0f4f2;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
  letter-spacing: .08em;
}

.application-history {
  margin-top: .8rem;
  padding: .75rem;
  border-radius: 9px;
  background: #f6f8f7;
  font-size: .88rem;
  color: #5f6964;
}

@media (max-width: 720px) {
  .customer-correction-entry,
  .customer-correction-code-row {
    grid-template-columns: 1fr;
  }
}


.application-communication-panel {
  margin-top: 1rem;
}

.application-communication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.application-communication-history {
  margin-top: .9rem;
  display: grid;
  gap: .45rem;
}

.application-communication-entry {
  padding: .65rem .75rem;
  border-radius: 9px;
  background: #f5f8f6;
  font-size: .88rem;
}

.application-communication-entry strong {
  color: #2f5d50;
}

.application-email-warning {
  margin-top: .75rem;
  padding: .7rem .8rem;
  border-left: 4px solid #8a6b34;
  border-radius: 8px;
  background: #fff8e8;
  font-size: .86rem;
}

@media (max-width: 650px) {
  .application-communication-actions button {
    width: 100%;
  }
}


.onboarding-dialog {
  width: min(920px, calc(100vw - 2rem));
}

.onboarding-badge {
  display: inline-block;
  margin-top: .45rem;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  background: #fff4dd;
  color: #805300;
}

.onboarding-badge.scheduled {
  background: #e8eef7;
  color: #31527d;
}

.onboarding-badge.completed,
.onboarding-badge.ready {
  background: #e6f1ec;
  color: #245346;
}

.onboarding-progress-steps,
.onboarding-document-status,
.onboarding-history {
  display: grid;
  gap: .55rem;
}

.onboarding-progress-step,
.onboarding-document-row,
.onboarding-history-entry {
  padding: .7rem .8rem;
  border-radius: 10px;
  background: #f5f8f6;
}

.onboarding-progress-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
}

.onboarding-progress-step .step-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe6e2;
  font-weight: 700;
}

.onboarding-progress-step.done .step-icon {
  background: #2f5d50;
  color: white;
}

.onboarding-document-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}


.customer-status-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr);
  gap: 1rem;
  align-items: center;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid #e2e8e5;
  background: #f7f9f8;
}

.customer-status-entry p {
  margin: .2rem 0 0;
  color: #66716b;
  font-size: .9rem;
}

.customer-status-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
}

.customer-status-dialog {
  width: min(820px, calc(100vw - 2rem));
}

.customer-status-summary {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #edf5f1;
}

.customer-status-progress,
.customer-status-documents {
  display: grid;
  gap: .55rem;
}

.customer-status-step,
.customer-status-document {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  padding: .7rem .8rem;
  border-radius: 10px;
  background: #f5f8f6;
}

.customer-status-step .status-icon,
.customer-status-document .status-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe6e2;
  font-weight: 700;
}

.customer-status-step.done .status-icon,
.customer-status-document.done .status-icon {
  background: #2f5d50;
  color: white;
}

.customer-status-next-step {
  padding: .85rem 1rem;
  border-left: 5px solid #8a6b34;
  border-radius: 10px;
  background: #fff8e8;
}

.customer-portal-code {
  margin-top: .6rem;
  padding: .55rem .7rem;
  border-radius: 8px;
  background: #f0f4f2;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
  letter-spacing: .08em;
}

@media (max-width: 720px) {
  .customer-status-entry,
  .customer-status-code-row {
    grid-template-columns: 1fr;
  }
}


.customer-meeting-response-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin: .8rem 0 1rem;
}

.customer-response-choice {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .9rem;
  border: 1px solid #dce4e0;
  border-radius: 12px;
  background: #fafbfa;
  cursor: pointer;
}

.customer-response-choice input {
  margin-top: .25rem;
}

.customer-response-choice span {
  display: grid;
  gap: .2rem;
}

.customer-response-choice small {
  color: #66716b;
}

.customer-meeting-response-status {
  margin-top: .8rem;
}

.customer-meeting-response-status.success {
  padding: .75rem .85rem;
  border-left: 5px solid #2f5d50;
  border-radius: 9px;
  background: #edf5f1;
  color: #245346;
  font-weight: 700;
}

.customer-response-card {
  border-left: 6px solid #31527d;
}

.customer-response-card.handled {
  border-left-color: #2f5d50;
  opacity: .78;
}

.customer-response-badge {
  display: inline-block;
  margin-top: .45rem;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  background: #e8eef7;
  color: #31527d;
}

.customer-response-badge.confirmed {
  background: #e6f1ec;
  color: #245346;
}

.customer-response-badge.handled {
  background: #eef0ef;
  color: #5f6964;
}

.customer-response-details {
  margin-top: .55rem;
  color: #5f6964;
  font-size: .9rem;
}

@media (max-width: 720px) {
  .customer-meeting-response-options {
    grid-template-columns: 1fr;
  }
}


.response-processing-dialog {
  width: min(860px, calc(100vw - 2rem));
}

.response-processing-history {
  display: grid;
  gap: .5rem;
  margin-top: 1rem;
}

.response-processing-history-entry {
  padding: .65rem .75rem;
  border-radius: 9px;
  background: #f5f8f6;
  font-size: .88rem;
}

.response-processing-highlight {
  padding: .8rem .9rem;
  border-left: 5px solid #31527d;
  border-radius: 10px;
  background: #eef3f9;
}

.response-processing-confirmed {
  padding: .8rem .9rem;
  border-left: 5px solid #2f5d50;
  border-radius: 10px;
  background: #edf5f1;
  color: #245346;
  font-weight: 700;
}


.visit-onboarding-badge {
  display: inline-block;
  margin-top: .4rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: #e8eef7;
  color: #31527d;
  font-size: .78rem;
  font-weight: 700;
}

.visit-onboarding-badge.completed {
  background: #e6f1ec;
  color: #245346;
}


.document-invitation-status {
  margin-top: .9rem;
  padding: .8rem .9rem;
  border-radius: 10px;
  background: #f5f8f6;
}

.document-invitation-status.ready {
  border-left: 5px solid #2f5d50;
  background: #edf5f1;
  color: #245346;
}

.document-invitation-status.waiting {
  border-left: 5px solid #8a6b34;
  background: #fff8e8;
  color: #624b1f;
}

.document-invitation-history {
  display: grid;
  gap: .45rem;
  margin-top: .9rem;
}

.document-invitation-history-entry {
  padding: .65rem .75rem;
  border-radius: 9px;
  background: #f5f8f6;
  font-size: .88rem;
}

.document-invitation-badge {
  display: inline-block;
  margin-left: .45rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: #fff4dd;
  color: #805300;
  font-size: .76rem;
  font-weight: 700;
}

.document-followup-card{border-left:6px solid #8a6b34}
.document-followup-card.urgent{border-left-color:#9d2f2f}
.document-followup-card.recent{border-left-color:#31527d}
.document-followup-meta{margin-top:.45rem;color:#5f6964;font-size:.9rem}
.document-followup-badge{display:inline-block;margin-top:.45rem;padding:.3rem .6rem;border-radius:999px;font-size:.8rem;font-weight:700;background:#fff4dd;color:#805300}
.document-followup-badge.urgent{background:#fde4e1;color:#842d27}
.document-followup-badge.recent{background:#e8eef7;color:#31527d}

.business-settings-form{max-width:980px}
.business-email-note{margin:1rem 0;padding:.85rem 1rem;border-left:5px solid #8a6b34;border-radius:10px;background:#fff8e8;color:#624b1f}
.business-settings-saved{margin-top:1rem;padding:.75rem .9rem;border-left:5px solid #2f5d50;border-radius:9px;background:#edf5f1;color:#245346;font-weight:700}


.customer-activation-card {
  border-left: 6px solid #2f5d50;
}

.customer-activation-status {
  padding: .85rem .95rem;
  border-radius: 10px;
  background: #f5f8f6;
}

.customer-activation-status.ready {
  border-left: 5px solid #2f5d50;
  background: #edf5f1;
  color: #245346;
}

.customer-activation-status.active {
  border-left: 5px solid #1f5c3e;
  background: #dff2e7;
  color: #1f5c3e;
  font-weight: 700;
}

.customer-activation-status.blocked {
  border-left: 5px solid #8a6b34;
  background: #fff8e8;
  color: #624b1f;
}

.customer-activation-history {
  display: grid;
  gap: .45rem;
  margin-top: .9rem;
}

.customer-activation-history-entry {
  padding: .65rem .75rem;
  border-radius: 9px;
  background: #f5f8f6;
  font-size: .88rem;
}

.customer-lifecycle-badge {
  display: inline-block;
  margin-left: .45rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
}

.customer-lifecycle-badge.onboarding {
  background: #fff4dd;
  color: #805300;
}

.customer-lifecycle-badge.ready {
  background: #e8eef7;
  color: #31527d;
}

.customer-lifecycle-badge.active {
  background: #dff2e7;
  color: #1f5c3e;
}

.paid-visit-confirmation-card{border-left:6px solid #31527d}
.paid-visit-confirmation-card.change-requested{border-left-color:#9d2f2f}
.paid-visit-status-badge{display:inline-block;margin-top:.4rem;padding:.28rem .55rem;border-radius:999px;font-size:.78rem;font-weight:700}
.paid-visit-status-badge.draft{background:#eef0ef;color:#5f6964}
.paid-visit-status-badge.waiting{background:#e8eef7;color:#31527d}
.paid-visit-status-badge.confirmed{background:#e6f1ec;color:#245346}
.paid-visit-status-badge.change_requested{background:#fde4e1;color:#842d27}
.customer-paid-visit-list{display:grid;gap:.75rem}
.customer-paid-visit-card{padding:.85rem .95rem;border:1px solid #dce4e0;border-radius:12px;background:#fafbfa}
.customer-paid-visit-actions,.visit-confirmation-actions{display:flex;flex-wrap:wrap;gap:.55rem;margin-top:.7rem}
.customer-paid-visit-change-fields{margin-top:.7rem}

.visit-reminder-card{border-left:6px solid #8a6b34}
.visit-reminder-card.overdue{border-left-color:#9d2f2f}
.visit-reminder-badge{display:inline-block;margin-top:.4rem;padding:.28rem .55rem;border-radius:999px;font-size:.78rem;font-weight:700}
.visit-reminder-badge.due{background:#fff4dd;color:#805300}
.visit-reminder-badge.sent{background:#e6f1ec;color:#245346}
.visit-reminder-badge.overdue{background:#fde4e1;color:#842d27}
.visit-reminder-actions{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.55rem}

.cancelled-visit-card{border-left:6px solid #6f6f6f}
.cancelled-visit-card.fee{border-left-color:#9d2f2f}
.cancelled-visit-badge{display:inline-block;margin-top:.4rem;padding:.28rem .55rem;border-radius:999px;background:#eef0ef;color:#4f5753;font-size:.78rem;font-weight:700}
.cancellation-fee-badge{display:inline-block;margin-left:.35rem;padding:.28rem .55rem;border-radius:999px;background:#fde4e1;color:#842d27;font-size:.78rem;font-weight:700}
.visit-cancel-actions{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.55rem}

.repeat-visit-options{padding:.9rem 1rem;border:1px solid #dce4e0;border-radius:12px;background:#f8faf9}
.series-badge{display:inline-block;margin-top:.4rem;padding:.28rem .55rem;border-radius:999px;background:#ece8f6;color:#5c477d;font-size:.78rem;font-weight:700}

.orphan-data-panel{margin-top:1.25rem}
.orphan-data-summary{margin:.75rem 0;padding:.8rem .95rem;border-radius:10px;background:#f5f8f6}
.orphan-data-card{border-left:6px solid #9d2f2f}
.orphan-data-meta{margin-top:.4rem;color:#5f6964;font-size:.9rem}
button.danger{background:#9d2f2f;color:#fff}

.series-management-summary{display:grid;gap:.45rem}
.series-management-actions{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.55rem}
.series-count-badge{display:inline-block;margin-left:.35rem;padding:.28rem .55rem;border-radius:999px;background:#f0ecf8;color:#5c477d;font-size:.78rem;font-weight:700}

.planning-conflict-card{border-left:6px solid #9d2f2f}
.planning-conflict-card.warning{border-left-color:#8a6b34}
.planning-conflict-badge{display:inline-block;margin-top:.4rem;padding:.28rem .55rem;border-radius:999px;font-size:.78rem;font-weight:700;background:#fde4e1;color:#842d27}
.planning-conflict-badge.warning{background:#fff4dd;color:#805300}
.planning-conflict-meta{margin-top:.45rem;color:#5f6964;font-size:.9rem}
.visit-time-block{display:inline-block;margin-top:.35rem;padding:.25rem .5rem;border-radius:999px;background:#eef0ef;color:#4f5753;font-size:.76rem;font-weight:700}

.main-tabs{position:sticky;top:0;z-index:20;background:#fff;padding-top:.5rem;padding-bottom:.5rem}
.more-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.9rem}
.more-card{display:flex;flex-direction:column;align-items:flex-start;gap:.35rem;min-height:110px;padding:1rem;text-align:left;border:1px solid #dce4e0;border-radius:14px;background:#fff;color:inherit;box-shadow:0 3px 12px rgba(0,0,0,.04)}
.more-card:hover{transform:translateY(-1px);box-shadow:0 5px 16px rgba(0,0,0,.07)}
.more-card strong{font-size:1rem}
.more-card span{color:#66706b;font-size:.9rem;line-height:1.4}
.back-to-more{margin-bottom:.9rem}
@media(max-width:720px){.main-tabs{overflow-x:auto;justify-content:flex-start}.main-tabs .tab{flex:0 0 auto}}


.top-donation-wrapper {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto .75rem;
}

.donation-hero-prominent {
  position: relative;
  overflow: hidden;
  border: 2px solid #8a6b34;
  border-radius: 18px;
  padding: 1.15rem 1.25rem;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, .98), rgba(247, 239, 211, .98));
  box-shadow: 0 8px 24px rgba(98, 75, 31, .14);
}

.donation-hero-prominent::before {
  content: "♥";
  position: absolute;
  right: 1rem;
  top: .4rem;
  font-size: 4.2rem;
  line-height: 1;
  opacity: .08;
}

.donation-hero-prominent h2,
.donation-hero-prominent h3 {
  margin-top: 0;
  margin-bottom: .4rem;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  color: #624b1f;
}

.donation-hero-prominent p {
  max-width: 760px;
  margin-bottom: .75rem;
}

.donation-hero-prominent button,
.donation-hero-prominent .button,
.donation-hero-prominent a[role="button"],
.donation-hero-prominent .donation-button {
  font-weight: 800;
  font-size: 1rem;
  padding: .8rem 1.1rem;
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(98, 75, 31, .18);
}

@media (max-width: 720px) {
  .top-donation-wrapper {
    width: min(100% - 1rem, 1180px);
    margin-top: .55rem;
  }

  .donation-hero-prominent {
    padding: 1rem;
    border-radius: 14px;
  }
}


/* Online beta 1 */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(245, 247, 246, 0.98);
}
.auth-gate.hidden { display: none; }
.auth-card {
  width: min(430px, 100%);
  background: #fff;
  border: 1px solid #d9e1dd;
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 18px 50px rgba(33, 54, 47, 0.16);
  text-align: center;
}
.auth-logo { width: 92px; height: 92px; object-fit: contain; margin-bottom: 8px; }
.auth-card h1 { margin: 0; }
.auth-subtitle { margin: 6px 0 22px; color: #5e6a66; }
.auth-form { display: grid; gap: 14px; text-align: left; }
.auth-form label { display: grid; gap: 6px; font-weight: 700; }
.auth-form input { width: 100%; }
.auth-form button { margin-top: 4px; }
.auth-message { min-height: 1.5em; margin: 14px 0 0; color: #31584d; font-weight: 700; }
.auth-message.error { color: #9c2c2c; }
.auth-help { margin: 12px 0 0; font-size: .9rem; color: #6d7773; }
body.auth-locked { overflow: hidden; }
.online-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid #ccd5d1;
  background: #f5f7f6;
}
.online-status.online { border-color: #a9c8bb; background: #edf7f2; }
.online-status.syncing { border-color: #d8c78c; background: #fff9e7; }
.online-status.error { border-color: #e1aeae; background: #fff0f0; }
.online-status.offline { color: #606965; }
@media (max-width: 760px) {
  .auth-card { padding: 22px; }
  .online-status { width: 100%; justify-content: center; }
}

.required-fields-note {
  margin: 12px 0 20px;
  padding: 10px 12px;
  border-left: 4px solid currentColor;
  border-radius: 8px;
  background: rgba(0,0,0,.035);
  font-size: .95rem;
}
.na-fill,
.dog-quick-fill {
  width: auto;
  margin-top: 7px;
  padding: 6px 10px;
  font-size: .86rem;
}


/* ============================================================
   ONLINE BETA 5 — MOBIELE KLANTENFICHE
   ============================================================ */
.mobile-step-hint { display: none; }

@media (max-width: 760px) {
  html { scroll-padding-top: 12px; }
  body { overflow-x: hidden; }

  .app-header {
    padding: .7rem .75rem;
    gap: .6rem;
  }

  .brand-block { gap: .65rem; }

  .brand-logo {
    width: 52px;
    height: 52px;
    padding: 4px;
    border-radius: 10px;
  }

  .app-header h1 {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .app-header p {
    font-size: .78rem;
    margin-top: .1rem;
  }

  .header-actions { gap: .4rem; }

  .header-actions button {
    flex: 1 1 auto;
    min-height: 42px;
    padding: .6rem .75rem;
    font-size: .9rem;
  }

  .donation-panel {
    margin: .55rem .65rem;
    padding: .65rem .75rem;
    gap: .55rem;
    border-radius: 12px;
  }

  .donation-panel h3 {
    font-size: 1rem;
    margin: 0;
  }

  .donation-panel p { display: none; }

  .donation-button {
    min-width: 0;
    width: auto;
    padding: .6rem .9rem;
    font-size: .92rem;
  }

  .tabs,
  .main-tabs {
    position: sticky;
    top: 0;
    z-index: 20;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar,
  .main-tabs::-webkit-scrollbar { display: none; }

  .tab,
  .main-tabs .tab {
    min-height: 48px;
    padding: .8rem .95rem;
    font-size: .98rem;
    scroll-snap-align: start;
  }

  main { padding: .7rem; }

  .section-heading { gap: .7rem; }

  .section-heading h2 {
    font-size: 1.55rem;
    margin-top: .3rem;
  }

  .section-heading p {
    font-size: .92rem;
    line-height: 1.4;
  }

  #newCustomerBtn {
    width: 100%;
    min-height: 50px;
    font-size: 1rem;
  }

  #customerForm.wizard {
    margin: .7rem -.15rem 0;
    padding: .85rem .75rem 6.8rem;
    border-radius: 14px;
  }

  #customerForm .wizard-header {
    position: sticky;
    top: 49px;
    z-index: 15;
    margin: -.85rem -.75rem 0;
    padding: .75rem;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid #d7dfdc;
    backdrop-filter: blur(8px);
  }

  #customerForm .wizard-header > div { width: 100%; }

  #customerForm .wizard-header h3 {
    font-size: 1.22rem;
    line-height: 1.25;
    margin: .12rem 0 0;
  }

  #customerForm .step-counter {
    display: inline-block;
    padding: .28rem .55rem;
    border-radius: 999px;
    background: #e8f1ee;
    color: #2f5d50;
    font-weight: 700;
    font-size: .82rem;
  }

  .mobile-step-hint {
    display: block;
    margin-top: .3rem;
    font-size: .78rem;
    line-height: 1.3;
    color: #66736e;
  }

  #closeWizardBtn {
    width: 100%;
    min-height: 42px;
  }

  #customerForm .progress-track {
    position: sticky;
    top: 160px;
    z-index: 14;
    margin: 0 -.75rem .65rem;
    height: 6px;
    border-radius: 0;
  }

  .required-fields-note {
    margin: .7rem 0 1rem;
    font-size: .88rem;
    line-height: 1.35;
  }

  #customerForm .form-grid,
  #customerForm .check-grid {
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  #customerForm label,
  #customerForm legend {
    font-size: .98rem;
    line-height: 1.35;
  }

  #customerForm input,
  #customerForm select,
  #customerForm textarea {
    min-height: 50px;
    border-radius: 10px;
    padding: .8rem .85rem;
    font-size: 16px;
  }

  #customerForm textarea {
    min-height: 104px;
    line-height: 1.45;
  }

  #customerForm textarea:focus { min-height: 145px; }

  #customerForm fieldset {
    padding: .8rem;
    border-radius: 12px;
  }

  #customerForm .check-row {
    min-height: 48px;
    align-items: center;
    margin: .25rem 0;
    padding: .58rem .65rem;
    border: 1px solid #dce4e0;
    border-radius: 10px;
    background: #fff;
  }

  #customerForm .check-row input[type="radio"],
  #customerForm .check-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-height: 0;
    flex: 0 0 22px;
    margin: 0;
  }

  #customerForm .dog-card {
    padding: .8rem;
    border-width: 1px;
    border-radius: 14px;
  }

  #customerForm .dog-card h4 {
    margin: -.8rem -.8rem .85rem;
    padding: .72rem .8rem;
    background: #f4f8f6;
    border-bottom: 1px solid #d6e0dc;
    border-radius: 14px 14px 0 0;
    font-size: 1rem;
  }

  #customerForm .info-box {
    font-size: .9rem;
    line-height: 1.4;
  }

  #customerForm .na-fill,
  #customerForm .dog-quick-fill {
    min-height: 42px;
    width: 100%;
    margin-top: .2rem;
  }

  #validationMessage {
    position: sticky;
    bottom: 78px;
    z-index: 25;
    margin: .75rem 0 0;
    box-shadow: 0 4px 18px rgba(0,0,0,.12);
  }

  #customerForm .wizard-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin: 0;
    padding: .7rem max(.75rem, env(safe-area-inset-right))
             calc(.7rem + env(safe-area-inset-bottom))
             max(.75rem, env(safe-area-inset-left));
    background: rgba(255,255,255,.98);
    border-top: 1px solid #ccd7d2;
    box-shadow: 0 -5px 18px rgba(0,0,0,.09);
    backdrop-filter: blur(8px);
  }

  #customerForm .wizard-actions button {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
    font-weight: 700;
  }

  #customerForm #saveCustomerBtn:not(.hidden) {
    grid-column: 1 / -1;
  }

  #customerForm #prevStepBtn.hidden + #nextStepBtn:not(.hidden) {
    grid-column: 1 / -1;
  }

  .list-item { padding: .85rem; }

  .item-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .item-actions button {
    width: 100%;
    min-height: 46px;
  }

  dialog,
  .donation-dialog,
  .customer-flow-dialog {
    width: calc(100vw - .75rem);
    max-height: calc(100dvh - .75rem);
    border-radius: 14px;
  }
}

@media (max-width: 420px) {
  .tab,
  .main-tabs .tab { padding-inline: .8rem; }
}


/* ============================================================
   ONLINE BETA 6 — KLANTENOMGEVING OP GSM
   ============================================================ */

.close-flow-mobile {
  display: none;
}

@media (max-width: 700px) {
  /* Treat the customer portal as a full-screen mobile app. */
  .customer-flow-dialog {
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    background: #fff;
  }

  .customer-flow-dialog::backdrop {
    background: rgba(19, 36, 31, .48);
  }

  .customer-flow-dialog,
  .customer-flow-dialog * {
    max-width: 100%;
  }

  .customer-flow-header {
    position: sticky;
    top: 0;
    z-index: 30;
    min-width: 0;
    padding: .72rem .8rem;
    gap: .55rem;
    align-items: center;
  }

  .customer-flow-brand {
    min-width: 0;
    flex: 1 1 auto;
    gap: .55rem;
  }

  .customer-flow-brand img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .customer-flow-brand > div {
    min-width: 0;
  }

  .customer-flow-brand h2 {
    font-size: 1.08rem;
    line-height: 1.13;
    overflow-wrap: anywhere;
  }

  .customer-flow-brand p {
    margin-top: .12rem;
    font-size: .78rem;
    line-height: 1.25;
  }

  #closeCustomerFlowBtn {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.55rem;
    line-height: 1;
  }

  .close-flow-full {
    display: none;
  }

  .close-flow-mobile {
    display: inline;
  }

  .customer-correction-entry,
  .customer-status-entry {
    display: block;
    padding: .78rem .8rem;
  }

  .customer-correction-entry strong,
  .customer-status-entry strong {
    display: block;
    font-size: .98rem;
    line-height: 1.25;
  }

  .customer-correction-entry p,
  .customer-status-entry p {
    margin-top: .25rem;
    font-size: .82rem;
    line-height: 1.35;
  }

  .customer-correction-code-row,
  .customer-status-code-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
    margin-top: .65rem;
  }

  .customer-correction-code-row input,
  .customer-status-code-row input,
  .customer-correction-code-row button,
  .customer-status-code-row button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 16px;
  }

  .customer-correction-mode {
    margin-top: .6rem;
  }

  /* Compact four-step navigator: never wider than the phone. */
  .customer-flow-progress {
    position: sticky;
    top: 58px;
    z-index: 25;
    height: 6px;
  }

  .customer-flow-labels {
    position: sticky;
    top: 64px;
    z-index: 24;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    padding: 0;
    background: #f7f9f8;
    border-bottom: 1px solid #e0e6e3;
    overflow: hidden;
  }

  .customer-flow-labels span {
    min-width: 0;
    padding: .55rem .18rem;
    font-size: .67rem;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .customer-flow-labels span.active {
    background: #e8f1ee;
  }

  #customerFlowForm {
    width: 100%;
    min-width: 0;
    padding: .75rem .75rem 6.3rem;
    overflow-x: hidden;
  }

  .customer-flow-step,
  .customer-flow-card,
  .cf-dog,
  .cf-review-block {
    min-width: 0;
    width: 100%;
  }

  .customer-flow-card {
    padding: .85rem;
    border-radius: 12px;
  }

  .customer-flow-card h3 {
    margin-bottom: .4rem;
    font-size: 1.12rem;
    line-height: 1.25;
  }

  .customer-flow-card > p {
    font-size: .88rem;
    line-height: 1.4;
  }

  #customerFlowForm .form-grid {
    grid-template-columns: 1fr !important;
    gap: .78rem;
  }

  #customerFlowForm label {
    min-width: 0;
    font-size: .94rem;
    line-height: 1.3;
  }

  #customerFlowForm input,
  #customerFlowForm select,
  #customerFlowForm textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: .78rem .8rem;
    font-size: 16px;
    border-radius: 10px;
  }

  #customerFlowForm textarea {
    min-height: 110px;
    resize: vertical;
  }

  .cf-dog {
    padding: .78rem;
    border-radius: 12px;
  }

  .cf-dog-head {
    gap: .5rem;
    align-items: flex-start;
  }

  .cf-dog-head h4 {
    min-width: 0;
    font-size: 1rem;
  }

  .cf-dog-head button {
    flex: 0 0 auto;
  }

  #addCfDogBtn {
    width: 100%;
    min-height: 48px;
  }

  .cf-services {
    grid-template-columns: 1fr !important;
    gap: .65rem;
  }

  .cf-services label {
    width: 100%;
    min-width: 0;
    padding: .8rem;
    gap: .65rem;
    align-items: flex-start;
  }

  .cf-services input[type="checkbox"] {
    flex: 0 0 22px;
    width: 22px !important;
    min-width: 22px;
    height: 22px;
    min-height: 22px !important;
    margin-top: .05rem;
  }

  .cf-services span {
    min-width: 0;
  }

  .cf-services strong,
  .cf-services small {
    overflow-wrap: anywhere;
  }

  .cf-docs > div {
    grid-template-columns: 1fr !important;
    width: 100%;
    min-width: 0;
    padding: .8rem;
  }

  .cf-docs button {
    width: 100%;
    min-height: 46px;
  }

  .cf-notice {
    font-size: .87rem;
    line-height: 1.4;
  }

  #cfReview {
    min-width: 0;
  }

  .cf-review-block {
    padding: .8rem;
    overflow-wrap: anywhere;
  }

  /* Fixed mobile actions: always reachable with one thumb. */
  .customer-flow-actions {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    width: 100%;
    margin: 0 !important;
    padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.98);
    border-top: 1px solid #ccd7d2;
    box-shadow: 0 -5px 18px rgba(0,0,0,.10);
    backdrop-filter: blur(8px);
  }

  .customer-flow-actions button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    margin: 0;
    font-size: .98rem;
    font-weight: 700;
  }

  #cfSubmitBtn:not(.hidden) {
    grid-column: 1 / -1;
  }

  #cfBackBtn.hidden + #cfNextBtn:not(.hidden) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .customer-flow-brand h2 {
    font-size: 1rem;
  }

  .customer-flow-labels span {
    font-size: .62rem;
    padding-inline: .1rem;
  }

  #customerFlowForm {
    padding-inline: .6rem;
  }
}


/* ============================================================
   ONLINE BETA 7 — TESTEROMGEVINGEN / BEHEERROLLEN
   ============================================================ */

.tester-environment-info p {
  margin: .35rem 0 0;
  color: #5f6965;
  line-height: 1.45;
}

.tester-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.tester-summary-grid > div {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .85rem;
  border: 1px solid #dde6e2;
  border-radius: 12px;
  background: #fff;
}

.tester-summary-grid strong {
  font-size: 1.4rem;
}

.tester-summary-grid span {
  color: #66706b;
  font-size: .9rem;
}

.tester-environment-card {
  display: block;
}

.tester-environment-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: .75rem;
  border-bottom: 1px solid #e2e8e5;
}

.tester-environment-head h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.tester-environment-head p {
  margin: .25rem 0 0;
  color: #68736e;
  font-size: .88rem;
}

.tester-role-badge {
  flex: 0 0 auto;
  padding: .3rem .55rem;
  border-radius: 999px;
  background: #e8f1ee;
  color: #2f5d50;
  font-weight: 700;
  font-size: .8rem;
}

.tester-counts {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0;
}

.tester-counts span {
  padding: .35rem .55rem;
  border-radius: 8px;
  background: #f4f7f5;
  color: #59645f;
  font-size: .85rem;
}

.tester-environment-section {
  margin-top: 1rem;
}

.tester-environment-section h4 {
  margin: 0 0 .55rem;
}

.tester-record {
  margin: .45rem 0;
  border: 1px solid #dfe6e3;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.tester-record summary {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .8rem;
  cursor: pointer;
  list-style: none;
}

.tester-record summary::-webkit-details-marker {
  display: none;
}

.tester-record summary span {
  color: #6a746f;
  font-size: .86rem;
  text-align: right;
}

.tester-record-body {
  padding: .25rem .8rem .8rem;
  border-top: 1px solid #e7ecea;
}

.error-panel {
  border-left: 4px solid #9e3e3e;
}

@media (max-width: 700px) {
  .tester-summary-grid {
    grid-template-columns: 1fr;
  }

  .tester-environment-head,
  .tester-record summary {
    flex-direction: column;
  }

  .tester-record summary span {
    text-align: left;
  }

  #refreshTesterEnvironmentsBtn {
    width: 100%;
  }
}

.activity-row{display:flex;justify-content:space-between;gap:1rem;align-items:center}
.activity-main,.activity-meta{display:flex;flex-direction:column;gap:.2rem}
.activity-main span,.activity-meta span{color:#66716c;font-size:.88rem}
.activity-meta{text-align:right}
@media(max-width:700px){.activity-row{align-items:flex-start;flex-direction:column}.activity-meta{text-align:left}}


/* ============================================================
   ONLINE BETA 8.2 — GEGROEPEERDE TESTERACTIVITEIT
   ============================================================ */

.tester-activity-card {
  display: block;
}

.tester-activity-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: .7rem;
  border-bottom: 1px solid #e2e8e5;
}

.tester-activity-head h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.tester-activity-head p {
  margin: .25rem 0 0;
  color: #68736e;
  font-size: .88rem;
}

.tester-activity-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0;
}

.tester-activity-stats span {
  padding: .4rem .6rem;
  border-radius: 8px;
  background: #f4f7f5;
  color: #59645f;
  font-size: .86rem;
}

.tester-activity-details {
  margin-top: .65rem;
}

.tester-activity-details summary {
  cursor: pointer;
  font-weight: 700;
}

.tester-activity-details ul {
  margin: .7rem 0 0;
  padding: 0;
  list-style: none;
}

.tester-activity-details li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid #edf1ef;
}

.tester-activity-details li span {
  color: #69736f;
  font-size: .85rem;
}

@media (max-width: 700px) {
  .tester-activity-head,
  .tester-activity-details li {
    flex-direction: column;
  }
}


/* ============================================================
   ONLINE BETA 8.3.1 — TE FACTUREREN FIX
   ============================================================ */

.legacy-invoicing {
  display: none !important;
}

.accountable-note {
  margin-bottom: 1rem;
  border-left: 4px solid #2f6a5b;
}

.accountable-note p {
  margin: .35rem 0 0;
  color: #626d68;
  line-height: 1.45;
}

.billable-card { display: block; }

.billable-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.billable-head h3 { margin: 0; }

.billable-head p {
  margin: .25rem 0 0;
  color: #69736f;
}

.billing-status {
  flex: 0 0 auto;
  padding: .32rem .55rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}

.status-todo { background: #fff3d7; color: #765500; }
.status-sent { background: #e8f1ee; color: #2f5d50; }
.status-invoiced { background: #e6f3e8; color: #2c6436; }

.billable-controls {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(260px, 1fr);
  gap: .8rem;
  margin-top: .85rem;
}

.billable-controls label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

@media (max-width: 700px) {
  .billable-head { flex-direction: column; }
  .billable-controls { grid-template-columns: 1fr; }
  .billing-status { align-self: flex-start; }
}
