/* ============================================================
   WepAdmin — site.css
   Branding: wijzig de CSS variabelen hieronder
   ============================================================ */

:root {
  /* Primaire brand kleur — makkelijk te overschrijven */
  --wa-primary:          #2563eb;
  --wa-primary-dark:     #1d4ed8;
  --wa-primary-light:    #dbeafe;

  /* Sidebar */
  --wa-sidebar-bg:       #1e293b;
  --wa-sidebar-width:    252px;
  --wa-sidebar-text:     #94a3b8;
  --wa-sidebar-text-hover: #e2e8f0;
  --wa-sidebar-active-bg:  #2563eb;
  --wa-sidebar-active-text: #ffffff;
  --wa-sidebar-section-text: #475569;

  /* Layout */
  --wa-topbar-height:    52px;
  --wa-header-height:    60px;
  --wa-border-radius:    8px;
  --wa-card-shadow:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.08);

  /* Overig */
  --wa-purple:           #7c3aed;
}

/* ── Bootstrap overrides ─────────────────────────────────── */
.btn-primary    { background-color: var(--wa-primary); border-color: var(--wa-primary); }
.btn-primary:hover { background-color: var(--wa-primary-dark); border-color: var(--wa-primary-dark); }
.text-primary   { color: var(--wa-primary) !important; }
.bg-primary     { background-color: var(--wa-primary) !important; }
.border-primary { border-color: var(--wa-primary) !important; }
.btn-outline-primary { color: var(--wa-primary); border-color: var(--wa-primary); }
.btn-outline-primary:hover { background-color: var(--wa-primary); color: #fff; }
a { color: var(--wa-primary); }

/* ── Global base ─────────────────────────────────────────── */
body { background: #f8fafc; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
h1,h2,h3,h4,h5,h6 { font-weight: 600; }
.card { border: 1px solid #e2e8f0; border-radius: var(--wa-border-radius); box-shadow: var(--wa-card-shadow); }
.card-header { background: #fff; border-bottom: 1px solid #e2e8f0; padding: .75rem 1rem; }

/* ── Sidebar desktop ──────────────────────────────────────── */
.wa-sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--wa-sidebar-width);
  background: var(--wa-sidebar-bg);
  z-index: 1030;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}
.wa-sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  width: var(--wa-sidebar-width);
}

/* Offcanvas sidebar (mobile) */
.wa-offcanvas-sidebar {
  width: var(--wa-sidebar-width) !important;
  background: var(--wa-sidebar-bg) !important;
}

/* ── Sidebar brand / logo ─────────────────────────────────── */
.wa-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.25rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: .5rem;
}
.wa-sidebar-logo { height: 28px; width: auto; flex-shrink: 0; }
.wa-sidebar-appname {
  font-size: .9rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-sidebar-company { opacity: .6; font-size: .72rem; }
.wa-nav-section {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--wa-sidebar-section-text);
  padding: .75rem 1rem .25rem;
}

/* ── Nav items ───────────────────────────────────────────── */
.wa-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .5rem 1rem;
  color: var(--wa-sidebar-text);
  text-decoration: none;
  font-size: .84rem;
  border-radius: 6px;
  margin: 1px 6px;
  transition: background .15s, color .15s;
}
.wa-nav-item:hover {
  background: rgba(255,255,255,.06);
  color: var(--wa-sidebar-text-hover);
  text-decoration: none;
}
.wa-nav-item.active {
  background: var(--wa-sidebar-active-bg);
  color: var(--wa-sidebar-active-text);
  font-weight: 600;
}
.wa-nav-item i { font-size: 1.1rem; flex-shrink: 0; opacity: .8; }
.wa-nav-item.active i { opacity: 1; }
.wa-nav { padding-bottom: .5rem; }

/* ── User info block ─────────────────────────────────────── */
.wa-sidebar-user {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: .5rem;
  padding-bottom: .5rem;
}
.wa-user-info { cursor: default; }
.wa-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--wa-primary);
  color: white;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wa-user-name { font-size: .8rem; color: #e2e8f0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Mobile topbar ───────────────────────────────────────── */
.wa-topbar {
  display: flex;
  align-items: center;
  background: var(--wa-sidebar-bg);
  height: var(--wa-topbar-height);
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.wa-topbar-brand {
  font-size: .9rem;
  font-weight: 700;
  color: #f1f5f9;
}
.text-slate-400 { color: #94a3b8 !important; }
.text-slate-500 { color: #64748b !important; }

/* ── Main content area ───────────────────────────────────── */
@media (min-width: 992px) {
  .wa-main { margin-left: var(--wa-sidebar-width); }
}

/* ── Page header ─────────────────────────────────────────── */
.wa-page-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: .875rem 1.5rem;
}
.wa-page-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #1e293b;
}
.wa-page-subtitle { font-size: .85rem; }

/* ── Cards & KPI ─────────────────────────────────────────── */
.wa-kpi-card .card-body { padding: 1rem; }
.wa-kpi-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: .5rem;
}
.wa-kpi-value { font-size: 1.4rem; font-weight: 700; color: #1e293b; line-height: 1.2; }
.wa-kpi-label { font-size: .75rem; color: #64748b; margin-top: 2px; }

/* ── Tables ──────────────────────────────────────────────── */
.wa-table { font-size: .875rem; }
.wa-table thead th {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: .6rem .75rem;
  white-space: nowrap;
}
.wa-table tbody td { padding: .6rem .75rem; vertical-align: middle; border-color: #f1f5f9; }
.wa-table tfoot td { padding: .6rem .75rem; }
.wa-table-hover tbody tr:hover td { background: #f8fafc; }
.table-danger-subtle td { background: #fff5f5; }

/* ── Auth / Login ────────────────────────────────────────── */
.wa-auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 1rem;
}
.wa-login-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

/* ── Badges ──────────────────────────────────────────────── */
.bg-success-subtle { background-color: #dcfce7 !important; }
.bg-danger-subtle  { background-color: #fee2e2 !important; }
.bg-warning-subtle { background-color: #fef3c7 !important; }
.bg-info-subtle    { background-color: #dbeafe !important; }
.bg-primary-subtle { background-color: var(--wa-primary-light) !important; }
.bg-purple-subtle  { background-color: #ede9fe !important; }

/* ── Flatpickr theming ───────────────────────────────────── */
.flatpickr-calendar { box-shadow: 0 4px 20px rgba(0,0,0,.12); border-radius: 8px; }

/* ── Responsive helpers ──────────────────────────────────── */
@media (max-width: 575.98px) {
  .wa-kpi-value { font-size: 1.1rem; }
  .wa-page-header { padding: .625rem 1rem; }
  .wa-kpi-card .card-body { padding: .75rem; }
}

/* ── Invoice line dynamic form ───────────────────────────── */
.invoice-line { background: #fff; transition: background .1s; }
.invoice-line:hover { background: #fafafa; }
.invoice-line:last-child { border-bottom: 0 !important; }

/* ── Sticky top util ─────────────────────────────────────── */
.sticky-top { top: 1rem !important; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
