body {
      font-family: sans-serif;
      background: #f5f5f5;
      margin: 0;
      padding: 20px;
    }
    .calendar-nav {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 10px;
    }
    .calendar-nav select, .calendar-nav button {
      margin: 0 5px;
      padding: 5px 10px;
    }
    .calendar-weekdays {
   /* border:1px solid red;*/
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      text-align: center;
      font-weight: bold;
     /* margin: 10px auto 5px;*/
     margin-bottom:10px;
      max-width: 100%;
    }

    .calendar-weekdays div {
text-align: center;
    }

    .calendar {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 5px;
      max-width: 100%;
     /* margin: 0 auto 20px;*/
      background: #fff;
      border-radius: 10px;
      padding: 10px;
    }
    .calendar div {
      padding: 10px 5px;
      text-align: center;
      border-radius: 5px;
      background: #f0f0f0;
      cursor: pointer;
      min-height: 50px;
      position: relative;
    }
    .calendar div.disabled {
      background: #ccc;
      pointer-events: none;
    }
    .calendar div.selected {
      background: #ffd700;
      color: #000;
    }
    .calendar div .time-label {
      font-size: 0.75em;
      color: #000;
      display: block;
      margin-top: 5px;
    }
    .calendar div.multiple::after {
      content: '+';
      position: absolute;
      bottom: 2px;
      right: 4px;
      font-size: 0.7em;
      color: #333;
    }
    .popup {
      position: absolute;
      top: 150px;
      left: 50%;
      transform: translateX(-50%);
      margin-top: 10px;
      background: #fff;
      box-shadow: 0 0 10px rgba(0,0,0,0.2);
      padding: 15px;
      border-radius: 10px;
      display: none;
      z-index: 1000;
      width: 90%;
      max-width: 320px;
    }



    .popup-header {
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      margin-bottom: 10px;
    }
    .popup-title {
      font-weight: bold;
      font-size: 16px;
      text-align: center;
      flex-grow: 1;
    }
    .popup-close {
      position: absolute;
      right: 0;
      top: -5;
      border: none;
      background: none;
      font-size: 20px;
      cursor: pointer;
      line-height: 1;
      padding: 5px 10px;
    }
    .popup-separator {
      height: 3px;
      background: transparent;
      margin: 10px 0;
    }
    .popup label {
      display: block;
     /* margin-top: 10px;*/
    }
    .popup select, .popup input[type="time"] {
      width: 100%;
      padding: 5px;
      margin-top: 5px;
    }
    .popup-buttons {
      display: flex;
      justify-content: space-between;
      margin-top: 15px;
    }
    .popup-buttons button {
      flex: 1;
      margin: 0 5px;
    }
    .record-entry {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.85em;
      margin-top: 5px;padding-bottom: 5px;
      border-bottom:1px solid #CCCCCC;
    }
    .record-entry button {
      font-size: 0.8em;
      padding: 2px 6px;
    }


.calendar .day {
  padding: 5px;
  cursor: pointer;
  text-align: center;
}
.calendar .day.has-record {
  background: #ffd700;
  border-radius: 4px;
}
.popup {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
}


.calendar-day.has-records {
  background-color: #ffd700;
  cursor: pointer;
}
.calendar-day.no-records {
  background-color: #f5f5f5;
  color: #aaa;
  cursor: default;
}
