/* VoxOfferte — mobile-first, ambachtelijk-professioneel */

:root {
  --navy: #1b2a41;
  --navy-deep: #131f30;
  --anthracite: #2b3644;
  --accent: #e8863a;
  --accent-dark: #cf6f24;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1b2a41;
  --text-soft: #5d6878;
  --line: #e1e5eb;
  --danger: #c0392b;
  --success: #2e7d4f;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(19, 31, 48, 0.08), 0 4px 14px rgba(19, 31, 48, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

button { font-family: inherit; }

/* ---------- Header ---------- */
.app-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(19, 31, 48, 0.25);
}
.app-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: 0.2px; }
.header-context { font-size: 13px; color: #9fb0c7; }

/* ---------- Layout ---------- */
.view {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}

h1 { font-size: 22px; margin: 6px 0 14px; }
h2 { font-size: 16px; margin: 0 0 10px; color: var(--anthracite); }

/* ---------- Knoppen ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-secondary { background: #e9edf2; color: var(--navy); }
.btn-secondary:hover { background: #dde3ea; }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line);
  font-weight: 600;
}
.btn-danger-ghost { background: transparent; color: var(--danger); border: none; font-weight: 600; min-height: 44px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.btn[disabled] { opacity: 0.55; cursor: default; }

/* ---------- Dashboard ---------- */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
}
.stat .stat-value { font-size: 24px; font-weight: 800; display: block; letter-spacing: -0.5px; }
.stat .stat-label { font-size: 11.5px; color: #9fb0c7; display: block; margin-top: 3px; line-height: 1.25; }

/* ---------- Offerte-lijst ---------- */
.quote-list { display: flex; flex-direction: column; gap: 10px; }
.quote-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.quote-item-main { flex: 1; min-width: 0; }
.quote-item-name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-item-meta { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.quote-item-amount { font-weight: 800; font-size: 17px; white-space: nowrap; }

.status-chip {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  min-height: 32px;
}
.status-concept { background: #e9edf2; color: #5d6878; }
.status-sent { background: #dbeafe; color: #1d4ed8; }
.status-accepted { background: #d7f0e1; color: var(--success); }
.status-rejected { background: #fde3df; color: var(--danger); }

.empty-state { text-align: center; padding: 34px 20px; color: var(--text-soft); }
.empty-state h2 { color: var(--navy); }
.hint-small { font-size: 12.5px; color: var(--text-soft); margin: 8px 0 0; }

/* ---------- Opnamescherm ---------- */
.record-hint { color: var(--text-soft); font-size: 14.5px; margin: 0 0 18px; }
.mic-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px 0 18px; }
.mic-btn {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(19, 31, 48, 0.35);
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.mic-btn svg { width: 52px; height: 52px; }
.mic-btn.recording {
  background: var(--accent);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 134, 58, 0.45); }
  70% { box-shadow: 0 0 0 26px rgba(232, 134, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 134, 58, 0); }
}
.mic-label { margin-top: 12px; font-weight: 700; font-size: 16px; }
.mic-timer { font-size: 14px; color: var(--text-soft); margin-top: 2px; min-height: 20px; }

.transcript-label { font-size: 13.5px; font-weight: 600; color: var(--text-soft); display: block; margin-bottom: 6px; }
textarea.transcript {
  width: 100%;
  min-height: 150px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  background: #fff;
  color: var(--text);
}
textarea.transcript:focus { outline: 2px solid var(--accent); border-color: transparent; }
.interim { color: var(--text-soft); font-style: italic; font-size: 14px; min-height: 20px; margin: 6px 2px; }

.demo-banner {
  background: #fdf0e4;
  border: 1.5px solid #f3cba4;
  color: #8a5010;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.notice {
  background: #fdf0e4;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  color: #8a5010;
  margin-bottom: 12px;
}

/* ---------- Eerste-keer-instap ---------- */
.onboarding-card { border: 2px solid var(--accent); background: #fdf7f1; }
.onboarding-card h2 { color: var(--navy); }
.onboarding-card p { font-size: 14.5px; color: var(--text); margin: 0 0 14px; }

/* ---------- Inloggen / registreren ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; padding-top: 8px; }
.auth-hero { background: var(--navy); color: #fff; }
.auth-hero h1 { margin: 4px 0 8px; }
.auth-hero p { color: #b8c4d6; margin: 0; font-size: 15px; }

/* ---------- Beheerscherm ---------- */
.admin-controls { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.admin-controls .btn { flex: 0 0 auto; width: auto; min-height: 46px; padding: 10px 14px; font-size: 15px; }
.admin-limit { display: flex; flex-direction: column; gap: 3px; }
.admin-limit input {
  width: 96px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 15px;
  font-family: inherit;
}

/* ---------- Laden / fouten ---------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 31, 48, 0.82);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 30px;
}
.spinner {
  width: 52px;
  height: 52px;
  border: 5px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-dark { border-color: rgba(27, 42, 65, 0.15); border-top-color: var(--accent); margin: 0 auto; }
.loading-title { font-size: 19px; font-weight: 700; }
.loading-sub { font-size: 14px; color: #b8c4d6; margin-top: 8px; max-width: 320px; }

.error-box a, .notice a { color: inherit; font-weight: 700; }

.error-box {
  background: #fde3df;
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--danger);
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---------- Review ---------- */
.assumptions {
  background: #fdf0e4;
  border: 1.5px solid #f3cba4;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.assumptions h2 { color: #8a5010; display: flex; align-items: center; gap: 8px; }
.assumptions ul { margin: 8px 0 0; padding-left: 20px; }
.assumptions li { font-size: 14.5px; color: #6e4a1a; margin-bottom: 5px; }
.assumptions .hint-small { color: #8a5010; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  min-height: 48px;
}
.field textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); border-color: transparent; }
/* Aankruisvakjes (bv. akkoord met de voorwaarden) mogen NIET de volledige
   breedte van een gewoon invulveld krijgen — anders verdwijnt de tekst ernaast. */
.field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}
.field.agree-field { align-items: flex-start; }
.field.agree-field span { font-size: 14px; color: var(--text); line-height: 1.4; }
.field.agree-field a { color: var(--accent-dark); font-weight: 600; }

.line-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.line-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.line-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.line-total { font-weight: 800; font-size: 17px; }

.totals-card { background: var(--navy); color: #fff; }
.totals-card h2 { color: #9fb0c7; }
.totals-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 15px; color: #c9d3e0; }
.totals-row.total {
  border-top: 1.5px solid rgba(255, 255, 255, 0.2);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
}
.totals-row.deposit { color: var(--accent); font-weight: 700; }

/* ---------- Deelscherm ---------- */
.share-icon { text-align: center; font-size: 44px; margin: 8px 0; }
.share-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* ---------- Instellingen ---------- */
.settings-intro { color: var(--text-soft); font-size: 14.5px; margin: 0 0 14px; }
.logo-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.logo-preview img { width: 62px; height: 62px; object-fit: contain; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.service-row {
  display: grid;
  grid-template-columns: 1fr 82px 92px 40px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.service-row input {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-size: 15px;
  min-height: 46px;
  width: 100%;
  font-family: inherit;
}
.service-del {
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 22px;
  cursor: pointer;
  min-height: 44px;
}
.numbering-preview { font-size: 15px; font-weight: 700; color: var(--navy); }

/* ---------- Abonnement ---------- */
.billing-plan { border: 1.5px solid var(--line); }
.billing-plan-featured { border-width: 2px; box-shadow: 0 4px 18px rgba(232, 134, 58, 0.18); }
.billing-badge {
  position: absolute;
  top: -11px;
  left: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}

/* ---------- Detailscherm ---------- */
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.detail-number { font-size: 13px; color: var(--text-soft); }

/* ---------- Navigatie onderaan ---------- */
.bottom-nav.hidden { display: none; }
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  z-index: 30;
}
.nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  cursor: pointer;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.nav-btn svg { width: 24px; height: 24px; }
.nav-btn.active { color: var(--navy); }
.nav-btn-primary {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  margin: 0 8px;
  max-width: 170px;
}
.nav-btn-primary .nav-plus { font-size: 24px; line-height: 1; font-weight: 800; }
.nav-btn-primary.active { color: #fff; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(90px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy-deep);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 70;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Desktop ---------- */
@media (min-width: 700px) {
  h1 { font-size: 26px; }
  .stat .stat-value { font-size: 30px; }
  .line-grid { grid-template-columns: repeat(4, 1fr); }
  .share-buttons { flex-direction: row; flex-wrap: wrap; }
  .share-buttons .btn { flex: 1 1 45%; }
}
