:root{
  --bg:#f4f6f8;
  --card:#ffffff;
  --text:#17202a;
  --muted:#6b7280;
  --line:#e5e7eb;
  --line-strong:#d1d5db;
  --accent:#0f766e;
  --accent-soft:#ecfdf5;
  --danger:#b91c1c;
  --danger-soft:#fef2f2;
  --shadow:0 8px 24px rgba(15,23,42,.06);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.45;
}
header{
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:30;
  backdrop-filter:blur(8px);
}
.wrap{
  max-width:1320px;
  margin:0 auto;
  padding:18px 20px;
}
h1{
  margin:0 0 3px;
  font-size:25px;
  line-height:1.2;
  letter-spacing:-.02em;
}
h2{
  margin:0 0 12px;
  font-size:18px;
  letter-spacing:-.01em;
}
.sub{
  color:var(--muted);
  font-size:14px;
}
nav{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:16px;
}
nav button,.btn{
  border:1px solid var(--line-strong);
  background:#fff;
  color:var(--text);
  padding:9px 12px;
  border-radius:10px;
  cursor:pointer;
  font:inherit;
  font-size:14px;
  transition:.16s ease;
}
nav button:hover,.btn:hover{
  transform:translateY(-1px);
  border-color:#9ca3af;
}
nav button.active,.btn.primary{
  background:var(--accent);
  color:#fff;
  border-color:var(--accent);
}
.btn.danger{
  color:var(--danger);
  background:#fff;
  border-color:#fecaca;
}
.btn.danger:hover{
  background:var(--danger-soft);
}
.btn.small{
  padding:6px 9px;
  font-size:12px;
  white-space:nowrap;
}
main{
  max-width:1320px;
  margin:0 auto;
  padding:24px 20px 36px;
}
.tab{display:none}
.tab.active{display:block}
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px;
  box-shadow:var(--shadow);
}
.stat{
  font-size:30px;
  font-weight:750;
  margin-top:4px;
}
.muted{color:var(--muted)}
.toolbar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 14px;
  align-items:center;
}
.section{margin:22px 0}
label{
  display:block;
  font-size:13px;
  font-weight:650;
  margin-bottom:6px;
}
input,select,textarea{
  width:100%;
  min-width:0;
  padding:9px 10px;
  border:1px solid var(--line-strong);
  border-radius:9px;
  background:#fff;
  color:var(--text);
  font:inherit;
  font-size:14px;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(15,118,110,.10);
}
textarea{
  min-height:42px;
  resize:vertical;
}
.table-wrap{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:auto;
  box-shadow:var(--shadow);
}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
}
th,td{
  padding:10px 9px;
  border-bottom:1px solid var(--line);
  vertical-align:middle;
  text-align:left;
  font-size:14px;
}
th{
  background:#f8fafc;
  font-weight:700;
  color:#111827;
  position:static;
  z-index:auto;
}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:#fcfcfd}
td input,td select,td textarea{
  width:100%;
  min-width:0;
}
td textarea{min-height:38px}
.row-actions{
  display:flex;
  gap:5px;
  justify-content:flex-end;
}
.empty{
  padding:24px;
  text-align:center;
  color:var(--muted);
}
.file-item{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
.file-item:last-child{border-bottom:0}
.file-meta{
  font-size:12px;
  color:var(--muted);
  margin-top:3px;
}
.badge{
  display:inline-block;
  padding:3px 7px;
  border-radius:999px;
  background:#eef2ff;
  font-size:12px;
}

/* Kolombreedtes per tabel */
#draaiboek table,#acties table,#personen table,#vrijwilligers table,#looplijsten table,#loten table,#begroting table{min-width:1050px}
#scheduleBody tr > *:nth-child(1), #scheduleBody ~ *{}
#draaiboek table th:nth-child(1){width:14%}
#draaiboek table th:nth-child(2){width:11%}
#draaiboek table th:nth-child(3){width:9%}
#draaiboek table th:nth-child(4){width:18%}
#draaiboek table th:nth-child(5){width:15%}
#draaiboek table th:nth-child(6){width:10%}
#draaiboek table th:nth-child(7){width:17%}
#draaiboek table th:nth-child(8){width:110px}

#acties table th:nth-child(1){width:14%}
#acties table th:nth-child(2){width:22%}
#acties table th:nth-child(3){width:15%}
#acties table th:nth-child(4){width:12%}
#acties table th:nth-child(5){width:10%}
#acties table th:nth-child(6){width:21%}
#acties table th:nth-child(7){width:110px}

#personen table th:nth-child(1){width:20%}
#personen table th:nth-child(2){width:27%}
#personen table th:nth-child(3){width:18%}
#personen table th:nth-child(4){width:29%}
#personen table th:nth-child(5){width:110px}


#vrijwilligers table th:nth-child(1){width:14%}
#vrijwilligers table th:nth-child(2){width:17%}
#vrijwilligers table th:nth-child(3){width:17%}
#vrijwilligers table th:nth-child(4){width:11%}
#vrijwilligers table th:nth-child(5){width:8%}
#vrijwilligers table th:nth-child(6){width:8%}
#vrijwilligers table th:nth-child(7){width:10%}
#vrijwilligers table th:nth-child(8){width:10%}
#vrijwilligers table th:nth-child(9){width:110px}

#looplijsten table th:nth-child(1){width:26%}
#looplijsten table th:nth-child(2){width:22%}
#looplijsten table th:nth-child(3){width:22%}
#looplijsten table th:nth-child(4){width:24%}
#looplijsten table th:nth-child(5){width:110px}

#loten table th:nth-child(1){width:23%}
#loten table th:nth-child(2){width:18%}
#loten table th:nth-child(3){width:18%}
#loten table th:nth-child(4){width:18%}
#loten table th:nth-child(5){width:17%}
#loten table th:nth-child(6){width:110px}

#begroting table th:nth-child(1){width:30%}
#begroting table th:nth-child(2){width:16%}
#begroting table th:nth-child(3){width:16%}
#begroting table th:nth-child(4){width:16%}
#begroting table th:nth-child(5){width:16%}
#begroting table th:nth-child(6){width:110px}

@media(max-width:900px){
  .wrap,main{padding-left:12px;padding-right:12px}
  h1{font-size:22px}
  nav{gap:6px}
  nav button{padding:8px 10px;font-size:13px}
  .table-wrap{border-radius:12px}
  #draaiboek table{min-width:1100px}
  #acties table{min-width:1000px}
  #personen table{min-width:820px}
  #vrijwilligers table{min-width:1200px}
  #looplijsten table{min-width:820px}
  #loten table{min-width:950px}
  #begroting table{min-width:900px}
}
@media(max-width:640px){
  main{padding-top:16px}
  .grid{grid-template-columns:1fr}
  .toolbar{align-items:stretch}
  .toolbar .btn{width:100%}
  .file-item{
    align-items:flex-start;
    flex-direction:column;
  }
  .row-actions{justify-content:flex-start}
  th{position:static}
}

/* Links die eruitzien als knop */
a.btn{display:inline-block;text-decoration:none;line-height:1.3}

/* Kopregel met ingelogde gebruiker */
.header-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.userbox{display:flex;align-items:center;gap:10px;font-size:13px}

/* Melding bovenaan (overzetten oude gegevens) */
.notice{margin-bottom:18px;border-color:#a7f3d0;background:var(--accent-soft)}

/* Inlogpagina */
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}
.login-card{width:100%;max-width:360px;display:flex;flex-direction:column}
.login-card h1{margin-bottom:4px}
.login-card p{margin:0 0 18px}
.login-card input{margin-bottom:14px}
.login-card .btn{margin-top:4px;padding:11px 12px}
.login-error{background:var(--danger-soft);color:var(--danger);border:1px solid #fecaca;border-radius:10px;padding:9px 11px;margin-bottom:14px;font-size:14px}
