/* 追加のカスタムスタイル */

/* スムーズなスクロール */
html {
    scroll-behavior: smooth;
}

/* カードのホバーエフェクト強化 */
.card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.12), 0 10px 10px rgba(0,0,0,0.08);
}

/* ボタンのアニメーション */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* テーブルの改善 */
.table {
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* フォームコントロールの改善 */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

/* アラートの改善 */
.alert {
    border-left-width: 4px;
    border-left-style: solid;
    animation: slideInDown 0.5s ease;
}

.alert-success {
    border-left-color: #28a745;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-info {
    border-left-color: #17a2b8;
}

/* アニメーション */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ページ遷移アニメーション */
.main-container {
    animation: fadeInUp 0.6s ease;
}

/* ローディングアニメーション改善 */
.spinner-border {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* レスポンシブ改善 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .main-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* プログレスバーのアニメーション */
.progress-bar {
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ナビゲーションの改善 */
.navbar-brand {
    font-size: 1.1rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #667eea !important;
}

/* ドロップダウンの改善 */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 10px;
    animation: fadeInUp 0.3s ease;
}

.dropdown-item {
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 2px;
}

.dropdown-item:hover {
    background-color: #667eea;
    color: white;
    transform: translateX(5px);
}

/* フッターの改善 */
.footer {
    margin-top: 4rem;
}

/* 統計カードの改善 */
.card .fa-2x {
    transition: transform 0.3s ease;
}

.card:hover .fa-2x {
    transform: scale(1.1);
}

/* タブの改善 */
.nav-tabs .nav-link {
    border-radius: 10px 10px 0 0;
    margin-right: 5px;
    border: none;
    background: rgba(102, 126, 234, 0.1);
}

.nav-tabs .nav-link.active {
    background: #667eea;
    color: white;
}

/* ファイルアップロードの改善 */
.form-control[type="file"] {
    padding: 0.75rem;
    height: auto;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-right: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    background: #5a6fd8;
}

/* バッジの改善 */
.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

/* 検索・フィルター機能のスタイル */
.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-box input {
    padding-left: 45px;
}

/* ツールチップの改善 */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* 印刷時のスタイル */
@media print {
    .navbar,
    .footer,
    .btn,
    .loading-overlay {
        display: none !important;
    }
    
    .main-container {
        box-shadow: none;
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== FullCalendar カスタムスタイル ===== */

/* イベント色（希望日ステータス） */
.fc-event-available { 
    background-color: #28a745 !important; 
    border-color: #28a745 !important;
    color: white !important;
}

.fc-event-unavailable { 
    background-color: #dc3545 !important; 
    border-color: #dc3545 !important;
    color: white !important;
}

.fc-event-not_set { 
    background-color: #6c757d !important; 
    border-color: #6c757d !important;
    color: white !important;
}

/* 休日の背景色 */
.fc-daygrid-day.fc-day-holiday { 
    background-color: #fff3cd !important;
}

.fc-daygrid-day.fc-day-sat {
    background-color: #e3f2fd !important;
}

.fc-daygrid-day.fc-day-sun {
    background-color: #ffebee !important;
}

/* 日付セルのホバーエフェクト */
.fc-daygrid-day:hover {
    background-color: #e9ecef !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fc-daygrid-day:active {
    transform: scale(0.98);
}

/* 今日の日付を強調 */
.fc-day-today {
    background-color: #e7f3ff !important;
    border: 2px solid #667eea !important;
}

/* イベントのアニメーション */
@keyframes statusChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.fc-event.status-changed {
    animation: statusChange 0.3s ease-in-out;
}

/* ツールバーのスタイル */
.fc .fc-toolbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.fc .fc-toolbar-title {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.fc .fc-button {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 600 !important;
}

.fc .fc-button:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
}

.fc .fc-button-active {
    background-color: rgba(255, 255, 255, 0.4) !important;
}

/* イベントタイトル */
.fc-event-title {
    font-weight: 600;
    font-size: 1.2rem;
}

/* 日付番号 */
.fc-daygrid-day-number {
    font-weight: 600;
    padding: 8px;
}

/* 週末の日付を強調 */
.fc-day-sat .fc-daygrid-day-number {
    color: #0d6efd;
}

.fc-day-sun .fc-daygrid-day-number {
    color: #dc3545;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .fc-daygrid-day {
        min-height: 60px !important;
    }
    
    .fc-toolbar {
        flex-direction: column !important;
        gap: 10px;
    }
    
    .fc-toolbar-chunk {
        margin: 5px 0 !important;
    }
    
    .fc-event-title {
        font-size: 0.9rem;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.2rem;
    }
}

/* イベントのツールチップ風スタイル */
.fc-event {
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fc-event:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
    z-index: 999;
}

.fc-event-title {
    text-align: center !important;
    width: 100%;
    display: block !important;
}

.fc-event-main {
    text-align: center !important;
}

/* カレンダー全体のスタイル */
.fc {
    border-radius: 10px;
    overflow: hidden;
}

.fc-view-harness {
    background: white;
}

/* 日付グリッドの境界線 */
.fc-theme-standard td,
.fc-theme-standard th {
    border-color: #dee2e6;
}

/* ===== サマリーウィジェットのスタイル ===== */

.summary-widget {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.summary-widget .progress {
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
}

.summary-widget .progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 保存状態インジケーター */
#saveStatus {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

/* トーストコンテナ */
#toastContainer {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
}

.toast {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ===== ステータス選択モーダル ===== */

#selectStatusModal .list-group-item {
    border: none;
    transition: all 0.2s ease;
}

#selectStatusModal .list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

#selectStatusModal .list-group-item:active {
    transform: scale(0.98);
}

#selectStatusModal .fa-check-circle:hover {
    transform: scale(1.1);
}

#selectStatusModal .fa-times-circle:hover {
    transform: scale(1.1);
}
