/* ===================================
   シフト管理システム - スタイルシート
   =================================== */

/* CSS カスタムプロパティ */
:root {
    /* カラーパレット */
    --primary-hue: 220;
    --primary: hsl(var(--primary-hue), 70%, 50%);
    --primary-light: hsl(var(--primary-hue), 70%, 60%);
    --primary-dark: hsl(var(--primary-hue), 70%, 40%);
    --primary-bg: hsl(var(--primary-hue), 70%, 95%);

    --success: hsl(150, 60%, 45%);
    --success-bg: hsl(150, 60%, 95%);
    --warning: hsl(40, 90%, 50%);
    --warning-bg: hsl(40, 90%, 95%);
    --danger: hsl(0, 70%, 55%);
    --danger-bg: hsl(0, 70%, 95%);

    /* 背景色 */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-hover: #e2e8f0;

    /* テキスト色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* ボーダー */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* シャドウ */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* サイズ */
    --sidebar-width: 240px;
    --header-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    /* トランジション */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* 休日カラー */
    --holiday-color: hsl(0, 70%, 55%);
    --holiday-bg: hsl(0, 70%, 95%);
    --sunday-color: hsl(0, 70%, 55%);
    --saturday-color: hsl(220, 70%, 50%);
}

/* ===================================
   リセット & ベース
   =================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===================================
   アプリコンテナ
   =================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===================================
   サイドバー（常時表示）
   =================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.nav-text {
    transition: opacity var(--transition-fast);
}

/* ===================================
   メインコンテンツ
   =================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===================================
   ヘッダー
   =================================== */
.main-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-left h1 {
    font-size: 24px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: var(--border-radius);
}

.month-nav {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.month-nav:hover {
    background: var(--primary);
    color: white;
}

.current-month {
    font-size: 16px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* ===================================
   ボタン
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 217, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: hsl(0, 70%, 45%);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--border-radius);
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* ===================================
   タブコンテンツ
   =================================== */
.tab-content {
    flex: 1;
    padding: 24px 32px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   カード
   =================================== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* ===================================
   勤務表テーブル
   =================================== */
.schedule-container {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.schedule-wrapper {
    overflow-x: auto;
    max-height: calc(100vh - 450px);
    overflow-y: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid var(--border-color);
    text-align: center;
    vertical-align: middle;
}

.schedule-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 8px;
}

.schedule-table th.worker-header {
    position: sticky;
    left: 0;
    z-index: 20;
    background: var(--bg-tertiary);
    min-width: 100px;
}

.schedule-table td.worker-name {
    position: sticky;
    left: 0;
    background: var(--bg-secondary);
    font-weight: 500;
    z-index: 5;
    min-width: 100px;
    padding: 8px;
}

.schedule-table td.day-cell {
    min-width: 40px;
    height: 45px;
    padding: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.schedule-table td.day-cell:hover {
    background: var(--bg-hover);
}

.schedule-table th.sunday,
.schedule-table th.holiday {
    color: var(--sunday-color);
}

.schedule-table th.saturday {
    color: var(--saturday-color);
}

.schedule-table td.day-cell.sunday,
.schedule-table td.day-cell.holiday {
    background: hsl(0, 70%, 98%);
}

.schedule-table td.day-cell.saturday {
    background: hsl(220, 70%, 98%);
}

.cell-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.cell-content.pattern {
    padding: 4px;
}

.cell-content.holiday {
    background: var(--holiday-bg);
    color: var(--holiday-color);
}

/* ===================================
   ガントチャートセクション
   =================================== */
.gantt-section {
    margin-top: 24px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 20px 24px;
}

.gantt-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.gantt-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gantt-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gantt-label {
    min-width: 120px;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gantt-bar-container {
    flex: 1;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.gantt-bar {
    position: absolute;
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.gantt-time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===================================
   集計セクション
   =================================== */
.summary-section {
    margin-top: 24px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 20px 24px;
}

.summary-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.summary-table-wrapper {
    overflow-x: auto;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.summary-table th,
.summary-table td {
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    text-align: center;
}

.summary-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.summary-table td {
    background: var(--bg-secondary);
}

.summary-table tr:hover td {
    background: var(--bg-tertiary);
}

/* ===================================
   パターングリッド
   =================================== */
.patterns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 20px 24px;
}

.pattern-card {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition-fast);
    border-left: 4px solid var(--primary);
}

.pattern-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pattern-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pattern-name {
    font-size: 24px;
    font-weight: 700;
}

.pattern-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.pattern-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.pattern-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* ===================================
   労働者リスト
   =================================== */
.workers-list {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.worker-card {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.worker-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.worker-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.worker-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.worker-details h4 {
    font-size: 16px;
    font-weight: 600;
}

.worker-details p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.worker-actions {
    display: flex;
    gap: 8px;
}

/* ===================================
   必要人数設定
   =================================== */
.requirements-content {
    padding: 20px 24px;
}

.requirements-info {
    background: var(--primary-bg);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}

.requirements-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.requirement-card {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 16px;
}

.requirement-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirement-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirement-input label {
    font-size: 14px;
    flex: 1;
}

.requirement-input input {
    width: 60px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ===================================
   自動割り当てアシスタント
   =================================== */
.assistant-content {
    padding: 20px 24px;
}

.assistant-section {
    margin-bottom: 32px;
}

.assistant-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.section-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.holiday-requests {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 更新日時表示 */
.app-version {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    letter-spacing: 0.5px;
}

/* 操作方法（マニュアル） */
.manual-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.manual-welcome {
    background: var(--primary-bg);
    color: var(--text-primary);
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
    border-bottom: 4px solid var(--primary);
}

.manual-header-visual h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.manual-section {
    margin-bottom: 40px;
}

.manual-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.step-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 25px 20px;
    flex: 1;
    min-width: 200px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-card.highlighter {
    background: rgba(74, 144, 217, 0.1);
    border: 2px solid var(--primary-color);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.step-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.step-card h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.step-card p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.step-arrow {
    font-size: 24px;
    color: var(--text-secondary);
    font-weight: bold;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.help-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 20px;
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.help-question {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.help-answer {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.help-answer strong {
    color: var(--primary-color);
}

.manual-footer-note {
    background: rgba(243, 156, 18, 0.1);
    border: 1px dashed #f39c12;
    padding: 15px 20px;
    border-radius: var(--border-radius-sm);
    margin-top: 30px;
}

@media (max-width: 768px) {
    .step-arrow {
        display: none;
    }

    .help-grid {
        grid-template-columns: 1fr;
    }
}

.holiday-request-card {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 16px;
}

.holiday-request-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.holiday-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.holiday-date-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.holiday-date-btn:hover {
    border-color: var(--primary);
}

.holiday-date-btn.selected {
    background: var(--holiday-color) !important;
    border-color: var(--holiday-color) !important;
    color: white !important;
}

.holiday-date-btn.is-holiday {
    color: var(--holiday-color);
}

.assignment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.assistant-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.assistant-log {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    min-height: 120px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    max-height: 300px;
    overflow-y: auto;
}

.log-entry {
    padding: 4px 0;
    border-bottom: 1px solid var(--border-light);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.success {
    color: var(--success);
}

.log-entry.warning {
    color: var(--warning);
}

.log-entry.error {
    color: var(--danger);
}

/* ===================================
   モーダル
   =================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-small .modal-content {
    max-width: 400px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ===================================
   フォーム
   =================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="time"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pattern-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pattern-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.pattern-checkbox input {
    accent-color: var(--primary);
}

/* ===================================
   セル選択オプション
   =================================== */
.cell-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cell-option {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-fast);
    font-weight: 600;
}

.cell-option:hover:not(.disabled) {
    border-color: var(--primary);
    transform: scale(1.05);
}

.cell-option.holiday {
    background: var(--holiday-bg);
    color: var(--holiday-color);
    border-color: var(--holiday-color);
}

.cell-option.clear {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.cell-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-tertiary);
}

.cell-option.unavailable {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-bg);
}

.cell-option .unavailable-label {
    display: block;
    font-size: 10px;
    color: var(--danger);
    margin-top: 4px;
}

/* ===================================
   PDFオプション
   =================================== */
.pdf-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===================================
   印刷スタイル
   =================================== */
.print-container {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }

    .print-container,
    .print-container * {
        visibility: visible;
    }

    .print-container {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* ===================================
   レスポンシブデザイン
   =================================== */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .main-header {
        padding: 0 16px;
        flex-wrap: wrap;
        height: auto;
        padding: 16px;
        gap: 16px;
    }

    .header-right {
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
    }

    .tab-content {
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .assistant-actions {
        flex-direction: column;
    }
}

/* ===================================
   スクロールバー
   =================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===================================
   追加テーブル（日別集計等）
   =================================== */
.metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}

.metrics-table th,
.metrics-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
}

.metrics-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.metrics-table td.low-holiday {
    color: var(--danger);
    font-weight: 700;
}

.metrics-warning {
    color: var(--danger);
    font-size: 12px;
    margin-top: 8px;
    font-weight: 500;
}

/* ===================================
   PDF出力レイアウト微調整
   =================================== */
.pdf-output table {
    table-layout: fixed;
    width: 100%;
}

.pdf-output .worker-name {
    width: 50px;
    /* 名前列をさらに絞る */
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-output th,
.pdf-output td {
    padding: 1px !important;
    font-size: 7px !important;
    /* フォントサイズを極限まで小さく */
}