* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #333;
    font-family: 'Helvetica Neue', sans-serif;
    padding: 20px;
}
.container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    background: #222;
    border-radius: 10px;
    overflow: hidden;
}
.sidebar {
    width: 250px;
    background: #111;
    color: #fff;
    padding: 20px;
    max-height: 75vh;
    overflow-y: auto; /* 啟用垂直滾動條 */
}
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: #333;
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 10px;
    border: 2px solid #333;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}
.sidebar h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}
.sidebar .monthly-list, .sidebar .past-list {
    margin-top: 20px;
}
.sidebar .monthly-list h3, .sidebar .past-list h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}
.sidebar .monthly-list ul, .sidebar .past-list ul {
    list-style: none;
}
.sidebar .monthly-list li, .sidebar .past-list li {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    color: #ccc;
}
.sidebar .monthly-list li:hover, .sidebar .past-list li:hover {
    color: #fff;
}
.main-content {
    flex: 1;
    background: #1c1c1c;
    padding: 20px;
    color: #fff;
}
.main-content header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.main-content header button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}
.main-content header button:hover {
    background: #0056b3;
}
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-gap: 10px;
}
.calendar .day-name {
    text-align: center;
    font-weight: bold;
    color: #aaa;
    padding: 10px 0;
}
.calendar .day {
    height: 60px;
    background: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
}
.calendar .day.occupied {
    background: #b71c1c; /* 深紅色 */
    color: white;
}
.calendar .day.pending {
    background: #ffc13b; /* 黃色 */
    color: black;
}
.calendar .day.active {
    background: #007bff; /* 藍色 */
}
.calendar .day.today {
    background: #4caf50; /* 綠色 */
    color: white;
}
.calendar .day.today-task {
    background: #e32b2b; /* 深紅色 */
    color: white;
}
.calendar .day.inactive {
    color: #666;
}
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}
.modal-content {
    background-color: #424242;
    color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover, .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.loading {
    display: none;
    position: fixed;
    z-index: 10;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #007bff;
}
.reservation-item {
    border-bottom: 1px solid #555;
    padding: 10px 0;
}
.reservation-item:last-child {
    border-bottom: none;
}
.reservation-item h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: #ffeb3b; /* 黄色 */
}
.reservation-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.reservation-details div {
    margin: 5px 0;
}
.reservation-details div span {
    display: block;
    font-weight: bold;
    color: #aaa;
}
.list-item {
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    color: black !important;
    font-weight: bold;
}
.urgent {
    background-color: #ff5252;
    color: black;
}
.ongoing {
    background-color: #e32b2b;
    color: white;
}
.upcoming {
    background-color: #ffeb3b;
    color: black;
}
.future {
    background-color: #43a047;
    color: white;
}
.past {
    background-color: #9e9e9e;
    color: white;
}
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .sidebar .monthly-list, .sidebar .past-list {
        display: none !important;
    }
    .reservation-details {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 450px) {
    .main-content {
        padding: 10px;
    }
    .calendar {
        grid-gap: 5px;
    }
    .calendar .day {
        height: 40px;
        font-size: 0.9rem;
    }
    .main-content header button {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
}
.current-date {
    cursor: pointer;
}
.current-date input {
    border: none;
    background: transparent;
    color: white;
    font-size: 1rem;
    text-align: center;
}
.current-date input::-webkit-inner-spin-button,
.current-date input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}