
  :root {
    --primary: #b6482f;      /* warm terracotta, nods to Indonesian spice/kitchen tones */
    --primary-dark: #93391f;
    --secondary: #2f6b4f;
    --bg: #faf6f2;
    --card: #ffffff;
    --text: #2a2118;
    --muted: #7a6e62;
    --warn: #c98a1c;
    --border: #e6ddd3;
  }

  * { box-sizing: border-box; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0 16px 32px;
  }

  .topbar { padding: 20px 0 8px; }
  .topbar h1 { font-size: 20px; margin: 0; color: var(--primary-dark); }

  .screen { display: none; }
  .screen.active { display: block; }

  .intro { color: var(--muted); margin-bottom: 20px; }

  .big-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 12px;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
  }
  .big-btn .sub { font-size: 13px; font-weight: 400; opacity: 0.85; margin-top: 2px; }
  .big-btn.primary { background: var(--primary); color: white; }
  .big-btn.secondary { background: var(--secondary); color: white; }

  .back-btn {
    background: none;
    border: none;
    color: var(--primary-dark);
    font-size: 15px;
    padding: 8px 0;
    margin-bottom: 4px;
    cursor: pointer;
  }

  h2 { font-size: 19px; margin: 4px 0 8px; }
  .hint { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

  .photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
  }
  .photo-thumb {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
  }
  .photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .photo-thumb .remove {
    position: absolute;
    top: 2px; right: 2px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
  }

  .add-photo-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 16px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 16px;
    cursor: pointer;
  }
  .add-photo-btn input { display: none; }

  .loading {
    text-align: center;
    color: var(--muted);
    padding: 16px;
    font-style: italic;
  }

  .success {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
    padding: 32px 0 20px;
  }

  /* --- form --- */
  .field { margin-bottom: 14px; }
  .field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
  }
  .field label.warn-label { color: var(--warn); }
  .field input, .field select, .field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: var(--card);
  }
  .field textarea { min-height: 70px; resize: vertical; }

  .allergen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 16px;
  }
  .allergen-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .allergen-row span { font-size: 13px; }
  .allergen-row select { width: auto; padding: 6px 8px; font-size: 13px; }

  fieldset { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 16px; padding: 12px; }
  legend { font-weight: 700; font-size: 14px; padding: 0 6px; }

  /* --- invoice line cards --- */
  .invoice-line {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
  }
  .invoice-line .status-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
  }
  .badge-zeker { background: #e2f1e8; color: var(--secondary); }
  .badge-onzeker { background: #fbeecd; color: var(--warn); }
  .badge-nieuw { background: #f3e0da; color: var(--primary-dark); }
  .invoice-line .original-text { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
  .invoice-line .remember-row { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 8px; }


.error-text { color: #c0392b; font-size: 14px; margin-top: 8px; }
