/* ========================================
   分析タブ - 最適化されたテーブルスタイル
   ======================================== */

/* 希望達成状況テーブル */
.achievement-table {
    width: 100%;
    overflow-x: auto;
}

.achievement-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.achievement-table th {
    background: linear-gradient(135deg, #2c5282, #3b82f6);
    color: white;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid #1e3a5f;
    position: sticky;
    top: 0;
    z-index: 10;
}

.achievement-table th:first-child {
    border-top-left-radius: 8px;
}

.achievement-table th:last-child {
    border-top-right-radius: 8px;
}

.achievement-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.achievement-table tr:hover td {
    background: #f8fafc;
}

/* 達成/未達成の行スタイル */
.achievement-table tr.achieved {
    background: #d1fae5;
}

.achievement-table tr.achieved:hover td {
    background: #a7f3d0;
}

.achievement-table tr.not-achieved {
    background: #fee2e2;
}

.achievement-table tr.not-achieved:hover td {
    background: #fecaca;
}

/* ステータスアイコン */
.status-icon {
    font-size: 20px;
    display: inline-block;
}

.status-icon.achieved {
    color: #059669;
}

.status-icon.not-achieved {
    color: #dc3545;
}

/* 達成率表示 */
.achievement-rate {
    font-weight: 700;
    font-size: 15px;
}

.achievement-rate.high {
    color: #059669;
}

.achievement-rate.medium {
    color: #f59e0b;
}

.achievement-rate.low {
    color: #dc3545;
}

/* シフト実績テーブル */
.shift-count-table {
    width: 100%;
    overflow-x: auto;
}

.shift-count-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.shift-count-table th {
    background: linear-gradient(135deg, #2c5282, #3b82f6);
    color: white;
    padding: 14px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid #1e3a5f;
    position: sticky;
    top: 0;
    z-index: 10;
}

.shift-count-table th:first-child {
    text-align: left;
    padding-left: 16px;
    border-top-left-radius: 8px;
}

.shift-count-table th:last-child {
    border-top-right-radius: 8px;
}

.shift-count-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.shift-count-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #1e3a5f;
    padding-left: 16px;
}

.shift-count-table tr:hover td {
    background: #f8fafc;
}

.shift-count-table tr:nth-child(even) {
    background: #f8fafc;
}

/* シフト回数セル */
.shift-count {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    min-width: 40px;
}

.shift-count.high {
    background: #dbeafe;
    color: #1e40af;
}

.shift-count.medium {
    background: #e0f2fe;
    color: #075985;
}

.shift-count.low {
    background: #f1f5f9;
    color: #64748b;
}

.shift-count.zero {
    background: #f8fafc;
    color: #94a3b8;
}

/* 合計時間表示 */
.total-hours {
    font-weight: 700;
    color: #1e3a5f;
    font-size: 15px;
}

/* 詳細ボタン */
.details-button {
    padding: 6px 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.details-button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* 警告アラート */
.warning-alert {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #92400e;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .achievement-table,
    .shift-count-table {
        font-size: 12px;
    }

    .achievement-table th,
    .shift-count-table th {
        padding: 10px 8px;
        font-size: 11px;
    }

    .achievement-table td,
    .shift-count-table td {
        padding: 10px 8px;
    }

    .shift-count {
        padding: 3px 8px;
        font-size: 12px;
        min-width: 30px;
    }
}

@media (max-width: 768px) {
    .achievement-table,
    .shift-count-table {
        font-size: 11px;
    }

    .status-icon {
        font-size: 16px;
    }
}
