body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background-color: #F3F4F6;
  color: #111827;
}

/* Topbar */
.navbar-3d {
  background-color: #003C7E;
  padding: 0.55rem 1.25rem;
}
.navbar-3d .navbar-brand {
  color: #FFFFFF;
  font-weight: 600;
}
.navbar-3d .navbar-brand img {
  height: 28px;
  margin-right: 0.5rem;
}
.navbar-3d .navbar-brand span {
  vertical-align: middle;
}
.navbar-3d .nav-user {
  font-size: 0.85rem;
  color: #E5E7EB;
}

/* Buttons */
.btn-3d-accent {
  background-color: #F5A623;
  border-color: #F5A623;
  color: #111827;
}
.btn-3d-accent:hover {
  background-color: #D98E1F;
  border-color: #D98E1F;
  color: #111827;
}

/* Containers */
.page-container {
  max-width: 1200px;
}

/* Cards */
.card-3d {
  border-radius: 0.8rem;
  border: 1px solid #E5E7EB;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* KPI tiles */
.kpi-card {
  border-radius: 0.8rem;
  border: none;
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
.kpi-card--blue {
  background: linear-gradient(135deg, #1D4ED8, #38BDF8);
}
.kpi-card--amber {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
}
.kpi-card--green {
  background: linear-gradient(135deg, #16A34A, #22C55E);
}
.kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.9;
}
.kpi-value {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0.15rem 0;
}
.kpi-sub {
  font-size: 0.85rem;
}

/* Tabellen */
.table-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.table-subtitle {
  font-size: 0.85rem;
  color: #6B7280;
  margin-bottom: 0.75rem;
}

/* Breadcrumb */
.breadcrumb-3d {
  font-size: 0.85rem;
  color: #6B7280;
}
.breadcrumb-3d a {
  color: #2563EB;
  text-decoration: none;
}
.breadcrumb-3d a:hover {
  text-decoration: underline;
}

/* === DARK UI FIX FOR FINANCE PORTAL === */

.chip,
.badge,
.pill,
.status-pill,
.filter-tag,
.source-pill,
.list-item,
.recent-payment,
.payment-card,
.panel,
.panel-header,
.panel-body,
.search-input,
input[type="text"] {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #e5e7eb !important;
  backdrop-filter: blur(6px) !important;
}

.list-item:hover,
.recent-payment:hover {
  background: rgba(255,255,255,0.12) !important;
}

input::placeholder {
  color: rgba(229,231,235,0.7) !important;
}

/* === DARK UI FIX FOR FINANCE PORTAL === */
.chip,
.badge,
.pill,
.status-pill,
.filter-tag,
.source-pill,
.list-item,
.recent-payment,
.payment-card,
.panel,
.panel-header,
.panel-body,
.search-input,
input[type="text"] {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #e5e7eb !important;
  backdrop-filter: blur(6px) !important;
}

.list-item:hover,
.recent-payment:hover {
  background: rgba(255,255,255,0.12) !important;
}

input::placeholder {
  color: rgba(229,231,235,0.7) !important;
}

/* === DARK UI FIX V2 (safe) === */
.chip,
.badge,
.pill,
.status-pill,
.filter-tag,
.source-pill,
.list-item,
.recent-payment,
.payment-card,
.search-input,
input[type="text"] {
  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(148,163,184,0.6);
  color: #e5e7eb;
  backdrop-filter: blur(6px);
}

.list-item:hover,
.recent-payment:hover {
  background: rgba(30,64,175,0.7);
}

input::placeholder {
  color: rgba(148,163,184,0.9);
}
/* === END DARK UI FIX V2 === */

/* === DARK MODE UI UPGRADE v3 (SAFE & CLEAN) ================================ */
/* Past ALLE lichte elementen netjes aan zonder HTML-risico                  */
/* ========================================================================== */

/* Kleine witte chips/pills/labels */
.chip,
.badge,
.pill,
.filter-tag,
.status-pill,
.source-pill {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #e5e7eb !important;
    backdrop-filter: blur(6px);
}

/* Zoekbalk + invoervelden */
input[type="text"],
.search-input,
.search-box {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    color: #e5e7eb !important;
    padding-left: 14px !important;
    backdrop-filter: blur(8px);
}

/* Placeholder kleur */
input::placeholder {
    color: rgba(229,231,235,0.7) !important;
}

/* Recente betalingen kaarten */
.recent-payment,
.payment-card {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    padding: 12px 16px !important;
    border-radius: 14px !important;
    color: #e5e7eb !important;
}

.recent-payment:hover,
.payment-card:hover {
    background: rgba(255,255,255,0.12) !important;
}

/* List items / factuurregels */
.list-item {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: 14px !important;
    padding: 10px 14px !important;
}

.list-item:hover {
    background: rgba(255,255,255,0.10) !important;
}

/* Panel headers (zoals 'Openstaande facturen (Top 10)' */
.panel-header {
    background: rgba(255,255,255,0.03) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    color: #e5e7eb !important;
}

/* Panel body */
.panel,
.panel-body {
    background: rgba(15,23,42,0.65) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 16px !important;
}

/* Bron labels (bijv. Bron: finance_invoices.json) */
.source-pill,
.small-pill,
.meta-pill {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    color: #e5e7eb !important;
}

/* Tabellen rijen */
table tbody tr:hover {
    background: rgba(255,255,255,0.06) !important;
}

/* === DARK FINANCE GLASS LAYER ========================================= */
/* Deze laag overschrijft alleen lichte blokken op de Finance pagina's   */

/* Kleine witte pills/labels (Bron: ..., filters, etc.) */
.chip,
.badge,
.pill,
.status-pill,
.source-pill,
.filter-tag,
.small-pill,
.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.75);
  color: #e5e7eb;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}

/* Zoekveld rechtsboven in Finance Cockpit */
.search-input,
input[type="search"] {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 9px 13px;
  font-size: 0.9rem;
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    border-color 0.16s ease-out,
    box-shadow 0.16s ease-out,
    background 0.16s ease-out;
}

.search-input:focus,
input[type="search"]:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7);
  background: rgba(15, 23, 42, 0.96);
}

input::placeholder {
  color: rgba(148, 163, 184, 0.85);
}

/* Recente betalingen / facturen kaarten (rechts) */
.recent-payment,
.payment-card,
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}

.recent-payment:hover,
.payment-card:hover,
.list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 250, 252, 0.95);
  background: rgba(15, 23, 42, 0.98);
}

/* Panelen onderin (Openstaande facturen, Openstaande posten, Recente facturen) */
.panel,
.panel-body {
  background: rgba(15, 23, 42, 0.85);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Animatie bij binnenkomen van cards/panels */
@keyframes financeCardIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel,
.kpi-card,
.list-item,
.recent-payment,
.payment-card {
  animation: financeCardIn 0.35s ease-out;
}
/* === EINDE DARK FINANCE GLASS LAYER =================================== */

/* === DARK FINANCE OVERRIDES (met !important) ========================= */

/* Bron-pills / filters / kleine witte labels */
.pill,
.chip,
.badge {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(148, 163, 184, 0.75) !important;
  color: #e5e7eb !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Zoekveld rechtsboven (ID komt uit je JS: globalSearch) */
#globalSearch {
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.8) !important;
  background: rgba(15, 23, 42, 0.9) !important;
  color: #e5e7eb !important;
  padding: 9px 13px !important;
  font-size: 0.9rem !important;
  outline: none !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    border-color 0.16s ease-out,
    box-shadow 0.16s ease-out,
    background 0.16s ease-out;
}

#globalSearch:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7) !important;
  background: rgba(15, 23, 42, 0.96) !important;
}

#globalSearch::placeholder {
  color: rgba(148, 163, 184, 0.85) !important;
}

/* Recente betalingen / facturen kaarten rechts (class komt uit je JS: list-item) */
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(148, 163, 184, 0.7) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}

.list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 250, 252, 0.95) !important;
  background: rgba(15, 23, 42, 0.98) !important;
}

/* Kleine animatie bij binnenkomen van kaarten/panelen */
@keyframes financeCardIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel,
.kpi-card,
.list-item {
  animation: financeCardIn 0.35s ease-out;
}
/* ===========================================================
   FORCE DARK MODE FOR FINANCE CHIP ELEMENTS (only inside .panel)
   =========================================================== */

.panel .chip {
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(148, 163, 184, 0.75) !important;
    color: #e5e7eb !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;

    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;

    font-size: 0.78rem !important;
    font-weight: 500 !important;

    display: inline-flex !important;
    align-items: center !important;
}

/* Hover voor klikbare chips */
.panel .chip:hover {
    background: rgba(15, 23, 42, 0.98) !important;
    border-color: #ffffff !important;
    cursor: pointer;
}
