.dashboard-container {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
}

.dashboard-header {
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.dashboard-title {
    margin: 0 0 20px 0;
    font-size: 2rem;
    font-weight: bold;
}

.control-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.control-label {
    font-weight: bold;
    margin-right: 5px;
}

.month-selector {
    width: 200px;
}

.update-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.update-button:hover {
    background-color: #0069d9;
}

.status-message {
    margin-top: 10px;
    font-weight: bold;
}

.success-message {
    color: #28a745;
}

.error-message {
    color: #dc3545;
}

.dashboard-main {
    display: flex;
    min-height: calc(100vh - 150px);
}

.dashboard-sidebar {
    width: 250px;
    background-color: #f8f9fa;
    padding: 20px;
    border-right: 1px solid #e9ecef;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.sidebar-nav {
    list-style-type: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 10px;
}

.sidebar-nav a {
    color: #495057;
    text-decoration: none;
}

.sidebar-nav a:hover {
    color: #007bff;
}

.dashboard-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.section-title {
    margin: 30px 0 20px 0;
    font-size: 1.5rem;
    font-weight: bold;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.data-table-section {
    margin-bottom: 30px;
}

.graph-section {
    margin-bottom: 30px;
}

.channel-graph-section {
    margin-bottom: 30px;
}

.graph-container {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 15px;
}

.table-container {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 15px;
    overflow-x: auto;
}

.no-data-message {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* 内部目標テーブルのスタイル */
.internal-target-table,
.comparison-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid #b8daff;
}

.internal-target-header th,
.comparison-header th {
    position: sticky;
    top: 0;
    background-color: #d1e7ff;
    z-index: 10;
    padding: 10px;
    text-align: center;
    border: 1px solid #b8daff;
}

.segment-header,
.indicator-header {
    position: sticky;
    left: 0;
    background-color: #d1e7ff;
    z-index: 20;
    min-width: 100px;
}

.indicator-header {
    left: 100px;  /* セグメント列の幅に応じて調整 */
    min-width: 80px;
}

.segment-cell {
    position: sticky;
    left: 0;
    background-color: #e6f3ff;
    z-index: 5;
    min-width: 100px;
    font-weight: bold;
    border-bottom: 2px solid #b8daff;
}

.indicator-cell {
    position: sticky;
    left: 100px;  /* セグメント列の幅に応じて調整 */
    background-color: #f8f9fa;
    z-index: 5;
    min-width: 80px;
    font-weight: bold;
}

.internal-target-container,
.comparison-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 800px;
    max-width: 100%;
    margin-bottom: 30px;
    position: relative;
}

/* 比較テーブル用の追加スタイル */
.segment-name {
    position: sticky;
    left: 0;
    background-color: #e6f3ff;
    font-weight: bold;
    text-align: left;
    z-index: 5;
    min-width: 100px;
    border-bottom: 2px solid #b8daff;
}

.indicator-name {
    position: sticky;
    left: 100px;  /* セグメント列の幅に応じて調整 */
    background-color: #f8f9fa;
    font-weight: bold;
    text-align: left;
    z-index: 5;
    min-width: 80px;
}

/* 実績比較テーブルのスタイル */
.comparison-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border: 1px solid #b8daff;
    font-size: 14px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.comparison-header th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #d1e7ff;
    color: #333;
    padding: 12px;
    border: 1px solid #b8daff;
    text-align: center;
}

.comparison-header th.sub-header {
    position: sticky;
    top: 43px; /* 上のヘッダーの高さに合わせて調整 */
    z-index: 10;
    background-color: #e6f3ff;
    padding: 8px;
    font-size: 13px;
    border: 1px solid #b8daff;
}

.comparison-body td {
    padding: 12px;
    text-align: right;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
}

/* セグメントヘッダーとサブヘッダーの交差部分のz-indexを調整 */
.segment-header, .indicator-header {
    z-index: 30;
}

/* 固定ヘッダーの角の部分 */
.comparison-header th:first-child,
.comparison-header th:nth-child(2) {
    z-index: 30;
}

.comparison-spacer {
    height: 20px;
    background-color: #f7fafc;
}

/* セグメントごとの色設定 */
.segment-全体 {
    background-color: #e6f3ff;
    border-left: 4px solid #3182ce;
}

.segment-新規 {
    background-color: #e6f7ef;
    border-left: 4px solid #319795;
}

.segment-ルーキー {
    background-color: #e6f7ef;
    border-left: 4px solid #dd6b20;
}

.segment-既存 {
    background-color: #e6f7ef;
    border-left: 4px solid #38a169;
}

.segment-復活 {
    background-color: #f5f2e6;
    border-left: 4px solid #e53e3e;
}

/* 達成率の色分け */
.achievement-rate {
    font-weight: bold;
}

.achievement-rate-high {
    color: #38a169;  /* 緑 - 達成率100%以上 */
}

.achievement-rate-medium {
    color: #d69e2e;  /* 黄 - 達成率80-99% */
}

.achievement-rate-low {
    color: #e53e3e;  /* 赤 - 達成率80%未満 */
}

.internal-target-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 800px;
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1px;
}

.internal-target-title {
    margin-bottom: 10px;
    font-size: 14px;
}

.internal-target-title-icon {
    color: #2c5282;
}

.comparison-container {
    margin-top: 30px;
}

/* タブのスタイル */
.nav-tabs .nav-link {
    color: #495057 !important;  /* 非アクティブタブの文字色を濃いグレーに */
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    cursor: pointer;
}

.nav-tabs .nav-link:hover {
    color: #007bff !important;
    background-color: #e9ecef;
}

.nav-tabs .nav-link.active {
    color: #495057 !important;  /* アクティブタブの文字色も濃いグレーに */
    background-color: #ffffff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: bold;
}

/* 期間選択ボタンのスタイル */
.period-selector {
    margin-bottom: 20px;
}

.period-selector .btn {
    margin-right: 10px;
}

.period-selector .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.period-selector .btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.period-selector .btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
} 