
:root{ --green:#31b057; --ink:#222; --muted:#6b7280; --bg:#fff }
*{ box-sizing:border-box }
body{ margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; color:var(--ink); background:var(--bg) }

.masthead{ position:sticky; top:0; z-index:10; background:rgba(255,255,255,.96); backdrop-filter:saturate(180%) blur(6px); border-bottom:1px solid #e5e7eb }
.brandline{ display:flex; align-items:center; gap:10px; padding:10px 16px; font-weight:700 }
.brandline .title{ font-size:18px }
.brandline .welcome{ margin-left:auto; font-weight:500; color:var(--muted) }

.menubar{ display:flex; gap:8px; padding:8px 16px; border-top:1px solid #f1f5f9; border-bottom:1px solid #e5e7eb; flex-wrap:wrap; align-items:center }
.menubar .spacer{ flex:1 }
.menubar button{ padding:8px 12px; border:1px solid #e5e7eb; background:#fff; border-radius:8px; cursor:pointer }
.menubar button.active{ background:var(--green); border-color:var(--green); color:#fff }
.inline{ display:flex; gap:8px; flex-wrap:wrap }

.container{ max-width:1100px; margin:16px auto; padding:0 16px }
.footer{ padding:16px; border-top:1px solid #e5e7eb; color:var(--muted); text-align:center }

.grid-7{ display:grid; grid-template-columns: repeat(7, 1fr); gap:8px }
@media (max-width: 1024px){ .grid-7{ grid-template-columns: repeat(4, 1fr) } }
@media (max-width: 780px){ .grid-7{ grid-template-columns: repeat(2, 1fr) } }

.day{ border:1px solid #e5e7eb; border-radius:12px; padding:8px; min-height:160px; display:flex; flex-direction:column }
.day.weekend{ background:#fafafa }
.date-label{ display:inline-block; background:#e5f7ed; color:#111; padding:2px 8px; border-radius:8px; font-size:12px; margin-bottom:6px }
.card{ border:1px solid #e5e7eb; border-radius:10px; padding:8px }
.bold{ font-weight:600 }
.muted{ color:var(--muted); font-size:12px }
.primary{ background:var(--green); color:#fff; border:0; border-radius:8px; padding:6px 10px; cursor:pointer }
.small{ background:#fff; color:#111; border:1px solid #e5e7eb; border-radius:8px; padding:6px 10px; cursor:pointer }

.list{ display:grid; gap:12px }
.row{ display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid #e5e7eb; border-radius:12px; padding:12px }
input, select{ padding:8px 10px; border:1px solid #e5e7eb; border-radius:8px }
.actions{ display:flex; gap:8px; flex-wrap:wrap }
hr{ border:0; border-top:1px solid #e5e7eb; margin:16px 0 }

/* menu-knoppen niet tegen elkaar plakken */
.menubar .navbtn, .menubar button {
  margin-right: 6px;
}

/* Buttons */
button.primary {
  background:#16a34a; color:#fff; border:1px solid #15803d;
}
button.primary:hover { filter: brightness(0.95); }


/* maand-header in weekkalender netjes uitgelijnd */
.card-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
}
.card-header .card-title { text-align: center; font-weight: 600; }
.card-header .icon {
  width: 36px; height: 32px;
  border: 1px solid #e5e7eb; background: #f9fafb; border-radius: 6px;
}
.card-header .icon:disabled { opacity: .5; }

/* Eenvoudige form-grid voor “Mijn gegevens” */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* GEEN vaste 220px meer */
  gap: 12px;
  max-width: 720px;
  width: 100%;
}

.form-grid input[type="text"],
.form-grid input[type="email"],
.form-grid input[type="password"] {
  width: 100%;
  height: 34px;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}


/* Submenu beheer */
.subnav{ display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 12px; border-bottom:1px solid #e5e7eb; padding-bottom:8px; }
.subnav button{ border:1px solid #e5e7eb; background:#f9fafb; padding:6px 10px; border-radius:8px; }
.subnav button.active{ background:#e0f2fe; border-color:#7dd3fc; }

.list.compact .row { padding:6px 8px; }
.chip { display:inline-block; padding:2px 6px; border-radius:10px; background:#eef6ff; font-size:12px; margin-right:4px; }

/* Basis layout: sticky footer */
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.container { flex: 1 0 auto; }

/* Groene footerbalk zoals in npm-versie (pas kleur indien nodig) */
.footer {
  flex-shrink: 0;
  background: #cfead1; /* lichtgroen; tweaken naar jouw exact tint */
  color: #1f2937;      /* donkergrijs */
  border-top: 1px solid #b7d9ba;
  padding: 10px 16px;
}

/* Header menuknoppen wat lucht */
.menubar button { margin-right: 6px; }

/* login pagina */
.center-card {
  max-width: 420px;
  margin: 48px auto;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}
.center-card .stack { display: grid; gap: 10px; }
.center-card input { width: 100%; }


/* Logboek */
.log-form textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px;
  resize: vertical;
  font-family: inherit;
}

.log-card {
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:12px;
  margin-bottom:10px;
  background:#fff;
}
.log-card .log-body {
  white-space: pre-wrap;
  line-height: 1.4;
  margin-bottom: 6px;
}
.log-card .log-meta {
  display:flex; gap:8px; flex-wrap:wrap;
  font-size:12px; color:#6b7280;
  margin-bottom: 6px;
}
.log-card .log-actions {
  display:flex; gap:8px; align-items:center;
}
button.danger { background:#c62828; color:#fff; border: none; }
button.danger:hover { filter: brightness(0.95); }

/* Einde Logboek */

/* History */

#beheerContent .table td, 
#beheerContent .table th { white-space: nowrap; }
#beheerContent .table td:nth-child(4) { white-space: normal; }
#beheerContent .pager { margin-top: 8px; display: flex; gap: 8px; align-items: center; }

#beheer-body .table th,
#beheer-body .table td { padding-right: 16px; vertical-align: top; }
#beheer-body .table td:last-child { white-space: normal; }

/* Einde History */


/* Wedstrijden cards grid (zoals npm) */
.cards-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card-wedstrijd {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}
.card-wedstrijd .title {
  font-weight: 600;
  margin-bottom: 4px;
}
.trophy { font-size: 1rem; }

.card-wedstrijd .meta {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.card-wedstrijd .shift {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  margin-top: 6px;
}
.card-wedstrijd .shift .t {
  font-size: 0.95rem;
}
.card-wedstrijd .shift .claim {
  margin-left: 8px;
}
@media (min-width: 1200px) {
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 899px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 599px) {
  .cards-grid { grid-template-columns: 1fr; }
}

.month-grid.no-header{
  display:grid;
  gap:8px;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* telefoons: altijd 2 */
}
/* pas vanaf echt tablet-breedte naar 3 kolommen */
@media (min-width: 900px){
  .month-grid.no-header{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* desktop */
@media (min-width: 1200px){
  .month-grid.no-header{ grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

.month-grid .day{
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  min-height: 110px;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.month-grid .day.weekend{ background: #fafafa; }
.month-grid .day.past{ opacity: .6; }
.month-grid .date-label{
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: #16a34a; /* groen */
  color: #fff;
  font-size: 12px;
}
.month-grid .day.past .date-label{
  background: #e5e7eb; color: #525252;
}
/* Vandaag subtiel highlighten en fijn scroll-ankerpunt */
.month-grid .day.today{
  border-color:#16a34a;
  box-shadow: 0 0 0 2px rgba(22,163,74,0.12) inset;
  scroll-margin-top: 72px; /* valt net onder sticky header */
}

/* gebruikers aanpassen */
.list.compact .row { gap: 12px; align-items: center; }
.list.compact .row > .muted { font-size: 12px; }
.grid-2 { display:grid; gap:8px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 640px){ .grid-2 { grid-template-columns: 1fr; } }
button.danger { background:#c62828; color:#fff; border: none; }
button.danger:hover { filter: brightness(0.95); }

/* Compact edit-venster boven de lijst */
.edit-user .card-header .card-title{
  font-weight: 600;
}

.edit-user .grid-compact{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.edit-user .grid-compact label{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.edit-user .grid-compact label.wide{
  grid-column: 1 / -1;
}
@media (max-width: 640px){
  .edit-user .grid-compact{
    grid-template-columns: 1fr;
  }
}

.edit-actions{
  display: flex;
  justify-content: flex-start;   /* altijd links */
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;               /* voorkomt afvallen op mobiel */
}

.edit-actions .spacer{
  display: none;                 /* spacer uitschakelen */
}

@media (max-width: 640px){
  .edit-actions button{
    width: 100%;    /* knop volle breedte op mobiel */
  }
}

/* lijst compacter */
.beheer-users .list.compact .row{
  align-items: flex-start;
}


.masthead, .brandline, .menubar { position: relative; z-index: 5; }
.menubar button { pointer-events: auto; }

/* Sticky hoofdmenu/header */
.masthead{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;               /* of jouw thema-kleur */
  border-bottom: 1px solid #e5e7eb;
  /* optioneel: licht glas-effect */
  /* backdrop-filter: saturate(180%) blur(8px); */
}

:root { --masthead-h: 56px; } /* fallback */

.masthead {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Laat de browser rekening houden met de hoogte van de sticky header
   bij scrollIntoView / ankers / handmatige scrolls */
html, body {
  scroll-padding-top: calc(var(--masthead-h, 56px) + 8px);
}

/* Zorg dat de 'today'-tegel altijd net onder de sticky header landt */
.month-grid .day.today{
  scroll-margin-top: calc(var(--masthead-h, 56px) + 8px);
}


/* Zorgt ervoor dat scrollIntoView de header-hoogte respecteert */
.month-grid .day { 
  scroll-margin-top: calc(var(--masthead-h) + 8px);
}


/* Zorg dat sticky kan werken: geen overflow op voorouders */
body, html { overflow-x: hidden; }


/* --- Hard lock: telefoon in portrait altijd 2 kolommen --- */
@media (orientation: portrait) {
  .month-grid.no-header{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Telefoon in landscape: 3 kolommen mag (past goed) */
@media (orientation: landscape) and (max-width: 900px){
  .month-grid.no-header{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Desktop blijft 7 kolommen; geef dit ook wat gewicht */
@media (min-width: 1200px){
  .month-grid.no-header{
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }
}
