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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', sans-serif;
    background: #e2e8f0;
    min-height: 100vh;
    padding: 20px;
    font-size: 15px;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: #0f172a;
    color: white;
    padding: 20px 25px;
    text-align: center;
}

.app-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.main-layout {
    display: flex;
    flex: 1;
}

.tab-navigation {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1e3a5f 0%, #2c5282 100%);
    width: 70px;
    padding: 15px 0;
    gap: 8px;
    transition: width 0.3s ease;
    position: relative;
}

.tab-button {
    padding: 14px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    color: #e2e8f0;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.tab-button .tab-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.tab-button .tab-text {
    display: none;
}

@media (min-width: 1920px) {
    .tab-navigation {
        width: 220px;
    }

    .tab-button {
        padding: 14px 20px;
        justify-content: flex-start;
    }

    .tab-button .tab-text {
        display: inline;
        color: #e2e8f0;
    }

    .tab-button.active .tab-text {
        color: #60A5FA;
    }
}

.tab-button.active {
    background: rgba(96, 165, 250, 0.2);
    color: #60A5FA;
    border-left-color: #60A5FA;
}

.tab-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* ツールチップ */
.tab-button::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    margin-left: 10px;
    padding: 8px 12px;
    background: #1a202c;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

@media (min-width: 1920px) {
    .tab-button::after {
        display: none;
    }
}

.tab-button:hover::after {
    opacity: 1;
}

.content-area {
    flex: 1;
    overflow-y: auto;
}

.tab-content {
    display: none;
    padding: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* スタッフ管理タブ用の特別なレイアウト */
#staff-tab .form-grid {
    grid-template-columns: 1fr 2fr;
}

.form-section {
    background: white;
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.form-section h3 {
    color: #212529;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.01em;
}

.input-group {
    margin-bottom: 12px;
}

.form-section .input-group:last-of-type {
    margin-bottom: 15px;
}

/* モーダル内段組みレイアウト */
.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* コンパクトフォーム段組み（新規登録用）*/
.compact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

/* モバイル対応 */
@media (max-width: 600px) {
    .modal-form-grid,
    .compact-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* オシャレなトグルボタン */
.toggle-container {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 40px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border: 2px solid rgba(108, 117, 125, 0.2);
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.1),
        0 2px 8px rgba(0,0,0,0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 30px;
    width: 30px;
    left: 3px;
    top: 3px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 2px 8px rgba(0,0,0,0.15),
        0 1px 2px rgba(0,0,0,0.1);
}

input:checked + .slider {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.1),
        0 0 0 3px rgba(14, 165, 233, 0.2),
        0 4px 12px rgba(14, 165, 233, 0.3);
}

input:checked + .slider:before {
    transform: translateX(40px);
    background: linear-gradient(135deg, #ffffff, #f0fff4);
    box-shadow:
        0 4px 12px rgba(14, 165, 233, 0.4),
        0 2px 4px rgba(0,0,0,0.1);
}

.toggle-labels {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.off-label {
    color: #6c757d;
    transition: all 0.3s ease;
}

.on-label {
    color: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}

input:checked + .slider .off-label {
    color: rgba(255,255,255,0.5);
}

input:checked + .slider .on-label {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.toggle-switch:hover .slider {
    transform: scale(1.02);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.1),
        0 4px 15px rgba(0,0,0,0.15);
}

input:checked + .slider:hover {
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.1),
        0 0 0 3px rgba(14, 165, 233, 0.3),
        0 6px 20px rgba(14, 165, 233, 0.4);
}

/* 小さいサイズのトグルボタン（スタッフ編集用）*/
.toggle-switch-small {
    width: 60px;
    height: 30px;
}

.slider-small {
    border-radius: 20px;
}

.slider-small:before {
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
}

input:checked + .slider-small:before {
    transform: translateX(30px);
}

.toggle-labels-small {
    font-size: 9px;
    padding: 0 6px;
}

/* トグルボタンスタイル */
.toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #6c757d;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-color: #dee2e6;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    border-color: #0ea5e9;
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.toggle-btn.active:hover {
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.toggle-icon {
    font-size: 16px;
    transition: all 0.3s ease;
}

.toggle-text {
    font-size: 14px;
    transition: all 0.3s ease;
}

/* 小さなトグルボタン */
.toggle-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.toggle-btn-small .toggle-icon {
    font-size: 14px;
}

.toggle-btn-small .toggle-text {
    font-size: 12px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(233,236,239,0.8);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #60A5FA;
    background: rgba(255,255,255,0.95);
    box-shadow:
        0 0 0 4px rgba(102, 126, 234, 0.12),
        0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.btn {
    padding: 11px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.btn-primary {
    background: #64748b;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-info {
    background: #0ea5e9;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    opacity: 0.9;
}

.btn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

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

.btn-icon {
    padding: 8px 12px;
    font-size: 18px;
}

/* スタッフカードコンテナ - タイル型グリッドレイアウト */
#staffList {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 1600px) {
    #staffList {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

/* スタッフカード - タイル型デザイン */
.staff-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px 14px 14px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: visible;
    min-height: 0;
}

.staff-card.has-preferences {
    gap: 8px;
}

.staff-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: #dee2e6;
    transition: all 0.3s ease;
}

.staff-card[data-role="医師"]::before {
    background: linear-gradient(90deg, #1e40af, #3b82f6);
}

.staff-card[data-role="看護師"]::before {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

.staff-card[data-role="技師"]::before {
    background: linear-gradient(90deg, #3b82f6, #60A5FA);
}

.staff-card[data-role="事務"]::before {
    background: linear-gradient(90deg, #475569, #64748b);
}

.staff-card[data-role="その他"]::before {
    background: linear-gradient(90deg, #60A5FA, #93c5fd);
}

.staff-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
    border-color: #cbd5e0;
    background: #ffffff;
}

.staff-card:hover::before {
    height: 5px;
}

/* タイル型レイアウト - 中央揃え */
.staff-card > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
}

.staff-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.staff-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4), 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.staff-avatar[data-role="医師"] { background: linear-gradient(135deg, #059669, #10B981); }
.staff-avatar[data-role="看護師"] { background: linear-gradient(135deg, #059669, #10B981); }
.staff-avatar[data-role="技師"] { background: linear-gradient(135deg, #059669, #10B981); }
.staff-avatar[data-role="事務"] { background: linear-gradient(135deg, #059669, #10B981); }
.staff-avatar[data-role="その他"] { background: linear-gradient(135deg, #059669, #10B981); }

.staff-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    align-items: center;
}

.staff-details > div:first-child {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.staff-holiday {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.3;
}

.staff-meta {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.2px;
}

.staff-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    margin-top: auto;
}

.staff-actions .btn {
    white-space: nowrap;
    justify-content: center;
    padding: 5px 8px;
    font-size: 10px;
    position: relative;
    border-radius: 6px;
}

@media (min-width: 1600px) {
    .staff-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .staff-actions .btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}


/* 勤務タイプカード */
.shift-type-card {
    background: white;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

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

.shift-color-indicator {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    margin-right: 15px;
}

.shift-color-indicator.color-1 {
    border: 2px solid #dee2e6 !important;
}

.shift-details {
    flex: 1;
}

.shift-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 3px;
}

.shift-info {
    font-size: 13px;
    color: #6c757d;
}

/* 画面表示用の淡い色 - 医療システム風の落ち着いた配色 */
.color-1 { background: transparent !important; }
.color-2 { background: #d4e7f5 !important; }  /* ソフトブルー */
.color-3 { background: #f5d4d4 !important; }  /* ソフトピンク */
.color-4 { background: #d4f5e7 !important; }  /* ソフトグリーン */
.color-5 { background: #e9ecef !important; }  /* ソフトグレー */

/* モーダル共通 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* スタッフ編集モーダルのz-indexを上げる */
#staffEditModal {
    z-index: 1100;
}

/* 休日設定モーダルがスタッフ編集から開かれた時のz-index */
#holidayModal.staff-edit-context {
    z-index: 1200;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

.modal-content {
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(248,249,250,0.95));
    border-radius: 6px;
    padding: 20px;
    width: 85%;
    max-width: 650px;
    box-shadow:
        0 25px 80px rgba(0,0,0,0.25),
        0 0 0 1px rgba(255,255,255,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.18);
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

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

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* カレンダーコンテナのスクロールバー */
.modal-calendar-container::-webkit-scrollbar {
    width: 6px;
}

.modal-calendar-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.03);
    border-radius: 3px;
}

.modal-calendar-container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.modal-calendar-container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

@keyframes slideUp {
    from {
        transform: translateY(60px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

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

.modal-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #212529;
    letter-spacing: -0.02em;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, rgba(248,249,250,0.8), rgba(233,236,239,0.8));
    cursor: pointer;
    font-size: 18px;
    color: #6c757d;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.modal-close:hover {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 25px rgba(220,53,69,0.3);
}

/* 休日設定モーダル */
.weekday-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
    margin: 20px 0;
    max-width: 100%;
}

.weekday-btn {
    padding: 15px 5px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.weekday-btn.selected {
    background: linear-gradient(135deg, #00a8e1, #0086b3);
    color: white;
    border-color: transparent;
}

/* シフト編集モーダル */
.shift-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 20px 0;
    max-width: 100%;
}

.shift-option-btn {
    padding: 20px 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.shift-option-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.shift-option-btn.selected {
    border-color: #60A5FA;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
}

.shift-option-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 0 auto 8px;
}

.shift-option-label {
    font-size: 14px;
    font-weight: 600;
}

.shift-option-time {
    font-size: 12px;
    color: #6c757d;
}

.custom-input-wrapper {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* スケジュール設定 */
.schedule-controls {
    background: white;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 20px;
}

.schedule-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.schedule-settings-grid .input-group {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.schedule-settings-grid .input-group:hover {
    border-color: #60A5FA;
    box-shadow: 0 2px 8px rgba(0, 168, 225, 0.1);
}

.control-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.control-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    letter-spacing: 0.02em;
}

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

/* カレンダー改善 */
.calendar-container {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 100%;
    overflow-x: auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #00a8e1, #0086b3);
    border-radius: 6px;
    color: white;
}

.calendar-title {
    font-size: 18px;
    font-weight: 700;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    padding: 8px 15px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.calendar-nav button:hover {
    background: white;
    color: #60A5FA;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    min-width: 320px;
    width: 100%;
}

.calendar-day-header {
    text-align: center;
    font-weight: 700;
    padding: 8px;
    color: #495057;
    font-size: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.calendar-day-header.sunday { color: #dc3545; }
.calendar-day-header.saturday { color: #60A5FA; }

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: white;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding: 4px;
    min-height: 60px;
    max-height: 80px;
}

.calendar-day:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-color: #60A5FA;
}

.calendar-day-number {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.calendar-day-shifts {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
}

.calendar-shift-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.calendar-day.weekend {
    background: #f8f9fa;
}

.calendar-day.holiday {
    background: #f8d7da;
}

.calendar-day.today {
    border-color: #60A5FA;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.calendar-day.calendar-holiday {
    background: #e3f2fd;
}

.calendar-rest-day {
    font-size: 18px;
    font-weight: 900;
    color: #d32f2f;
    text-align: center;
    margin: 4px 0;
    padding: 2px;
    background: #ffebee;
    border-radius: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* スケジュール表 */
.schedule-container {
    overflow-x: scroll;
    overflow-y: auto;
    margin-top: 20px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-height: 70vh;
    max-width: 100%;
}

.schedule-container::-webkit-scrollbar {
    height: 16px;
    width: 16px;
}

.schedule-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 6px;
    margin: 5px;
}

.schedule-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00a8e1, #0086b3);
    border-radius: 6px;
    border: 2px solid #f8f9fa;
}

.schedule-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0086b3, #006d8f);
}

.schedule-container::-webkit-scrollbar-corner {
    background: #f8f9fa;
}

.schedule-grid {
    display: grid;
    gap: 2px;
    background: #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.schedule-header {
    background: linear-gradient(135deg, #2c5282, #3b82f6);
    color: #ffffff;
    padding: 10px 5px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    min-width: 60px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid #1e3a5f;
    box-shadow: 0 2px 6px rgba(44, 82, 130, 0.25);
}

.schedule-header small {
    color: #fbbf24;
    font-weight: 600;
    font-size: 10px;
    display: inline-block;
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.schedule-cell {
    background: white;
    padding: 8px 4px;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.schedule-cell:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.schedule-cell.rest {
    background: #6c757d !important;
    color: white !important;
}

.schedule-cell.color-1 {
    background: white !important;
    color: #333 !important;
    border: 1px solid #dee2e6;
}

/* 淡い色の背景には濃い文字色を設定 */
.schedule-cell.color-2,
.schedule-cell.color-3,
.schedule-cell.color-4,
.schedule-cell.color-5 {
    color: #333 !important;
    font-weight: 600 !important;
}

.schedule-cell.custom {
    background: linear-gradient(135deg, #ff6b6b, #feca57) !important;
}

/* 統計 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, white, #f8f9fa);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-title {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #60A5FA;
}

.stat-detail {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    font-size: 13px;
    color: #495057;
}

.staff-stat-list {
    list-style: none;
    padding: 0;
}

.staff-stat-item {
    padding: 8px;
    margin-bottom: 5px;
    background: white;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.staff-stat-name {
    font-weight: 600;
}

.staff-stat-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* 希望休カレンダーのスタイル */
.requested-off-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    background: white;
    border-radius: 6px;
    padding: 10px;
    border: 1px solid #e9ecef;
}

.requested-off-day-header {
    text-align: center;
    font-weight: 700;
    padding: 6px;
    color: #495057;
    font-size: 11px;
    background: #f8f9fa;
    border-radius: 4px;
}

.requested-off-day-header.sunday { color: #dc3545; }
.requested-off-day-header.saturday { color: #60A5FA; }

.requested-off-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: white;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 12px;
    position: relative;
}

.requested-off-day:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-color: #60A5FA;
}

.requested-off-day.weekend {
    background: #f8f9fa;
}

.requested-off-day.today {
    border-color: #60A5FA;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.requested-off-day.requested {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border-color: #ff6b6b;
}

.requested-off-day.requested:hover {
    background: linear-gradient(135deg, #ff5252, #ff7979);
}

.requested-off-day.other-month {
    color: #dee2e6;
    background: #f8f9fa;
    cursor: not-allowed;
}

.requested-off-day.other-month:hover {
    transform: none;
    box-shadow: none;
    border-color: #e9ecef;
}

.requested-off-day.holiday {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #dc3545;
}

.requested-off-day.custom-holiday {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #dc3545;
}

.requested-off-day.scheduled-holiday {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #dc3545;
}

.requested-off-day.staff-holiday {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #dc3545;
    opacity: 0.7;
}

.requested-off-day.not-selectable {
    cursor: not-allowed !important;
    opacity: 0.7;
}

.requested-off-day.not-selectable:hover {
    transform: scale(1.02) !important;
    box-shadow: none !important;
}

.requested-off-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #ff6b6b;
}

.requested-off-date {
    font-weight: 600;
    color: #2d3748;
}

.requested-off-reason {
    font-size: 12px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border-radius: 6px;
}

.requested-off-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.requested-off-remove:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

/* 希望勤務カレンダーのスタイル */
.preferred-shift-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    background: white;
    border-radius: 6px;
    padding: 10px;
    border: 1px solid #e9ecef;
}

.preferred-shift-day-header {
    text-align: center;
    font-weight: 700;
    padding: 6px;
    color: #495057;
    font-size: 11px;
    background: #f8f9fa;
    border-radius: 4px;
}

.preferred-shift-day-header.sunday { color: #dc3545; }
.preferred-shift-day-header.saturday { color: #60A5FA; }

.preferred-shift-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: white;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 10px;
    position: relative;
    padding: 2px;
}

.preferred-shift-day:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-color: #60A5FA;
}

.preferred-shift-day.weekend {
    background: #f8f9fa;
}

.preferred-shift-day.today {
    border-color: #60A5FA;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.preferred-shift-day.other-month {
    color: #dee2e6;
    background: #f8f9fa;
    cursor: not-allowed;
}

.preferred-shift-day.other-month:hover {
    transform: none;
    box-shadow: none;
    border-color: #e9ecef;
}

.preferred-shift-day.holiday {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #dc3545;
}

.preferred-shift-day.custom-holiday {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #dc3545;
}

.preferred-shift-day.staff-holiday {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #dc3545;
    opacity: 0.7;
}

.preferred-shift-day.scheduled-holiday {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #dc3545;
    opacity: 0.8;
}

.preferred-shift-day.holiday:hover,
.preferred-shift-day.custom-holiday:hover,
.preferred-shift-day.staff-holiday:hover,
.preferred-shift-day.scheduled-holiday:hover {
    opacity: 0.8;
    cursor: not-allowed !important;
    transform: scale(1.02) !important;
    box-shadow: none !important;
}

.holiday-flag {
    display: inline-block;
    margin-left: 2px;
}

.preferred-shift-day-number {
    font-weight: 700;
    margin-bottom: 1px;
    font-size: 11px;
}

.preferred-shift-indicator {
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
}

.preferred-shift-indicator.日 { background: white; border: 1px solid #dee2e6; color: #333; }
.preferred-shift-indicator.早 { background: #B8D4F0; color: #333; }
.preferred-shift-indicator.遅 { background: #FFB3B3; color: #333; }

/* 印刷用メディアクエリ - 印刷時は濃い色で鮮明に */
@media print {
    .color-2, .preferred-shift-indicator.早 { background: #1565C0 !important; color: white !important; }
    .color-3, .preferred-shift-indicator.遅 { background: #D32F2F !important; color: white !important; }
    .color-4 { background: #2E7D32 !important; color: white !important; }
    .color-5 { background: #F57C00 !important; color: white !important; }
    
    /* 印刷時の文字をより読みやすく */
    .schedule-cell {
        color: white !important;
        font-weight: 600 !important;
    }
    .schedule-cell.color-1 {
        color: #333 !important;
        border: 2px solid #333 !important;
    }
}

.preferred-shift-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin: 10px 0;
}

.preferred-shift-option {
    padding: 8px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
}

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

.preferred-shift-option.selected {
    border-color: #60A5FA;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
}

.preferred-shift-option .shift-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 0 auto 5px;
}

.preferred-shift-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #0ea5e9;
}

.preferred-shift-date {
    font-weight: 600;
    color: #2d3748;
}

.preferred-shift-type {
    font-size: 12px;
    padding: 2px 8px;
    color: white;
    border-radius: 6px;
}

.preferred-shift-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.preferred-shift-remove:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .form-grid,
    #staff-tab .form-grid {
        grid-template-columns: 1fr;
    }

    .shift-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .control-buttons {
        flex-direction: column;
    }

    .weekday-selector {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .modal-form-grid,
    .compact-form-grid {
        grid-template-columns: 1fr !important;
    }

    .modal-content {
        width: 95%;
        padding: 25px;
    }
}

/* ===== 休日設定モーダル - おしゃれなデザイン ===== */

/* 曜日選択カード */
.weekday-selector {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 20px;
}

.weekday-selector-enhanced {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 20px;
    padding: 0;
}

.weekday-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    overflow: hidden;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.weekday-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.weekday-card:hover::before {
    left: 100%;
}

.weekday-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: #60A5FA;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.weekday-card.selected {
    background: linear-gradient(145deg, #00a8e1, #0086b3);
    border-color: #60A5FA;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.weekday-card.selected:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.weekday-icon {
    font-size: 12px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.weekday-card:hover .weekday-icon {
    transform: scale(1.15) rotate(5deg);
}

.weekday-card.selected .weekday-icon {
    transform: scale(1.15);
    filter: brightness(1.2);
}

.weekday-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

.weekday-short {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.weekday-card.disabled {
    background: #f0f0f0;
    border-color: #d0d0d0;
    opacity: 0.5;
    cursor: not-allowed;
}

.weekday-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

.weekday-card.disabled .weekday-icon,
.weekday-card.disabled .weekday-name {
    opacity: 0.4;
}

.weekday-card.selected .weekday-name,
.weekday-card.selected .weekday-short {
    opacity: 1;
}

/* 選択ヒント */
.selection-hint {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border: 1px solid #e1bee7;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 16px;
}

.hint-icon {
    font-size: 18px;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

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

.hint-text {
    font-size: 13px;
    color: #5e35b1;
    line-height: 1.4;
}

/* プレビューカード */
.holiday-preview-card {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 24px;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
}

.holiday-preview-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.preview-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.preview-icon {
    font-size: 24px;
    margin-right: 12px;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(10deg); }
}

.preview-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 0.5px;
}

.preview-content {
    position: relative;
    z-index: 1;
}

.preview-main {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 6px;
    border-left: 4px solid #00a8e1;
}

.preview-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 6px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

.mini-day {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    background: #f8f9fa;
    color: #495057;
    transition: all 0.3s ease;
}

.mini-day.weekend {
    background: linear-gradient(135deg, #00a8e1, #0086b3);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.preview-arrow {
    font-size: 24px;
    color: #60A5FA;
    font-weight: bold;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    40% { transform: translateX(-5px); }
    60% { transform: translateX(-3px); }
}

.preview-result {
    text-align: center;
}

.result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.result-icon {
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.result-text {
    font-size: 14px;
    font-weight: 600;
    color: #0ea5e9;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #b3d7c2;
}

.preview-note {
    display: flex;
    align-items: center;
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ffd93d;
    position: relative;
    z-index: 1;
}

.note-icon {
    font-size: 16px;
    margin-right: 10px;
}

.note-text {
    font-size: 13px;
    color: #856404;
    line-height: 1.4;
    font-weight: 500;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .weekday-selector {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .weekday-selector-enhanced {
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
    }

    .weekday-card {
        padding: 8px 2px;
        min-height: 50px;
    }

    .weekday-icon {
        font-size: 10px;
    }

    .weekday-name {
        font-size: 10px;
        letter-spacing: 0;
    }

    .weekday-short {
        font-size: 10px;
    }

    .preview-visual {
        flex-direction: column;
        gap: 16px;
    }

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

    .mini-day {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

/* ===== モーダル内カレンダー ===== */

.calendar-preview-section {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar-preview-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

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

.calendar-nav-btn {
    background: #60A5FA;
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: #3b82f6;
}

.calendar-nav-btn:active {
    transform: scale(0.95);
}

.calendar-title {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    min-width: 90px;
    text-align: center;
}

.calendar-legend {
    display: flex;
    gap: 12px;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #495057;
    font-weight: 500;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.legend-color.normal {
    background: #f8f9fa;
}

.legend-color.holiday {
    background: linear-gradient(135deg, #00a8e1, #0086b3);
}

.modal-calendar-container {
    background: linear-gradient(145deg, #ffffff, #fafbfc);
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    margin: 0;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    box-sizing: border-box;
}

.modal-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 12px;
}

.modal-calendar-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin: 0 0 4px 0;
    padding: 0;
    width: 100%;
}

.modal-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin: 0;
    padding: 0;
    width: 100%;
}

.calendar-weekday {
    padding: 6px 0;
    margin: 0;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #495057;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 4px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    user-select: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    box-sizing: border-box;
    width: 100%;
}

.calendar-weekday:hover {
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-weekday[data-day="0"] {
    color: #dc3545;
}

.calendar-weekday[data-day="6"] {
    color: #60A5FA;
}

.calendar-weekday.active {
    background: #60A5FA;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.modal-calendar-day {
    aspect-ratio: 1;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    color: #495057;
    border: 2px solid #e9ecef;
    outline: none;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.modal-calendar-day:hover {
    transform: scale(1.08);
    border-color: #60A5FA;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    background: linear-gradient(145deg, #ffffff, #e9ecef);
}

.modal-calendar-day.sunday {
    color: #dc3545;
}

.modal-calendar-day.saturday {
    color: #60A5FA;
}

.modal-calendar-day.holiday {
    background: #60A5FA;
    color: white;
    border-color: #60A5FA;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

.modal-calendar-day.holiday:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: #3b82f6;
}

.modal-calendar-day.other-month {
    opacity: 0.3;
    pointer-events: none;
    background: #fafafa;
}

.modal-calendar-day.national-holiday::after {
    content: '🎌';
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 10px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* カレンダー指示説明 */
.calendar-instruction {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e1f5fe;
}

.instruction-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.instruction-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.instruction-text {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.4;
}

/* 曜日ヘッダーをクリック可能にする */
.calendar-weekday.selectable {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.calendar-weekday.selectable:hover {
    background: linear-gradient(145deg, #00a8e1, #0086b3);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.calendar-weekday.selected {
    background: linear-gradient(145deg, #00a8e1, #0086b3);
    color: white;
    border-color: #5a67d8;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.calendar-weekday.selected::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* カスタム設定で平日扱いになった日付 */
.modal-calendar-day.excluded {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    color: #6c757d;
    border: 2px dashed #adb5bd;
    position: relative;
    font-weight: 500;
}

.modal-calendar-day.excluded::before {
    content: '💼';
    position: absolute;
    top: 3px;
    left: 3px;
    font-size: 9px;
    opacity: 0.7;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.modal-calendar-day.excluded:hover {
    border-color: #6c757d;
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.25);
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
}

/* 個別指定された休日日付 */
.modal-calendar-day.specific-holiday {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: 2px solid #ff5252;
    position: relative;
    font-weight: 700;
}

.modal-calendar-day.specific-holiday::after {
    content: '🗓️';
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 10px;
    opacity: 0.9;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.modal-calendar-day.specific-holiday:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
    background: linear-gradient(135deg, #ee5a52 0%, #dc3545 100%);
}

/* 設定サマリーカード */
.holiday-summary-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

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

.summary-icon {
    font-size: 20px;
    margin-right: 10px;
}

.summary-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.summary-content {
    font-size: 14px;
    color: #495057;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #00a8e1;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        gap: 12px;
    }

    .calendar-container {
        padding: 15px;
        margin: 0 -10px;
    }

    .calendar-grid {
        gap: 4px;
        min-width: 280px;
    }

    .calendar-day {
        min-height: 50px;
        max-height: 60px;
        padding: 2px;
    }

    .calendar-day-number {
        font-size: 12px;
    }

    .calendar-day-header {
        padding: 6px;
        font-size: 11px;
    }

    .calendar-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .calendar-container {
        padding: 10px;
        margin: 0 -5px;
    }

    .calendar-grid {
        gap: 2px;
        min-width: 260px;
    }

    .calendar-day {
        min-height: 40px;
        max-height: 50px;
        padding: 1px;
    }

    .calendar-day-number {
        font-size: 11px;
    }

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

    .calendar-title {
        font-size: 14px;
    }

    .calendar-header {
        padding: 8px;
    }

    .modal-calendar-container {
        padding: 16px;
    }

    .calendar-weekday {
        padding: 8px 4px;
        font-size: 11px;
    }

    .modal-calendar-day {
        font-size: 12px;
    }
}

/* ======================================
   豪華な分析タブスタイル
   ====================================== */

/* 分析ヘッダー */
.analysis-header {
    background: #1a1a1a;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.period-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.period-selector label {
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.period-selector input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
}

.period-selector input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* 分析グリッド */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.analysis-section {
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.analysis-section:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.analysis-section.full-width {
    grid-column: 1 / -1;
}

/* セクションヘッダー */
.section-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2d3748;
    font-weight: 700;
}

.section-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.achievement-rate {
    font-size: 24px;
    font-weight: 700;
    color: #60A5FA;
    background-clip: text;
}

.stats-toggle {
    display: flex;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.stats-toggle .btn {
    border: none;
    background: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #60A5FA;
    transition: all 0.3s ease;
}

.stats-toggle .btn.toggle-active,
.stats-toggle .btn:hover {
    background: #60A5FA;
    color: white;
}

/* 分析コンテンツ */
.analysis-content {
    padding: 20px;
}

/* 未達成者分析 */
.unachieved-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.unachieved-section h4 {
    color: #856404;
    margin-bottom: 15px;
    font-weight: 700;
}

.unachieved-list {
    display: grid;
    gap: 12px;
}

.unachieved-item {
    background: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #ff6b6b;
    transition: all 0.3s ease;
}

.unachieved-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.unachieved-staff {
    font-weight: 700;
    color: #2d3748;
    font-size: 16px;
    margin-bottom: 8px;
}

.unachieved-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.unachieved-stat {
    background: rgba(255, 107, 107, 0.1);
    color: #dc3545;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* 達成率ランキング */
.ranking-section h4 {
    color: #60A5FA;
    margin-bottom: 15px;
    font-weight: 700;
}

.achievement-ranking {
    display: grid;
    gap: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #f8f9fa, white);
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    background: linear-gradient(135deg, #00a8e1, #0086b3);
    color: white;
    transform: scale(1.02);
}

.ranking-position {
    font-size: 20px;
    font-weight: 800;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00a8e1, #0086b3);
    color: white;
}

.ranking-staff {
    flex: 1;
    font-weight: 600;
}

.ranking-rate {
    font-size: 18px;
    font-weight: 700;
}

/* 統計カード */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #00a8e1, #0086b3);
    border-radius: 15px;
    padding: 20px;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ビジュアル統計 */
.visual-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.chart-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.chart-container h5 {
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: 700;
}

.chart-placeholder {
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60A5FA;
    font-weight: 600;
    border: 2px dashed #00a8e1;
}

/* 統計ビュー切り替え */
.stats-view {
    display: none;
}

.stats-view.active {
    display: block;
}

/* 個人別統計 */
.individual-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.individual-stat-card {
    background: linear-gradient(135deg, #f8f9fa, white);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.individual-stat-card:hover {
    border-color: #60A5FA;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.individual-name {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.individual-metrics {
    display: grid;
    gap: 10px;
}

.individual-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.metric-label {
    color: #6c757d;
    font-size: 14px;
}

.metric-value {
    font-weight: 600;
    color: #2d3748;
}

/* 強化されたカレンダー */
.calendar-container.enhanced {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calendar-controls {
    display: flex;
    gap: 5px;
}

.calendar-controls .btn {
    border: 1px solid #e9ecef;
    background: white;
    color: #6c757d;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.calendar-controls .btn.toggle-active,
.calendar-controls .btn:hover {
    background: #60A5FA;
    color: white;
    border-color: #60A5FA;
}

.enhanced-calendar {
    padding: 20px;
}

.calendar-legend {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6c757d;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* シフト別分析 */
.shift-analysis {
    display: grid;
    gap: 20px;
}

.shift-analysis-item {
    background: linear-gradient(135deg, #f8f9fa, white);
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid #00a8e1;
}

.shift-name {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.shift-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.shift-metric {
    text-align: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    padding: 15px;
}

.shift-metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #60A5FA;
    margin-bottom: 5px;
}

.shift-metric-label {
    font-size: 12px;
    color: #6c757d;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .period-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .visual-stats {
        grid-template-columns: 1fr;
    }

    .individual-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================
   スタッフカード希望情報表示スタイル
   ====================================== */

/* 希望情報表示エリア（コンパクト横書きレイアウト） */
.staff-preferences {
    background: #ffffff;
    border-radius: 6px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    font-size: 9px;
}

.preference-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 希望情報ヘッダー（横書き用） */
.preference-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preference-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.preference-title {
    font-weight: 600;
    color: #334155;
    font-size: 11px;
    flex-shrink: 0;
}

.preference-count {
    background: #3b82f6;
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* リセットボタン */
.preference-reset-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
    line-height: 1;
    position: relative;
}

.preference-reset-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: scale(1.15);
}

/* ゴミ箱ボタンのツールチップ */
.preference-reset-btn::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 5px 8px;
    background: #1a202c;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.preference-reset-btn:hover::after {
    opacity: 1;
}

/* 横書きコンテンツ */
.preference-content-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    line-height: 1.6;
}

/* 旧縦書きコンテンツ（後方互換性） */
.preference-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 設定なしの表示 */
.no-preferences {
    color: #94a3b8;
    font-style: italic;
    font-size: 12px;
    padding: 4px 8px;
    background: transparent;
}

/* 横書き希望アイテム（コンパクト） */
.preference-item-horizontal {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.preference-item-horizontal:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 希望休アイテム（横書き） */
.preference-item-horizontal.requested-off-item {
    background: #fff7ed;
    border: 1px solid #fb923c;
    color: #9a3412;
}

/* その他件数表示（横書き） */
.preference-more-horizontal {
    font-size: 11px;
    color: #64748b;
    font-style: italic;
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 6px;
    white-space: nowrap;
}

/* 旧縦書きスタイル（後方互換性） */
.requested-off-item:not(.preference-item-horizontal) {
    background: #f8f9fa;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.requested-off-item:not(.preference-item-horizontal):hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.preference-date {
    font-weight: 700;
    color: #856404;
    font-size: 13px;
}

.preference-reason {
    background: rgba(133, 100, 4, 0.1);
    color: #856404;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* 希望勤務アイテム（横書き用のシフトタイプ別色分け） */
.preference-item-horizontal.preferred-shift-item.color-1 {
    background: #f1f5f9;
    border: 1px solid #94a3b8;
    color: #475569;
}

.preference-item-horizontal.preferred-shift-item.color-2 {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

.preference-item-horizontal.preferred-shift-item.color-3 {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.preference-item-horizontal.preferred-shift-item.color-4 {
    background: #e0f2fe;
    border: 1px solid #0ea5e9;
    color: #075985;
}

.preference-item-horizontal.preferred-shift-item.color-5 {
    background: #e2e8f0;
    border: 1px solid #64748b;
    color: #334155;
}

/* 旧縦書きスタイル（後方互換性） */
.preferred-shift-item:not(.preference-item-horizontal) {
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.preferred-shift-item:not(.preference-item-horizontal):hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preferred-shift-item:not(.preference-item-horizontal).color-1 {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-color: #e9ecef;
    color: #2d3748;
}

.preferred-shift-item:not(.preference-item-horizontal).color-2 {
    background: linear-gradient(135deg, #cce7ff, #b3d9ff);
    border-color: #0066cc;
    color: #004080;
}

.preferred-shift-item:not(.preference-item-horizontal).color-3 {
    background: linear-gradient(135deg, #ffcccc, #ffb3b3);
    border-color: #cc0000;
    color: #800000;
}

.preferred-shift-item:not(.preference-item-horizontal).color-4 {
    background: linear-gradient(135deg, #ccffcc, #b3ffb3);
    border-color: #00cc00;
    color: #008000;
}

.preferred-shift-item:not(.preference-item-horizontal).color-5 {
    background: linear-gradient(135deg, #ffe6cc, #ffd9b3);
    border-color: #ff8000;
    color: #cc6600;
}

.preference-shift-name {
    font-weight: 600;
    font-size: 13px;
}

.preference-count-badge {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* その他の件数表示 */
.preference-more {
    text-align: center;
    color: #6c757d;
    font-size: 11px;
    font-style: italic;
    padding: 4px;
    background: rgba(108, 117, 125, 0.05);
    border-radius: 6px;
    margin-top: 4px;
}

/* スタッフカード全体のアップデート */
.staff-card {
    transition: all 0.3s ease;
}

.staff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* レスポンシブ対応（横書きレイアウト用） */
@media (max-width: 768px) {
    .staff-card {
        grid-template-columns: auto 1fr;
        gap: 16px;
    }

    .staff-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        gap: 6px;
    }

    .staff-actions .btn {
        min-width: auto;
        flex: 1;
        font-size: 10px;
        padding: 6px 8px;
    }

    .staff-preferences {
        padding: 12px;
        gap: 10px;
    }

    .preference-header {
        gap: 6px;
    }

    .preference-title {
        font-size: 12px;
    }

    .preference-count {
        font-size: 10px;
        padding: 2px 6px;
    }

    .preference-reset-btn {
        font-size: 13px;
        padding: 3px 5px;
    }

    .preference-content-horizontal {
        gap: 4px;
    }

    .preference-item-horizontal {
        font-size: 10px;
        padding: 1px 4px;
    }

    .preference-more-horizontal {
        font-size: 9px;
        padding: 1px 4px;
    }

    /* 旧縦書きスタイルのレスポンシブ */
    .requested-off-item:not(.preference-item-horizontal),
    .preferred-shift-item:not(.preference-item-horizontal) {
        padding: 6px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .preference-date,
    .preference-shift-name {
        font-size: 12px;
    }

    .preference-reason,
    .preference-count-badge {
        font-size: 10px;
    }
}

/* 超小画面対応 */
@media (max-width: 480px) {
    .staff-preferences {
        padding: 8px;
        margin: 8px 0;
    }

    .preference-section {
        margin-bottom: 8px;
    }

    .preference-header {
        flex-wrap: wrap;
        gap: 3px;
    }

    .preference-title {
        font-size: 10px;
    }

    .preference-count,
    .preference-reset-btn {
        font-size: 9px;
    }

    .preference-content-horizontal {
        gap: 2px;
    }

    .preference-item-horizontal {
        font-size: 9px;
        padding: 1px 3px;
    }
}

/* 全体的な小さいテキストのスタイル統一 */
small {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
    letter-spacing: 0.01em;
}

h4 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

h5 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
