/* ── Emondt Materiaalapp — pages.css ────────────────── */

/* ═══ WELKOM / BENTO HOME ════════════════════════════════════ */
.welkom-header { padding: 20px 0 24px; }
.welkom-badge {
  display: inline-block;
  background: var(--green-dim); border: 1px solid var(--green-border);
  color: var(--green);
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  padding: 4px 12px; border-radius: 30px; margin-bottom: 14px;
}
.welkom-title {
  font-size: 2.1rem; font-weight: 800;
  color: var(--white); line-height: 1.1;
  letter-spacing: -.03em; margin-bottom: 10px;
}
.welkom-desc { font-size: .88rem; color: var(--text-secondary); line-height: 1.6; max-width: 320px; }

/* ═══ BENTO GRID ═════════════════════════════════════════════ */
.bento-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.bento-primary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: background .2s, border-color .2s, box-shadow .22s ease, transform .18s ease; min-height: 90px;
  box-shadow: var(--elev-2);
}
.bento-primary:active { background: var(--surface2); border-color: var(--border-strong); box-shadow: var(--elev-1); transform: scale(.99); }
.bento-primary-content { display: flex; align-items: center; gap: 16px; }
.bento-primary-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--green-dim); border: 1px solid var(--green-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--green); flex-shrink: 0;
  box-shadow: var(--glow-green-sm);
}
.bento-primary-label { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 2px; }
.bento-primary-sub   { font-size: .8rem; color: var(--text-secondary); }
.bento-primary-arrow { color: var(--muted); flex-shrink: 0; }

.bento-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.bento-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 12px; cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .22s ease, transform .18s ease; min-height: 96px;
  box-shadow: var(--elev-2);
}
.bento-tile:active { background: var(--surface2); border-color: var(--border-strong); box-shadow: var(--elev-1); transform: scale(.98); }
.bento-tile svg { color: var(--green); }
.bento-tile span { font-size: .82rem; font-weight: 600; color: var(--text-secondary); line-height: 1.2; }

.welkom-footer-tekst {
  text-align: center; font-size: .68rem; color: var(--muted);
  margin-top: 8px; letter-spacing: .06em; padding-bottom: 8px;
}

/* ═══ PWA INSTALLATIE UITLEG ════════════════════════════════ */
.pwa-uitleg-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px 16px; margin-bottom: 16px;
}
.pwa-uitleg-titel {
  display: flex; align-items: center; gap: 8px;
  font-size: .92rem; font-weight: 700; color: var(--white); margin-bottom: 8px;
}
.pwa-uitleg-titel svg { color: var(--green); flex-shrink: 0; }
.pwa-uitleg-sub { font-size: .82rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.pwa-os { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media(max-width:400px) { .pwa-os { grid-template-columns: 1fr; } }
.pwa-os-blok { background: var(--surface2); border-radius: 10px; padding: 12px; }
.pwa-os-naam { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.pwa-stappen { margin: 0; padding-left: 16px; font-size: .76rem; color: var(--text-secondary); line-height: 1.9; }
.pwa-stappen strong { color: var(--text); }

/* ═══ FILTER SHEET ═══════════════════════════════════════════ */
.filter-sheet {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 520px;
  display: flex; flex-direction: column; max-height: 80dvh;
  border-top: 1px solid var(--border-strong);
}
.filter-sheet-handle {
  width: 36px; height: 4px; background: var(--border-strong);
  border-radius: 2px; margin: 12px auto 4px;
}
.filter-sheet-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 14px; border-bottom: 1px solid var(--border);
}
.filter-sheet-inhoud { flex: 1; overflow-y: auto; }
.filter-sheet-footer {
  display: flex; gap: 10px;
  padding: 14px 16px calc(var(--nav-h) + 12px);
  border-top: 1px solid var(--border);
}
.filter-sheet-footer .btn { margin-bottom: 0; }

/* ═══ VRIJ ARTIKEL SHEET ═════════════════════════════════════ */
#vrij-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  z-index: 600; display: none;
  align-items: flex-end; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
#vrij-overlay.open { display: flex; }
.vrij-sheet {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 520px;
  padding: 0 20px calc(var(--nav-h) + 20px);
  border-top: 1px solid var(--border-strong);
  max-height: 90dvh; overflow-y: auto;
}
.vrij-handle {
  width: 36px; height: 4px; background: var(--border-strong);
  border-radius: 2px; margin: 14px auto 16px;
}
.vrij-title { font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.vrij-sub   { font-size: .84rem; color: var(--text-secondary); margin-bottom: 20px; }

/* ═══ BESTELBEVESTIGING ══════════════════════════════════════ */
#bevestiging-icoon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--green-dim); border: 1px solid var(--green-border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; transition: transform .3s;
}
#bevestiging-samenvatting {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px;
  font-size: .84rem; color: var(--text-secondary); line-height: 1.7;
}

/* ═══ CART / WINKELWAGEN ═════════════════════════════════════ */
#cart-content { margin-bottom: 14px; }

/* ═══ PAGE HEADER (terug-knoppen) ════════════════════════════ */
.page-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.page-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--white); margin: 0; }
.page-back-btn {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; flex-shrink: 0;
  transition: background .15s; font-size: 1.1rem;
}
.page-back-btn:active { background: var(--surface3); }

/* ═══ LEGE STATES ════════════════════════════════════════════ */
.leeg-state {
  text-align: center; padding: 48px 20px; color: var(--text-secondary);
}
.leeg-state svg { color: var(--muted); margin-bottom: 14px; opacity: .5; }
.leeg-state h3 { font-size: .95rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.leeg-state p  { font-size: .84rem; line-height: 1.6; }

/* ═══ BEHEER OMGEVING WAARSCHUWING ══════════════════════════ */
#beheer-omgeving-waarschuwing {
  background: var(--warning-bg); border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: .8rem; color: var(--warning); margin-bottom: 12px; line-height: 1.6;
}

/* ═══ CSV DROPZONE ═══════════════════════════════════════════ */
#tu-dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 24px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s; background: var(--surface2); margin-bottom: 10px;
}
#tu-dropzone:hover { border-color: var(--green-border); }

/* ═══ LEVERDATUM KNOPPEN ═════════════════════════════════════ */
#leverdatum-waarschuwing, .lev-waarschuwing {
  background: var(--warning-bg); border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: .82rem; color: var(--warning); margin-top: 6px; line-height: 1.5;
}

/* ═══ HIST ITEMS ═════════════════════════════════════════════ */
.hist-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 8px;
  cursor: pointer; transition: background .15s;
}
.hist-item:active { background: var(--surface2); }
.hist-item.open { border-color: var(--green-border); }
.hist-datum { font-size: .72rem; color: var(--muted); font-family: 'DM Mono', monospace; margin-bottom: 4px; }
.hist-project { font-size: .92rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.hist-meta { font-size: .76rem; color: var(--muted); }
.hist-detail { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.hist-detail.open { display: block; }
.hist-artikel-rij {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 4px; font-size: .82rem;
}
.hist-artikel-qty { font-weight: 700; color: var(--green); min-width: 32px; }

/* ═══ INKLAPBAAR ═════════════════════════════════════════════ */
.inklapbaar-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; padding: 0;
  cursor: pointer; text-align: left;
  font-family: 'Inter', 'DM Sans', sans-serif;
  -webkit-appearance: none; appearance: none; color: inherit;
}
.inklapbaar-arrow {
  color: var(--muted); flex-shrink: 0;
  transition: transform .22s ease; margin-left: 8px;
}
.inklapbaar-arrow path { stroke: var(--muted); }
.inklapbaar-open .inklapbaar-arrow { transform: rotate(90deg); }
.inklapbaar-header .gids-titel {
  font-size: .92rem; font-weight: 700;
  text-transform: none; letter-spacing: normal;
  color: var(--green); margin-bottom: 0;
}
.inklapbaar-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease-out;
}
.inklapbaar-open .inklapbaar-body {
  transition: max-height .32s ease-in;
}

/* ═══ GEBRUIKSGIDS ═══════════════════════════════════════════ */
.gids-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  margin-bottom: 16px;
}
.gids-titel {
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--green); margin-bottom: 14px;
}
.gids-stap {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.gids-stap:last-child { border-bottom: none; padding-bottom: 0; }
.gids-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--green-dim); border: 1px solid var(--green-border);
  color: var(--green); font-size: .74rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.gids-tekst { display: flex; flex-direction: column; gap: 1px; }
.gids-tekst strong { font-size: .86rem; color: var(--text); font-weight: 600; }
.gids-tekst span { font-size: .76rem; color: var(--muted); line-height: 1.4; }

/* ═══ BEHEER / ADMIN ═════════════════════════════════════════ */
#tab-beheer-panel { padding-top: 0; }
.admin-artikel-rij {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.admin-artikel-rij:last-child { border-bottom: none; }
.admin-artikel-info { flex: 1; min-width: 0; }
.admin-artikel-naam { font-size: .88rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-artikel-code { font-size: .72rem; color: var(--muted); font-family: 'DM Mono', monospace; margin-top: 2px; }

/* ═══ WEERGAVE KEUZE SHEET ═══════════════════════════════════ */
#weergave-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  z-index: 600; display: none;
  align-items: flex-end; justify-content: center;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}

/* ═══ SUGGESTIE OVERLAY ══════════════════════════════════════ */
#suggestie-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  z-index: 700; display: none;
  align-items: flex-end; justify-content: center;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}

/* ═══ FOOTER ════════════════════════════════════════════════ */
footer {
  text-align: center; padding: 20px 16px 24px; margin-top: 8px;
  font-size: .7rem; color: var(--muted); letter-spacing: .06em;
  border-top: 1px solid var(--border);
}
footer a { color: var(--muted); text-decoration: none; transition: color .15s; }
footer a:hover { color: var(--text-secondary); }

/* ═══ BESTELLINGEN OVERZICHT (beheer) ═══════════════════════ */
.best-artikelen-wrap {
  background: var(--surface2); border-radius: var(--radius-sm);
  padding: 4px 10px; margin-bottom: 10px;
}
.best-artikel-rij {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--border);
}
.best-artikel-rij:last-child { border-bottom: none; }
.best-artikel-qty { font-weight: 700; color: var(--green); min-width: 32px; font-size: .82rem; }

/* ═══ PROFIEL OPSLAAN BTN ════════════════════════════════════ */
#profiel-opslaan-btn { width: 100%; margin-top: 4px; }
