.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 14px 0;
}
.calendar-nav h1 {
  margin: 0;
  font-size: 22px;
  text-align: center;
}
.calendar-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--po-input-border, #ccc);
  background: var(--po-card-bg, #fff);
  color: var(--po-text, #333);
  font-size: 16px;
  text-decoration: none;
}
.calendar-nav-arrow:hover {
  background: var(--po-hover, #f2f6fa);
  border-color: var(--po-accent, #4682B4);
  color: var(--po-accent, #4682B4);
}
.calendar-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 10px;
}
.calendar-day, .calendar-day-np {
  background: var(--po-card-bg, #fff);
  border: 1px solid var(--po-card-border, #ddd);
  padding: 10px;
  height: 180px;
  vertical-align: top;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}
.calendar-day-np {
  background: var(--po-tile-bg, #f5f5f5);
}
.day-number {
  background: var(--po-tooltip-panel, #555);
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 14px;
}

.day-number-today {
  background: var(--po-nav-active, #f1a400) !important; /* Highlight color, the theme's "you are here" color, same as the active nav pill */
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 14px;
}

.calendar-day-head {
  text-align: center;
  font-weight: bold;
  padding: 10px;
  background: var(--po-nav-bg, #212737);
  color: white;
  border-radius: 5px;
}
.job {
  margin-top: 35px;
  font-size: 13px;
  padding-left: 4px;
  border-left: 3px solid var(--po-accent, #888);
  overflow-wrap: break-word;
}
.calendar-holiday {
  display: inline-block;
  margin: 2px 34px 2px 0; /* right margin keeps it clear of the top-right day-number circle */
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--po-accent, #4682B4);
  background: var(--po-accent-soft, rgba(70,130,180,0.10));
  border: 1px solid var(--po-accent-line, rgba(70,130,180,0.3));
  border-radius: var(--po-radius-pill, 20px);
  line-height: 1.3;
}
.calendar-holiday + .job {
  margin-top: 10px; /* the holiday label above already clears the day number, so the first job doesn't need the full 35px */
}
.worker-badge {
  display: inline-block;
  background: #ccc;
  color: #fff;
  padding: 2px 6px;
  margin: 2px 2px 0 0;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
}
.timeoff-badge {
  margin-top: 4px;
  font-size: 11px;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  background-color: #999;
}
.calendar-add-job {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--po-hover, #eee);
  color: var(--po-text, #333) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 2;
}
.calendar-add-job:hover {
  background: var(--po-line, #ddd);
  color: var(--po-text, #333) !important;
}
.calendar-mobile {
  display: none;
}
.calendar-day-head:nth-child(2),
.calendar-day-head:nth-child(3),
.calendar-day-head:nth-child(4),
.calendar-day-head:nth-child(5),
.calendar-day-head:nth-child(6) {
  background: var(--po-accent, #4a90e2); /* Mon-Fri */
}
@media screen and (max-width: 768px) {
  .calendar-desktop {
    display: none;
  }
  .calendar-wrapper > .calendar-nav {
    display: none;
  }
  .calendar-mobile-scroll {
    max-height: 100vh;
    overflow-y: auto;
    position: relative;
  }
  .calendar-mobile {
    display: block;
  }
  .calendar-mobile-day {
    position: relative;
    border: 1px solid var(--po-input-border, #ccc);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    background: var(--po-tile-bg, #f9f9f9);
  }
  .calendar-mobile-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
  }
  .calendar-mobile-job {
    padding: 4px 0;
    font-size: 14px;
    border-left: 3px solid var(--po-accent, #999);
    padding-left: 8px;
    margin-bottom: 5px;
  }
  .calendar-no-job {
    font-style: italic;
    color: var(--po-text-muted, #777);
    border: none;
    padding-left: 0;
  }
  .worker-badge, .timeoff-badge {
    display: inline-block;
    font-size: 12px;
    margin: 3px 3px 0 0;
    padding: 2px 6px;
    color: white;
    border-radius: 4px;
  }
  .calendar-nav {
    position: sticky;
    top: 0;
    background: var(--po-card-bg, #fff);
    z-index: 10;
    padding: 10px 0;
    border-bottom: 1px solid var(--po-card-border, #ddd);
    text-align: center;
  }
  .calendar-nav h1 {
    margin: 0;
    font-size: 18px;
  }
}
