.crew-kalender-controls{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin: 10px 0 14px 0;
}
.ck-month-nav{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.ck-nav-btn{
  min-width:34px;
  padding:4px 10px !important;
  line-height:1 !important;
}
.ck-month-title{
  min-width:180px;
  text-align:center;
  font-size:16px;
  line-height:1.2;
}
.crew-kalender-controls label{
  display:flex;
  gap:8px;
  align-items:center;
}
.crew-kalender-table-wrap{
  --ck-sticky-header-height: 34px;
  overflow-x:auto;
  overflow-y:auto;
  max-height:70vh;
}
.crew-kalender-table{
  border-collapse:collapse;
  width:100%;
  min-width: 900px;
}
.crew-kalender .crew-kalender-table th,
.crew-kalender .crew-kalender-table td{
  border:1px solid #e5e5e5;
  padding:4px !important;
  line-height:1.2 !important;
  vertical-align:middle;
}
.ck-label{
  white-space:nowrap;
  font-weight:600;
  background:#fafafa;
}
.ck-header .ck-day{
  text-align:center;
  font-weight:600;
  font-size:12px;
  padding:2px 4px !important;
  line-height:1.1 !important;
  position:sticky;
  top:0;
  z-index:4;
  background:#fff;
}
.ck-event-row .ck-event-cell{
  position:sticky;
  top:var(--ck-sticky-header-height);
  z-index:3;
  background:#fff;
}
.ck-header .ck-weekend{
  background:#ffffff;
  color:#dd3333;
}
.ck-header .ck-day.ck-today{
  background:#e0e0e0;
  color:#111;
}
.ck-cell{
  width:28px;
  height:26px !important;
  padding:0 !important;
  text-align:center;
  position:relative;
}
.ck-block{
  background:#d8d8d8;
}
.ck-event-name{
  font-size:11px;
  line-height:1.1;
  display:inline-block;
  max-width: 120px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ck-selected{
  outline:2px solid #222;
  outline-offset:-2px;
}
.crew-kalender-actions{
  margin-top:24px;
  display:flex;
  gap:24px;
}
.crew-kalender-notice{
  padding:10px 12px;
  border:1px solid #ddd;
  border-radius:10px;
  background:#fff8e5;
}

/* Modal */
.crew-kalender-modal{
  position:fixed;
  inset:0;
  z-index:99999;
}
.crew-kalender-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
}
.crew-kalender-modal__panel{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(560px, 92vw);
  background:#fff;
  border-radius:14px;
  padding:18px;
}
.crew-kalender-modal__row{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin:10px 0 12px 0;
}
.crew-kalender-modal__row label{
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:1;
  min-width: 220px;
}
.crew-kalender-modal__actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:10px;
}
.crew-kalender-modal__hint{
  font-size:12px;
  opacity:.75;
  margin-top:10px;
}


.ck-export-buttons{display:flex;gap:8px;align-items:center}
.ck-legend{margin:8px 0 12px 0;padding:10px 12px;border:1px solid #eee;border-radius:12px;background:#fafafa}
.ck-legend__title{font-weight:700;margin:0 0 6px 0}
.ck-legend__items{display:flex;flex-wrap:wrap;gap:10px}
.ck-legend__item{display:inline-flex;gap:6px;align-items:center;font-size:13px}
.ck-legend__swatch{width:14px;height:14px;border-radius:4px;border:1px solid rgba(0,0,0,.12)}
.ck-tooltip-float{position:absolute;z-index:99999;background:#111;color:#fff;padding:6px 8px;border-radius:8px;font-size:12px;white-space:nowrap;pointer-events:none;box-shadow:0 8px 20px rgba(0,0,0,.25)}
.ck-comment-indicator{
  display:inline-block;
  width:10px;
  height:8px;
  margin-left:5px;
  vertical-align:middle;
  border:1px solid currentColor;
  border-radius:3px;
  position:relative;
  opacity:.95;
}
.ck-comment-indicator:after{
  content:'';
  position:absolute;
  left:2px;
  bottom:-4px;
  width:0;
  height:0;
  border-left:3px solid transparent;
  border-right:1px solid transparent;
  border-top:4px solid currentColor;
}
.ck-comment-link{
  cursor:pointer;
}
.ck-comment-indicator--cell{
  position:absolute;
  top:2px;
  right:2px;
  margin-left:0;
}

@media (max-width: 640px){
  .crew-kalender .crew-kalender-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
  }
  .crew-kalender .crew-kalender-actions [data-ck-action="create"],
  .crew-kalender .crew-kalender-actions [data-ck-action="delete"]{
    flex:0 0 calc(50% - 5px);
  }
  .crew-kalender .crew-kalender-actions [data-ck-action="info"],
  .crew-kalender .crew-kalender-actions [data-ck-action="comment"],
  .crew-kalender .crew-kalender-actions [data-ck-action="absence"]{
    flex:0 0 calc(33.333% - 6.7px);
  }
}
