/* WorkWife Finance (agent B, ronde 20-10): fakture, kwotasies, strokies, lone. Tokens uit styles.css (groen + goud, neutralen). */
.fi { padding-bottom: 24px; }
.fi-head { margin-bottom: 4px; }
.fi-head h2 { margin: 6px 0; }
.btn.fi-new { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn.fi-sm { width: auto; min-height: 36px; padding: 6px 12px; font-size: 14px; }
.fi-search { margin: 0 0 10px; min-height: 44px; }
.fi-tot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 2px 4px 8px; font-size: 14px; color: var(--muted); }
.fi-tot b { color: var(--ink); font-size: 15px; }

/* opsomming fakture */
.fi-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.fi-sum > div { background: var(--surf); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.fi-sum small { color: var(--muted); font-size: 13px; }
.fi-sum b { font-size: 19px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* lyste */
.fi-list { display: flex; flex-direction: column; gap: 8px; }
.fi-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.fi-item:hover { border-color: var(--green); }
.fi-item:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.fi-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.fi-t b { font-size: 16px; overflow-wrap: anywhere; }
.fi-s { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.fi-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; flex: none; }
.fi-r b { font-size: 16px; white-space: nowrap; }
.fi-r small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fi-paid {
  border: 1px solid var(--green); background: var(--bg); color: var(--green); border-radius: 999px;
  font-size: 13px; font-weight: 600; padding: 6px 12px; min-height: 32px; cursor: pointer; white-space: nowrap;
}
.fi-paid:hover { background: var(--green-ink); }

/* statuspille */
.fi-st { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; background: var(--surf); color: var(--ink-2); }
.fi-st.st-draft, .fi-st.rs-new { background: var(--surf); color: var(--ink-2); }
.fi-st.st-sent, .fi-st.rs-checked { background: #E7EEF6; color: #2D5F8B; }
.fi-st.st-paid, .fi-st.st-accepted, .fi-st.rs-sent { background: var(--green-ink); color: var(--green); }
.fi-st.st-overdue, .fi-st.st-expired { background: #FCEFCF; color: var(--gold-ink); }
.fi-st.st-cancelled { background: var(--surf); color: var(--muted); text-decoration: line-through; }

/* leë state */
.fi-empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.fi-empty svg { width: 34px; height: 34px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fi-empty.big { background: var(--surf-2); border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 36px 20px; margin-top: 12px; }
.fi-empty.big svg { width: 44px; height: 44px; }
.fi-empty h3 { color: var(--ink); margin: 10px 0 6px; }
.fi-empty p { margin: 0 auto; max-width: 380px; font-size: 15px; line-height: 1.5; }

/* strokies */
.fi-scan { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin: 8px 0 12px; }
.fi-scan .btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; margin: 0; cursor: pointer; }
.fi-scan svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.fi-scanbtn { font-size: 16px; }
.fi-acc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--surf); border-radius: var(--radius-sm); }
.fi-acc > svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fi-acc b { display: block; font-size: 15px; }
.fi-acc small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.fi-month { margin-bottom: 14px; }
.fi-mh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 14px 4px 8px; }
.fi-mh b { font-size: 15px; text-transform: capitalize; }
.fi-mh span { font-size: 13px; color: var(--muted); text-align: right; }
.fi-month .fi-item { margin-bottom: 8px; }
.fi-cb { width: 24px; height: 24px; min-height: 0; flex: none; accent-color: var(--green); cursor: pointer; }
.fi-hasbar { padding-bottom: 96px; }
.fi-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 10px); z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.fi-bar .btn { width: auto; min-height: 44px; margin: 0; }
.fi-bar span { font-weight: 600; }
@media (min-width: 900px) { .fi-bar { left: calc(var(--side-w) + 24px); right: 24px; bottom: 20px; max-width: 760px; } }

/* strokie: detail */
.fi-detail { display: grid; gap: 14px; }
.fi-photo img { width: 100%; max-height: 52dvh; object-fit: contain; background: var(--surf); border-radius: var(--radius-sm); display: block; }
.fi-photo .btn { margin: 0; }
.fi-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fi-2 > * { min-width: 0; }
.fi-f label { margin-top: 10px; }
.fi-rev input, .fi-rev select, .fi-rev textarea { border-color: var(--gold); background: #FFF9EC; }
.fi-rev label::after { content: " ●"; color: var(--gold-ink); font-size: 10px; vertical-align: 2px; }
.fi-lines { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.fi-lines.fi-rev { border-color: var(--gold); }
.fi-line { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.fi-line:last-child { border-bottom: 0; }
.fi-line small { display: block; color: var(--muted); font-size: 12px; }
.fi-line b { white-space: nowrap; }
.fi-stock { margin-top: 14px; padding: 12px 14px; background: var(--green-ink); border-radius: var(--radius-sm); }
.fi-stock p { margin: 0 0 10px; font-weight: 600; color: var(--green); }
.fi-stock .btn { margin: 0; background: var(--bg); }
.fi-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 6px 0 10px; background: #FCEFCF; color: var(--gold-ink); border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.fi-warn svg, .fi-w svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fi-note { padding: 10px 14px; margin: 6px 0 10px; background: #FFF9EC; border: 1px solid var(--gold); border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-2); }
.btn.fi-del { width: 100%; margin-top: 10px; color: var(--low); }
.fi-help { margin: 6px 0 0; }

/* inlees-vordering */
.fi-prog { text-align: center; padding-top: 12vh; max-width: 420px; margin: 0 auto; }
.fi-progic { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; background: var(--green-ink); display: flex; align-items: center; justify-content: center; animation: fi-pulse 1.4s ease-in-out infinite; }
.fi-progic svg { width: 34px; height: 34px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fi-prog ol { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; display: inline-block; }
.fi-prog li { padding: 6px 0 6px 28px; position: relative; color: var(--muted); }
.fi-prog li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.fi-prog li.done { color: var(--ink-2); }
.fi-prog li.done::before { background: var(--green); }
.fi-prog li.now { color: var(--ink); font-weight: 600; }
.fi-prog li.now::before { background: var(--gold); animation: fi-pulse 1s ease-in-out infinite; }
@keyframes fi-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .fi-progic, .fi-prog li.now::before { animation: none; } }

/* lone */
.fi-monthnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 4px; background: var(--surf); border-radius: var(--radius-sm); padding: 4px; }
.fi-monthnav b { text-transform: capitalize; font-size: 16px; }
.fi-monthnav .btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.fi-monthnav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fi-info { font-size: 13px; color: var(--muted); margin: 8px 4px 4px; line-height: 1.45; }
.fi-emp { cursor: default; flex-wrap: wrap; }
.fi-emp:hover { border-color: var(--line); }
.fi-acts { display: flex; gap: 6px; flex: none; }
.fi-runh { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.fi-runh h3 { margin: 8px 0; display: flex; align-items: center; gap: 8px; }
.fi-tablewrap { overflow-x: auto; }
.fi-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fi-table th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fi-table th:first-child { text-align: left; }
.fi-table td { text-align: right; padding: 10px 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: top; }
.fi-table td:first-child { text-align: left; white-space: normal; }
.fi-table td small { display: block; color: var(--muted); font-size: 12px; }
.fi-w { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; color: var(--gold-ink); }
.fi-w svg { width: 14px; height: 14px; }
.fi-totals { margin: 12px 0; padding: 12px 14px; background: var(--surf); border-radius: var(--radius-sm); }
.fi-totals > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; }
.fi-totals > div.big { font-size: 18px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.fi-runbtns { margin-top: 10px; }
.fi-runbtns .btn { margin: 0; }
/* telefoon: tabel as kaarte */
@media (max-width: 640px) {
  .fi-table thead { display: none; }
  .fi-table, .fi-table tbody, .fi-table tr, .fi-table td { display: block; width: 100%; }
  .fi-table tr { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; }
  .fi-table td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; text-align: right; }
  .fi-table td:first-child { display: block; padding-bottom: 6px; }
  .fi-table td[data-l]::before { content: attr(data-l); color: var(--muted); }
  .fi-table td:last-child { justify-content: flex-end; padding-top: 6px; }
  .fi-runbtns { grid-template-columns: 1fr; }
  .fi-scan { grid-template-columns: 1fr; }
}

/* kalender (dae en ure) */
.fi-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0; }
.fi-wd { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.fi-day {
  aspect-ratio: 1 / 1; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; cursor: pointer; padding: 2px; color: var(--ink);
}
.fi-day span { font-size: 12px; color: var(--muted); line-height: 1.1; }
.fi-day b { font-size: 15px; line-height: 1.1; min-height: 16px; }
.fi-day.on { background: var(--green); border-color: var(--green); color: var(--cream); }
.fi-day.on span { color: var(--green-ink); }
.fi-day.half { background: var(--green-ink); border-color: var(--green); color: var(--green); }
.fi-day.fut { opacity: .35; cursor: not-allowed; }
.fi-day.h { cursor: default; aspect-ratio: auto; padding: 4px 2px; }
.fi-day.h input { min-height: 30px; padding: 2px; text-align: center; border: 0; background: transparent; font-weight: 700; font-size: 15px; width: 100%; }
.fi-day.h.on input { color: #fff; }
.fi-calsum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fi-calsum b { flex: 1; }

/* chatkaarte */
.fi-cc .amt { white-space: nowrap; }

@media (min-width: 900px) {
  .fi { max-width: 860px; }
  .fi-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .sheet .in:has(.fi-detail) { max-width: 900px; }
}
/* QA-ui 20-10: op de telefoon brak de naam van de werknemer af naast de knoppen; knoppen dan naar de volgende regel */
.fi-emp .grow { flex: 1 1 210px; min-width: 0; }
