/*
 * Partiva Design System — Bootstrap 5 theme override
 * Drop this file into src/EventManagement.Web/wwwroot/css/
 * Link AFTER bootstrap.min.css in _Layout.cshtml:
 *   <link rel="stylesheet" href="~/css/partiva.css" asp-append-version="true" />
 *
 * Requires Inter from Google Fonts (add to <head>):
 *   <link rel="preconnect" href="https://fonts.googleapis.com">
 *   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
 */

/* ─── 1. CSS custom properties ──────────────────────────────────────────── */
:root {
  /* Brand palette */
  --pv-primary:        #C2F500;
  --pv-primary-dark:   #9ccc00;
  --pv-primary-text:   #0B1021;
  --pv-secondary:      #8B7CF6;
  --pv-secondary-dark: #5040e8;
  --pv-dark:           #0B1021;
  --pv-dark-panel:     #141929;
  --pv-dark-mid:       #1c2438;

  /* Bootstrap 5 CSS variable overrides */
  --bs-primary:        #8B7CF6;
  --bs-primary-rgb:    139, 124, 246;
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bs-body-font-size: 0.875rem;
  --bs-body-color:     #212529;
  --bs-link-color:     #5040e8;
  --bs-link-hover-color: #3e30c0;
  --bs-border-radius:  6px;
  --bs-border-radius-sm: 4px;
  --bs-border-radius-lg: 10px;
  --bs-border-radius-xl: 12px;
  --bs-border-color:   #e5e5e5;

  /* Layout */
  --pv-sidebar-width:  240px;
  --pv-topbar-height:  56px;
}

/* ─── 2. Base resets ─────────────────────────────────────────────────────── */
body { font-family: var(--bs-body-font-family); background: #f5f7fa; }
a { color: var(--bs-link-color); }
a:hover { color: var(--bs-link-hover-color); }
h1,h2,h3,h4,h5,h6 { letter-spacing: -0.02em; font-weight: 600; }

/* ─── 3. Buttons ─────────────────────────────────────────────────────────── */
.btn-primary {
  background-color: var(--pv-primary);
  border-color: var(--pv-primary-dark);
  color: var(--pv-primary-text);
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--pv-primary-dark);
  border-color: #78a300;
  color: var(--pv-primary-text);
}
.btn-secondary {
  background-color: var(--pv-secondary);
  border-color: var(--pv-secondary-dark);
  color: #fff;
  font-weight: 600;
}
.btn-secondary:hover { background-color: var(--pv-secondary-dark); border-color: #3e30c0; }
.btn-outline-primary { color: var(--pv-secondary); border-color: var(--pv-secondary); font-weight: 500; }
.btn-outline-primary:hover { background-color: var(--pv-secondary); border-color: var(--pv-secondary-dark); color: #fff; }
.btn { border-radius: 6px; font-weight: 500; transition: all 0.12s ease; }
.btn:focus, .btn:active:focus,
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--pv-primary);
}

/* ─── 4. Forms ───────────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: #dee2e6;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.form-control:focus, .form-select:focus { border-color: var(--pv-primary); }
.form-label { font-weight: 500; font-size: 0.8125rem; margin-bottom: 0.25rem; }
.invalid-feedback { font-size: 0.75rem; }
.form-check-input:checked { background-color: var(--pv-secondary); border-color: var(--pv-secondary-dark); }

/* ─── 5. Cards ───────────────────────────────────────────────────────────── */
.card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.card-header { background: #f8f9fa; border-bottom: 1px solid #e9ecef; font-weight: 600; font-size: 0.9375rem; }
.card-title { font-weight: 600; letter-spacing: -0.02em; }

/* ─── 6. Tables ──────────────────────────────────────────────────────────── */
.table { font-size: 0.875rem; }
.table thead th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c757d;
  border-bottom-width: 2px;
  background: #f8f9fa;
  white-space: nowrap;
}
.table-hover > tbody > tr:hover { --bs-table-hover-bg: rgba(194,245,0,.06); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-striped-bg: #f8f9fa; }
.table td { vertical-align: middle; }

/* ─── 7. Badges ──────────────────────────────────────────────────────────── */
.badge { font-weight: 600; border-radius: 9999px; padding: 3px 10px; font-size: 0.75rem; }
.bg-primary { background-color: var(--pv-secondary) !important; }

/* ─── 8. Status badges ───────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 9999px; padding: 3px 10px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.status-concept         { background: #f1f3f5; color: #495057; border-color: #dee2e6; }
.status-ingediend       { background: #f0effe; color: #3e30c0; border-color: #bbb3f9; }
.status-aanvulling      { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.status-goedgekeurd     { background: #d1f7e2; color: #15803d; border-color: #86efac; }
.status-afgewezen       { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.status-geannuleerd     { background: #e9ecef; color: #343a40; border-color: #ced4da; }
.status-ingetrokken     { background: #f8f9fa; color: #6c757d; border-color: #dee2e6; }

/* ─── 9. Alerts / Banners ────────────────────────────────────────────────── */
.alert { border-radius: 8px; font-size: 0.875rem; }
.alert-info    { background: #f0effe; border-color: #bbb3f9; color: #3e30c0; }
.alert-warning { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.alert-danger  { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.alert-success { background: #d1f7e2; border-color: #86efac; color: #15803d; }

/* ─── 10. Navigation pills / tabs ───────────────────────────────────────── */
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  background-color: var(--pv-secondary);
  color: #fff;
}
.nav-pills .nav-link { color: #495057; border-radius: 6px; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--pv-secondary); border-bottom-color: var(--pv-secondary); font-weight: 600; }

/* ─── 11. Pagination ─────────────────────────────────────────────────────── */
.page-link { color: var(--pv-secondary); border-radius: 6px !important; }
.page-item.active .page-link {
  background-color: var(--pv-primary); border-color: var(--pv-primary-dark); color: var(--pv-primary-text);
}
.page-link:focus { box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--pv-primary); }

/* ─── 12. Modals ─────────────────────────────────────────────────────────── */
.modal-content { border-radius: 12px; border: none; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.modal-header { border-bottom: 1px solid #e9ecef; }
.modal-footer { border-top: 1px solid #e9ecef; }

/* ─── 13. Admin sidebar layout ───────────────────────────────────────────── */
.pv-shell {
  display: flex;
  min-height: 100vh;
}

.pv-sidebar {
  width: var(--pv-sidebar-width);
  min-height: 100vh;
  background: var(--pv-dark);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1030;
  overflow-y: auto;
}

.pv-sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.pv-sidebar-logo {
  height: 28px;
  object-fit: contain;
  display: block;
}

.pv-sidebar-context {
  font-size: 11px;
  color: rgba(194,245,0,.5);
  font-weight: 600;
  letter-spacing: .04em;
  margin-top: 4px;
}

.pv-nav { padding: 12px 0; flex: 1; }

.pv-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all .12s ease;
  white-space: nowrap;
}
.pv-nav-item:hover {
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.06);
  text-decoration: none;
}
.pv-nav-item.active, .pv-nav-item[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-left-color: var(--pv-primary);
}
.pv-nav-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  opacity: .8;
}

.pv-sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pv-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--pv-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--pv-primary-text);
  border: 2px solid var(--pv-primary-dark);
  flex-shrink: 0;
}
.pv-user-name { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.85); }
.pv-user-role { font-size: 11px; color: rgba(255,255,255,.4); }

/* ─── 14. Main content area ──────────────────────────────────────────────── */
.pv-main {
  margin-left: var(--pv-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex: 1;
}

.pv-topbar {
  height: var(--pv-topbar-height);
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.pv-topbar-title { font-size: 17px; font-weight: 600; flex: 1; margin: 0; }

.pv-content { flex: 1; padding: 24px; background: #f5f7fa; }

/* ─── 15. Stat cards (dashboard) ─────────────────────────────────────────── */
.pv-stat-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.pv-stat-card.pv-stat-dark {
  background: var(--pv-dark);
  border-color: var(--pv-dark-panel);
}
.pv-stat-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: #6c757d; margin-bottom: 8px;
}
.pv-stat-dark .pv-stat-label { color: rgba(255,255,255,.45); }
.pv-stat-value { font-size: 30px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.pv-stat-sub { font-size: 11px; color: #6c757d; }
.pv-stat-dark .pv-stat-sub { color: rgba(255,255,255,.35); }

/* ─── 16. Participant mobile header ──────────────────────────────────────── */
.pv-mobile-header {
  background: var(--pv-dark);
  padding: 14px 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pv-mobile-hero {
  background: linear-gradient(135deg, var(--pv-dark) 0%, var(--pv-dark-mid) 100%);
  padding: 24px 16px 48px;
}
.pv-mobile-hero h1 { color: #fff; font-size: 22px; letter-spacing: -.02em; }
.pv-mobile-hero .subtitle { color: rgba(255,255,255,.6); font-size: 13px; }

/* ─── 17. Bottom navigation (mobile) ────────────────────────────────────── */
.pv-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--pv-dark);
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  z-index: 1030;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.pv-bottom-nav-item {
  flex: 1; padding: 10px 0 14px;
  border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-top: 2px solid transparent;
  color: rgba(255,255,255,.4);
  font-size: 10px; font-weight: 400; font-family: inherit;
  text-decoration: none;
  transition: border-color .12s, color .12s;
}
.pv-bottom-nav-item.active, .pv-bottom-nav-item[aria-current="page"] {
  border-top-color: var(--pv-primary);
  color: var(--pv-primary);
  font-weight: 700;
}

/* ─── 18. Progress stepper ───────────────────────────────────────────────── */
.pv-stepper { display: flex; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.pv-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 48px; }
.pv-step-connector { flex: 1; height: 2px; background: #e9ecef; margin-top: 13px; transition: background .2s; }
.pv-step-connector.done { background: var(--pv-primary); }
.pv-step-circle {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  border: 2px solid transparent;
  transition: all .2s;
}
.pv-step-circle.done  { background: var(--pv-primary); color: var(--pv-primary-text); }
.pv-step-circle.active{ background: var(--pv-dark); color: var(--pv-primary); border-color: var(--pv-primary); }
.pv-step-circle.todo  { background: #e9ecef; color: #6c757d; }
.pv-step-label { font-size: 9px; text-align: center; line-height: 1.2; color: #6c757d; }
.pv-step.active .pv-step-label { font-weight: 600; color: #212529; }

/* ─── 19. File uploader ──────────────────────────────────────────────────── */
.pv-upload-zone {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: #f8f9fa;
  transition: border-color .12s, background .12s;
}
.pv-upload-zone:hover { border-color: var(--pv-secondary); background: #f0effe; }

/* ─── 20. Payment panel ──────────────────────────────────────────────────── */
.pv-payment-panel {
  background: var(--pv-dark);
  border-radius: 12px;
  padding: 20px;
  color: #fff;
}
.pv-payment-amount { font-size: 36px; font-weight: 700; color: var(--pv-primary); letter-spacing: -.02em; }
.pv-payment-label  { font-size: 13px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ─── 21. Audit timeline ─────────────────────────────────────────────────── */
.pv-timeline { padding-left: 0; list-style: none; }
.pv-timeline-item { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.pv-timeline-item::before {
  content: ''; position: absolute; left: 11px; top: 22px;
  width: 2px; bottom: 0; background: #e9ecef;
}
.pv-timeline-item:last-child::before { display: none; }
.pv-timeline-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--pv-secondary); border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e9ecef;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff;
}
.pv-timeline-body { flex: 1; padding-top: 2px; }
.pv-timeline-meta { font-size: 11px; color: #6c757d; margin-top: 2px; }

/* ─── 22. Notification bell ──────────────────────────────────────────────── */
.pv-notif-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(194,245,0,.12);
  border: 1px solid rgba(194,245,0,.3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--pv-primary);
  transition: background .12s;
}
.pv-notif-btn:hover { background: rgba(194,245,0,.22); }

/* ─── 23. Responsive sidebar collapse ───────────────────────────────────── */
@media (max-width: 991.98px) {
  .pv-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .pv-sidebar.show { transform: translateX(0); }
  .pv-main { margin-left: 0; }
  .pv-content { padding: 16px; }
}
