:root {
  /* Merkkleuren */
  --green: #4a7362;
  --green-dark: #2f463c;
  --green-light: #8fb5a3;
  --green-soft: rgba(120, 178, 154, 0.16);

  --bg: #0b0d0c;
  --surface: rgba(30, 33, 31, 0.22);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --surface-solid: #16181a;
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f3f5f4;
  --text-muted: rgba(243, 245, 244, 0.58);
  --text-faint: rgba(243, 245, 244, 0.36);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);

  --blur: blur(28px) saturate(150%);

  --danger: #ff6b6b;
  --danger-dark: #e2483f;
  --danger-soft: rgba(255, 107, 107, 0.14);

  --ease: 200ms cubic-bezier(.4, 0, .2, 1);
}

/* =========================
   RESET & BASIS
   ========================= */
* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
}

/* Ambient glow behind the whole app (shows through empty photo areas) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 420px at 18% -8%, rgba(120, 178, 154, 0.16), transparent 60%),
    radial-gradient(600px 500px at 85% 0%, rgba(90, 130, 200, 0.1), transparent 55%);
}

/* Full-bleed photo backdrop behind the glass panels */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.app-bg-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
  filter: grayscale(5%) contrast(103%) brightness(0.96);
}

.app-bg-slideshow img.visible {
  opacity: 0.78;
}

.app-bg-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,8,7,0.38), rgba(6,8,7,0.14) 40%, rgba(6,8,7,0.5));
}

::selection {
  background: var(--green-light);
  color: #0b0d0c;
}

/* Modern scrollbar (webkit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.24);
  background-clip: content-box;
}

/* =========================
   APP LAYOUT
   ========================= */
.app {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  gap: 16px;
  padding: 16px;
}

/* =========================
   SIDEBAR
   ========================= */
.sidebar {
  width: 84px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  padding: 18px 12px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.logo {
  margin-bottom: 22px;
}

.logo img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 4px;
  border-radius: 13px;
  border: 1px solid transparent;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}

.sidebar nav a svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.sidebar nav a:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.sidebar nav a:active {
  transform: scale(0.94);
}

.sidebar nav a.active {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.sidebar nav hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 6px;
  width: 32px;
}

.sidebar nav .nav-spacer {
  flex: 1;
}

/* =========================
   CONTENT
   ========================= */
.content {
  flex: 1;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 4px 18px;
}

.topbar-eyebrow {
  font-size: 13px;
  color: var(--text-muted);
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.topbar-eyebrow strong {
  color: var(--text);
  font-weight: 600;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 16px 6px 6px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-meta strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.user-meta small {
  font-size: 11.5px;
  color: var(--text-muted);
}

.page {
  padding: 4px;
}

/* =========================
   TYPOGRAFIE
   ========================= */
h1 {
  margin-top: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

p {
  color: var(--text-muted);
}

a {
  color: var(--green-light);
}

/* =========================
   CARDS
   ========================= */
.card {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  transition: box-shadow var(--ease), border-color var(--ease);
}

/* =========================
   KPI BLOKKEN (DASHBOARD)
   ========================= */
.kpis {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.kpi {
  min-width: 160px;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.kpi span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.kpi strong {
  display: block;
  font-size: 32px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: -.02em;
  color: var(--text);
}

/* =========================
   FORMULIEREN
   ========================= */
form label {
  display: block;
  margin-top: 16px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  /* Geen backdrop-filter hier: te veel gelijktijdige blur-lagen (elke card +
     elk veld) laat de browser zijn GPU-budget overschrijden, waardoor de
     blur op willekeurige elementen niet meer rendert. Velden krijgen daarom
     een iets dekkendere vlakke tint i.p.v. hun eigen glaslaag. */
  background: rgba(22, 24, 23, 0.55);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

select {
  color-scheme: dark;
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--green-light);
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px var(--green-soft);
}

/* =========================
   RANGE SLIDERS
   ========================= */
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  padding: 0;
  margin-top: 6px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(to right, var(--green-light) var(--range-fill, 0%), rgba(255, 255, 255, 0.12) var(--range-fill, 0%));
  cursor: pointer;
}

input[type="range"]:focus {
  outline: none;
  box-shadow: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(to right, var(--green-light) var(--range-fill, 0%), rgba(255, 255, 255, 0.12) var(--range-fill, 0%));
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--green-light);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform var(--ease), box-shadow var(--ease);
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--green-soft);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--green-light);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-light);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease);
}

input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--green-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 120px auto;
  gap: 12px;
  align-items: end;
}

/* Toggle switch (checkboxes) */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px !important;
  height: 25px;
  margin: 0 10px 0 0 !important;
  padding: 0;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-strong);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--ease), border-color var(--ease);
}

input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  transition: transform var(--ease);
}

input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}

input[type="checkbox"]:checked::before {
  transform: translateX(17px);
}

input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px var(--green-soft);
}

/* =========================
   BUTTONS (ALGEMEEN)
   ========================= */
.btn,
a.btn {
  margin-top: 20px;
  background: linear-gradient(180deg, #ffffff, #e7e9e8);
  color: #14171a;
  border: 1px solid rgba(255,255,255,0.6);
  padding: 12px 18px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: filter var(--ease), box-shadow var(--ease), transform var(--ease);
}

/* Hover effect voor alle buttons */
.btn:hover,
a.btn:hover {
  filter: brightness(0.96);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.btn:active,
a.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Disabled button state */
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn:disabled:hover {
  filter: none;
  transform: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* =========================
   SECONDARY BUTTON
   Gebruik voor: filters, minder belangrijke acties
   ========================= */
.btn.secondary,
a.btn.secondary {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

/* Hover secondary */
.btn.secondary:hover,
a.btn.secondary:hover {
  background: rgba(255,255,255,0.12);
  box-shadow: var(--shadow-sm);
}

/* =========================
   DANGER BUTTON
   Gebruik voor: verwijderen / destructieve acties
   ========================= */
.btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.35);
  box-shadow: none;
}

/* Hover danger */
.btn.danger:hover {
  background: rgba(255, 107, 107, 0.22);
  color: #fff;
  box-shadow: 0 6px 16px rgba(226, 72, 63, 0.3);
}

/* =========================
   BUTTON GROUPS
   ========================= */
.button-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.button-row .btn {
  flex: 1;
}

/* =========================
   TABELLEN
   ========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--border);
}

th {
  text-transform: uppercase;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-faint);
}

tbody tr {
  transition: background var(--ease);
}

tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

.actions {
  text-align: right;
  white-space: nowrap;
}

.inline {
  display: inline-flex;
  gap: 8px;
  margin-left: 8px;
}

/* =========================
   ALERTS (FEEDBACK)
   ========================= */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}

.alert.success {
  border-left: 3px solid #4caf62;
  background: rgba(76, 175, 98, 0.08);
}

.alert.error {
  border-left: 3px solid var(--danger);
  background: rgba(255, 107, 107, 0.08);
}

/* =========================
   LOGIN PAGINA
   ========================= */
body.login {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.login .container {
  max-width: 360px;
}

body.login h1 {
  font-size: 26px;
}

/* =========================
   QR CODE WEERGAVE
   ========================= */
#qrBlock {
  text-align: center;
  margin-top: 20px;
}

#qrBlock img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* =========================
   STATUS INDICATORS
   ========================= */
.status-indicator {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: help;
  line-height: 1.3;
  border: 1px solid transparent;
}

.status-active {
  color: #6fd684;
  background: rgba(76, 175, 98, 0.14);
  border-color: rgba(76, 175, 98, 0.25);
}

.status-broken {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(255, 107, 107, 0.25);
}

.status-unknown {
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
}

.status-checking {
  color: #ffc266;
  background: rgba(255, 194, 102, 0.14);
  border-color: rgba(255, 194, 102, 0.25);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* =========================
   KPI WARNING
   ========================= */
.kpi-warning {
  border-color: rgba(255, 152, 0, 0.4) !important;
}

.kpi-warning strong {
  color: #ff9800;
}

/* =========================
   KLEINE BUTTONS
   ========================= */
.btn-small,
a.btn-small {
  padding: 7px 12px;
  font-size: 12.5px;
  margin-top: 0;
  margin-left: 4px;
}

.actions .btn-small:first-child {
  margin-left: 0;
}
/* =========================
   TEXT TOOLS
   ========================= */
.tool-container {
  display: flex;
  gap: 30px;
  margin-top: 20px;
  align-items: stretch;
}

.tool-column {
  flex: 1;
  min-width: 0;
}

.tool-section {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.tool-section h3 {
  margin: 0 0 15px 0;
  color: var(--green-light);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

/* =========================
   TOAST NOTIFICATIONS
   ========================= */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 0.3s cubic-bezier(.4,0,.2,1);
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast.hide {
  animation: slideOut 0.3s ease-out forwards;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  .app {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    position: static;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px;
  }

  .logo {
    margin-bottom: 0;
    margin-right: 10px;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    flex: 0;
  }

  .sidebar nav a {
    margin-bottom: 0;
    margin-right: 4px;
  }

  .sidebar nav hr {
    display: none;
  }

  .sidebar nav .nav-spacer {
    display: none;
  }

  .topbar {
    flex-direction: column;
  }

  .tool-container {
    flex-direction: column;
    gap: 20px;
  }

  .qr-container {
    flex-direction: column;
    gap: 20px;
  }

  .qr-column {
    max-width: 100%;
  }

  .link-container {
    flex-direction: column;
    gap: 20px;
  }

  .link-column {
    max-width: 100%;
  }
}

/* =========================
   QR GENERATOR STYLES
   ========================= */
.qr-container {
  display: flex;
  gap: 30px;
  margin-top: 20px;
  align-items: stretch;
}

.qr-column {
  flex: 0 1 50%;
  max-width: 50%;
  min-width: 0;
}

/* =========================
   SHORTLINK GENERATOR STYLES
   ========================= */
.link-container {
  display: flex;
  gap: 30px;
  margin-top: 20px;
  align-items: stretch;
}

.link-column {
  flex: 0 1 50%;
  max-width: 50%;
  min-width: 0;
}

/* =========================
   ACTIES IN USERS TABLE NETJES OP 1 LIJN
   ========================= */

td.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

td.actions form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

td.actions .btn {
  margin-top: 0; /* override standaard 20px margin */
}

/* =========================
   BUTTON UITLIJNING IN FORM-GRID
   ========================= */

.form-grid .btn {
  margin-top: 0;
  align-self: end;
}

.reset-password-input {
  flex: 1;
  min-width: 420px;
}
/* =========================
   TABLE TEXT LEFT ALIGN
   ========================= */

th,
td {
  text-align: left;
}

td.actions,
th.actions {
  text-align: right;
}

/* =========================
   LOGIN V2: centered + dynamic bg + slideshow
   ========================= */

body.login.login-v2 {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

body.login.login-v2::before {
  content: none;
}

/* Centered card */
.login-center {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.login-card h1 {
  color: #fff;
}

.subtitle {
  margin-top: -6px;
  margin-bottom: 18px;
  color: var(--text-muted);
}

/* Background base layer */
.login-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Slideshow background (subtiel!) */
.login-bg-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.3s ease-in-out;
  filter: grayscale(0%) contrast(100%) brightness(0.85);
}

.login-bg-slideshow img.visible {
  opacity: 0.55;
}

/* Donkere overlay zodat het glas-effect leesbaar blijft */
.login-bg-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 7, 0.034), rgba(6, 8, 7, 0.144) 15%, rgba(6, 8, 7, 0.178));
}

/* Mobiel: card blijft mooi */
@media (max-width: 600px) {
  .login-card { max-width: 100%; }
}

/* =========================
   ENTRANCE ANIMATIE (premium fade bij openen)
   ========================= */
/* Puur opacity-only: een transform hier zou (via animation-fill-mode) een
   nieuwe stacking/backdrop-context op de voorouder achterlaten, waardoor
   geneste .card-elementen met backdrop-filter niet meer door de echte
   achtergrondfoto heen kunnen blurren en veel "leger"/doorzichtiger ogen. */
@keyframes fadeSlideUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeSlideDown {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeSlideRight {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sidebar {
  animation: fadeSlideRight 560ms cubic-bezier(.22, 1, .36, 1) both;
}

/* Animatie zit bewust NIET op .topbar/wrapper-containers: een geanimeerd
   voorouder-element (zelfs opacity-only, fill-mode:both) kan de browser
   ertoe zetten dat op zijn eigen compositing-laag te zetten, wat
   backdrop-filter van geneste cards/chips blokkeert. Daarom animeren we
   alleen de glaselementen zelf, nooit hun wrappers. */
.topbar-eyebrow {
  animation: fadeSlideDown 520ms cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: 60ms;
}

.user-chip {
  animation: fadeSlideDown 520ms cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: 60ms;
}

.page > h1 {
  animation: fadeSlideUp 560ms cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: 80ms;
}

.page > p {
  animation: fadeSlideUp 560ms cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: 130ms;
}

.card,
.kpi,
.alert {
  animation: fadeSlideUp 560ms cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: 200ms;
}

.kpis > .kpi:nth-child(2) { animation-delay: 250ms; }
.kpis > .kpi:nth-child(3) { animation-delay: 300ms; }

.login-card {
  animation: fadeSlideUp 620ms cubic-bezier(.22, 1, .36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .topbar-eyebrow,
  .user-chip,
  .page > h1,
  .page > p,
  .card,
  .kpi,
  .alert,
  .login-card {
    animation: none;
  }
}
