:root{
  --jacops-red:#d71920;
  --jacops-red-dark:#b51218;
  --ink:#171c22;
  --muted:#69727d;
  --line:#dfe4e8;
  --bg:#f4f6f8;
  --white:#fff;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--ink);
  background:var(--bg);
}

/* HEADER */
.topbar{
  background:#fff;
  border-bottom:1px solid var(--line);
  box-shadow:0 2px 10px rgba(0,0,0,.04);
}

.topbar-inner{
  max-width:1240px;
  margin:auto;
  min-height:92px;
  padding:12px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
}

.brand{
  display:flex;
  align-items:center;
  gap:20px;
  text-decoration:none;
  color:inherit;
}

.brand-logo{
  width:auto;
  height:58px;
  max-width:220px;
  object-fit:contain;
}

.brand-divider{
  height:55px;
  width:1px;
  background:#ccd2d8;
}

.brand-text{
  display:flex;
  flex-direction:column;
}

.brand-text strong{
  color:var(--jacops-red);
  font-size:26px;
  line-height:1.1;
}

.brand-text span{
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
}

/* NAVIGATIE */
.main-nav{
  display:flex;
  align-items:stretch;
  align-self:stretch;
}

.main-nav a{
  display:flex;
  align-items:center;
  padding:0 18px;
  color:#242a30;
  text-decoration:none;
  font-weight:600;
  border-bottom:4px solid transparent;
  transition:.15s;
}

.main-nav a:hover{
  color:var(--jacops-red);
  border-bottom-color:var(--jacops-red);
  background:#fafafa;
}

/* PAGINA */
.page{
  max-width:1160px;
  min-height:calc(100vh - 165px);
  margin:0 auto;
  padding:38px 22px 55px;
}

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:28px;
  box-shadow:0 6px 22px rgba(24,31,38,.06);
}

h1{
  margin-top:0;
  color:#15191e;
  font-size:30px;
}

h2,h3{
  color:#1d2228;
}

/* FORMULIER */
.formgrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px 20px;
}

.formgrid label{
  display:flex;
  flex-direction:column;
  gap:7px;
  font-weight:700;
}

.formgrid input,
.formgrid select{
  width:100%;
  min-height:44px;
  padding:10px 12px;
  border:1px solid #cbd3da;
  border-radius:7px;
  background:#fff;
  color:#171c22;
  font-size:15px;
}

.formgrid input:focus,
.formgrid select:focus{
  outline:none;
  border-color:var(--jacops-red);
  box-shadow:0 0 0 3px rgba(215,25,32,.10);
}

.wide{
  grid-column:1/-1;
}

fieldset{
  border:1px solid #d7dde2;
  border-radius:9px;
  padding:17px 18px;
  margin:3px 0;
}

legend{
  padding:0 8px;
  font-weight:700;
}

label.check{
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
  margin:5px 22px 5px 0;
  font-weight:600;
}

label.check input{
  width:auto;
  min-height:auto;
}

/* KNOPPEN */
button,
.button{
  display:inline-block;
  border:0;
  border-radius:7px;
  padding:11px 17px;
  background:var(--jacops-red);
  color:#fff;
  font-weight:700;
  font-size:14px;
  text-decoration:none;
  cursor:pointer;
}

button:hover,
.button:hover{
  background:var(--jacops-red-dark);
}

button.secondary,
.button.secondary{
  background:#eef1f3;
  color:#20252a;
}

button.secondary:hover,
.button.secondary:hover{
  background:#dfe4e8;
}

.actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* TABELLEN */
table{
  width:100%;
  border-collapse:collapse;
}

th{
  text-align:left;
  background:#f4f5f6;
  border-bottom:2px solid var(--jacops-red);
  padding:12px;
}

td{
  padding:12px;
  border-bottom:1px solid #e5e8eb;
}

/* MELDINGEN */
.flash-container{
  margin-bottom:20px;
}

.flash{
  padding:13px 16px;
  border-radius:8px;
  border-left:5px solid #68717b;
  background:#fff;
}

.flash.ok{
  border-left-color:#2b8a3e;
}

.flash.error{
  border-left-color:var(--jacops-red);
  background:#fff5f5;
}

/* FOOTER */
.footer{
  min-height:72px;
  background:#191e23;
  color:#d9dde1;
  padding:0 30px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  font-size:13px;
}

.footer strong{
  color:#fff;
}

/* MOBIEL */
@media(max-width:800px){
  .topbar-inner{
    flex-direction:column;
    align-items:flex-start;
  }

  .main-nav{
    width:100%;
    overflow-x:auto;
  }

  .main-nav a{
    min-height:48px;
    padding:0 12px;
  }

  .brand-logo{
    height:45px;
    max-width:160px;
  }

  .brand-divider{
    height:45px;
  }

  .brand-text strong{
    font-size:20px;
  }

  .formgrid{
    grid-template-columns:1fr;
  }

  .wide{
    grid-column:1;
  }

  .footer{
    flex-direction:column;
    justify-content:center;
    padding:18px;
  }
}
/* ===== DASHBOARD ===== */

.hero{
  margin-bottom:28px;
}

.hero h1{
  margin:0 0 8px;
  font-size:32px;
}

.hero p{
  margin:0;
  color:var(--muted);
  font-size:16px;
}

.badge{
  display:inline-flex;
  align-items:center;
  margin:0 0 26px;
  padding:7px 12px;
  border-radius:999px;
  background:#fdebec;
  color:var(--jacops-red-dark);
  border:1px solid #f3c5c7;
  font-size:13px;
  font-weight:700;
}

/* Modulekaarten */
.grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
}

.module.card{
  display:flex;
  flex-direction:column;
  min-height:190px;
  padding:25px;
  color:var(--ink);
  text-decoration:none;
  border-top:4px solid var(--jacops-red);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.module.card:hover{
  transform:translateY(-3px);
  box-shadow:0 10px 28px rgba(24,31,38,.11);
  border-color:var(--jacops-red-dark);
}

.module.card h2{
  margin:0 0 12px;
  font-size:22px;
  color:#171c22;
}

.module.card p{
  margin:0 0 25px;
  color:var(--muted);
  line-height:1.55;
  flex:1;
}

.module.card span{
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  padding:9px 14px;
  border-radius:7px;
  background:var(--jacops-red);
  color:#fff;
  font-weight:700;
  font-size:14px;
}

/* Laatste kaart mag bij oneven aantal mooi uitlijnen */
.grid .module.card:last-child:nth-child(odd){
  grid-column:1 / -1;
}

/* Dashboard mobiel */
@media(max-width:800px){
  .grid{
    grid-template-columns:1fr;
  }

  .grid .module.card:last-child:nth-child(odd){
    grid-column:auto;
  }

  .module.card{
    min-height:160px;
  }

  .hero h1{
    font-size:27px;
  }
}
