/* MarkDrive — grijs / wit / drive-blauw */
:root {
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-light:  #3b82f6;
  --blue-soft:   #eff4ff;
  --grey-bg:     #eef1f5;
  --grey-line:   #e2e6ec;
  --grey-text:   #6b7280;
  --ink:         #1f2937;
  --white:       #ffffff;
  --danger:      #dc2626;
  --ok:          #16a34a;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background: var(--grey-bg);
}

/* ---------- Login ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(59,130,246,0.18), transparent 60%),
    radial-gradient(700px 500px at 100% 110%, rgba(37,99,235,0.16), transparent 55%),
    var(--grey-bg);
}
/* subtiele zwevende vormen op de achtergrond */
.auth-wrap::before,
.auth-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.5;
  z-index: 0;
}
.auth-wrap::before { width: 220px; height: 220px; top: -60px; right: 12%;
  background: radial-gradient(circle at 30% 30%, #bcd3ff, transparent 70%); }
.auth-wrap::after { width: 300px; height: 300px; bottom: -90px; left: 8%;
  background: radial-gradient(circle at 30% 30%, #cfe0ff, transparent 70%); }

/* zwevende drive-iconen over de hele achtergrond */
.bg-icons {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-icons i {
  position: absolute;
  color: var(--blue);
  transform: rotate(var(--r, 0deg));
  animation: floaty 8s ease-in-out infinite;
  will-change: transform;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-16px) rotate(var(--r, 0deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-icons i { animation: none; }
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 22px;
  box-shadow:
    0 24px 60px rgba(29, 78, 216, 0.16),
    0 6px 18px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }

.card__head {
  position: relative;
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue) 45%, var(--blue-dark) 100%);
  color: #fff;
  padding: 38px 30px 30px;
  text-align: center;
}
.card__head::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 30px;
  background: rgba(255,255,255,0.92);
  clip-path: ellipse(75% 100% at 50% 100%);
}

.logo {
  width: 62px; height: 62px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.4);
}
.logo svg { width: 32px; height: 32px; }

.card__head h1 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.card__head p  { margin: 7px 0 0; font-size: 13.5px; opacity: 0.9; }

.card__body { padding: 30px 30px 26px; }

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--grey-text);
  margin-bottom: 8px;
  letter-spacing: .01em;
}

input[type="email"],
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 14px 15px;
  font-size: 15px;
  color: var(--ink);
  background: #f8fafc;
  border: 1.5px solid var(--grey-line);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
  background: #fff;
}

/* OTP — 6 losse vakjes */
.otp-group {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.otp-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  background: #f8fafc;
  border: 1.5px solid var(--grey-line);
  border-radius: 12px;
  outline: none;
  transition: border-color .12s, box-shadow .12s, transform .06s, background .12s;
}
.otp-box:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
  background: #fff;
  transform: translateY(-1px);
}
.otp-box.filled { border-color: var(--blue-light); background: #fff; }

.btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-light), var(--blue) 55%, var(--blue-dark));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(37,99,235,0.28);
  transition: transform .06s, box-shadow .15s, filter .15s;
}
.btn:hover  { filter: brightness(1.05); box-shadow: 0 14px 26px rgba(37,99,235,0.34); }
.btn:active { transform: translateY(1px); box-shadow: 0 6px 14px rgba(37,99,235,0.28); }

.link-btn {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  background: none; border: none; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 18px;
  line-height: 1.45;
  display: flex; gap: 9px; align-items: flex-start;
}
.alert svg { flex: none; margin-top: 1px; }
.alert--error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert--ok    { background: #f0fdf4; color: var(--ok);     border: 1px solid #bbf7d0; }
.alert--info  { background: var(--blue-soft); color: var(--blue-dark); border: 1px solid #dbe6ff; }

.muted { color: var(--grey-text); font-size: 12.5px; text-align: center; margin-top: 18px; }
.hint  { color: var(--grey-text); font-size: 13px; margin: 14px 0 2px; text-align: center; }
.hint b { color: var(--ink); }

.secure-note {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--grey-line);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--grey-text); font-size: 12px;
}

/* ---------- App-layout met sidebar ---------- */
.app-layout { display: flex; min-height: 100vh; }
.mobile-topbar { display: none; }
.sidebar-overlay { display: none; }
/* pagina achter het mobiele menu bevriezen zodat alleen de sidebar scrollt */
body.nav-open { overflow: hidden; }

/* ---------- Sidebar (donker / premium) ---------- */
.sidebar {
  width: 264px;
  flex: none;
  background: linear-gradient(185deg, #1b2748 0%, #111a30 55%, #0d1424 100%);
  color: #e8edf7;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.sidebar__brand .logo {
  width: 42px; height: 42px; margin: 0; border: none;
  border-radius: 12px; background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px;
  box-shadow: 0 6px 16px rgba(37,99,235,0.4);
}
.sidebar__brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.sidebar__brand-text .bn { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: #fff; }
.sidebar__brand-text .bs { font-size: 11px; color: rgba(232,237,247,0.5); }

.new-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 0 4px 16px;
  padding: 12px; font-size: 14.5px; font-weight: 600;
  color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--blue-light), var(--blue) 55%, var(--blue-dark));
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(37,99,235,0.45);
  transition: filter .15s, transform .06s;
}
.new-btn:hover  { filter: brightness(1.08); }
.new-btn:active { transform: translateY(1px); }

.sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(232,237,247,0.55); padding: 16px 12px 8px;
}
.nav-label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(147,180,255,0.28), rgba(255,255,255,0.02));
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  padding: 10px 12px; border-radius: 11px;
  color: rgba(232,237,247,0.72); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: background .13s, color .13s;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; color: rgba(232,237,247,0.5); transition: color .13s; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item:hover i { color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.28), rgba(37,99,235,0.16));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(96,165,250,0.32);
}
.nav-item.active i { color: #93b4ff; }
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 20px; border-radius: 0 4px 4px 0; background: var(--blue-light);
}

.sidebar__storage {
  margin-top: auto;
  padding: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.storage-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: rgba(232,237,247,0.75); margin-bottom: 10px; }
.storage-head i { color: #93b4ff; margin-right: 6px; }
.storage-pct { color: #93b4ff; }
.storage-bar { height: 7px; background: rgba(255,255,255,0.12); border-radius: 99px; overflow: hidden; }
.storage-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue-light), #60a5fa); }
.storage-text { margin-top: 8px; font-size: 11px; color: rgba(232,237,247,0.5); }

.sidebar__user {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px;
  border-radius: 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; overflow: hidden;
  background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar__user-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sidebar__user-info strong { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-info span   { font-size: 11px; color: rgba(232,237,247,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__logout {
  margin-left: auto; flex: none;
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(232,237,247,0.6); background: rgba(255,255,255,0.06); text-decoration: none;
  transition: background .13s, color .13s;
}
.sidebar__logout:hover { background: rgba(220,38,38,0.9); color: #fff; }

/* ---------- Greeting-topbalk ---------- */
.topbar {
  position: fixed; top: 0; left: 264px; right: 0; height: 46px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 26px; font-size: 13px;
  background: linear-gradient(90deg, #eef2fc 0%, #f1eefb 55%, #eef2fc 100%);
  border-bottom: 1px solid #e3e8f2;
}
.topbar__greet { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; min-width: 0; }
.topbar__greet-ic {
  width: 26px; height: 26px; flex: none; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-soft); color: var(--blue); font-size: 13px;
}
.topbar__greet strong { font-weight: 700; }
.topbar__info { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.tb-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 9px; font-size: 12px; font-weight: 600;
  color: #475569; background: rgba(255,255,255,0.7); border: 1px solid #e3e8f2;
}
.tb-badge i { color: #94a3b8; font-size: 11px; }
.tb-badge--time { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.tb-badge--time i { color: var(--blue); }
.tb-badge--tz { color: var(--blue-dark); background: var(--blue-soft); border-color: #dbe6ff; font-weight: 700; }
.tb-badge--tz i { color: var(--blue); }

/* ---------- Main ---------- */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-top: 46px; }
.main-head {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grey-line);
  position: sticky; top: 46px; z-index: 5;
}
.search {
  position: relative; flex: 1; max-width: 520px;
}
.search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--grey-text); font-size: 14px; }
.search input {
  width: 100%; padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--grey-line); border-radius: 11px;
  background: #f6f8fc; font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); background: #fff; }
.upload-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; font-size: 14px; font-weight: 600;
  color: var(--blue); background: var(--blue-soft);
  border: 1px solid #dbe6ff; border-radius: 11px; text-decoration: none; white-space: nowrap;
  transition: background .13s;
}
.upload-btn:hover { background: #e2ecff; }

.main-body { padding: 32px 28px; max-width: 1360px; }
.welcome h2 { margin: 0 0 6px; font-size: 25px; letter-spacing: -0.02em; }
.welcome p  { margin: 0; color: var(--grey-text); }
.section-title { margin: 34px 0 14px; font-size: 14px; font-weight: 600; color: var(--grey-text); text-transform: uppercase; letter-spacing: .04em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.tile {
  display: block; color: inherit; text-decoration: none;
  background: var(--white); border: 1px solid var(--grey-line);
  border-radius: 14px; padding: 22px 18px; cursor: pointer;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.tile:hover { box-shadow: 0 8px 20px rgba(37,99,235,0.10); transform: translateY(-2px); border-color: #cfdcff; }
.tile .ic {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--blue-soft); color: var(--blue); font-size: 18px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.tile h3 { margin: 0 0 4px; font-size: 15px; }
.tile span { font-size: 12.5px; color: var(--grey-text); }

.nav-sep { height: 1px; background: var(--grey-line); margin: 10px 8px; }

/* ---------- Pagina-header + gebruikerstabel ---------- */
.page-head {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(115deg, #ffffff 0%, #f5f8ff 100%);
  border: 1px solid var(--grey-line);
  border-radius: 18px;
  padding: 22px 26px;
  box-shadow: 0 8px 26px rgba(15,23,42,0.06);
}
.page-head::after {
  content: ""; position: absolute; right: -30px; top: -70px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle at center, rgba(59,130,246,0.12), transparent 68%);
  pointer-events: none; z-index: 0;
}
.page-head__text, .page-head__right { position: relative; z-index: 1; }
.page-head__text { display: flex; align-items: center; gap: 16px; min-width: 0; }
.page-head__icon {
  width: 52px; height: 52px; flex: none; border-radius: 16px;
  background: linear-gradient(135deg, var(--blue-light), var(--blue) 55%, var(--blue-dark));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px;
  box-shadow: 0 10px 24px rgba(37,99,235,0.38), inset 0 1px 0 rgba(255,255,255,0.25);
}
.page-head h2 { margin: 0 0 3px; font-size: 26px; letter-spacing: -0.025em; }
.page-head p  { margin: 0; color: var(--grey-text); font-size: 13.5px; }
.page-head__right { flex: none; }

/* page-header op kleine schermen */
@media (max-width: 560px) {
  .page-head { padding: 15px 16px; gap: 12px; }
  .page-head__text { gap: 12px; }
  .page-head__icon { width: 42px; height: 42px; font-size: 18px; border-radius: 11px; }
  .page-head h2 { font-size: 20px; }
  .page-head p  { font-size: 12.5px; }
  .count-badge { padding: 7px 13px; font-size: 13px; }
}

/* ---------- Statistiek-kaarten ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.stat-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 15px;
  background: var(--white); border: 1px solid var(--grey-line);
  border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 4px 14px rgba(15,23,42,0.04);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(15,23,42,0.10); border-color: #dbe4f2; }
.stat-card__icon {
  width: 50px; height: 50px; flex: none; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; position: relative; z-index: 1;
}
.stat-card__body { position: relative; z-index: 1; min-width: 0; }
.stat-card__value { font-size: 27px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card__label { font-size: 12.5px; color: var(--grey-text); margin-top: 6px; font-weight: 500; }
.stat-card__ghost {
  position: absolute; right: -10px; bottom: -18px;
  font-size: 88px; opacity: 0.06; transform: rotate(-12deg); pointer-events: none; z-index: 0;
}

/* kleurtinten per tone */
.stat-card.tone-blue   .stat-card__icon { background: linear-gradient(135deg,#3b82f6,#1d4ed8); box-shadow: 0 10px 20px rgba(37,99,235,.34); }
.stat-card.tone-green  .stat-card__icon { background: linear-gradient(135deg,#34d399,#059669); box-shadow: 0 10px 20px rgba(5,150,105,.30); }
.stat-card.tone-amber  .stat-card__icon { background: linear-gradient(135deg,#fbbf24,#d97706); box-shadow: 0 10px 20px rgba(217,119,6,.30); }
.stat-card.tone-purple .stat-card__icon { background: linear-gradient(135deg,#a78bfa,#7c3aed); box-shadow: 0 10px 20px rgba(124,58,237,.30); }
.stat-card.tone-grey   .stat-card__icon { background: linear-gradient(135deg,#94a3b8,#475569); box-shadow: 0 10px 20px rgba(71,85,105,.26); }
.stat-card.tone-blue   .stat-card__ghost { color: #2563eb; }
.stat-card.tone-green  .stat-card__ghost { color: #059669; }
.stat-card.tone-amber  .stat-card__ghost { color: #d97706; }
.stat-card.tone-purple .stat-card__ghost { color: #7c3aed; }
.stat-card.tone-grey   .stat-card__ghost { color: #475569; }

/* gekleurd randje aan de linkerkant */
.stat-card::after { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 5px; z-index: 2; }
.stat-card.tone-blue::after   { background: linear-gradient(180deg,#3b82f6,#1d4ed8); }
.stat-card.tone-green::after  { background: linear-gradient(180deg,#34d399,#059669); }
.stat-card.tone-amber::after  { background: linear-gradient(180deg,#fbbf24,#d97706); }
.stat-card.tone-purple::after { background: linear-gradient(180deg,#a78bfa,#7c3aed); }
.stat-card.tone-grey::after   { background: linear-gradient(180deg,#94a3b8,#475569); }

@media (max-width: 620px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; gap: 12px; border-radius: 14px; }
  .stat-card__icon { width: 42px; height: 42px; font-size: 17px; border-radius: 12px; }
  .stat-card__value { font-size: 21px; }
  .stat-card__label { font-size: 11px; margin-top: 4px; }
  .stat-card__ghost { font-size: 66px; }
}
.count-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 17px; font-size: 14px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-light), var(--blue) 55%, var(--blue-dark));
  border: none; border-radius: 99px;
  box-shadow: 0 8px 18px rgba(37,99,235,0.30);
}
.count-badge i { color: #fff; }

.table-card {
  margin-top: 22px;
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: 16px;
  overflow-x: auto;   /* nooit afkappen: scrollt indien nodig */
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}
.user-table { width: 100%; border-collapse: collapse; }
.user-table thead th {
  text-align: left; padding: 14px 20px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--grey-text); background: #f7f9fc; border-bottom: 1px solid var(--grey-line);
}
.user-table tbody td { padding: 14px 20px; border-bottom: 1px solid #f0f2f6; font-size: 14px; vertical-align: middle; }
.user-table tbody tr:last-child td { border-bottom: none; }
.user-table tbody tr { transition: background .12s; }
.user-table tbody tr:hover { background: #f8faff; }

.user-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; flex: none; }
.user-cell-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.user-cell-info strong { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-email { font-size: 12.5px; color: var(--grey-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-cell { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.you-tag {
  margin-left: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700;
  color: var(--blue-dark); background: var(--blue-soft); border-radius: 99px; vertical-align: middle;
}
.email-cell { color: #45505f; }
.muted-cell { color: var(--grey-text); }
.empty-state { padding: 40px; text-align: center; color: var(--grey-text); font-size: 14px; }
.empty-state i { display: block; font-size: 26px; margin-bottom: 10px; color: #c3ccd9; }

/* ---------- Rol-badges ---------- */
.role-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 99px;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
/* alles in de tabel op één regel */
.user-table th, .user-table td { white-space: nowrap; }
.pin-code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700; font-size: 14px; letter-spacing: 2px;
  color: var(--blue-dark); background: var(--blue-soft);
  border: 1px solid #cfe0ff; border-radius: 8px; padding: 3px 10px;
}
.role-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.role-user  { color: #475569; background: #eef1f6; border: 1px solid #e2e6ec; }
.role-admin { color: #1d4ed8; background: #eaf1ff; border: 1px solid #cfe0ff; }
.role-super { color: #92400e; background: linear-gradient(135deg,#fff6df,#ffe9b8); border: 1px solid #f5d68a; }

/* ---------- Flash ---------- */
.flash {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 4px; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500;
}
.flash--ok  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.flash--err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ---------- Toast-meldingen ---------- */
.toast-wrap {
  position: fixed; top: 20px; right: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 12px; max-width: 380px;
}
.toast {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 13px;
  background: #fff; border: 1px solid var(--grey-line);
  border-radius: 14px; padding: 14px 12px 14px 18px;
  box-shadow: 0 16px 40px rgba(15,23,42,0.16);
  animation: toastIn .34s cubic-bezier(.2,.9,.3,1.2) both;
}
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.toast--ok::before  { background: linear-gradient(180deg, #22c55e, #15803d); }
.toast--err::before { background: linear-gradient(180deg, #f87171, #dc2626); }
.toast--out { animation: toastOut .28s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(40px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(.98); } }

.toast__icon { flex: none; font-size: 20px; }
.toast--ok  .toast__icon { color: #16a34a; }
.toast--err .toast__icon { color: #dc2626; }
.toast__msg { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--ink); line-height: 1.4; }

.toast__close {
  flex: none; position: relative; width: 34px; height: 34px;
  border: none; background: transparent; cursor: pointer; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--grey-text);
}
.toast__close:hover { color: var(--ink); background: #f3f6fb; }
.toast__close i { font-size: 13px; position: relative; z-index: 1; }
.toast__ring { position: absolute; inset: 0; width: 34px; height: 34px; transform: rotate(-90deg); }
.toast__ring-track { fill: none; stroke: #e6eaf0; stroke-width: 2.5; }
.toast__ring-progress {
  fill: none; stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 100.53; stroke-dashoffset: 0;
  animation: toastRing 5s linear forwards;
}
.toast--ok  .toast__ring-progress { stroke: #22c55e; }
.toast--err .toast__ring-progress { stroke: #dc2626; }
@keyframes toastRing { to { stroke-dashoffset: 100.53; } }

@media (max-width: 480px) {
  .toast-wrap { left: 12px; right: 12px; top: 12px; max-width: none; }
}

/* pin-status in tabel */
.pin-state { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; margin-top: 2px; }
.pin-state.on  { color: #16a34a; }
.pin-state.off { color: #b98900; }

/* ---------- Actie-knoppen in tabel ---------- */
.actions-cell { text-align: right; white-space: nowrap; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--grey-line); background: #fff; color: #55607a;
  cursor: pointer; font-size: 13px; margin-left: 6px;
  transition: background .12s, color .12s, border-color .12s, transform .06s;
}
.icon-btn:active { transform: translateY(1px); }
.icon-btn--edit { color: var(--blue);   background: var(--blue-soft); border-color: #d8e4ff; }
.icon-btn--edit:hover { background: #dbe7ff; border-color: #b9d0ff; }
.icon-btn--key  { color: #b8860b;        background: #fef7e6;         border-color: #f3e2b5; }
.icon-btn--key:hover  { background: #fdefcf; border-color: #ecd28f; }
.icon-btn--del  { color: var(--danger);  background: #fef2f2;         border-color: #fbd5d5; }
.icon-btn--del:hover  { background: #fde3e3; border-color: #f7bcbc; }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn:disabled:hover { transform: none; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(15,23,42,0.45); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; animation: fade .15s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 420px; background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(15,23,42,0.35);
  animation: rise .2s cubic-bezier(.2,.8,.2,1) both;
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--grey-line);
}
.modal__head h3 { margin: 0; font-size: 17px; }
.modal__close { width: 32px; height: 32px; border: none; background: #f3f6fb; border-radius: 9px; color: var(--grey-text); cursor: pointer; }
.modal__close:hover { background: #e8edf5; color: var(--ink); }
.modal__body { padding: 22px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.btn-ghost {
  padding: 12px 18px; font-size: 14px; font-weight: 600;
  color: #55607a; background: #f3f6fb; border: 1px solid var(--grey-line);
  border-radius: 10px; cursor: pointer;
}
.btn-ghost:hover { background: #e8edf5; }
.select {
  width: 100%; padding: 12px 42px 12px 14px; font-size: 15px; color: var(--ink);
  background-color: #f8fafc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
  border: 1.5px solid var(--grey-line); border-radius: 10px; outline: none; cursor: pointer;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.select:hover  { border-color: #cdd7e5; }
.select:focus  { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); background-color: #fff; }
.select option { color: var(--ink); background: #fff; }

/* Custom dropdown (volledig gestyled, ook de open lijst) */
.cselect { position: relative; }
.cselect__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; font-size: 15px; color: var(--ink); text-align: left;
  background: #f8fafc; border: 1.5px solid var(--grey-line); border-radius: 10px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.cselect__btn > i { color: #64748b; font-size: 13px; transition: transform .18s, color .18s; }
.cselect__btn:hover { border-color: #cdd7e5; }
.cselect.open .cselect__btn { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); background: #fff; }
.cselect.open .cselect__btn > i { transform: rotate(180deg); color: var(--blue); }
.cselect__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5;
  margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--grey-line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15,23,42,0.18);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.cselect.open .cselect__list { opacity: 1; visibility: visible; transform: none; }
.cselect__opt {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: 8px; font-size: 14.5px; color: #374151; cursor: pointer;
}
.cselect__opt i { font-size: 11px; opacity: 0; color: var(--blue); }
.cselect__opt:hover { background: var(--blue-soft); color: var(--blue-dark); }
.cselect__opt.selected { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.cselect__opt.selected i { opacity: 1; }
/* profielfoto-upload met preview */
.avatar-upload { display: flex; align-items: center; gap: 14px; }
.avatar-upload__preview {
  width: 62px; height: 62px; flex: none; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--blue-light), var(--blue-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
  border: 1px solid var(--grey-line); box-shadow: 0 6px 16px rgba(37,99,235,0.22);
}
.avatar-upload__preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload__ctrl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.avatar-upload__btn {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 9px 15px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  color: var(--blue); background: var(--blue-soft); border: 1px solid #cfe0ff; border-radius: 10px;
  transition: background .13s;
}
.avatar-upload__btn:hover { background: #dbe7ff; }
.avatar-upload__name { font-size: 12px; color: var(--grey-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

/* ---------- Rechtermuisknop-menu ---------- */
.ctx-menu {
  position: fixed; z-index: 60; display: none;
  min-width: 210px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--grey-line); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15,23,42,0.22);
}
.ctx-menu li {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 8px; font-size: 13.5px; color: #374151; cursor: pointer;
}
.ctx-menu li i { width: 16px; text-align: center; color: var(--grey-text); }
.ctx-menu li:hover { background: var(--blue-soft); color: var(--blue-dark); }
.ctx-menu li:hover i { color: var(--blue); }
.ctx-menu li.danger:hover { background: #fef2f2; color: var(--danger); }
.ctx-menu li.danger:hover i { color: var(--danger); }
.ctx-menu li.disabled { opacity: .4; pointer-events: none; }
.ctx-menu .ctx-sep { height: 1px; padding: 0; margin: 5px 6px; background: var(--grey-line); border-radius: 0; }
.ctx-menu .ctx-sep:hover { background: var(--grey-line); }

/* ---------- Responsive: sidebar -> mobiele navbar + drawer ---------- */
@media (max-width: 820px) {
  .app-layout { flex-direction: column; }
  /* topbalk loopt mee i.p.v. vast, want sidebar is nu een drawer */
  .topbar { position: static; left: auto; right: auto; height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 8px 16px; }
  .app-main { padding-top: 0; }

  /* Bovenbalk met hamburger */
  .mobile-topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 40;
    padding: 11px 16px;
    background: linear-gradient(135deg, #1b2748, #111a30);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .mt-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; }
  .mt-logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px;
  }
  .hamburger {
    width: 42px; height: 42px; border: none; border-radius: 10px;
    background: rgba(255,255,255,0.1); color: #fff; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .hamburger:active { background: rgba(255,255,255,0.18); }

  /* Sidebar wordt een uitschuifbaar paneel */
  .sidebar {
    position: fixed; top: 0; left: 0;
    height: 100vh; height: 100dvh; width: 284px;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    z-index: 50;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;   /* soepel scrollen (momentum) op iOS */
    overscroll-behavior: contain;         /* voorkomt doorscrollen naar de pagina */
  }
  .sidebar.open { transform: none; box-shadow: 24px 0 70px rgba(0,0,0,0.45); }

  .sidebar-overlay {
    display: block; position: fixed; inset: 0; z-index: 45;
    background: rgba(5,10,20,0.4);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden; transition: opacity .22s;
  }
  .sidebar-overlay.open { opacity: 1; visibility: visible; }

  .main-head { position: static; flex-wrap: wrap; gap: 10px; }
  .main-head .search { flex-basis: 100%; max-width: none; }
  .main-head .upload-btn { width: 100%; justify-content: center; }
  .main-body { padding: 22px 16px; }
  .page-head { flex-wrap: wrap; padding: 16px 18px; }
}

/* ---------- Gebruikerstabel: past op elke schermgrootte, geen scroll ---------- */
.table-card { overflow: hidden; }
.user-table { table-layout: fixed; }

/* Op tablet minder belangrijke kolommen verbergen */
@media (max-width: 1040px) { .user-table .col-added { display: none; } }
@media (max-width: 820px)  { .user-table .col-num   { display: none; } }

/* Op telefoon: zoekbalk-header + greeting-topbalk verbergen, tabel als kaarten */
@media (max-width: 720px) {
  .main-head { display: none; }
  .topbar { display: none; }
  .table-card { background: transparent; border: none; box-shadow: none; margin-top: 16px; }
  .user-table, .user-table tbody { display: block; }
  .user-table thead { display: none; }
  .user-table tr {
    display: block; background: var(--white);
    border: 1px solid var(--grey-line); border-radius: 14px;
    padding: 12px 16px; margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(15,23,42,0.05);
  }
  .user-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 8px 0; border: none; white-space: normal;
  }
  .user-table td + td { border-top: 1px solid #f2f4f8; }
  .user-table td[data-label]::before {
    content: attr(data-label); flex: none;
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--grey-text); font-weight: 700;
  }
  .user-table td:first-child { padding-top: 0; } /* Gebruiker-cel = kaartkop */
  .user-cell { width: 100%; }
  .user-cell-info strong, .user-email { white-space: normal; }
  .code-cell { align-items: flex-end; }
  .actions-cell { justify-content: space-between; }
}

/* ---------- Login op kleine schermen ---------- */
@media (max-width: 480px) {
  .auth-wrap { padding: 14px; align-items: flex-start; padding-top: 32px; }
  .card { border-radius: 18px; }
  .card__head { padding: 28px 22px 24px; }
  .card__head h1 { font-size: 20px; }
  .card__head .logo { width: 54px; height: 54px; }
  .card__head .logo i { font-size: 22px !important; }
  .card__body { padding: 22px 18px; }
  /* font-size 16px voorkomt automatisch inzoomen op iOS bij focus */
  input[type="email"], input[type="text"] { font-size: 16px; }
  .otp-group { gap: 7px; }
  .otp-box { font-size: 20px; border-radius: 10px; max-height: 52px; }
  .btn { font-size: 16px; padding: 14px; }
  .bg-icons i { opacity: 0.08 !important; }
}

/* ---------- Footer ---------- */
.app-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 24px; margin-top: auto;
  font-size: 11.5px; color: var(--grey-text);
  border-top: 1px solid var(--grey-line);
  background: rgba(255,255,255,0.55);
}
.app-footer__brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #64748b; }
.app-footer__brand i { color: var(--blue); }
.app-footer__ver { color: var(--blue); text-decoration: none; font-weight: 700; }
.app-footer__ver:hover { text-decoration: underline; }
.app-footer__dot { opacity: .45; }
.app-footer__made { display: inline-flex; align-items: center; gap: 5px; }
.app-footer__made i { color: #ef4444; }
.app-footer--login {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
  margin: 0; border-top: none; background: transparent;
}

/* ---------- Changelog-tijdlijn ---------- */
.changelog { margin-top: 22px; }
.cl-entry { display: flex; gap: 18px; }
.cl-rail { position: relative; flex: none; width: 40px; display: flex; justify-content: center; }
.cl-rail::before {
  content: ""; position: absolute; top: 40px; bottom: -6px; left: 50%; width: 2px;
  transform: translateX(-50%); background: var(--grey-line);
}
.cl-entry:last-child .cl-rail::before { display: none; }
.cl-dot {
  width: 40px; height: 40px; border-radius: 12px; z-index: 1;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: #eef1f6; color: #94a3b8; border: 1px solid var(--grey-line);
}
.cl-dot--latest { background: linear-gradient(135deg, var(--blue-light), var(--blue-dark)); color: #fff; border: none; box-shadow: 0 8px 18px rgba(37,99,235,.35); }
.cl-card {
  flex: 1; min-width: 0; margin-bottom: 18px;
  background: var(--white); border: 1px solid var(--grey-line); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 4px 14px rgba(15,23,42,0.04);
}
.cl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cl-version { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.cl-tag { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.cl-tag--launch  { color: #7c3aed; background: #f3f0ff; }
.cl-tag--new     { color: var(--blue-dark); background: var(--blue-soft); }
.cl-tag--improve { color: #0891b2; background: #ecfeff; }
.cl-tag--secure  { color: #b8860b; background: #fef7e6; }
.cl-tag--fix     { color: #dc2626; background: #fef2f2; }
.cl-latest { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #16a34a; background: #f0fdf4; border: 1px solid #bbf7d0; padding: 2px 9px; border-radius: 99px; }
.cl-date { margin-left: auto; font-size: 12px; color: var(--grey-text); display: inline-flex; align-items: center; gap: 6px; }
.cl-date i { color: #94a3b8; }
.cl-title { margin: 12px 0; font-size: 16px; letter-spacing: -0.01em; }
.cl-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-items li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: #45505f; line-height: 1.45; }
.cl-items li i { color: #16a34a; font-size: 11px; margin-top: 3px; flex: none; }

@media (max-width: 620px) {
  .cl-entry { gap: 12px; }
  .cl-rail { width: 34px; }
  .cl-dot { width: 34px; height: 34px; }
  .cl-date { margin-left: 0; }
  .app-footer { font-size: 11px; gap: 7px; }
}

/* ---------- Mappen (bestanden.php) ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin-top: 16px; padding: 8px 12px; font-size: 13.5px;
  background: var(--white); border: 1px solid var(--grey-line); border-radius: 12px;
  box-shadow: 0 3px 12px rgba(15,23,42,0.04);
}
.crumb { display: inline-flex; align-items: center; gap: 7px; color: var(--grey-text); text-decoration: none; padding: 5px 10px; border-radius: 8px; transition: background .13s, color .13s; }
.crumb:hover { background: #eef2f8; color: var(--ink); }
.crumb--active { color: var(--blue-dark); font-weight: 700; background: var(--blue-soft); }
.crumb i { font-size: 12px; }
.crumb-sep { color: #c3ccd9; font-size: 11px; }

/* Verkenner-tegels (mappen + bestanden) */
.folder-grid, .file-grid {
  margin-top: 14px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.folder-card, .file-card {
  position: relative;
  background: var(--white); border: 1px solid var(--grey-line); border-radius: 12px;
  transition: box-shadow .15s, border-color .15s;
}
.folder-card:hover, .file-card:hover { box-shadow: 0 8px 20px rgba(15,23,42,0.09); border-color: #cfdcff; }
.folder-card__link, .file-card__link {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 15px 12px 12px; text-decoration: none; color: inherit;
}
.folder-card__thumb, .file-card__thumb {
  width: 100%; height: 88px; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.folder-card__thumb { font-size: 46px; color: #f6b73c; }
.folder-card__thumb i { filter: drop-shadow(0 6px 10px rgba(245,158,11,0.28)); }
.file-card__thumb { font-size: 40px; background: #f3f6fb; color: #64748b; }
.file-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-card.is-img .file-card__thumb { background: #0f172a; }
.file-card.tone-pdf .file-card__thumb { background: #fef2f2; color: #dc2626; }
.file-card.tone-doc .file-card__thumb { background: #eef4ff; color: #2563eb; }
.file-card.tone-xls .file-card__thumb { background: #ecfdf3; color: #16a34a; }
.file-card.tone-ppt .file-card__thumb { background: #fff4ec; color: #ea580c; }
.file-card.tone-zip .file-card__thumb { background: #fef7e6; color: #b8860b; }
.file-card.tone-vid .file-card__thumb { background: #f3f0ff; color: #7c3aed; }
.file-card.tone-aud .file-card__thumb { background: #fdf2f8; color: #db2777; }
/* Video-poster met play-overlay */
.file-card__thumb.is-video { position: relative; background: #0f172a; }
.file-card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.file-card__play i {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(15,23,42,0.55); color: #fff; font-size: 13px;
  display: flex; align-items: center; justify-content: center; padding-left: 2px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35); backdrop-filter: blur(2px);
}
.folder-card__name, .file-card__name {
  width: 100%; text-align: center; font-weight: 600; font-size: 12.5px; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.3; word-break: break-word;
}
.folder-card__meta, .file-card__meta {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  font-size: 11px; color: var(--grey-text); text-align: center;
}
.folder-year { display: inline-flex; align-items: center; gap: 4px; color: var(--blue-dark); background: var(--blue-soft); font-weight: 700; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; }
.size-badge { display: inline-block; font-size: 10.5px; font-weight: 600; color: #55607a; background: #eef1f6; padding: 2px 9px; border-radius: 99px; }
.folder-card__act, .file-card__act {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px;
  border: none; background: rgba(255,255,255,0.92); color: #64748b; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(15,23,42,0.14);
  opacity: 0; transition: opacity .12s, background .12s, color .12s;
}
.folder-card:hover .folder-card__act, .file-card:hover .file-card__act { opacity: 1; }
.folder-card__act:hover, .file-card__act:hover { background: #eef2f8; color: var(--ink); }
@media (hover: none) { .folder-card__act, .file-card__act { opacity: 1; } }

.empty-drive { text-align: center; padding: 56px 20px; }
.empty-drive__icon {
  width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  background: var(--blue-soft); color: var(--blue);
}
.empty-drive h3 { margin: 0 0 6px; font-size: 18px; }
.empty-drive p { margin: 0 0 18px; color: var(--grey-text); }

/* header-knoppen naast elkaar */
.head-actions { display: flex; gap: 10px; }
.upload-btn--ghost { color: #55607a; background: #f3f6fb; border-color: var(--grey-line); }
.upload-btn--ghost:hover { background: #e8edf5; }


/* ---------- Sleep-om-te-uploaden ---------- */
.drop-overlay {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center;
  background: rgba(37,99,235,0.16); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.drop-overlay.show { display: flex; }
.drop-overlay__box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 44px 60px; border-radius: 22px; text-align: center;
  background: rgba(255,255,255,0.96); border: 2.5px dashed var(--blue);
  box-shadow: 0 24px 60px rgba(37,99,235,0.28); color: var(--ink); font-weight: 600;
}
.drop-overlay__box i { font-size: 42px; color: var(--blue); }
.drop-overlay__box strong { color: var(--blue-dark); }

/* ---------- Bestandsgroepen ---------- */
.group-head { display: flex; align-items: center; gap: 11px; margin: 26px 0 6px; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.group-head__ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; background: var(--blue-soft); color: var(--blue); }
.group-head__line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--grey-line), transparent); }
.group-count { font-size: 12px; font-weight: 700; color: var(--grey-text); background: #eef1f6; padding: 1px 9px; border-radius: 99px; }
.group-head--photos   .group-head__ic { background: #eef7ff; color: #2563eb; }
.group-head--videos   .group-head__ic { background: #f3f0ff; color: #7c3aed; }
.group-head--audio    .group-head__ic { background: #fdf2f8; color: #db2777; }
.group-head--docs     .group-head__ic { background: #eef4ff; color: #2563eb; }
.group-head--archives .group-head__ic { background: #fef7e6; color: #b8860b; }
.group-head--other    .group-head__ic { background: #eef1f6; color: #64748b; }
.group-head--folders  .group-head__ic { background: #fef7e6; color: #f59e0b; }

/* ---------- Kleine/confirm modal ---------- */
.modal--sm { max-width: 400px; }
.btn--danger { background: linear-gradient(135deg, #f87171, #dc2626) !important; box-shadow: 0 10px 22px rgba(220,38,38,0.28) !important; }
.confirm__body { padding: 26px 24px 6px; text-align: center; }
.confirm__icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--blue-soft); color: var(--blue); }
.confirm__icon--danger { background: #fef2f2; color: var(--danger); }
.confirm__title { margin: 0 0 6px; font-size: 18px; }
.confirm__msg { margin: 0; color: var(--grey-text); font-size: 14px; line-height: 1.5; }
.confirm__foot { display: flex; justify-content: center; gap: 10px; padding: 20px 24px 24px; }
.confirm__foot .btn, .confirm__foot .btn-ghost { width: auto; margin: 0; padding: 12px 24px; }

/* ---------- Upload-voortgang ---------- */
.upload-modal { padding: 28px 26px 26px; text-align: center; }
.upload-modal__icon { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 23px; background: var(--blue-soft); color: var(--blue); }
.upload-modal h3 { margin: 0 0 16px; font-size: 17px; }
.progress { height: 10px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.progress__bar { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--blue-light), var(--blue-dark)); transition: width .2s ease; }
.upload-modal__pct { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--blue-dark); }
.upload-modal__bytes { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--grey-text); font-variant-numeric: tabular-nums; }

/* ---------- Live-sync "bijgewerkt"-melding ---------- */
.sync-pop {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  z-index: 3000; display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 99px;
  background: #0f172a; color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.sync-pop.show { opacity: 1; transform: translate(-50%, 0); }
.sync-pop i { color: #60a5fa; }

/* ---------- Bestand-/fotoviewer ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(8,12,22,0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  flex-direction: column;
}
.viewer.open { display: flex; }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; color: #fff; }
.viewer__title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.viewer__name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__count { flex: none; font-size: 12px; color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.12); padding: 2px 9px; border-radius: 99px; }
.viewer__tools { display: flex; gap: 8px; flex: none; }
.viewer__btn {
  width: 40px; height: 40px; border-radius: 10px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  background: rgba(255,255,255,0.12); color: #fff; text-decoration: none;
  transition: background .13s;
}
.viewer__btn:hover { background: rgba(255,255,255,0.22); }
.viewer__stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 16px 20px; min-height: 0; }
.viewer__stage img { max-width: 92vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.viewer__stage video { max-width: 92vw; max-height: 82vh; border-radius: 8px; }
.viewer__stage iframe { width: 92vw; height: 82vh; border: none; border-radius: 8px; background: #fff; }
.viewer__stage audio { width: min(92vw, 520px); }
.viewer__none { text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.viewer__none i { font-size: 60px; opacity: .5; }
.viewer__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.14); color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center; transition: background .13s;
}
.viewer__nav:hover { background: rgba(255,255,255,0.26); }
.viewer__nav--prev { left: 16px; }
.viewer__nav--next { right: 16px; }
@media (max-width: 620px) { .viewer__nav { width: 40px; height: 40px; } .viewer__nav--prev { left: 8px; } .viewer__nav--next { right: 8px; } }

/* Immersieve modus (touch): alleen de foto, chrome eromheen weg — tik om te tonen/verbergen */
.viewer__bar { transition: opacity .22s ease, transform .22s ease; }
.viewer__nav { transition: opacity .22s ease, background .13s; }
.viewer.immersive { background: #000; }
.viewer.immersive .viewer__bar { opacity: 0; pointer-events: none; transform: translateY(-100%); }
.viewer.immersive .viewer__nav { opacity: 0; pointer-events: none; }
.viewer.immersive .viewer__stage { padding: 0; }
.viewer.immersive .viewer__stage img,
.viewer.immersive .viewer__stage video { max-width: 100vw; max-height: 100vh; border-radius: 0; box-shadow: none; }

/* ---------- App bottom-nav (mobiel) ---------- */
.bottom-nav { display: none; }
@media (max-width: 820px) {
  .bottom-nav {
    display: flex; align-items: flex-start; justify-content: space-around;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.94);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid #e6eaf0; box-shadow: 0 -6px 22px rgba(15,23,42,0.07);
  }
  .bn-item {
    flex: 1; min-width: 0; background: none; border: none; cursor: pointer; text-decoration: none;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: #9aa6b6; font-size: 10px; font-weight: 600; padding: 4px 0; font-family: inherit;
    transition: color .15s;
  }
  .bn-item i { font-size: 18px; }
  .bn-item.active { color: var(--blue-dark); }
  .bn-fab {
    flex: 0 0 auto; width: 52px; height: 52px; margin: -20px 4px 0; border: none; cursor: pointer;
    border-radius: 50%; background: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
    color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(29,78,216,0.42); transition: transform .1s;
  }
  .bn-fab:active { transform: scale(0.93); }
  .app-main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (display-mode: standalone) {
  .mobile-topbar { padding-top: env(safe-area-inset-top); }
}

/* ---------- Mappen-toegang (user.php deel-sectie) ---------- */
.share-list {
  margin-top: 8px; max-height: 220px; overflow-y: auto;
  border: 1px solid #e6eaf0; border-radius: 12px; padding: 6px; background: #fbfcfe;
  display: flex; flex-direction: column; gap: 2px;
}
.share-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  cursor: pointer; transition: background .12s;
}
.share-item:hover { background: #eef3fb; }
.share-item input { width: 17px; height: 17px; accent-color: var(--blue-dark); cursor: pointer; flex: none; }
.share-item__ic { color: #f59e0b; font-size: 14px; flex: none; }
.share-item__name { font-weight: 600; font-size: 13px; color: var(--ink); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-item__owner { font-size: 11px; color: var(--grey-text); flex: none; display: flex; align-items: center; gap: 4px; }
.share-item__owner i { font-size: 10px; }
.share-empty { margin: 8px 0 0; font-size: 13px; color: var(--grey-text); }
/* Gedeeld-badge op een mapkaart */
.shared-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700;
  color: #0e7490; background: #cffafe; padding: 2px 7px; border-radius: 99px;
}

/* Alleen-lezen badge in de page-header (gedeelde map) */
.ro-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 10px;
  background: #cffafe; color: #0e7490; font-weight: 700; font-size: 13px; white-space: nowrap;
}

/* ---------- Verplaats-modal (bestand naar map) ---------- */
.move-file-name { margin: 0 0 12px; font-weight: 600; color: var(--ink); font-size: 14px; }
.move-list {
  max-height: 300px; overflow-y: auto; border: 1px solid #e6eaf0; border-radius: 12px;
  padding: 6px; background: #fbfcfe; display: flex; flex-direction: column; gap: 2px;
}
.move-opt {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  cursor: pointer; transition: background .12s;
}
.move-opt:hover { background: #eef3fb; }
.move-opt input { width: 16px; height: 16px; accent-color: var(--blue-dark); cursor: pointer; flex: none; }
.move-opt__ic { color: #f59e0b; font-size: 14px; flex: none; }
.move-opt[data-fid="0"] .move-opt__ic { color: var(--blue-dark); }
.move-opt__name { font-weight: 600; font-size: 13px; color: var(--ink); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move-opt__hint { font-weight: 400; font-size: 11px; color: var(--grey-text); margin-left: 6px; }
.move-opt.disabled { opacity: .4; pointer-events: none; }

/* ---------- Slepen-en-neerzetten (verplaatsen) ---------- */
.folder-card[draggable="true"], .file-card[draggable="true"] { cursor: grab; }
.folder-card.dragging, .file-card.dragging { opacity: .4; }
.crumb.drop-hover, .folder-card.drop-hover {
  background: #e6efff !important; box-shadow: inset 0 0 0 2px var(--blue-dark);
  border-radius: 8px; color: var(--blue-dark) !important;
}
body.dnd-active .crumb[data-folder-id] { box-shadow: inset 0 0 0 1px #c7d6f0; }

/* ---------- Meerdere selecteren ---------- */
.folder-card, .file-card { position: relative; }
.card-check {
  position: absolute; top: 8px; left: 8px; z-index: 3; padding: 0;
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbd5e1;
  background: rgba(255,255,255,.92); color: transparent; font-size: 10px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transition: opacity .12s, background .12s, border-color .12s;
}
.folder-card:hover .card-check, .file-card:hover .card-check,
body.has-selection .card-check { opacity: 1; }
.folder-card.selected .card-check, .file-card.selected .card-check {
  opacity: 1; background: var(--blue-dark); border-color: var(--blue-dark); color: #fff;
}
.folder-card.selected, .file-card.selected { box-shadow: 0 0 0 2px var(--blue-dark); }

/* Selectie-actiebalk */
.sel-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 24px);
  z-index: 80; display: flex; align-items: center; gap: 14px;
  background: #0f172a; color: #fff; padding: 10px 12px 10px 18px; border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.32); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.sel-bar.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.sel-bar__count { font-weight: 600; font-size: 14px; white-space: nowrap; }
.sel-bar__count i { color: #60a5fa; margin-right: 4px; }
.sel-bar__actions { display: flex; gap: 8px; }
.sel-bar__btn {
  border: none; cursor: pointer; border-radius: 9px; padding: 9px 14px; font-weight: 600;
  font-size: 13px; background: rgba(255,255,255,.14); color: #fff; font-family: inherit;
  display: flex; align-items: center; gap: 7px;
}
.sel-bar__btn:hover { background: rgba(255,255,255,.26); }
.sel-bar__btn--ghost { padding: 9px 11px; }
@media (max-width: 820px) {
  .sel-bar { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom));
             transform: translateY(24px); justify-content: space-between; }
  .sel-bar.show { transform: translateY(0); }
}

/* Geknipte items (Ctrl+X) + rode bulk-verwijderknop */
.folder-card.card-cut, .file-card.card-cut { opacity: .45; }
.sel-bar__btn--danger:hover { background: #dc2626; }
