:root {
  --font-base: 13px;
  --font-small: 12px;
  --font-tiny: 11px;

  /* linker kolommen */
  --planning-pl-width: 110px;
  --planning-project-width: 235px;

  /* Fallback for sticky offsets (updated dynamically via JS) */
  --planning-header-height: 64px;
}

body {
  font-family: system-ui, sans-serif;
  margin: 0 20px;
  font-size: var(--font-base);
}

/* HEADER BAR */

.planning-header-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0px;
  padding: 12px 0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Keep the calendar row sticky beneath the header bar */
.planning-header,
.calendar-day {
  position: sticky;
  top: var(--planning-header-height);
  z-index: 10;
  background: #f5f5f5;
}

.planning-header-bar h1 {
  color: #9c1c3d;
  margin: 0;
  line-height: 1;
  position: relative;
  top: -2px;
}

.planning-header-bar .left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.planning-header-bar .right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.planning-header-bar select,
.planning-header-bar input[type="date"] {
  padding: 4px 8px;
  font-size: var(--font-small);
}

#projectleider {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  margin-left: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.range {
  color: #444;
  white-space: nowrap;
}

/* GRID */

.planning-grid {
  display: grid;
  border-top: 1px solid #ddd;

  grid-template-columns:
    var(--planning-pl-width)
    var(--planning-project-width)
    repeat(30, 1fr) !important;
}

/* HEADER ROW */

.planning-header {
  font-weight: bold;
  background: #f5f5f5;
  padding: 4px;
  border-bottom: 1px solid #ddd;  
  text-align: right;
  padding-right: 12px;
}

/* PROJECTLEIDER KOLOM */

.planning-projectleider {
  padding: 4px;
  border-bottom: 1px solid #9c969648;
  font-size: var(--font-tiny);
  color: #444;
  text-align: left;
}

/* DOSSIER KOLOM */

.planning-dossier {
  padding: 4px;
  border-bottom: 1px solid #9c969648;
  text-align: right;
  padding-right: 12px;

  font-size: var(--font-base);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CELLS */

.planning-cell {
  border-bottom: 1px solid #9c969648;
}

/* KALENDER HEADER */

.calendar-day {
  text-align: center;
  font-size: 12px;
  padding: 6px 4px;
  border-bottom: 1px solid #ddd;
}

.calendar-day .day {
  font-weight: bold;
}

.calendar-day .weekday {
  font-size: 11px;
  color: #666;
}

/* EVENTS */

.plan-block {
  height: 22px;
  border-radius: 4px;
  margin: 3px 2px;

  color: #000;
  font-size: 11px;
  line-height: 24px;
  text-align: center;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* STATUS */

.status.inline {
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: var(--font-tiny);
  color: #b00020;
  white-space: nowrap;
  margin-left: 6px;
  min-width: 80px;
}

/* TITEL */

.planning-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.planning-logo {
  height: 28px;
  width: auto;
  display: block;
}

/* HEADER STRUCTUUR */

.planning-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.planning-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* LEGEND */

.planning-legend {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-tiny);
  white-space: nowrap;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* WEEKEND */

.calendar-day.weekend,
.planning-cell.weekend {
  background: #EBEBEB;
}

/* REFRESH BUTTON */

.refresh-btn {
  margin-left: 8px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f0f0f0;
  cursor: pointer;
}

.refresh-btn:hover {
  background: #e5e5e5;
}

/* LOGIN PAGE */

.login-page{
  display:flex;
  justify-content:center;
  align-items:center;
  height:100vh;
  background:#f6f6f6;
}

.login-box{
  background:white;
  padding:40px;
  border-radius:6px;
  box-shadow:0 2px 10px rgba(0,0,0,0.1);
  width:260px;
}

.login-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:40px;
  font-weight:bold;
  color:#9c1c3d;
  margin-bottom:25px;
}

.login-title img{
  height:40px;
}

.login-box input,
.login-box button{
  width:100%;
  padding:8px;
  margin-bottom:12px;
  border-radius:4px;
  font-size:14px;
  box-sizing:border-box;
}

.login-box input{
  border:1px solid #ccc;
}

.login-box button{
  background:#9c1c3d;
  color:white;
  border:none;
  cursor:pointer;
}

.login-box button:hover{
  background:#7e1530;
}

.login-error{
  color:#b00020;
  font-size:12px;
  margin-top:8px;
}