* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.app-container {
    min-height: 100vh;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

/* ヘッダー */
.app-header {
    background-color: #ffffff;
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-bottom: 1px solid #e9ecef;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
}

.app-header .text-muted {
    font-size: 0.875rem;
}

.header-content {
    position: relative;
    left: 50%; /* コンテナ内で中央揃え */
    transform: translateX(-50%); /* 完全に中央に配置 */
    text-align: center; /* テキストを中央揃え */
}

/* ハンバーガーメニュー */
.dropdown {
    position: relative; /* ドロップダウンの基準位置を設定 */
}

.dropdown .btn-link {
    text-decoration: none;
    border: none;
    background: none;
    box-shadow: none;
    position: relative;
    z-index: 9999; /* ボタンも同じz-indexを設定 */
}

.dropdown .btn-link:hover {
    opacity: 0.7;
}

.dropdown .btn-link:focus {
    box-shadow: none;
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
    min-width: 180px;
    z-index: 10000; /* さらに高い値を設定 */
    position: fixed; /* fixedに変更してより確実に最前面に表示 */
}

.dropdown-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
}

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

.dropdown-item.text-danger:hover {
    background-color: #fff5f5;
}

/* タブナビゲーション */
.custom-tabs {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 0.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.custom-tabs .nav-link {
    border-radius: 10px;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-tabs .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: #495057;
}

.custom-tabs .nav-link.active {
    background-color: #ffffff;
    color: #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-tabs .nav-link svg {
    vertical-align: middle;
}

/* セクションタイトル */
.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 4px solid #007bff;
}

/* シフトカード */
.shift-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shift-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.shift-date {
    min-width: 60px;
    text-align: center;
    padding-right: 1rem;
    border-right: 2px solid #e9ecef;
}

.date-day {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.2;
}

.date-week {
    font-size: 0.875rem;
    color: #6c757d;
}

.shift-details {
    flex: 1;
    padding-left: 1rem;
}

.shift-time {
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

.shift-place {
    font-size: 1rem;
    color: #212529;
    font-weight: 500;
    margin-top: 0.25rem;
}

.shift-salary {
    text-align: right;
}

.salary-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: #007bff;
}

/* サマリーカード */
.summary-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.summary-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.25rem;
}

.summary-sub {
    font-size: 0.75rem;
    color: #28a745;
}

/* チャートコンテナ */
.chart-container,
.pie-chart-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
}

/* レスポンシブ対応 */
@media (max-width: 576px) {
    .app-header h1 {
        font-size: 1.25rem;
    }

    .shift-card {
        padding: 0.875rem;
    }

    .shift-date {
        min-width: 50px;
    }

    .date-day {
        font-size: 1rem;
    }

    .shift-time {
        font-size: 0.8125rem;
    }

    .shift-place {
        font-size: 0.9375rem;
    }

    .salary-amount {
        font-size: 1rem;
    }

    .summary-value {
        font-size: 1.25rem;
    }
}

/* ページネーションコントロール */
.pagination-controls-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.btn-pagination {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
}

.btn-pagination:hover:not(:disabled) {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
    transform: scale(1.05);
}

.btn-pagination:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #495057;
    min-width: 60px;
    text-align: center;
}

/* タブコンテンツのフェードイン */
.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* 設定画面 */
.settings-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.settings-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

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

.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
    font-size: 1rem;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 500;
}

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

/* バイト一覧カード */
.job-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.job-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.job-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.job-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: #f8f9fa;
    transform: scale(1.05);
}

.btn-icon.btn-edit:hover {
    border-color: #007bff;
    color: #007bff;
}

.btn-icon.btn-delete:hover {
    border-color: #dc3545;
    color: #dc3545;
    background-color: #fff5f5;
}

.job-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.job-detail-item {
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
    color: #495057;
}

.job-detail-label {
    font-weight: 500;
    min-width: 120px;
    color: #6c757d;
}

.job-detail-value {
    color: #212529;
}

.job-keyword {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.job-wage {
    font-weight: 600;
    color: #28a745;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state svg {
    opacity: 0.5;
    margin-bottom: 1rem;
}

#backBtn {
    text-decoration: none;
    border: none;
    background: none;
}

#backBtn:hover {
    opacity: 0.7;
}

@media (max-width: 576px) {
    .job-detail-label {
        min-width: 100px;
    }
    
    .settings-card {
        padding: 1rem;
    }
}

/* 表示切り替えボタン */
.btn-view-toggle {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-toggle:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

/* カレンダー表示 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.calendar-month {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

.btn-calendar-nav {
    background-color: transparent;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-calendar-nav:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    padding: 0.75rem 0.5rem;
    background-color: #e9ecef;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.calendar-day-header:nth-child(7) {
    border-right: none;
}

.calendar-day {
    min-height: 60px;
    padding: 6px 4px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

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

/* ★★★ 追加: 選択された日付のスタイル ★★★ */
.calendar-day.selected {
    background-color: #cfe2ff !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* 今日の日付 */
.calendar-day.today {
    background-color: #fff3cd;
    border-color: #ffc107;
}

/* 今日かつ選択された日付 */
.calendar-day.today.selected {
    background-color: #b8daff !important;
    border-color: #0d6efd !important;
}

/* 他の月の日付 */
.calendar-day.other-month {
    background-color: #f8f9fa;
    color: #adb5bd;
    cursor: default;
}

.calendar-day.other-month:hover {
    background-color: #f8f9fa;
}

/* 日付番号 */
.calendar-day-number {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

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

.calendar-day.today .calendar-day-number {
    color: #856404;
}

.calendar-day.selected .calendar-day-number {
    color: #0d6efd;
    font-weight: 700;
}

/* シフト情報表示エリア */
.shift-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
    align-items: center;
    min-height: 14px;
}

/* シフトドット */
.calendar-shift {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* 以下のクラスは不要になったため削除 */
/*
.calendar-shift.cafe { background-color: #FFB6C1; }
.calendar-shift.convenience { background-color: #87CEEB; }
.calendar-shift.cleaning { background-color: #F0E68C; }
.calendar-shift.event { background-color: #B0E0E6; }
.calendar-shift.warehouse { background-color: #DDA0DD;
}
*/

/* カレンダー凡例 */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    /* 色はJavaScriptで動的に設定されるため、CSSから削除 */
}

/* 以下のクラスは不要になったため削除 */
/*
.legend-dot.cafe { background-color: #FFB6C1; }
.legend-dot.convenience { background-color: #87CEEB; }
.legend-dot.cleaning { background-color: #F0E68C; }
.legend-dot.event { background-color: #B0E0E6; }
.legend-dot.warehouse { background-color: #DDA0DD; }
*/

.legend-label {
    font-size: 13px;
    color: #495057;
}

/* ...existing code... */

.login-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
}

.google-login-button {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: #212529;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.google-login-button:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* シフトカードのフェードイン */
.shift-fade-in {
    animation: shiftFadeIn 0.3s ease-in-out;
}

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

/* クリアボタンの初期状態（非表示） */
#clearDatesBtn {
    display: none;
    transition: all 0.2s ease;
}

/* クリアボタンのホバー時 */
#clearDatesBtn:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}