#date_assign {
  width: 90%;
  margin: 0 auto;
  padding: 8px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#calendar_select_row {
  display: flex;
  align-items: center;
  gap: 12px;
}

#calendar_select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  font-size: 15px;
  box-sizing: border-box;
  background: white;
}

#calendar_order_info {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  font-size: 13px;
  align-items: center;
}

.cal-info-label {
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

#calendar_annotations {
  grid-column: 1 / -1;
  resize: vertical;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  color: #333;
  background: #fafafa;
  box-sizing: border-box;
  width: 100%;
}

#calendar_annotations:focus {
  outline: none;
  border-color: #f29900;
  box-shadow: 0 0 0 2px rgba(242, 153, 0, 0.2);
}

.cal-info-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 8px;
}

.cal-info-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

#calendar {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

#calendar_nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: white;
  border-bottom: 1px solid #e0e0e0;
}

#cal_year,
#cal_month {
  font-weight: 700;
  font-size: 15px;
  color: #333;
  min-width: 36px;
  text-align: center;
}

#cal_month {
  min-width: 110px;
  text-transform: capitalize;
}

#calendar_header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #f29900;
  color: white;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}

#calendar_header span {
  padding: 8px 0;
  text-align: center;
}

#calendar_grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 8px;
  background: white;
}

.cal-day {
  width: 100%;
  height: 30px;
  border-radius: 4px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid #e0e0e0;
}

/* EMPTY */
.cal-day.empty {
  background: white;
  border: 1px solid #e0e0e0;
  pointer-events: none;
}

/* INVALID */
.cal-day.invalid {
  background: #f0f0f0;
  border: 1px solid #d0d0d0;
  color: transparent;
  pointer-events: none;
}

/* DISABLED (valid but not selectable) */
.cal-day.disabled {
  background: #bdbdbd;
  border: 1px solid #9e9e9e;
  color: white;
  cursor: not-allowed;
}

/* ENABLED BASE */
.cal-day.enabled {
  cursor: pointer;
}

/* NORMAL */
.cal-day.enabled.normal {
  background: white;
  border: 1px solid #000;
  color: black;
}

/* TODAY */
.cal-day.enabled.today {
  background: white;
  border: 2px solid #1e88e5;
  color: black;
  font-weight: 700;
}

/* BUSY */
.cal-day.enabled.busy {
  background: #2e7d32;
  border: 1px solid #000;
  color: white;
  font-weight: 700;
}

/* HOVER */
.cal-day.enabled:hover {
  filter: brightness(0.95);
}

.badge {
  position: absolute;
  top: 1px;
  right: 1px;
  background: #f29900;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#calendar_buttons_row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

#calendar_save_btn,
#calendar_confirm_btn {
  border: 1px solid #1565c0;
}

.ann-label-thin { display: none; }

.annotations-wrap {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  #calendar_order_info {
    grid-template-columns: 1fr;
  }

  .cal-info-label {
    margin-top: 4px;
  }

  .ann-label-wide { display: none; }
  .ann-label-thin { display: block; }

  .annotations-wrap {
    grid-column: 1;
  }
}

@media (max-width: 1366px) {
  .cal-day { height: 34px; font-size: 11px; }
  #calendar_header span { font-size: 11px; padding: 6px 0; }
}