* { box-sizing: border-box; }
body { font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif; margin: 0; background: #f5f6f8; color: #222; }
.hidden { display: none !important; }

.app-header { display: flex; justify-content: space-between; align-items: center; background: #2d3e50; color: #fff; padding: 10px 20px; }
.app-header nav a { color: #cfd8e3; text-decoration: none; margin-right: 20px; font-weight: bold; }
.app-header nav a.active, .app-header nav a:hover { color: #fff; border-bottom: 2px solid #fff; }
.user-box button { margin-left: 10px; }

main { padding: 20px; }

button { cursor: pointer; padding: 6px 12px; border: 1px solid #999; background: #fff; border-radius: 4px; }
button.danger { color: #c0392b; border-color: #c0392b; }
button.order-btn { padding: 2px 8px; }
button.order-btn:disabled { opacity: 0.3; cursor: default; }
button:hover { background: #eee; }

.calendar-nav { margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.week-style-toggle { display: flex; gap: 4px; }
.style-btn.active { background: #2d3e50; color: #fff; border-color: #2d3e50; }

.calendar-table { border-collapse: collapse; width: 100%; background: #fff; }
.calendar-table th, .calendar-table td { border: 1px solid #ddd; padding: 6px; vertical-align: top; min-width: 130px; }
.calendar-table thead th { background: #eef1f5; }
.calendar-table thead th.today-col { background: #dff0d8; }
.calendar-table thead th.saturday-col { color: #2255cc; }
.calendar-table thead th.sunday-col { color: #cc3333; }
.calendar-table .facility-name { background: #fafafa; white-space: nowrap; }
.calendar-table td { height: 0; padding: 0; }

.cell-content { height: 100%; min-height: 60px; padding: 6px; box-sizing: border-box; display: flex; flex-direction: column; }
.cell-blank { flex: 1 1 auto; min-height: 20px; cursor: pointer; }
.cell-blank:hover { background: rgba(0, 0, 0, 0.05); }

.reservation-block { border-radius: 4px; padding: 4px 6px; margin-bottom: 4px; color: #fff; font-size: 12px; cursor: pointer; }
.reservation-block .res-time { display: block; font-weight: bold; }
.reservation-block .res-creator { display: block; opacity: 0.85; }
.reservation-block .res-daterange { display: block; opacity: 0.85; font-size: 11px; }

.timeline { margin-top: 24px; background: #fff; padding: 16px; border-radius: 6px; }
.timeline ul { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 6px 0; border-bottom: 1px solid #eee; display: flex; gap: 12px; font-size: 14px; }
.timeline-user { font-weight: bold; }
.timeline-time { margin-left: auto; color: #888; font-size: 12px; }

.list-table { border-collapse: collapse; margin-top: 12px; width: 100%; max-width: 600px; background: #fff; }
.list-table th, .list-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }

.color-swatch { display: inline-block; width: 20px; height: 20px; border-radius: 3px; border: 1px solid #ccc; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; padding: 20px; border-radius: 8px; width: 360px; max-width: 90vw; max-height: 90vh; overflow-y: auto; }
.modal label { display: block; margin-bottom: 10px; font-size: 14px; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 6px; margin-top: 4px; border: 1px solid #ccc; border-radius: 4px; }
.time-select-group { display: flex; align-items: center; gap: 4px; }
.time-select-group select { width: auto; flex: 1; margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.modal input[type="checkbox"] { width: auto; margin-top: 0; }
.modal .checkbox-label { display: flex; align-items: center; gap: 6px; }
.error-message { color: #c0392b; font-size: 13px; min-height: 1em; }

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: #2d3e50; }
.login-card { background: #fff; padding: 32px; border-radius: 8px; width: 320px; }
.login-card h1 { font-size: 18px; margin-bottom: 20px; text-align: center; }
.login-card label { display: block; margin-bottom: 12px; font-size: 14px; }
.login-card input { width: 100%; padding: 8px; margin-top: 4px; border: 1px solid #ccc; border-radius: 4px; }
.login-card button { width: 100%; padding: 10px; margin-top: 8px; background: #2d3e50; color: #fff; border: none; }
