/* 予約作成モーダルのスタイル */
.booking-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.booking-modal-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* animation: bookingModalSlideIn 0.3s ease-out; アニメーションを無効化 */
}

/* ヘッダー部分 */
.booking-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.header-text h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-subtitle {
    margin: 5px 0 0 0;
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 400;
}

.booking-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.booking-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ボディ部分 */
.booking-modal-body {
    padding: 30px;
    background: white;
}

/* セクション */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-icon {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.section-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
}

/* フォーム要素 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.required {
    color: #dc3545;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    font-size: 1.2rem;
    color: #667eea;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.form-control,
.form-select {
    width: 100%;
    padding: 12px 15px 12px 50px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
    padding-left: 50px;
}

.form-control::placeholder {
    color: #adb5bd;
}

/* 日時グリッド */
.datetime-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* フォーム行 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* テキストエリア */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    padding-left: 50px;
}

/* フッター */
.booking-modal-footer {
    background: #f8f9fa;
    padding: 25px 30px;
    border-radius: 0 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: none;
        opacity: 1;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .booking-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .booking-modal-header {
        padding: 20px;
    }
    
    .header-text h2 {
        font-size: 1.5rem;
    }
    
    .booking-modal-body {
        padding: 20px;
    }
    
    .datetime-grid,
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .booking-modal-footer {
        padding: 20px;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* スクロールバーのスタイル */
.booking-modal-content::-webkit-scrollbar {
    width: 8px;
}

.booking-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.booking-modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.booking-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* フォーカス時のアニメーション */
.form-control:focus,
.form-select:focus {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* ユーザー検索結果のスタイル */
.user-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.user-search-results .user-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.user-search-results .user-result-item:hover {
    background-color: #f8f9fa;
}

.user-search-results .user-result-item:last-child {
    border-bottom: none;
}

.user-result-item .user-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.user-result-item .user-details {
    font-size: 0.9rem;
    color: #6c757d;
}

/* 既存のモーダルスタイルとの競合を避けるため、古いクラスもサポート */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid #dee2e6;
}

.modal-header h2 {
    margin: 0;
    color: #495057;
    font-size: 1.5rem;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 0 0 10px 10px;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.modal-footer .btn {
    margin-left: 10px;
}

/* 予約作成モーダル専用のスタイル（休憩モーダルをベースに調整） */
#bookingModal.break-modal {
    /* 既存のbreak-modalスタイルを継承しつつ、予約作成用に調整 */
}

#bookingModal .break-modal-content {
    width: 95%;
    max-width: 700px; /* 幅を大きく */
    max-height: 85vh; /* 高さを調整 */
    margin: 3% auto; /* マージンを調整 */
    overflow: hidden; /* スクロールを無効化 */
}

#bookingModal .break-modal-body {
    max-height: 60vh; /* ボディの最大高さを設定 */
    overflow-y: auto; /* ボディ内でスクロール可能 */
    padding: 24px;
}

#bookingModal .break-modal-footer {
    position: sticky; /* フッターを固定 */
    bottom: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 2px solid #dee2e6;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* スクロールバーのスタイル（予約作成モーダル用） */
#bookingModal .break-modal-body::-webkit-scrollbar {
    width: 8px;
}

#bookingModal .break-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#bookingModal .break-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#bookingModal .break-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #bookingModal .break-modal-content {
        width: 98%;
        max-width: none;
        margin: 2% auto;
    }
    
    #bookingModal .break-modal-body {
        max-height: 65vh;
        padding: 20px;
    }
    
    #bookingModal .break-modal-footer {
        padding: 20px;
    }
}
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* History item styles - compact size */
        .history-item-compact {
            display: flex;
            align-items: center;
            padding: 6px 10px;
            margin-bottom: 12px;
            background-color: #f8f9fa;
            border-radius: 4px;
            font-size: 13px;
            line-height: 1.3;
            border-left: 2px solid #e9ecef;
            transition: background-color 0.2s ease;
        }

        .history-item-compact:hover {
            background-color: #e9ecef;
        }

        .history-icon-small {
            font-size: 14px;
            margin-right: 8px;
            min-width: 20px;
            text-align: center;
        }

        .history-content-compact {
            flex: 1;
            color: #495057;
        }

        .history-content-compact strong {
            color: #212529;
            font-weight: 600;
        }

        /* Break block styles - with proper class targeting */
        .reservation-block.break-block,
        .reservation-block.spanning.break-block {
            background: linear-gradient(135deg, #3498db 0%, #74b9ff 100%) !important;
            border: 2px solid #0984e3 !important;
            color: white !important;
            box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4) !important;
        }

        .reservation-block.break-block:hover,
        .reservation-block.spanning.break-block:hover {
            background: linear-gradient(135deg, #2980b9 0%, #6c5ce7 100%) !important;
            box-shadow: 0 6px 16px rgba(41, 128, 185, 0.5) !important;
            transform: translateY(-1px);
        }

        /* Orange button styles */
        .btn-orange {
            background: linear-gradient(135deg, #ff9f43 0%, #feca57 100%);
            color: white;
            border: 2px solid #ff6348;
            padding: 8px 16px;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
        }

        .btn-orange:hover {
            background: linear-gradient(135deg, #ff6348 0%, #ff9f43 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(255, 159, 67, 0.4);
        }

        .btn-orange:active {
            transform: translateY(0);
            box-shadow: 0 2px 6px rgba(255, 159, 67, 0.3);
        }

        /* Action buttons container */
        .action-buttons {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        /* Slot options menu */
        .slot-options-menu {
            background: white;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
            padding: 8px;
            min-width: 160px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        .slot-option {
            padding: 12px 16px;
            cursor: pointer;
            border-radius: 6px;
            transition: background-color 0.2s ease;
            font-weight: 500;
            font-size: 14px;
            margin-bottom: 4px;
        }

        .slot-option:hover {
            background-color: #f8f9fa;
        }

        .slot-option:active {
            background-color: #e9ecef;
        }

        .slot-option-cancel {
            padding: 12px 16px;
            cursor: pointer;
            border-radius: 6px;
            transition: background-color 0.2s ease;
            font-weight: 500;
            font-size: 14px;
            color: #6c757d;
            border-top: 1px solid #e9ecef;
            margin-top: 4px;
        }

        .slot-option-cancel:hover {
            background-color: #f8f9fa;
            color: #495057;
        }

        /* Break Modal Styles */
        .break-modal {
            display: none;
            position: fixed;
            z-index: 10000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            pointer-events: auto; /* モーダル背景のクリックイベントを有効化 */
        }

        .break-modal-background {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.1); /* 軽い透明度を追加 */
            backdrop-filter: blur(3px); /* 適度なぼやかし効果を追加 */
            cursor: pointer; /* 背景部分にカーソルを表示 */
        }

        .break-modal-content {
            background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            border: none;
            width: 90%;
            max-width: 500px;
            border-radius: 16px;
            box-shadow: 0 20px 40px rgba(255, 159, 67, 0.3);
            overflow: hidden;
            /* animation: breakModalSlideIn 0.3s ease-out; アニメーションを無効化 */
            pointer-events: auto; /* モーダル内容のクリックイベントを有効化 */
            z-index: 1; /* 背景より前面に表示 */
        }

        @keyframes breakModalSlideIn {
            from {
                opacity: 1;
                transform: none;
            }
            to {
                opacity: 1;
                transform: none;
            }
        }

        .break-modal-header {
            background: linear-gradient(135deg, #3498db 0%, #74b9ff 100%);
            color: white;
            padding: 20px 24px;
            text-align: center;
            position: relative;
            pointer-events: auto; /* ヘッダー部分のクリックイベントを有効化 */
        }

        .break-modal-header h2 {
            margin: 0;
            font-size: 20px;
            font-weight: 600;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .break-modal-close {
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 24px;
            font-weight: bold;
            color: white;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
            pointer-events: auto; /* 閉じるボタンのクリックイベントを有効化 */
        }

        .break-modal-close:hover {
            background-color: rgba(255, 255, 255, 0.2);
            transform: translateY(-50%) scale(1.1);
        }

        .break-modal-body {
            padding: 24px;
            pointer-events: auto; /* ボディ部分のクリックイベントを有効化 */
        }

        .break-info-section {
            background: linear-gradient(135deg, #fff8f0 0%, #fff4e6 100%);
            border: 2px solid #ff9f43;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 20px;
            text-align: center;
        }

        .break-datetime {
            font-size: 16px;
            color: #e67e22;
            font-weight: 500;
        }

        .break-form-section {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .break-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .break-label {
            font-weight: 600;
            font-size: 14px;
            color: #2c3e50;
        }

        .break-select, .break-input, .break-textarea {
            padding: 12px 16px;
            border: 2px solid #3498db;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.2s ease;
            background: white;
        }

        .break-select:focus, .break-input:focus, .break-textarea:focus {
            outline: none;
            border-color: #2980b9;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
            transform: translateY(-1px);
        }

        .break-textarea {
            resize: vertical;
            min-height: 60px;
            font-family: inherit;
        }

        .break-modal-footer {
            padding: 20px 24px;
            background: #fafafa;
            display: flex;
            gap: 12px;
            justify-content: center;
            pointer-events: auto; /* フッター部分のクリックイベントを有効化 */
        }

        .break-btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 120px;
        }

        .break-btn-create {
            background: linear-gradient(135deg, #ff9f43 0%, #feca57 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(255, 159, 67, 0.3);
        }

        .break-btn-create:hover {
            background: linear-gradient(135deg, #ff6348 0%, #ff9f43 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(255, 159, 67, 0.4);
        }

        .break-btn-cancel {
            background: #ecf0f1;
            color: #7f8c8d;
            border: 2px solid #bdc3c7;
        }

        .break-btn-cancel:hover {
            background: #d5dbdb;
            color: #2c3e50;
            transform: translateY(-1px);
        }

        /* Break Detail Modal Styles - Simple Clean Design */
        .break-detail-modal {
            display: none;
            position: fixed;
            z-index: 11000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
        }

        .break-detail-modal-content {
            background: white;
            margin: 5% auto;
            border: none;
            width: 90%;
            max-width: 500px;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            overflow: hidden;
        }



        .break-detail-modal-header {
            background: #e3f2fd;
            color: #1976d2;
            padding: 20px 25px;
            text-align: center;
            position: relative;
            border-bottom: 2px solid #2196f3;
        }



        .break-detail-modal-header h2 {
            margin: 0;
            font-size: 20px;
            font-weight: 600;
            color: #1976d2;
        }

        .break-detail-modal-close {
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 24px;
            font-weight: bold;
            color: #666;
            cursor: pointer;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
        }

        .break-detail-modal-close:hover {
            background-color: #e9ecef;
            color: #333;
        }

        .break-detail-modal-body {
            padding: 25px;
            background: white;
            color: #333;
        }

        .break-detail-info {
            background: #f3f8ff;
            border: 1px solid #bbdefb;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            text-align: center;
        }



        .break-detail-datetime {
            font-size: 18px;
            color: #1976d2;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .break-detail-duration {
            font-size: 16px;
            color: #42a5f5;
            font-weight: 500;
        }

        .break-detail-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }



        .break-detail-field {
            display: flex;
            flex-direction: column;
            gap: 10px;
            position: relative;
        }



        .break-detail-label {
            font-weight: 600;
            font-size: 14px;
            color: #1976d2;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .break-detail-label::before {
            content: '✨';
            font-size: 12px;
            opacity: 0.8;
            color: #42a5f5;
        }

        .break-detail-select, .break-detail-input, .break-detail-textarea {
            padding: 12px 16px;
            border: 1px solid #bbdefb;
            border-radius: 6px;
            font-size: 14px;
            transition: all 0.2s ease;
            background: white;
            color: #333;
            font-family: inherit;
        }

        /* Make break type options more prominent with blue styling */
        .break-detail-select option {
            background: white;
            color: #1976d2;
            padding: 8px;
        }

        .break-detail-select option:hover {
            background: #e3f2fd;
        }

        .break-detail-select:focus, .break-detail-input:focus, .break-detail-textarea:focus {
            outline: none;
            border-color: #2196f3;
            box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
        }

        /* Enhanced blue styling for select elements */
        .break-detail-select {
            background-image: linear-gradient(45deg, transparent 50%, #1976d2 50%), linear-gradient(135deg, #1976d2 50%, transparent 50%);
            background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px);
            background-size: 5px 5px, 5px 5px;
            background-repeat: no-repeat;
            background-color: white;
        }

        .break-detail-select:hover {
            border-color: #42a5f5;
            background-color: #f8fbff;
        }

        .break-detail-textarea {
            resize: vertical;
            min-height: 100px;
            line-height: 1.6;
        }

        .break-detail-modal-footer {
            padding: 20px 25px;
            background: #e3f2fd;
            display: flex;
            gap: 12px;
            justify-content: center;
            border-top: 1px solid #bbdefb;
        }

        .break-detail-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            font-weight: 500;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 100px;
        }

        .break-detail-btn-save {
            background: #2196f3;
            color: white;
        }

        .break-detail-btn-save:hover {
            background: #1976d2;
        }

        .break-detail-btn-delete {
            background: #dc3545;
            color: white;
        }

        .break-detail-btn-delete:hover {
            background: #c82333;
        }

        .break-detail-btn-cancel {
            background: #6c757d;
            color: white;
        }

        .break-detail-btn-cancel:hover {
            background: #5a6268;
        }



        /* Responsive design for break detail modal */
        @media (max-width: 768px) {
            .break-detail-modal-content {
                width: 95%;
                margin: 5% auto;
                border-radius: 20px;
            }

            .break-detail-modal-header {
                padding: 20px 24px;
            }

            .break-detail-modal-header h2 {
                font-size: 20px;
            }

            .break-detail-modal-body {
                padding: 24px;
            }

            .break-detail-modal-footer {
                padding: 20px 24px;
                flex-direction: column;
                gap: 12px;
            }

            .break-detail-btn {
                min-width: 100%;
                padding: 14px 24px;
            }
        }



        /* Tab button styles for booking modal */
        .booking-tabs {
            display: flex;
            border-bottom: 2px solid #e9ecef;
            margin-bottom: 20px;
        }

        .booking-tabs .tab-button {
            flex: 1;
            padding: 12px 20px;
            border: none;
            background: #f8f9fa;
            color: #6c757d;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s ease;
            border-radius: 8px 8px 0 0;
            margin-right: 5px;
        }

        .booking-tabs .tab-button:last-child {
            margin-right: 0;
        }

        .booking-tabs .tab-button:hover {
            background: #e9ecef;
            color: #495057;
        }

        .booking-tabs .tab-button.active {
            background: #007bff;
            color: white;
            box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
        }

        /* Bulk Reservation Modal Styles */
        .checkbox-group {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 5px;
        }

        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
        }

        .checkbox-item input[type="checkbox"] {
            margin: 0;
        }

        .bulk-preview {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            padding: 15px;
        }

        .bulk-preview h4 {
            margin: 0 0 15px 0;
            color: #495057;
            font-size: 16px;
        }

        .bulk-preview-list {
            max-height: 200px;
            overflow-y: auto;
            background: white;
            border: 1px solid #e9ecef;
            border-radius: 6px;
            padding: 10px;
        }

        .bulk-preview-item {
            padding: 8px;
            border-bottom: 1px solid #f1f3f4;
            font-size: 14px;
        }

        .bulk-preview-item:last-child {
            border-bottom: none;
        }

        .bulk-preview-item .date {
            font-weight: bold;
            color: #007bff;
        }

        .bulk-preview-item .time {
            color: #6c757d;
        }

        .bulk-preview-item.conflict {
            background-color: #fff3cd;
            border-left: 4px solid #ffc107;
        }

        .conflict-warning {
            color: #856404;
            font-weight: bold;
            margin-left: 10px;
        }

        body {
            font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', Meiryo, sans-serif;
            background-color: #f8f9fa;
            min-height: 100vh;
        }

        .container {
  max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            background: white;
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header h1 {
            color: #333;
            font-size: 24px;
        }

        .header-controls {
  display: flex;
            gap: 12px;
  align-items: center;
}

        .week-nav {
  display: flex;
  align-items: center;
            gap: 16px;
        }

        .nav-btn {
            background: #007bff;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.2s;
        }

        .nav-btn:hover {
            background: #0056b3;
        }

        .current-week {
  font-weight: 600;
            color: #333;
            min-width: 200px;
            text-align: center;
        }

        .settings-btn {
            background: #28a745;
  color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .settings-btn:hover {
            background: #1e7e34;
            transform: translateY(-1px);
        }

        /* Mini Calendar */
        .mini-calendar-container {
            position: relative;
        }

        .mini-calendar-btn {
            background: #6c757d;
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: 6px;
  cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .mini-calendar-btn:hover {
            background: #545b62;
        }

        .mini-calendar {
  position: absolute;
            top: 100%;
  right: 0;
            background: white;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            padding: 16px;
            z-index: 1000;
            min-width: 280px;
            display: none;
            animation: slideDown 0.2s ease;
        }

        .mini-calendar.show {
            display: block;
        }

        .mini-calendar-header {
  display: flex;
  align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            padding: 0 4px;
        }

        .mini-calendar-title {
            font-weight: 600;
            color: #333;
            font-size: 14px;
  flex: 1;
            text-align: center;
        }

        .mini-calendar-nav {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .mini-calendar-nav-btn {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            cursor: pointer;
            padding: 6px 10px;
            border-radius: 6px;
            color: #495057;
            font-size: 12px;
            font-weight: 500;
            transition: all 0.2s;
            min-width: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .mini-calendar-nav-btn:hover {
            background: #e9ecef;
            border-color: #adb5bd;
        }

        .mini-calendar-year-btn {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            cursor: pointer;
            padding: 6px 8px;
            border-radius: 6px;
            color: #495057;
            font-size: 11px;
            font-weight: 500;
            transition: all 0.2s;
            min-width: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .mini-calendar-year-btn:hover {
            background: #e9ecef;
            border-color: #adb5bd;
        }

        .mini-calendar-weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 1px;
            margin-bottom: 8px;
        }

        .mini-calendar-weekday {
            text-align: center;
            font-size: 11px;
  font-weight: 600;
            color: #6c757d;
            padding: 4px 0;
        }

        .mini-calendar-days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 1px;
        }

        .mini-calendar-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.2s;
            border: 1px solid transparent;
        }

        .mini-calendar-day:hover {
            background: #f8f9fa;
        }

        .mini-calendar-day.other-month {
            color: #adb5bd;
        }

        .mini-calendar-day.today {
            background: #007bff;
  color: white;
            font-weight: 600;
        }

        .mini-calendar-day.selected {
            background: #28a745;
  color: white;
            font-weight: 600;
        }

        .mini-calendar-day.clicked-day {
            background: #28a745;
            color: white;
            font-weight: 600;
            border: 2px solid #1e7e34;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .schedule-container {
            background: white;
    border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        .schedule-header {
            display: grid;
            grid-template-columns: 80px repeat(7, 1fr);
            background: #f8f9fa;
            border-bottom: 2px solid #dee2e6;
        }

        .time-column-header {
            padding: 16px 8px;
            text-align: center;
            font-weight: 600;
            color: #6c757d;
            border-right: 1px solid #dee2e6;
        }

        .day-header {
            padding: 16px 12px;
            text-align: center;
  font-weight: 600;
            color: #333;
            border-right: 1px solid #dee2e6;
        }

        .day-header.sunday {
            color: #dc3545;
            background: #ffeaea;
        }

        .day-header.saturday {
            color: #007bff;
            background: #e6f3ff;
        }

        .schedule-body {
            max-height: 600px;
            overflow-y: auto;
        }

        .schedule-row {
            display: grid;
            grid-template-columns: 80px repeat(7, 1fr);
        }

        .time-slot {
            padding: 4px;
            text-align: center;
            font-size: 12px;
            color: #6c757d;
            border-right: 1px solid #dee2e6;
            border-bottom: 1px solid #f0f0f0;
            background: #fafafa;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 20px;
            min-height: 20px;
        }

        .time-slot.hour-marker {
            font-weight: 700;
            color: #495057;
            background: #e9ecef;
            border-bottom: 2px solid #dee2e6;
        }

        .time-slot.half-hour-marker {
            font-weight: 600;
            color: #6c757d;
            background: #f8f9fa;
        }

        /* 行全体のスタイル */
        .schedule-row.hour-row {
            background: #e9ecef;
        }

        .schedule-row.half-hour-row {
            background: #f8f9fa;
        }

        .schedule-row.hour-row .schedule-cell {
            border-top: 2px solid #adb5bd;
        }

        .schedule-row.half-hour-row .schedule-cell {
            border-top: 1px solid #adb5bd;
        }

        .schedule-cell {
            padding: 2px;
            border-right: 1px solid #dee2e6;
            border-bottom: 1px solid #f0f0f0;
            height: 20px;
            min-height: 20px;
            cursor: pointer;
            transition: background 0.2s;
            position: relative;
        }

        .schedule-cell:hover {
            background: #f8f9fa;
        }

        .schedule-cell.available {
            background: #ffffff;
            border-color: #e9ecef;
        }

        .schedule-cell.unavailable {
            background: #e9ecef;
            border-color: #ced4da;
        }

        .schedule-cell.outside-business-hours {
            background: #6c757d;
            border-color: #495057;
            opacity: 0.8;
            cursor: not-allowed;
        }

        .schedule-cell.drag-over-invalid {
            background: rgba(220, 53, 69, 0.2) !important;
            border: 2px dashed #dc3545 !important;
            position: relative;
            margin: 0 !important;
        }



                .reservation-block {
            background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
            font-size: 11px;
            font-weight: 500;
            text-align: center;
            margin: 2px 0;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
        }

        .reservation-block.spanning {
            position: absolute;
            left: 2px;
            right: 2px;
            z-index: 20;
            border-radius: 8px;
            margin: 0;
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }



        .reservation-block:hover {
            transform: scale(1.02);
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
        }

        .reservation-block.spanning:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
        }

        .reservation-block.tentative {
            background: linear-gradient(135deg, #ff9500 0%, #ff6b35 100%);
        }

        .reservation-block.confirmed {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        }

        .reservation-block.completed {
            background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
        }

        .available-slot {
            background: #e8f5e8;
            color: #155724;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 10px;
            text-align: center;
            margin: 1px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .available-slot:hover {
            background: #d1ecf1;
            color: #0c5460;
        }

        /* 設定モーダル */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            animation: fadeIn 0.3s ease;
        }

        /* モーダル背景部分（クリックで閉じる） */
        .modal-background {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0); /* 完全に透明 */
            backdrop-filter: none; /* ぼやかし効果なし */
            cursor: pointer; /* 背景部分にカーソルを表示 */
        }

        .modal-content {
            background: white;
            margin: 2% auto;
            border-radius: 20px;
            width: 95%;
            max-width: 1000px;
            max-height: 96vh;
            overflow-y: auto;
            overflow-x: hidden;
            animation: slideIn 0.3s ease;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(0, 0, 0, 0.08);
            position: relative; /* 背景部分の上に表示するため */
            z-index: 1; /* 背景部分より前面に表示 */
        }

        .close {
            color: #666;
            font-size: 24px;
            font-weight: bold;
            cursor: pointer;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background 0.2s;
            position: absolute;
            top: 16px;
            right: 16px;
            z-index: 10;
        }

        .close:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .modal-body {
            padding: 32px;
            position: relative;
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        }

        .settings-tabs {
            display: flex;
            border-bottom: 2px solid #dee2e6;
            margin-bottom: 24px;
        }

        .tab-button {
            padding: 12px 24px;
            border: none;
            background: none;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #6c757d;
            border-bottom: 2px solid transparent;
            transition: all 0.2s;
        }

        .tab-button.active {
            color: #007bff;
            border-bottom-color: #007bff;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .day-setting {
            border: 1px solid #dee2e6;
            border-radius: 8px;
            margin-bottom: 16px;
            overflow: hidden;
        }

        .day-setting-header {
            background: #f8f9fa;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-weight: 600;
        }

        .day-setting-header.sunday {
            color: #dc3545;
            background: #ffeaea;
        }

        .day-setting-header.saturday {
            color: #007bff;
            background: #e6f3ff;
        }

        .day-toggle {
            position: relative;
            width: 50px;
            height: 24px;
            background: #ccc;
    border-radius: 12px;
            cursor: pointer;
            transition: background 0.3s;
        }

        .day-toggle.active {
            background: #28a745;
        }

        .day-toggle::before {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            transition: transform 0.3s;
        }

        .day-toggle.active::before {
            transform: translateX(26px);
        }

        .time-slots-container {
            padding: 16px;
            background: white;
        }

        .time-slot-input {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
            padding: 12px;
            background: #f8f9fa;
            border-radius: 6px;
        }

        .time-input {
            padding: 6px 10px;
            border: 1px solid #dee2e6;
  border-radius: 4px;
            font-size: 14px;
}

        .btn {
            padding: 8px 16px;
            border: none;
  border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
        }

        .btn-sm {
            padding: 4px 8px;
            font-size: 12px;
        }

        .btn-primary {
            background: #007bff;
  color: white;
        }

        .btn-primary:hover {
            background: #0056b3;
        }

        .btn-success {
            background: #28a745;
  color: white;
        }

        .btn-success:hover {
            background: #1e7e34;
        }

        .btn-danger {
            background: #dc3545;
  color: white;
        }

        .btn-danger:hover {
            background: #c82333;
        }

        .btn-secondary {
            background: #6c757d;
  color: white;
        }

        .btn-secondary:hover {
            background: #545b62;
        }

        .add-time-btn {
            width: 100%;
            margin-top: 8px;
            border: 2px dashed #dee2e6;
            background: white;
            color: #6c757d;
            padding: 12px;
  border-radius: 6px;
  cursor: pointer;
            transition: all 0.2s;
        }

        .add-time-btn:hover {
            border-color: #28a745;
            color: #28a745;
            background: #f8fff8;
        }

        .modal-footer {
              padding: 24px 32px;
              background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
              border-top: 1px solid #e9ecef;
            display: flex;
              gap: 8px;
            justify-content: flex-end;
              padding-right: 48px;
              margin: 0 -32px -32px -32px;
              border-radius: 0 0 20px 20px;
        }

        /* ボタンスタイル */
        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        }

        .btn:active {
            transform: translateY(0);
        }

        /* 重複警告と利用可能スロットのスタイル */
        .overlap-warning {
            background-color: #ffebee !important;
            border-color: #f44336 !important;
            color: #d32f2f !important;
            opacity: 0.7;
        }

        .overlap-warning:hover {
            background-color: #ffcdd2 !important;
            cursor: not-allowed;
        }

        .available-slot {
            background-color: #e8f5e8 !important;
            border-color: #4caf50 !important;
            color: #2e7d32 !important;
        }

        .available-slot:hover {
            background-color: #c8e6c9 !important;
            cursor: pointer;
        }

        /* ドラッグ&ドロップのスタイル */
        .reservation-block.dragging {
            opacity: 0.7;
            transform: rotate(2deg);
            z-index: 1000;
            cursor: grabbing;
            box-shadow: 0 8px 25px rgba(0,0,0,0.3);
        }

        .schedule-cell.drag-over {
            background: rgba(76, 175, 80, 0.3) !important;
            border-left: 3px dashed #4caf50 !important;
            border-right: 3px dashed #4caf50 !important;
            position: relative;
            margin: 0 !important;
        }

        /* First cell - add top border */
        .schedule-cell.drag-over:first-child {
            border-top: 3px dashed #4caf50 !important;
        }

        /* Last cell - add bottom border */
        .schedule-cell.drag-over:last-child {
            border-bottom: 3px dashed #4caf50 !important;
        }

        /* Remove internal borders between consecutive cells */
        .schedule-cell.drag-over + .schedule-cell.drag-over {
            border-top: none !important;
        }

        .reservation-block {
            cursor: grab;
            transition: all 0.2s ease;
            user-select: none; /* Prevent text selection during drag */
        }

        .reservation-block:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .reservation-block:active {
            cursor: grabbing;
        }

        /* ドラッグヒント */
        .drag-hint {
            position: fixed;
            top: 10px;
            right: 10px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .drag-hint.show {
            opacity: 1;
        }

        /* インターバル設定モーダルのスタイル */
        .interval-settings {
            padding: 20px 0;
        }

        .interval-info {
            margin: 20px 0;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border-left: 4px solid #007bff;
        }

        .interval-info p {
            margin: 5px 0;
        }

        .interval-info small {
            color: #6c757d;
        }

        .btn-secondary {
            background: #6c757d;
            color: white;
        }

        .btn-secondary:hover {
            background: #545b62;
        }

        .btn-success {
            background: #28a745;
            color: white;
        }

        .btn-success:hover {
            background: #1e7e34;
        }

        .btn-warning {
            background: #ffc107;
            color: #212529;
        }

        .btn-warning:hover {
            background: #e0a800;
        }

        .btn-primary {
            background: #007bff;
            color: white;
        }

        .btn-primary:hover {
            background: #0056b3;
        }

        /* フォームスタイル */
        .form-group {
            margin-bottom: 1rem;
        }

        .form-label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
            color: #333;
        }

        .form-control {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid #ced4da;
            border-radius: 0.375rem;
            font-size: 1rem;
            transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
        }

        .form-control:focus {
            border-color: #86b7fe;
            outline: 0;
            box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
        }

        .form-select {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid #ced4da;
            border-radius: 0.375rem;
            font-size: 1rem;
            background-color: #fff;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            background-size: 16px 12px;
            transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
        }

        .form-select:focus {
            border-color: #86b7fe;
            outline: 0;
            box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
        }

        /* メッセージ表示 */
        .message {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 20px;
            border-radius: 8px;
            color: white;
            font-weight: 500;
            z-index: 10000;
            animation: slideInRight 0.3s ease;
        }

        .message.success {
            background: #28a745;
        }

        .message.error {
            background: #dc3545;
        }

        .message.info {
            background: #17a2b8;
        }

        @keyframes slideInRight {
  from {
                transform: translateX(100%);
    opacity: 0;
  }
  to {
                transform: translateX(0);
    opacity: 1;
            }
        }

        /* 予約ブロックのクリック可能スタイル */
        .schedule-cell.bookable {
            cursor: pointer;
            transition: all 0.2s;
        }

        .schedule-cell.bookable:hover {
            background-color: #e3f2fd !important;
            transform: scale(1.02);
        }

        .schedule-cell.bookable:active {
            transform: scale(0.98);
        }

        /* 削除アニメーション */
        .reservation-block.deleting {
            animation: fadeOutScale 0.3s ease-out forwards;
        }

                @keyframes fadeOutScale {
            0% {
                opacity: 1;
                transform: scale(1);
            }
            100% {
                opacity: 0;
                transform: scale(0.8);
            }
        }

        /* ユーザー検索結果のスタイル */
        .user-search-results {
  position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-top: none;
            border-radius: 0 0 4px 4px;
            max-height: 200px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .user-search-item {
            padding: 8px 12px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
            transition: background-color 0.2s;
        }

        .user-search-item:hover {
            background-color: #f8f9fa;
        }

        .user-search-item:last-child {
            border-bottom: none;
        }

        .user-search-item .user-name {
  font-weight: bold;
            color: #333;
        }

        .user-search-item .user-details {
            font-size: 0.85em;
            color: #666;
            margin-top: 2px;
        }

        .user-search-item .user-tickets {
            color: #28a745;
            font-weight: bold;
        }

        /* キャンセル表示エリアのスタイル */
        .cancellation-display {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            border-radius: 8px;
            margin: 20px 0;
            padding: 15px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .cancellation-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #ffeaa7;
        }

        .cancellation-header h3 {
            margin: 0;
            color: #856404;
            font-size: 18px;
        }

        .clear-btn {
            background: #dc3545;
  color: white;
            border: none;
            padding: 6px 12px;
  border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: background-color 0.2s;
        }

        .clear-btn:hover {
            background: #c82333;
        }

        .cancellation-list {
            max-height: 200px;
            overflow-y: auto;
        }

        .cancellation-item {
            background: white;
            border: 1px solid #ffeaa7;
            border-radius: 6px;
            padding: 10px;
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .cancellation-item:last-child {
            margin-bottom: 0;
        }

        .cancellation-info {
            flex: 1;
        }

        .cancellation-customer {
            font-weight: bold;
            color: #856404;
            margin-bottom: 4px;
        }

        .cancellation-details {
            font-size: 14px;
            color: #666;
        }

        .cancellation-time {
            color: #dc3545;
  font-weight: bold;
}

        /* 予約詳細モーダルのスタイル */
        .reservation-detail-container {
            max-width: 100%;
            font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', Meiryo, sans-serif;
            background: #ffffff;
            border-radius: 12px;
            padding: 0;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }

        .reservation-header {
            padding: 32px 32px 24px 32px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 20px 20px 0 0;
            color: white;
            margin: -32px -32px 32px -32px;
            position: relative;
            overflow: hidden;
        }

        .reservation-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(/%23grain)"/></svg>');
            opacity: 0.3;
        }

        .header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .header-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 16px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }

        .customer-name-header {
            display: flex;
            align-items: center;
            pointer-events: auto;
        }

        .customer-name-large {
            font-size: 24px;
            font-weight: 700;
  color: white;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .customer-name-large .customer-link {
            color: #fff !important;
            text-decoration: none !important;
            transition: all 0.2s;
            border-bottom: 1px solid transparent;
            cursor: pointer !important;
            font-weight: 700;
            pointer-events: auto !important;
            position: relative;
            z-index: 10;
        }

        .customer-name-large .customer-link:hover {
            color: #fff !important;
            text-decoration: none !important;
            border-bottom: 1px solid #fff;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .header-detail-item {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 6px;
        }

        .header-label {
            font-size: 11px;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.8);
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .header-value {
            font-size: 15px;
            font-weight: 600;
        }

        /* 編集フォームのスタイル */
        .customer-name-input {
            font-size: 1.5rem;
            font-weight: bold;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            padding: 8px 12px;
            background-color: rgba(255, 255, 255, 0.1);
            color: white;
            width: 100%;
            pointer-events: auto;
            z-index: 10;
            position: relative;
        }

        .customer-name-input:focus {
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
            outline: none;
        }

        .customer-name-input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        .status-select {
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            padding: 8px 12px;
            background-color: rgba(255, 255, 255, 0.1);
            font-weight: bold;
            color: white;
            width: 100%;
            pointer-events: auto;
            z-index: 10;
            position: relative;
        }

        .status-select:focus {
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
            outline: none;
        }

        .status-select option {
            background-color: #333;
            color: white;
        }

        .course-select {
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            padding: 8px 12px;
            background-color: rgba(255, 255, 255, 0.1);
            color: white;
            width: 100%;
            pointer-events: auto;
            z-index: 10;
            position: relative;
        }

        .course-select:focus {
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
            outline: none;
        }

        .course-select option {
            background-color: #333;
            color: white;
        }

        .interval-select {
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            padding: 8px 12px;
            background-color: rgba(255, 255, 255, 0.1);
            color: white;
            width: 100%;
            pointer-events: auto;
            z-index: 10;
            position: relative;
        }

        .interval-select:focus {
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
            outline: none;
        }

        .interval-select option {
            background-color: #333;
            color: white;
        }

        /* Remove dropdown arrows from select elements */
        .course-select,
        .status-select,
        .interval-select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-image: none !important;
        }

        .course-select::-ms-expand,
        .status-select::-ms-expand,
        .interval-select::-ms-expand {
            display: none;
        }

        /* メモテキストエリアのスタイル */
        #edit-note {
            border: 2px solid #e9ecef;
            border-radius: 8px;
            padding: 12px;
            background-color: #ffffff;
            color: #333;
            font-family: inherit;
            resize: vertical;
            min-height: 80px;
        }

        #edit-note:focus {
            border-color: #6c757d;
            box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
            outline: none;
        }

        #edit-note::placeholder {
            color: #6c757d;
        }

        /* ユーザー選択のスタイル */
        .user-selection {
            margin-bottom: 15px;
        }

        .user-selection .form-label {
            font-weight: bold;
            color: #333;
            margin-bottom: 5px;
            display: block;
        }

        .user-select {
            border: 2px solid #007bff;
            border-radius: 8px;
            padding: 8px 12px;
            background-color: #ffffff;
            color: #333;
            width: 100%;
        }

        .user-select:focus {
            border-color: #0056b3;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
            outline: none;
        }

        /* ユーザー変更ボタンのスタイル */
        .change-user-btn {
            margin-left: 10px;
            font-size: 0.8rem;
            padding: 4px 8px;
            border: 1px solid rgba(255, 255, 255, 0.5);
            background-color: rgba(255, 255, 255, 0.1);
            color: white;
            border-radius: 4px;
            transition: all 0.3s ease;
        }

        .change-user-btn:hover {
            background-color: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.7);
        }

        .customer-name-header {
            display: flex;
            align-items: center;
        }

        /* ユーザー検索のスタイル */
        .user-search-results {
            max-height: 300px;
            overflow-y: auto;
            margin-top: 10px;
            border: 1px solid #ddd;
            border-radius: 8px;
            background-color: #f8f9fa;
            position: relative;
            z-index: 1000;
            width: 100%;
            box-sizing: border-box;
            display: none; /* Hidden by default */
        }

        .user-search-item {
            padding: 12px;
            border-bottom: 1px solid #e9ecef;
            cursor: pointer;
            transition: background-color 0.2s ease;
            background-color: white;
            color: #333;
            display: block;
            width: 100%;
            box-sizing: border-box;
            min-height: 60px;
            line-height: 1.4;
        }

        .user-search-item:hover {
            background-color: #e9ecef;
        }

        .user-search-item:last-child {
            border-bottom: none;
        }

        .user-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .user-name {
            font-weight: bold;
            color: #333;
            font-size: 1rem;
            display: block;
            line-height: 1.2;
            margin-bottom: 4px;
        }

        .user-details {
            display: flex;
            gap: 15px;
            font-size: 0.9rem;
            color: #666;
            line-height: 1.2;
        }

        .user-phone, .user-email {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .selected-user {
            padding: 12px;
            background-color: #d4edda;
            border: 1px solid #c3e6cb;
            border-radius: 8px;
            margin-top: 10px;
        }

        .selected-user .user-name {
            color: #155724;
        }

        .no-results {
            padding: 20px;
            text-align: center;
            color: #666;
            font-style: italic;
        }

        #userSearchInput {
            border: 2px solid #007bff;
            border-radius: 8px;
            padding: 10px 12px;
            font-size: 1rem;
        }

        #userSearchInput:focus {
            border-color: #0056b3;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
            outline: none;
        }

        .reservation-status {
            display: flex;
            align-items: center;
            padding: 8px 16px;
            border-radius: 25px;
            font-weight: 600;
            font-size: 13px;
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .status-success {
            background: rgba(40, 167, 69, 0.2);
            border-color: rgba(40, 167, 69, 0.3);
        }

        .status-warning {
            background: rgba(255, 193, 7, 0.2);
            border-color: rgba(255, 193, 7, 0.3);
        }

        .status-danger {
            background: rgba(220, 53, 69, 0.2);
            border-color: rgba(220, 53, 69, 0.3);
        }

        .status-info {
            background: rgba(23, 162, 184, 0.2);
            border-color: rgba(23, 162, 184, 0.3);
        }

        .status-secondary {
            background: rgba(108, 117, 125, 0.2);
            border-color: rgba(108, 117, 125, 0.3);
        }

        .customer-basic-info {
            padding: 24px 32px;
            border-bottom: 1px solid #f1f3f4;
            background: #fafbfc;
            margin: -32px 0 0 0;
        }

        .customer-phone {
            font-size: 15px;
            color: #495057;
            font-weight: 500;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .customer-phone::before {
            content: "📞";
            font-size: 14px;
        }

        .customer-email {
            font-size: 15px;
            color: #495057;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .customer-email::before {
            content: "✉️";
            font-size: 14px;
        }

        .tickets-section {
            padding: 24px;
            border-bottom: 1px solid #f1f3f4;
        }

        .tickets-content {
            display: flex;
            flex-direction: column;
            gap: 8px;
            flex: 1;
            overflow-y: visible;
        }

        .ticket-item {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            padding: 12px 18px;
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border-radius: 10px;
            border: 1px solid #e9ecef;
            transition: all 0.3s ease;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
            margin-bottom: 8px;
        }

        .ticket-item:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            border-color: #dee2e6;
        }

        .ticket-checkbox {
            font-size: 18px;
            color: #6c757d;
            margin-top: 2px;
            min-width: 24px;
        }

        .ticket-info {
            flex: 1;
        }

        .ticket-name {
            font-size: 14px;
            font-weight: 600;
            color: #212529;
            margin-bottom: 3px;
        }

        .ticket-details {
            font-size: 13px;
            color: #6c757d;
        }

        .ticket-item.expired {
            background: #f8f9fa;
            opacity: 0.6;
        }

        .ticket-item.expired .ticket-name,
        .ticket-item.expired .ticket-details {
            color: #adb5bd;
        }

        .tickets-history-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin-bottom: 0;
            width: 100%;
            box-sizing: border-box;
            align-items: start;
        }

        .tickets-section {
            padding: 20px;
            background: white;
            border-radius: 16px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid #f1f3f4;
            height: 500px;
            display: flex;
            flex-direction: column;
        }

        .reservation-history-section {
            padding: 20px;
            background: white;
            border-radius: 16px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid #f1f3f4;
            height: 500px;
            display: flex;
            flex-direction: column;
        }

        .history-content {
            margin-bottom: 0;
            flex: 1;
            overflow-y: visible;
        }

        .history-item {
            display: flex;
            align-items: center;
            padding: 4px 10px;
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border-radius: 4px;
            border: 1px solid #e9ecef;
            margin-bottom: 4px;
            transition: all 0.3s ease;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
            gap: 8px;
        }

        .history-item:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            border-color: #dee2e6;
        }

        .history-icon {
            font-size: 11px;
            color: #28a745;
            background: #e8f5e8;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .history-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 0px;
        }

        .history-ticket-name {
            font-size: 12px;
            font-weight: 600;
            color: #212529;
            line-height: 1.0;
        }

        .history-date-time {
            font-size: 10px;
            color: #6c757d;
            font-weight: 500;
        }

        .history-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .history-btn {
            background: #667eea;
            border: none;
            color: white;
            padding: 8px 16px;
  border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .history-btn:hover {
            background: #5a6fd8;
  transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
        }

        .loading {
            text-align: center;
            padding: 20px;
            color: #6c757d;
            font-style: italic;
        }

        .no-data {
            text-align: center;
            padding: 20px;
            color: #6c757d;
            font-style: italic;
            background: #f8f9fa;
            border-radius: 6px;
            border: 1px dashed #dee2e6;
        }



        .notes-section {
            padding: 24px;
            border-bottom: 1px solid #f1f3f4;
        }

        .section-title {
            font-size: 18px;
            font-weight: 700;
            color: #2c3e50;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            padding-bottom: 8px;
            border-bottom: 2px solid #e9ecef;
        }

        .section-title::before {
            content: "📝";
            font-size: 18px;
        }

        .notes-content {
            background: #f8f9fa;
            padding: 16px;
            border-radius: 8px;
            border: 1px solid #e9ecef;
            font-size: 15px;
            color: #495057;
            line-height: 1.6;
            max-height: 8em; /* 5 lines (1.6 * 5) */
            overflow: hidden;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            white-space: pre-line;
        }

        .system-info-section {
            padding: 20px 24px;
            background: #f8f9fa;
            border-radius: 0 0 12px 12px;
        }

        .system-info-section .detail-item {
            padding: 6px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .system-info-section .detail-label {
            font-size: 14px;
            color: #6c757d;
  font-weight: 500;
        }

        .system-info-section .detail-value {
            font-size: 14px;
            color: #6c757d;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
            .customer-name-section {
                flex-direction: column;
                align-items: flex-start;
                gap: 4px;
            }

            .detail-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 4px;
            }

            .detail-value {
                text-align: left;
            }

            .reservation-header {
                padding: 12px 16px;
            }

            .customer-basic-info,
            .reservation-details,
            .notes-section {
                padding: 16px;
            }

            .system-info-section {
                padding: 12px 16px;
            }

            .tickets-history-container {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .tickets-section,
            .reservation-history-section {
                padding: 16px;
            }
        }

        /* キャンセルボタンのスタイル */
        .cancellation-btn {
            background: #ffc107;
            color: #212529;
            border: 2px solid #ffc107;
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
  font-weight: bold;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            margin-left: 10px;
        }

        .cancellation-btn:hover {
            background: #e0a800;
            border-color: #e0a800;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        }

        .cancellation-btn.active {
            background: #dc3545;
          color: white;
            border-color: #dc3545;
        }

        .cancellation-btn:disabled {
            background: #6c757d;
            color: #fff;
            border-color: #6c757d;
            cursor: not-allowed;
            opacity: 0.6;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideIn {
            from { transform: translateY(-20px) scale(0.98); opacity: 0; }
            to { transform: translateY(0) scale(1); opacity: 1; }
        }

@media (max-width: 768px) {
            .container {
  padding: 10px;
  }
  
            .header {
    flex-direction: column;
                gap: 16px;
                padding: 16px;
            }

            .header-controls {
                width: 100%;
                justify-content: space-between;
            }

            .schedule-header {
                grid-template-columns: 60px repeat(7, 1fr);
            }

            .schedule-body {
                grid-template-columns: 60px repeat(7, 1fr);
            }

            .time-column-header,
            .time-slot {
                padding: 8px 4px;
                font-size: 10px;
            }

            .day-header {
                padding: 12px 4px;
                font-size: 12px;
            }

            .schedule-cell {
                height: 20px;
                min-height: 20px;
            }

            .reservation-block {
          font-size: 10px;
                padding: 2px 4px;
            }

            .modal-content {
                margin: 5% auto;
                width: 95%;
            }

            .settings-tabs {
                overflow-x: auto;
            }

            .tab-button {
  white-space: nowrap;
                min-width: 100px;
            }

            .time-slot-input {
                flex-direction: column;
                gap: 8px;
            }
        }

    @keyframes slideInRight {
        from { transform: translateX(300px); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
    }

    @keyframes slideOutRight {
        from { transform: translateX(0); opacity: 1; }
        to { transform: translateX(300px); opacity: 0; }
    }
    
    /* シフト変更確認モーダルのスタイル */
    #shiftChangeModal {
        z-index: 1050;
        overflow: hidden;
    }
    
    #shiftChangeModal .modal-dialog {
        max-width: 1400px;
        width: 98%;
        margin: 0.5rem auto;
        overflow: hidden;
    }
    
    #shiftChangeModal .modal-content {
        max-height: 55vh;
        height: 50vh;
        overflow: hidden;
    }
    
    #shiftChangeModal .modal-body {
        padding: 1rem;
        max-height: 35vh;
        height: 25vh;
        overflow: hidden;
        font-size: 1.1rem;
    }
    
    #shiftChangeModal .table {
        font-size: 1rem;
        margin-bottom: 0;
    }
    
    #shiftChangeModal .table-responsive {
        overflow: hidden !important;
    }
    
    #shiftChangeModal .alert {
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        font-size: 0.9em;
    }
    
    #shiftChangeModal .modal-footer {
        padding: 0.75rem 1.5rem 1rem 1.5rem;
        border-top: 1px solid #dee2e6;
        text-align: center;
    }
    
    #shiftChangeModal .modal-footer .btn {
        min-width: 80px;
        margin: 0 auto;
        padding: 0.375rem 1rem;
        font-size: 0.9rem;
    }
    
    #shiftChangeModal .modal-header {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #dee2e6;
    }
    
    #shiftChangeModal .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1040;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
    }

    /* Booking Modal Styles - Distinct from Break Modal */
    .booking-modal {
        display: none;
        position: fixed;
        z-index: 10000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        pointer-events: auto; /* モーダル背景のクリックイベントを有効化 */
    }

    .booking-modal-background {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0); /* 完全に透明に変更 */
        backdrop-filter: none; /* ぼやかし効果を完全に無効化 */
        cursor: pointer; /* 背景部分にカーソルを表示 */
    }

    .booking-modal-content {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border: none;
        width: 90%;
        max-width: 500px;
        max-height: 90vh;
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(52, 152, 219, 0.3);
        overflow: hidden;
        /* animation: bookingModalSlideIn 0.3s ease-out; アニメーションを無効化 */
        display: flex;
        flex-direction: column;
        pointer-events: auto; /* モーダル内容のクリックイベントを有効化 */
        cursor: default; /* 内容部分は通常のカーソル */
        z-index: 1; /* 背景より前面に表示 */
    }

    @keyframes bookingModalSlideIn {
        from {
            opacity: 1;
            transform: none;
        }
        to {
            opacity: 1;
            transform: none;
        }
    }

    .booking-modal-header {
        background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
        color: white;
        padding: 20px 24px;
        text-align: center;
        position: relative;
        pointer-events: auto; /* ヘッダー部分のクリックイベントを有効化 */
    }

    .booking-modal-header h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .booking-modal-close {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 24px;
        font-weight: bold;
        color: white;
        cursor: pointer;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.2s ease;
        pointer-events: auto; /* 閉じるボタンのクリックイベントを有効化 */
    }

    .booking-modal-close:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-50%) scale(1.1);
    }

    .booking-modal-body {
        padding: 24px;
        overflow-y: auto;
        flex: 1;
        max-height: calc(90vh - 140px); /* Account for header and footer */
        pointer-events: auto; /* ボディ部分のクリックイベントを有効化 */
    }

    .booking-info-section {
        background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
        border: 2px solid #28a745;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 20px;
        text-align: center;
    }

    .booking-datetime {
        font-size: 16px;
        color: #155724;
        font-weight: 500;
    }

    .booking-form-section {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .booking-field {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .booking-label {
        font-weight: 600;
        font-size: 14px;
        color: #2c3e50;
    }

    .booking-select, .booking-input, .booking-textarea {
        padding: 12px 16px;
        border: 2px solid #2ecc71;
        border-radius: 8px;
        font-size: 14px;
        transition: all 0.2s ease;
        background: white;
    }

    .booking-select:focus, .booking-input:focus, .booking-textarea:focus {
        outline: none;
        border-color: #27ae60;
        box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
        transform: translateY(-1px);
    }

    .booking-textarea {
        resize: vertical;
        min-height: 60px;
        font-family: inherit;
    }

    .booking-modal-footer {
        padding: 20px 24px;
        background: #f8f9fa;
        display: flex;
        gap: 12px;
        justify-content: center;
        flex-shrink: 0;
        pointer-events: auto; /* フッター部分のクリックイベントを有効化 */
    }

    /* Custom scrollbar for booking modal body */
    .booking-modal-body::-webkit-scrollbar {
        width: 8px;
    }

    .booking-modal-body::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .booking-modal-body::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

    .booking-modal-body::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

    .booking-btn {
        padding: 12px 24px;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
        min-width: 120px;
    }

    .booking-btn-create {
        background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    }

    .booking-btn-create:hover {
        background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
    }

    .booking-btn-cancel {
        background: #6c757d;
        color: white;
    }

    .booking-btn-cancel:hover {
        background: #5a6268;
        transform: translateY(-2px);
    }

    /* その日以降の予約セクション - 強制適用 */
    .future-reservations-section {
        background: #f8f9fa !important;
        border-radius: 8px !important;
        padding: 15px !important;
        margin: 15px 0 !important;
        border: 1px solid #dee2e6 !important;
    }

    .future-reservations-section .section-title {
        color: #495057 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        margin-bottom: 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .future-reservation-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 12px !important;
        background: #ffffff !important;
        border-radius: 6px !important;
        margin-bottom: 8px !important;
        transition: all 0.2s ease !important;
        border: 1px solid #e9ecef !important;
    }

    .future-reservation-item:hover {
        background: #f8f9fa !important;
        transform: translateX(2px) !important;
        border-color: #007bff !important;
    }

    .future-reservation-date {
        color: #495057 !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        min-width: 80px !important;
    }

    .future-reservation-details {
        flex: 1 !important;
        margin-left: 12px !important;
    }

    .future-reservation-customer {
        color: #212529 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        margin-bottom: 2px !important;
    }

    .future-reservation-course {
        color: #6c757d !important;
        font-size: 12px !important;
    }

    /* その日以降の予約セクション内のローディング状態とデータなし状態 - 強制適用 */
    .future-reservations-content .loading {
        color: #6c757d !important;
        font-size: 14px !important;
        text-align: center !important;
        padding: 20px !important;
        font-style: italic !important;
    }

    .future-reservations-content .no-data {
        color: #6c757d !important;
        font-size: 14px !important;
        text-align: center !important;
        padding: 20px !important;
        font-style: italic !important;
        background: #f8f9fa !important;
        border-radius: 6px !important;
        border: 1px dashed #dee2e6 !important;
    }

    /* その日以降の予約セクション内の時間表示 */
    .future-reservation-time {
        color: #007bff;
        font-size: 12px;
        font-weight: 500;
        margin-right: 8px;
    }

    /* その日以降の予約セクション内のステータス表示 */
    .future-reservation-status {
        font-size: 11px;
        padding: 2px 6px;
        border-radius: 12px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .future-reservation-status.confirmed {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

    .future-reservation-status.tentative {
        background: #fff3cd;
        color: #856404;
        border: 1px solid #ffeaa7;
    }

    .future-reservation-status.cancelled {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

    /* より具体的で強力なセレクタ - その日以降の予約セクション */
    #reservationDetailModal .future-reservations-section,
    .modal .future-reservations-section {
        background: #f8f9fa !important;
        border-radius: 8px !important;
        padding: 15px !important;
        margin: 15px 0 !important;
        border: 1px solid #dee2e6 !important;
    }

    #reservationDetailModal .future-reservations-section .section-title,
    .modal .future-reservations-section .section-title {
        color: #495057 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        margin-bottom: 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    #reservationDetailModal .future-reservation-item,
    .modal .future-reservation-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 12px !important;
        background: #ffffff !important;
        border-radius: 6px !important;
        margin-bottom: 8px !important;
        transition: all 0.2s ease !important;
        border: 1px solid #e9ecef !important;
    }

    #reservationDetailModal .future-reservation-item:hover,
    .modal .future-reservation-item:hover {
        background: #f8f9fa !important;
        transform: translateX(2px) !important;
        border-color: #007bff !important;
    }

    #reservationDetailModal .future-reservation-date,
    .modal .future-reservation-date {
        color: #495057 !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        min-width: 80px !important;
    }

    #reservationDetailModal .future-reservation-details,
    .modal .future-reservation-details {
        flex: 1 !important;
        margin-left: 12px !important;
    }

    #reservationDetailModal .future-reservation-customer,
    .modal .future-reservation-customer {
        color: #212529 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        margin-bottom: 2px !important;
    }

    #reservationDetailModal .future-reservation-course,
    .modal .future-reservation-course {
        color: #6c757d !important;
        font-size: 12px !important;
    }

    #reservationDetailModal .future-reservations-content .loading,
    .modal .future-reservations-content .loading {
        color: #6c757d !important;
        font-size: 14px !important;
        text-align: center !important;
        padding: 20px !important;
        font-style: italic !important;
    }

    #reservationDetailModal .future-reservations-content .no-data,
    .modal .future-reservations-content .no-data {
        color: #6c757d !important;
        font-size: 14px !important;
        text-align: center !important;
        padding: 20px !important;
        font-style: italic !important;
        background: #f8f9fa !important;
        border-radius: 6px !important;
        border: 1px dashed #dee2e6 !important;
    }

    /* インラインスタイルを上書きするための最強セレクタ */
    #reservationDetailModal .future-reservations-section *,
    .modal .future-reservations-section * {
        color: inherit !important;
    }

    #reservationDetailModal .future-reservations-section .section-title,
    .modal .future-reservations-section .section-title {
        color: #495057 !important;
    }

    #reservationDetailModal .future-reservations-section .future-reservation-date,
    .modal .future-reservations-section .future-reservation-date {
        color: #495057 !important;
    }

    #reservationDetailModal .future-reservations-section .future-reservation-customer,
    .modal .future-reservations-section .future-reservation-customer {
        color: #212529 !important;
    }

    #reservationDetailModal .future-reservations-section .future-reservation-course,
    .modal .future-reservations-section .future-reservation-course {
        color: #6c757d !important;
    }

    /* モバイル向けレスポンシブデザイン */
    @media (max-width: 767px) {
        /* コンテナのパディング調整 */
        #calendar-page-wrapper .container-lg {
            padding-left: 10px;
            padding-right: 10px;
        }

        /* ヘッダー部分の調整 */
        #calendar-page-wrapper h1 {
            font-size: 1.25rem;
        }

        /* カレンダーカードの調整 */
        .card {
            margin-bottom: 1rem;
        }

        /* スケジュールコンテナの横スクロール対応 */
        .schedule-container {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .schedule-header,
        .schedule-body {
            min-width: 650px;
        }

        /* グリッドの列幅を統一（ヘッダーとボディのずれを防ぐ） */
        .schedule-header {
            grid-template-columns: 60px repeat(7, 1fr) !important;
        }

        .schedule-body {
            grid-template-columns: 60px repeat(7, 1fr) !important;
        }

        .schedule-row {
            grid-template-columns: 60px repeat(7, 1fr) !important;
        }

        /* 時刻列の幅を統一 */
        .time-column-header {
            width: 60px !important;
            min-width: 60px !important;
            max-width: 60px !important;
        }

        .time-slot {
            width: 60px !important;
            min-width: 60px !important;
            max-width: 60px !important;
        }

        /* サイドバーの調整 */
        .course-blocks-container {
            padding: 0.5rem;
        }

        .course-blocks-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
        }

        .course-block {
            font-size: 0.75rem;
        }

        .course-block-header {
            padding: 0.25rem;
        }

        .course-block-body {
            padding: 0.25rem;
        }

        /* モーダルの調整 */
        .modal-dialog {
            margin: 0.5rem;
            max-width: calc(100% - 1rem);
        }

        .modal-content {
            border-radius: 0.5rem;
        }

        .modal-header {
            padding: 0.75rem 1rem;
        }

        .modal-body {
            padding: 1rem;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }

        /* ボタンの調整 */
        .btn-sm {
            padding: 0.25rem 0.5rem;
            font-size: 0.875rem;
        }

        /* 予約詳細フォームの調整 */
        #reservationDetailsForm {
            padding: 0.75rem;
        }

        #reservationDetailsForm .form-group {
            margin-bottom: 0.75rem;
        }

        /* ミニカレンダーの調整 */
        .mini-calendar {
            width: calc(100vw - 2rem);
            max-width: 320px;
            left: 50% !important;
            transform: translateX(-50%);
        }

        /* 週表示の調整 */
        #currentWeek {
            font-size: 0.75rem;
            white-space: normal;
            line-height: 1.2;
            text-align: center;
            min-width: 100px;
            max-width: none;
            flex-shrink: 0;
        }

        /* 週ナビゲーションのボタンを横並びに */
        .card-header .d-flex.flex-wrap {
            flex-wrap: nowrap !important;
        }

        /* カレンダーヘッダーの調整 */
        .card-header {
            padding: 0.75rem;
        }

        /* 予約ブロックの調整（サイズのみ） */
        .reservation-block {
            font-size: 0.65rem;
            padding: 2px 4px;
        }

        .reservation-block .customer-name {
            font-size: 0.6rem;
        }

        .reservation-block .reservation-time {
            font-size: 0.55rem;
        }

        /* フォーム要素の調整 */
        .form-control,
        .form-select {
            font-size: 0.875rem;
            padding: 0.375rem 0.5rem;
        }

        /* ユーザー選択セクションの調整 */
        .selected-user-display {
            padding: 0.5rem;
            font-size: 0.875rem;
        }

        /* コースブロックのドラッグ時の視認性向上 */
        .course-block.dragging {
            opacity: 0.7;
            transform: scale(0.95);
        }
    }

    /* より小さな画面向け（480px以下） */
    @media (max-width: 480px) {
        .schedule-header,
        .schedule-body {
            min-width: 600px;
        }

        .course-blocks-grid {
            grid-template-columns: 1fr;
        }

        #currentWeek {
            font-size: 0.7rem;
            min-width: 90px;
        }

        .btn-sm {
            padding: 0.2rem 0.4rem;
            font-size: 0.8rem;
        }

        .card-header h5 {
            font-size: 0.9rem;
        }

        /* 予約ブロックのサイズ調整 */
        .reservation-block {
            font-size: 0.6rem;
            padding: 1px 3px;
        }

        .reservation-block .customer-name {
            font-size: 0.55rem;
        }

        .reservation-block .reservation-time {
            font-size: 0.5rem;
        }
    }
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* ナビゲーションのFOUC問題を完全に解決 */
.navbar {
  min-height: 56px !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

.navbar-brand {
  display: flex !important;
  align-items: center !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
}

.navbar-nav {
  margin: 0 !important;
  padding: 0 !important;
}

.nav-link {
  padding: 0.5rem 1rem !important;
  font-size: 0.9rem !important;
}

.navbar-logo {
  width: 120px !important;
  height: auto !important;
  max-height: 40px !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1) !important;
  transition: none !important;
}

.brand-text {
  font-weight: 600 !important;
  font-size: 1.2rem !important;
}

/* グローバルテキスト入力スタイル修正 - 入力フィールドのみに限定 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  padding-left: 0.375rem !important;
  padding-right: 0.375rem !important;
  text-indent: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ログインボタンのみ中央寄せに - 初期状態から確実に適用 */
.btn-primary,
.btn-primary:focus,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:visited,
.btn-primary:link {
  text-align: center !important;
  text-align-last: center !important;
  direction: ltr !important;
}

/* より具体的なセレクターで優先順位を上げる */
input[type="submit"].btn-primary,
button.btn-primary {
  text-align: center !important;
  text-align-last: center !important;
  direction: ltr !important;
}

/* プレースホルダーのスタイル - 入力フィールドのみ */
input::placeholder,
textarea::placeholder {
  text-align: left !important;
  direction: ltr !important;
  text-indent: 0 !important;
}

/* フォーカス時のスタイル - 入力フィールドのみ */
input:focus,
textarea:focus,
select:focus {
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  text-indent: 0 !important;
}

/* 入力中のスタイル - 入力フィールドのみ */
input:not(:placeholder-shown),
textarea:not(:placeholder-shown) {
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  text-indent: 0 !important;
}

/* Bootstrapフォームコントロールのオーバーライド - 入力フィールドのみ */
.form-control {
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  text-indent: 0 !important;
}

.form-control:focus {
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  text-indent: 0 !important;
}

/* 入力グループ内のフォームコントロール - 入力フィールドのみ */
.input-group .form-control {
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  text-indent: 0 !important;
}

/* 特定のクラスを持つ要素のオーバーライドを削除 - タイトルなどに影響しないように */
/* .text-start,
.text-center,
.text-end {
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  text-indent: 0 !important;
} */
