* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}

main {
    max-width: 900px;
    margin: auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

#calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#schedule-container {
    display: flex;
}

#time-labels {
    padding-top: 60px;
}

#time-labels1 {
    padding-top: 25px;
}

/* 共通ボタンデザイン（デフォルト） */
button {
    background-color: #4CAF50; /* 緑 */
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.day-bulk-buttons .bulk-button {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

#logout-button {
    background-color: #e74c3c;
}

#logout-button:hover {
    background-color: #c0392b;
}


.day-header .bulk-button.full-available {
    background-color: #a7e9af !important;
    color: #333 !important;
}

.day-header .bulk-button.full-unavailable {
    background-color: #f4b6b6 !important;
    color: #333 !important;
}

.time-label {
    height: 30px;
    text-align: right;
    padding-right: 10px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}

.time-label.half-hour {
    font-size: 12px;
    color: #999; /* 30分のラベルは薄くする */
}

#calendar-grid, #template-grid {
    display: grid;
    /* 曜日(7) + 時間軸の列(1) */
    grid-template-columns: repeat(7, 1fr);
    flex-grow: 1;
    border-left: 1px solid #ccc;
}

.day-header {
    text-align: center;
    padding: 5px 0;
    border-bottom: 2px solid #aaccee;
    font-weight: bold;
    position: sticky;
    top: 0;
    background-color: #f0f8ff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.time-slot {
    height: 30px;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* 1時間ごとの区切り線を少し濃くする */
.time-slot.hour-mark {
    border-bottom: 1px solid #aaa;
}

.time-slot:hover {
    background-color: #e0e0e0;
}

/* 予定の種類に応じた色分け */
.time-slot.available, .legend-item.available {
    background-color: #a7e9af; /* 緑色 */
}

.time-slot.unavailable, .legend-item.unavailable {
    background-color: #f4b6b6; /* 赤色 */
}

.time-slot.needs-check, .legend-item.needs-check {
    background-color: #a0c4ff; /* 明るい青色 */
}

#legend {
    text-align: center;
    margin-top: 20px;
}

.legend-item {
    display: inline-block;
    width: 15px;
    height: 15px;
    vertical-align: middle;
    margin-right: 5px;
}

#tool-panel {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#group-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 0;
}

.group-card {
    background-color: #fff;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.group-card h3 {
    font-size: 16px;
    margin: 0;
}

.group-card p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.group-button {
    display: inline-block;
    padding: 6px 12px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.group-button.secondary {
    background-color: #2196F3;
}
