/* ============================================================================
   QOVERED COMPONENT LIBRARY  (depends on tokens.css)
   All classes are .q-* and read only from --q-* tokens, so they adapt to
   light/dark automatically and never clash with the legacy styles.
   ============================================================================ */

.q-scope { font-family: var(--q-font-sans); color: var(--q-text); background: var(--q-bg);
  -webkit-font-smoothing: antialiased; font-size: var(--q-text-base); line-height: 1.55; }
.q-scope *, .q-scope *::before, .q-scope *::after { box-sizing: border-box; }

/* ---- Typography ---- */
.q-display { font-family: var(--q-font-display); font-weight: 700; letter-spacing: -0.03em;
  font-size: var(--q-display); line-height: 1.0; color: var(--q-text); font-variant-numeric: tabular-nums; }
.q-h1 { font-family: var(--q-font-display); font-weight: 700; font-size: var(--q-text-xl); letter-spacing: -0.025em; color: var(--q-text); }
.q-h2 { font-weight: 700; font-size: var(--q-text-lg); letter-spacing: -0.015em; color: var(--q-text); }
.q-eyebrow { font-size: var(--q-text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--q-text-muted); }
.q-muted { color: var(--q-text-muted); }
.q-secondary { color: var(--q-text-secondary); }
.q-num { font-family: var(--q-font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.q-metric { font-family: var(--q-font-display); font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em; font-size: var(--q-text-2xl); line-height: 1.05; color: var(--q-text); }
/* Amount with raised superscript cents — €1.151,34 */
.q-amt { font-family: var(--q-font-display); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.025em; color: var(--q-text); white-space: nowrap; }
.q-amt .c { font-size: 0.56em; font-weight: 600; vertical-align: 0.52em; margin-left: 1px; letter-spacing: 0; }
.q-amt .cur { font-weight: 600; margin-right: 2px; }

/* ---- Buttons ---- */
.q-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--q-font-sans); font-size: var(--q-text-base); font-weight: 600;
  padding: 0 18px; height: 42px; border-radius: var(--q-radius-sm); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; transition: background var(--q-dur-fast) var(--q-ease),
  border-color var(--q-dur-fast) var(--q-ease), transform var(--q-dur-fast) var(--q-ease), box-shadow var(--q-dur-fast) var(--q-ease);
  user-select: none; text-decoration: none; }
.q-btn:active { transform: scale(0.98); }
.q-btn:focus-visible { outline: none; box-shadow: var(--q-ring); }
.q-btn--primary { background: linear-gradient(145deg, var(--q-accent-hover), var(--q-accent)); color: var(--q-accent-contrast);
  box-shadow: 0 6px 20px -4px var(--q-accent-glow); }
.q-btn--primary:hover { filter: brightness(1.04); }
.q-btn--ghost { background: transparent; color: var(--q-text); }
.q-btn--ghost:hover { background: var(--q-surface-2); }
.q-btn--outline { background: var(--q-surface); color: var(--q-text); border-color: var(--q-border-strong); }
.q-btn--outline:hover { border-color: var(--q-text-muted); }
.q-btn--danger { background: transparent; color: var(--q-danger); border-color: transparent; }
.q-btn--danger:hover { background: var(--q-danger-soft); }
.q-btn--sm { height: 34px; padding: 0 13px; font-size: var(--q-text-sm); }
.q-btn--lg { height: 50px; padding: 0 26px; font-size: var(--q-text-md); }
.q-btn--pill { height: 54px; padding: 0 22px; border-radius: var(--q-radius-pill); font-size: var(--q-text-md); font-weight: 700; }
.q-btn--icon { width: 40px; height: 40px; padding: 0; border-radius: var(--q-radius-sm); }
.q-btn--block { width: 100%; }
.q-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Coloured category tile (Bunq-style icon) — gradient + soft colour glow */
.q-tile { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; color: #fff; font-family: var(--q-font-display); font-weight: 700; font-size: var(--q-text-md);
  position: relative; }
.q-tile svg { width: 22px; height: 22px; }
.q-tile::after { content:''; position:absolute; inset:0; border-radius:inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 55%); pointer-events:none; }
.q-tile.t-green  { background: linear-gradient(145deg,#46E6A6,#0E9F73); box-shadow: 0 6px 16px -2px rgba(16,185,129,0.45); }
.q-tile.t-purple { background: linear-gradient(145deg,#B794FF,#6D28D9); box-shadow: 0 6px 16px -2px rgba(124,58,237,0.45); }
.q-tile.t-blue   { background: linear-gradient(145deg,#5EA8FF,#2563EB); box-shadow: 0 6px 16px -2px rgba(37,99,235,0.45); }
.q-tile.t-teal   { background: linear-gradient(145deg,#37E0CE,#0D9488); box-shadow: 0 6px 16px -2px rgba(13,148,136,0.45); }
.q-tile.t-indigo { background: linear-gradient(145deg,#8487FF,#4338CA); box-shadow: 0 6px 16px -2px rgba(67,56,202,0.45); }
.q-tile.t-pink   { background: linear-gradient(145deg,#FB8FC6,#DB2777); box-shadow: 0 6px 16px -2px rgba(219,39,119,0.4); }
.q-tile.t-orange { background: linear-gradient(145deg,#FFC65C,#F59E0B); box-shadow: 0 6px 16px -2px rgba(245,158,11,0.4); }
.q-tile.t-red    { background: linear-gradient(145deg,#FF6B6B,#E11D48); box-shadow: 0 6px 16px -2px rgba(225,29,72,0.4); }
.q-tile.t-slate  { background: linear-gradient(145deg,#3A4250,#1B2029); box-shadow: 0 6px 16px -2px rgba(0,0,0,0.45); }

/* ---- Inputs ---- */
.q-field { display: flex; flex-direction: column; gap: 7px; }
.q-label { font-size: var(--q-text-sm); font-weight: 600; color: var(--q-text-secondary); }
.q-label .q-hint { font-weight: 400; color: var(--q-text-muted); }
.q-input, .q-select, .q-textarea { width: 100%; font-family: var(--q-font-sans); font-size: var(--q-text-base);
  color: var(--q-text); background: var(--q-surface); border: 1px solid var(--q-border); border-radius: var(--q-radius-sm);
  padding: 0 13px; height: 44px; outline: none; transition: border-color var(--q-dur-fast) var(--q-ease), box-shadow var(--q-dur-fast) var(--q-ease); }
.q-textarea { height: auto; min-height: 84px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.q-input::placeholder, .q-textarea::placeholder { color: var(--q-text-muted); }
.q-input:hover, .q-select:hover, .q-textarea:hover { border-color: var(--q-border-strong); }
.q-input:focus, .q-select:focus, .q-textarea:focus { border-color: var(--q-accent); box-shadow: var(--q-ring); }
.q-select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A93A1' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }

/* ---- Cards ---- */
.q-card { background: var(--q-surface); border: 1px solid var(--q-border); border-radius: var(--q-radius-lg);
  box-shadow: var(--q-shadow-sm); }
.q-card--pad { padding: 20px 22px; }
.q-card--hover { transition: transform var(--q-dur) var(--q-ease), box-shadow var(--q-dur) var(--q-ease), border-color var(--q-dur) var(--q-ease); cursor: pointer; }
.q-card--hover:hover { transform: translateY(-2px); box-shadow: var(--q-shadow-md); border-color: var(--q-border-strong); }
.q-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

/* ---- Metric card ---- */
.q-metric-card { background: var(--q-surface); border-radius: var(--q-radius-lg); padding: 18px 20px; }
.q-metric-card .q-eyebrow { margin-bottom: 10px; }
.q-metric-card .val { font-family: var(--q-font-display); font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: var(--q-text-xl); letter-spacing: -0.025em; color: var(--q-text); line-height: 1.1; }
.q-metric-card .sub { font-size: var(--q-text-sm); color: var(--q-text-muted); margin-top: 4px; }

/* ---- Tabs ---- */
.q-tabs { display: inline-flex; gap: 2px; }
.q-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; background: none; border: none;
  cursor: pointer; font-family: var(--q-font-sans); font-size: var(--q-text-base); font-weight: 600;
  color: var(--q-text-muted); padding: 10px 14px; border-radius: var(--q-radius-sm); transition: color var(--q-dur-fast), background var(--q-dur-fast); }
.q-tab:hover { color: var(--q-text-secondary); background: var(--q-surface-2); }
.q-tab.is-active { color: var(--q-accent); }
.q-tab.is-active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--q-accent); border-radius: 2px; }

/* ---- Segmented control ---- */
.q-segment { display: inline-flex; background: var(--q-surface-2); border-radius: var(--q-radius-sm); padding: 3px; gap: 2px; }
.q-segment button { border: none; background: none; cursor: pointer; font-family: var(--q-font-sans);
  font-size: var(--q-text-sm); font-weight: 600; color: var(--q-text-muted); padding: 7px 14px; border-radius: 6px; transition: all var(--q-dur-fast); }
.q-segment button.is-active { background: var(--q-surface); color: var(--q-text); box-shadow: var(--q-shadow-sm); }

/* ---- Badges & chips ---- */
.q-badge { display: inline-flex; align-items: center; gap: 5px; font-size: var(--q-text-xs); font-weight: 700;
  padding: 3px 9px; border-radius: var(--q-radius-pill); letter-spacing: 0.01em; }
.q-badge--accent { background: var(--q-accent-soft); color: var(--q-accent-soft-text); }
.q-badge--neutral { background: var(--q-surface-3); color: var(--q-text-secondary); }
.q-badge--danger { background: var(--q-danger-soft); color: var(--q-danger-soft-text); }
.q-badge--warning { background: var(--q-warning-soft); color: var(--q-warning-soft-text); }
.q-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--q-text-sm); font-weight: 600;
  padding: 6px 12px; border-radius: var(--q-radius-pill); background: var(--q-surface-2); color: var(--q-text-secondary); }

/* ---- List row ---- */
.q-row { display: flex; align-items: center; gap: 14px; padding: 15px 2px; }
.q-row + .q-row { border-top: 1px solid var(--q-border); }
.q-row-main { flex: 1; min-width: 0; }
.q-row-title { font-weight: 700; font-size: var(--q-text-md); color: var(--q-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.q-row-sub { font-size: var(--q-text-sm); color: var(--q-text-muted); margin-top: 1px; }
.q-row-trail { text-align: right; flex-shrink: 0; }
.q-row-amount { font-family: var(--q-font-display); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--q-text); letter-spacing: -0.02em; }

/* ---- Avatar / logo tile ---- */
.q-avatar { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-family: var(--q-font-display); font-weight: 600; font-size: var(--q-text-base);
  background: var(--q-accent-soft); color: var(--q-accent-soft-text); overflow: hidden; }
.q-avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.q-avatar--round { border-radius: 50%; }

/* ---- Switch ---- */
.q-switch { position: relative; width: 42px; height: 25px; flex-shrink: 0; display: inline-block; }
.q-switch input { opacity: 0; width: 0; height: 0; }
.q-switch .track { position: absolute; inset: 0; background: var(--q-surface-3); border-radius: var(--q-radius-pill); transition: background var(--q-dur) var(--q-ease); }
.q-switch .track::before { content: ''; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px; background: #fff;
  border-radius: 50%; transition: transform var(--q-dur) var(--q-ease); box-shadow: var(--q-shadow-sm); }
.q-switch input:checked + .track { background: var(--q-accent); }
.q-switch input:checked + .track::before { transform: translateX(17px); }

/* ---- Divider ---- */
.q-divider { height: 1px; background: var(--q-border); border: none; margin: 0; }

/* ---- Split / progress bar ---- */
.q-bar { height: 8px; border-radius: var(--q-radius-pill); background: var(--q-surface-3); overflow: hidden; display: flex; }
.q-bar-fill { height: 100%; background: var(--q-accent); border-radius: var(--q-radius-pill); transition: width var(--q-dur-slow) var(--q-ease-out); }

/* ---- Modal ---- */
.q-modal-overlay { position: fixed; inset: 0; background: var(--q-overlay); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 200; animation: q-fade var(--q-dur) var(--q-ease); }
.q-modal { background: var(--q-surface); border: 1px solid var(--q-border); border-radius: var(--q-radius-xl);
  box-shadow: var(--q-shadow-lg); width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; padding: 24px;
  animation: q-modal-in var(--q-dur) var(--q-ease-out); }
.q-modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.q-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---- Empty state ---- */
.q-empty { text-align: center; padding: 48px 24px; }
.q-empty .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--q-surface-2); display: inline-flex;
  align-items: center; justify-content: center; color: var(--q-text-muted); margin-bottom: 14px; }
.q-empty h3 { font-weight: 600; font-size: var(--q-text-md); color: var(--q-text); margin: 0 0 4px; }
.q-empty p { font-size: var(--q-text-sm); color: var(--q-text-muted); margin: 0 0 16px; }

/* ---- Skeleton ---- */
.q-skeleton { background: linear-gradient(100deg, var(--q-surface-2) 30%, var(--q-surface-3) 50%, var(--q-surface-2) 70%);
  background-size: 200% 100%; animation: q-shimmer 1.3s linear infinite; border-radius: var(--q-radius-sm); }

/* ---- Motion ---- */
@keyframes q-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes q-modal-in { from { opacity: 0; transform: translateY(8px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes q-shimmer { to { background-position: -200% 0; } }
@keyframes q-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.q-fade-up { animation: q-fade-up var(--q-dur-slow) var(--q-ease-out) both; }
.q-stagger > * { animation: q-fade-up var(--q-dur-slow) var(--q-ease-out) both; }
.q-stagger > *:nth-child(1) { animation-delay: 0.03s; }
.q-stagger > *:nth-child(2) { animation-delay: 0.08s; }
.q-stagger > *:nth-child(3) { animation-delay: 0.13s; }
.q-stagger > *:nth-child(4) { animation-delay: 0.18s; }
.q-stagger > *:nth-child(5) { animation-delay: 0.23s; }
.q-stagger > *:nth-child(6) { animation-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  .q-scope *, .q-fade-up, .q-stagger > *, .q-skeleton { animation: none !important; transition: none !important; }
}

/* ── Balans receipt upload ── */
.q-spinner { display:inline-block; width:14px; height:14px; border:2px solid var(--q-border-strong);
  border-top-color: var(--q-accent); border-radius:50%; animation: qSpin 0.7s linear infinite; vertical-align:-2px; }
@keyframes qSpin { to { transform: rotate(360deg); } }
.bal-receipt-drop { display:flex; align-items:center; gap:12px; width:100%; text-align:left;
  padding:13px 15px; border:1.5px dashed var(--q-border-strong); border-radius:var(--q-radius);
  background:var(--q-surface-2); color:var(--q-text-secondary); cursor:pointer; font-family:inherit;
  transition: border-color var(--q-dur-fast), background var(--q-dur-fast); }
.bal-receipt-drop:hover { border-color:var(--q-accent); background:var(--q-accent-soft); color:var(--q-accent-soft-text); }
.bal-receipt-drop svg { flex-shrink:0; color:var(--q-accent); }
.bal-receipt-drop span { display:flex; flex-direction:column; line-height:1.3; }
.bal-receipt-drop strong { font-size:var(--q-text-sm); color:var(--q-text); font-weight:700; }
.bal-receipt-drop small { font-size:var(--q-text-xs); color:var(--q-text-muted); }
.bal-receipt { display:flex; align-items:center; gap:10px; padding:11px 14px; border-radius:var(--q-radius);
  font-size:var(--q-text-sm); }
.bal-receipt--busy { background:var(--q-surface-2); color:var(--q-text-secondary); }
.bal-receipt--done { background:var(--q-accent-soft); color:var(--q-accent-soft-text); font-weight:600; }
.bal-receipt--done svg { flex-shrink:0; }
.bal-receipt--existing { background:var(--q-surface-2); flex-wrap:wrap; }
.bal-receipt-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bal-receipt-link { background:none; border:none; padding:0; cursor:pointer; font-family:inherit;
  font-size:var(--q-text-sm); font-weight:600; color:var(--q-accent); }
.bal-receipt-link--alt { color:var(--q-text-secondary); margin-left:auto; }
.bal-receipt-x { background:none; border:none; cursor:pointer; color:var(--q-text-muted); font-size:14px;
  line-height:1; padding:2px 4px; border-radius:6px; }
.bal-receipt-x:hover { background:var(--q-surface-3); color:var(--q-text); }
.bal-clip { color:var(--q-text-muted); vertical-align:-1px; }

/* ── Balans helpers (mobile overrides live in responsive.css) ── */
.bal-hero-amt { font-size: 42px; }
.q-field-row { display: flex; gap: 12px; }
.q-field-row > .q-field { flex: 1; min-width: 0; }

/* ── Bank statement import rows ── */
.imp-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--q-border); cursor: pointer; }
.imp-row:last-of-type { border-bottom: none; }
.imp-row input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--q-accent); flex-shrink: 0; cursor: pointer; }
.imp-main { flex: 1; min-width: 0; }
.imp-name { font-weight: 600; font-size: var(--q-text-base); display: flex; align-items: center; gap: 8px; }
.imp-meta { font-size: var(--q-text-sm); color: var(--q-text-muted); margin-top: 2px; }
.imp-sub { color: var(--q-accent); font-weight: 600; }

/* ── Import: category chip + confidence hint ── */
.imp-toggle { cursor: pointer; }
.imp-cat-wrap { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.imp-cat { display: inline-flex; align-items: center; gap: 6px; font-family: var(--q-font-sans); font-size: 12px; font-weight: 600;
  color: var(--q-accent-soft-text, var(--q-accent)); background: var(--q-accent-soft); border: 1px solid transparent;
  border-radius: var(--q-radius-pill); padding: 5px 10px; max-width: 150px; cursor: pointer; }
.imp-cat:hover { background: var(--q-accent-soft); border-color: var(--q-accent); }
.imp-cat .imp-cat-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-cat svg { flex-shrink: 0; opacity: 0.8; }
.imp-cat:focus-visible { outline: 2px solid var(--q-accent); outline-offset: 1px; }
.imp-hint { font-size: 10.5px; color: var(--q-text-muted); }
.imp-hint.mint { color: var(--q-accent); }
.imp-hint.amber { color: var(--q-warning); }
@media (max-width: 480px) { .imp-cat { max-width: 124px; font-size: 11px; } }

/* Searchable category picker popover */
.cat-pop { position: fixed; z-index: 300; width: 220px; max-width: calc(100vw - 16px); background: var(--q-surface);
  border: 1px solid var(--q-border); border-radius: var(--q-radius); box-shadow: var(--q-shadow-lg); padding: 8px; overflow: hidden; }
.cat-pop-search { width: 100%; box-sizing: border-box; font-family: var(--q-font-sans); font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--q-border); border-radius: var(--q-radius-sm); outline: none; margin-bottom: 6px; background: var(--q-surface-2); color: var(--q-text); }
.cat-pop-search:focus { border-color: var(--q-accent); }
.cat-pop-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.cat-pop-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font-family: var(--q-font-sans); font-size: 13.5px; color: var(--q-text);
  padding: 9px 10px; border-radius: var(--q-radius-sm); }
.cat-pop-opt:hover { background: var(--q-surface-2); }
.cat-pop-opt.is-active { color: var(--q-accent); font-weight: 600; }
.cat-pop-opt svg { flex-shrink: 0; }

/* ── Re-import nudge (Phase 2) ── */
.import-nudge { display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
  background: var(--q-accent-soft); border: 1px solid var(--q-border); border-radius: var(--q-radius);
  padding: 14px 16px; }
.import-nudge-ic { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--q-accent); }
.import-nudge-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.import-nudge-main strong { font-size: var(--q-text-base); color: var(--q-text); }
.import-nudge-main span { font-size: var(--q-text-sm); color: var(--q-text-secondary); line-height: 1.45; }
.import-nudge-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 600px) {
  .import-nudge { flex-wrap: wrap; }
  .import-nudge-actions { width: 100%; }
  .import-nudge-actions .q-btn { flex: 1; }
}

/* Import: link a recurring payment to a policy */
.imp-link-slot:empty { display: none; }
.imp-link-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; background: none; border: none; padding: 2px 0;
  font-family: var(--q-font-sans); font-size: 12px; font-weight: 600; color: var(--q-text-muted); cursor: pointer; }
.imp-link-btn:hover { color: var(--q-accent); }
.imp-link-btn.linked { color: var(--q-accent); }

/* Import: privé/zakelijk + share options bar */
.imp-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.imp-seg { display: inline-flex; background: var(--q-surface-2); border-radius: var(--q-radius-pill); padding: 3px; }
.imp-seg-btn { border: none; background: none; cursor: pointer; font-family: var(--q-font-sans); font-size: 13px; font-weight: 600;
  color: var(--q-text-secondary); padding: 6px 16px; border-radius: var(--q-radius-pill); }
.imp-seg-btn.is-active { background: var(--q-surface); color: var(--q-text); box-shadow: var(--q-shadow-sm); }
.imp-share-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--q-surface-2); border: 1px solid transparent;
  border-radius: var(--q-radius-pill); padding: 7px 14px; cursor: pointer; font-family: var(--q-font-sans); font-size: 13px;
  font-weight: 600; color: var(--q-text-secondary); }
.imp-share-btn:hover { border-color: var(--q-accent); color: var(--q-accent); }
.imp-share-btn.linked { background: var(--q-accent-soft); color: var(--q-accent); }
.imp-share-btn svg { flex-shrink: 0; }
.imp-nogroup-link { display: inline-flex; align-items: center; gap: 7px; background: none; border: none; padding: 7px 6px;
  cursor: pointer; font-family: var(--q-font-sans); font-size: 13px; font-weight: 600; color: var(--q-text-muted);
  text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--q-border-strong); }
.imp-nogroup-link:hover { color: var(--q-accent); text-decoration-color: var(--q-accent); }
.imp-nogroup-link svg { flex-shrink: 0; }
.imp-seg-lbl { font-size: 12px; font-weight: 600; color: var(--q-text-muted); }

/* Import: per-row privé/zakelijk chip + policy link, on one tag line */
.imp-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.imp-tags .imp-link-btn { margin-top: 0; }
.imp-tags .imp-link-slot:empty { display: none; }
.imp-biz { font-family: var(--q-font-sans); font-size: 11px; font-weight: 700; letter-spacing: .01em;
  padding: 3px 11px; border-radius: var(--q-radius-pill); border: 1px solid var(--q-border-strong);
  background: var(--q-surface-2); color: var(--q-text-secondary); cursor: pointer; white-space: nowrap;
  transition: background var(--q-dur-fast), border-color var(--q-dur-fast), color var(--q-dur-fast); }
.imp-biz:hover { border-color: var(--q-text-muted); color: var(--q-text); }
.imp-biz.is-biz { background: #E7F1FB; border-color: #A6CBEC; color: #1A6FC4; }
.imp-share-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--q-font-sans);
  font-size: 11px; font-weight: 700; letter-spacing: .01em; padding: 3px 11px; border-radius: var(--q-radius-pill);
  border: 1px solid var(--q-border-strong); background: var(--q-surface-2); color: var(--q-text-secondary);
  cursor: pointer; white-space: nowrap; max-width: 160px;
  transition: background var(--q-dur-fast), border-color var(--q-dur-fast), color var(--q-dur-fast); }
.imp-share-chip svg { width: 12px; height: 12px; flex-shrink: 0; }
.imp-share-chip .imp-share-chip-lbl { overflow: hidden; text-overflow: ellipsis; }
.imp-share-chip:hover { border-color: var(--q-accent); color: var(--q-accent); }
.imp-share-chip.is-shared { background: var(--q-accent-soft); border-color: var(--q-accent); color: var(--q-accent); }

/* Balans: drop a bon directly on the tab */
.bal-dropzone { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-top: 10px;
  padding: 14px 16px; border: 1.5px dashed var(--q-border-strong); border-radius: var(--q-radius);
  background: var(--q-surface-2); color: var(--q-text-secondary); cursor: pointer; font-family: inherit;
  transition: border-color var(--q-dur-fast), background var(--q-dur-fast); }
.bal-dropzone:hover, .bal-dropzone.dragover { border-color: var(--q-accent); background: var(--q-accent-soft); color: var(--q-accent-soft-text); }
.bal-dropzone.dragover { border-style: solid; }
.bal-dropzone.busy { opacity: 0.6; pointer-events: none; }
.bal-dropzone svg { flex-shrink: 0; color: var(--q-accent); }
.bal-dropzone span { display: flex; flex-direction: column; line-height: 1.3; }
.bal-dropzone strong { font-size: var(--q-text-sm); color: var(--q-text); font-weight: 700; }
.bal-dropzone small { font-size: var(--q-text-xs); color: var(--q-text-muted); }

/* ── Balans projects (per-project cost & document tracker) ── */
.bal-projects { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; margin: 4px -2px 0;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.bal-projects::-webkit-scrollbar { height: 6px; }
.bal-projects::-webkit-scrollbar-thumb { background: var(--q-border-strong); border-radius: 999px; }
.bal-project-card { flex: 0 0 auto; width: 156px; scroll-snap-align: start; text-align: left;
  display: flex; flex-direction: column; gap: 7px; padding: 13px 14px; border-radius: var(--q-radius);
  border: 1px solid var(--q-border); background: var(--q-surface); cursor: pointer; font-family: inherit;
  transition: border-color var(--q-dur-fast), box-shadow var(--q-dur-fast), transform var(--q-dur-fast); }
.bal-project-card:hover { border-color: var(--q-accent); box-shadow: var(--q-shadow-sm); transform: translateY(-1px); }
.bal-project-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bal-project-emoji { font-size: 19px; line-height: 1; flex-shrink: 0; }
.bal-project-name { font-weight: 700; font-size: var(--q-text-sm); color: var(--q-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal-project-meta { font-size: var(--q-text-sm); font-weight: 600; color: var(--q-text); }
.bal-project-meta .q-muted { font-weight: 500; }
.bal-project-card--new { align-items: center; justify-content: center; gap: 5px; text-align: center;
  border-style: dashed; border-color: var(--q-border-strong); background: var(--q-surface-2); color: var(--q-text-muted); }
.bal-project-card--new:hover { color: var(--q-accent); }
.bal-project-new-ico { font-size: 22px; line-height: 1; font-weight: 400; }
.bal-project-new-label { font-size: var(--q-text-xs); font-weight: 700; }

/* mini budget bar on a card + the larger one in the detail view */
.bal-project-budget { height: 5px; border-radius: 999px; background: var(--q-surface-3, var(--q-surface-2)); overflow: hidden; margin-top: 1px; }
.bal-project-budget-fill { height: 100%; border-radius: 999px; background: var(--q-accent); transition: width var(--q-dur); }
.bal-project-budget-fill.is-over { background: var(--red, #e03131); }

/* project chip shown on a tagged entry row */
.bal-entry-project { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700;
  padding: 1px 8px; border-radius: var(--q-radius-pill); background: var(--q-accent-soft); color: var(--q-accent);
  white-space: nowrap; vertical-align: middle; }

/* project detail view */
.bal-back { margin-bottom: 2px; }
.bal-project-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bal-project-header-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bal-project-header-emoji { font-size: 30px; line-height: 1; flex-shrink: 0; }
.bal-budget-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bal-budget-foot { margin-top: 8px; font-size: var(--q-text-sm); font-weight: 700; color: var(--q-accent); }
.bal-budget-foot.is-over { color: var(--red, #e03131); }
.bal-project-settle { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--q-border);
  font-size: var(--q-text-sm); font-weight: 600; color: var(--q-text-secondary); }

/* emoji picker in the project modal */
.bal-emoji-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.bal-emoji { width: 40px; height: 40px; border-radius: var(--q-radius-sm); border: 1px solid var(--q-border);
  background: var(--q-surface); font-size: 19px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color var(--q-dur-fast), background var(--q-dur-fast); }
.bal-emoji:hover { border-color: var(--q-accent); }
.bal-emoji.is-sel { border-color: var(--q-accent); background: var(--q-accent-soft); box-shadow: inset 0 0 0 1px var(--q-accent); }

/* Balans: per-entry split editor (wie draagt de kosten) */
.bal-split-seg { display: inline-flex; background: var(--q-surface-2); border-radius: var(--q-radius-pill); padding: 3px; gap: 2px; }
.bal-split-seg button { border: none; background: none; cursor: pointer; font-family: var(--q-font-sans);
  font-size: 13px; font-weight: 600; color: var(--q-text-secondary); padding: 6px 16px; border-radius: var(--q-radius-pill); }
.bal-split-seg button.is-active { background: var(--q-surface); color: var(--q-text); box-shadow: var(--q-shadow-sm); }
.bal-split-std { margin-top: 9px; font-size: var(--q-text-sm); color: var(--q-text-muted); }
.bal-split-rows { margin-top: 11px; display: flex; flex-direction: column; gap: 9px; }
.bal-split-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bal-split-name { font-size: var(--q-text-base); font-weight: 600; color: var(--q-text); }
.bal-split-pct { display: inline-flex; align-items: center; gap: 6px; color: var(--q-text-muted); font-weight: 600; }
.bal-split-input { width: 84px; height: 40px; text-align: right; }
.bal-split-total { margin-top: 2px; text-align: right; font-size: var(--q-text-sm); font-weight: 700; color: var(--q-accent); }
.bal-split-total.is-off { color: var(--red, #e03131); }

/* Balans: euro-prefixed amount field */
.bal-amount-wrap { position: relative; }
.bal-amount-cur { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: var(--q-text-muted); font-weight: 600; font-size: var(--q-text-base); }
.bal-amount-input { padding-left: 30px; }
.bal-amount-input::-webkit-outer-spin-button, .bal-amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
