body{margin:0;font-family:Arial}
.topbar{height:50px;background:#1f2937;color:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 16px}
.dispatch-board{display:grid;grid-template-columns:320px 1fr;height:calc(100vh - 50px)}
.jobs-open{border-right:1px solid #ccc;padding:12px;overflow:auto}
.job-card{border:1px solid #ccc;padding:8px;margin-bottom:8px;background:#fafafa;cursor:grab}

/* Drop-Zone soll den gesamten linken Bereich abdecken */
#open-jobs{min-height:calc(100vh - 120px)}

/* HIER DER FIX */
.calendar{padding:12px;overflow:visible}

.calendar-toolbar{margin-bottom:8px}
.calendar-header,.calendar-row{display:grid;grid-template-columns:max-content repeat(7,1fr)}
.calendar-row{min-height:1.6em;align-items:stretch}
.calendar-cell{border:1px solid #ddd;min-height:1.6em;padding:4px 6px;position:relative;display:flex;align-items:center}
.calendar-cell.dropzone{flex-wrap:wrap;align-items:flex-start;align-content:flex-start;min-width:0;overflow:visible}
.tech-col{font-weight:bold;white-space:nowrap;padding-right:12px}
.job-bar{color:#000;font-size:12px;padding:2px 6px;border-radius:4px;margin:2px 0;line-height:1.4;min-width:0;display:flex;width:100%;align-items:center;justify-content:center;gap:2px;box-sizing:border-box;flex-shrink:0}
.job-bar.job-bar-span{max-width:none;position:relative;z-index:1}
.absence-bar.absence-bar-span{max-width:none;position:relative;z-index:1}
.calendar-row{overflow:visible}
.job-bar-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.absence-bar{font-size:12px;padding:2px 6px;border-radius:4px;margin:2px 0;line-height:1.4;min-width:0;display:flex;width:100%;align-items:center;justify-content:center;box-sizing:border-box;flex-shrink:0;background:#fff;color:#333;border:1px solid #ddd;background-image:repeating-linear-gradient(-45deg,transparent 0,transparent 3px,var(--stripes,#ccc) 3px,var(--stripes,#ccc) 5px)}
.absence-bar-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.absent{background:#fdd;color:#900;font-weight:bold;text-align:center}
.month-absence{font-size:11px;padding:2px 6px;border-radius:4px;margin:2px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#fff;color:#333;border:1px solid #ddd;background-image:repeating-linear-gradient(-45deg,transparent 0,transparent 3px,var(--stripes,#ccc) 3px,var(--stripes,#ccc) 5px)}

/* =========================
   MONTH VIEW
========================= */
.month-toolbar{margin:8px 0 12px 0;display:flex;align-items:center;gap:10px}
.month-toolbar button{min-width:34px;height:28px}
#monthLabel{font-weight:bold}

#calendar-month{overflow:auto}
/* Monatskalender: 1 feste KW-Spalte + 7 gleich breite Tagesspalten.
   minmax(0,1fr) verhindert, dass langer Text/Balken die Spalten verbreitert. */
.month-header{display:grid;grid-template-columns:50px repeat(7,minmax(0,1fr));gap:0;width:100%;max-width:100%}
.month-headcell{border:1px solid #ddd;background:#f0f0f0;padding:6px;font-weight:bold;text-align:center}
.month-headcell.month-week-col{background:#e8e8e8;font-size:0.9em}

.month-grid{display:grid;grid-template-columns:50px repeat(7,minmax(0,1fr));gap:0;width:100%;max-width:100%}
.month-cell.month-week-col{background:#f5f5f5;font-weight:bold;text-align:center;display:flex;align-items:center;justify-content:center;border-right:2px solid #ccc;min-height:110px}
.month-cell{border:1px solid #ddd;min-height:110px;padding:6px;position:relative;overflow:hidden;min-width:0}
.month-cell:not(.month-week-col){overflow:visible}
.month-cell.other-month{background:#fafafa;opacity:0.7}
.month-daynum{font-size:12px;font-weight:bold;margin-bottom:4px}
.month-event{
  color:#000;
  font-size:11px;
  padding:2px 6px;
  border-radius:4px;
  margin:2px 0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  cursor:pointer;
  text-align:center;
  box-sizing:border-box;
}
.month-event.month-event-start{
  border-radius:4px 0 0 4px;
  margin-right:-1px;
  width:calc(100% + 1px);
}
.month-event.month-event-middle{
  border-radius:0;
  margin-left:-1px;
  margin-right:-1px;
  width:calc(100% + 2px);
}
.month-event.month-event-end{
  border-radius:0 4px 4px 0;
  margin-left:-1px;
  width:calc(100% + 1px);
}
.month-absence{
  text-align:center;
  box-sizing:border-box;
  font-size:11px;
  padding:2px 6px;
  border-radius:4px;
  margin:2px 0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.month-absence.month-absence-start{
  border-radius:4px 0 0 4px;
  margin-right:-1px;
  width:calc(100% + 1px);
}
.month-absence.month-absence-middle{
  border-radius:0;
  margin-left:-1px;
  margin-right:-1px;
  width:calc(100% + 2px);
}
.month-absence.month-absence-end{
  border-radius:0 4px 4px 0;
  margin-left:-1px;
  width:calc(100% + 1px);
}

/* ================
   MONTH VIEW (LANES)
   ================ */
.month2-grid{
  display:flex;
  flex-direction:column;
  gap:0;
}
.month2-week-row{
  position:relative;
  margin:0;
}
.month2-week-grid{
  width:100%;
}
.month2-week-bands{
  position:absolute;
  inset:22px 0 4px 0; /* unter der Datumzeile starten */
  display:grid;
  grid-template-columns:50px repeat(7,minmax(0,1fr));
  grid-auto-rows:18px;
  pointer-events:none;
}
.month2-band{
  pointer-events:auto;
  margin:1px 2px;
  font-size:11px;
  border-radius:4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-sizing:border-box;
}
.month2-event{
  background:#ffcc00;
  color:#000;
  padding:2px 4px;
  text-align:center;
}
.month2-absence{
  background:#fff;
  color:#333;
  padding:2px 4px;
  text-align:center;
  border:1px solid #ddd;
  background-image:repeating-linear-gradient(-45deg,transparent 0,transparent 3px,var(--stripes,#ccc) 3px,var(--stripes,#ccc) 5px);
}

.job-title {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 4px;
}

.job-meta {
  font-size: 12px;
  color: #333;
  line-height: 1.4;
}

.job-number {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}

.jobs-open.drop-hover,
#open-jobs.drop-hover {
  background: #eef6ff;
  border: 2px dashed #4a90e2;
}

.calendar-cell.dropzone.drop-hover {
  background: #eef6ff;
  border: 2px dashed #4a90e2;
}

.calendar-cell.tech-dropzone.drop-hover {
  background: #d1f0dc !important; /* Grünton, um zu zeigen, dass es die Techniker-Spalte ist */
  border: 2px dashed #0b6b3a;
}

/* Offene Aufträge: Meta-Zeilen mit Icon-Spalte links */
.job-meta-line{
  display:flex;
  align-items:center;
  gap:4px;
}
.job-meta-icon{
  width:1.4em;
  flex:0 0 auto;
  text-align:center;
}
.job-meta-text{
  flex:1 1 auto;
}


/* =========================
   WEEKEND / HOLIDAYS
========================= */
.day-header{ text-align:center; min-height:1.6em; }
.day-header small{ display:inline; font-weight:normal; opacity:0.85; margin-left:4px; }
.day-saturday{ background:#fff3cd; }
.day-sunday{ background:#f8d7da; }
.day-holiday{ background:#f8d7da; }

.month-cell.other-month.day-saturday{ background:#fff3cd; }
.month-cell.other-month.day-sunday,
.month-cell.other-month.day-holiday{ background:#f8d7da; }


/* Feiertagsnamen */
.day-header .holiday-name{font-size:0.75em;color:#a00000;margin-top:0;display:block;line-height:1.2;}
.month-daynum{display:flex;gap:6px;align-items:baseline;}
.month-holiday-name{font-size:10px;font-weight:normal;color:#a00000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:90%;}

/* =========================
   APP HEADER / LOGO
========================= */
.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
}

.app-logo {
  height: 40px;
  width: auto;
  max-width: 100%;
}

.app-title {
  font-size: 24px;
  font-weight: bold;
  line-height: 1.2;
}

.app-username {
  font-size: 24px;
  font-weight: bold;
  line-height: 1.2;
  margin-left: auto;
}

.app-version {
  margin-left: 12px;
  font-size: 11px;
  color: #666;
}

/* =========================
   NAVIGATION BUTTONS
========================= */
.app-nav {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.nav-btn {
  padding: 8px 16px;
  background: #1f2937;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.nav-btn:hover {
  background: #374151;
}

.nav-btn-logout {
  margin-left: auto;
}

/* Service-Intervalle Button: gelb/rot bei fälligen Services */
.nav-btn-service-reminder {
  background: #facc15;
  border-color: #eab308;
  color: #111827;
}
.nav-btn-service-reminder:hover {
  background: #eab308;
}
.nav-btn-service-overdue {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
.nav-btn-service-overdue:hover {
  background: #991b1b;
}

/* =========================
   HEUTE HERVORHEBEN
========================= */
.calendar-day.today,
.day.today,
td.today {
  outline: 3px solid #2ecc71;
  outline-offset: -3px;
  background-color: rgba(46, 204, 113, 0.08);
}


/* =========================
   HEUTE HERVORHEBEN
========================= */
.calendar-cell.today,
.month-cell.today {
  outline: 3px solid #2ecc71;
  outline-offset: -3px;
  background-color: rgba(46, 204, 113, 0.08);
}
