/* CSS変数定義 */
:root {
    --project-border-color: #DADADA;
    --project-text-muted: #b5b5b5;
    --project-bg-hover: #f7f7f7;
    --project-border-radius: 0.4rem;
}

/* 横スクロールバー常時表示の共通スタイル
   .always-show-scrollbar: 汎用クラス（プロジェクト一覧、売上予測等）
   .gantt_hor_scroll: dhtmlxGanttライブラリの内部要素 */
.always-show-scrollbar,
.gantt_hor_scroll {
    overflow-x: scroll;
}

/* Chrome, Safari, Edge向け: WebKit独自プロパティでスクロールバーをカスタマイズ */
.always-show-scrollbar::-webkit-scrollbar,
.gantt_hor_scroll::-webkit-scrollbar {
    height: 8px;
}

.always-show-scrollbar::-webkit-scrollbar-track,
.gantt_hor_scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.always-show-scrollbar::-webkit-scrollbar-thumb,
.gantt_hor_scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.always-show-scrollbar::-webkit-scrollbar-thumb:hover,
.gantt_hor_scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox向け: ::-webkit-scrollbar 非対応ブラウザにのみ標準プロパティを適用
   Chrome 121+は両方サポートするが、標準プロパティがあるとwebkit側が無視されるため分離 */
@supports not selector(::-webkit-scrollbar) {
    .always-show-scrollbar,
    .gantt_hor_scroll {
        scrollbar-width: thin;
        scrollbar-color: #888 #f1f1f1;
    }
}

/* 共通: 追加ボタン */
.btn-add {
    margin: auto;
    border: 1px solid var(--project-border-color);
    border-radius: var(--project-border-radius);
    color: var(--project-text-muted);
    background-color: #ffffff;
    padding: 0.3rem;
    font-weight: 600;
    text-align: center;
}

.btn-add:hover {
    background-color: var(--project-bg-hover);
    cursor: pointer;
}

.page-tabs {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding: 0 1rem;
    border-bottom: 2px solid var(--project-border-color);
    font-weight: 700;
    font-size: 0.875rem;
}

.page-tab {
    position: relative;
    padding: 0.5rem 0.8rem;
    color: var(--primary-dark);
    text-decoration: none;
}

@media (min-width: 400px) {
    .page-tab {
        padding: 0.5rem 1rem;
    }
}

@media (min-width: 1082px) {
    .page-tab {
        padding: 0.5rem 1.5rem;
    }
}

.page-tab:hover {
    background-color: rgba(0,0,255,0.1);
    color: var(--primary-blue);
    text-decoration: none;
}

.page-tab.active {
    background-color: #ffffff;
}

.page-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 4px;
    background-color: rgba(0,0,255,0.2);
    border-bottom: 4px solid #336B87;
    border-radius: 2px;
}

/* 複数の project 系ページで使うため、ページ固有 CSS ではなく共有側に置く。 */
.global-save-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1050;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.global-save-status.saving {
    display: inline-flex;
    background: #e8eaed;
    color: #5f6368;
}

.global-save-status.saved {
    display: inline-flex;
    background: #e6f4ea;
    color: #1e7e34;
}

.global-save-status.error {
    display: inline-flex;
    background: #fce8e6;
    color: #c62828;
}

.global-save-status .spinner-border {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.15em;
}

.project-tool-icon {
    width: 120px;
    height: 120px;
}

.project-tool-icon-2 {
    width: 160px;
    height: 160px;
}

.project-tool-image {
    width: 100%;
}

.project-tool-image-2 {
    width: 100%;
}

.project-tool-image-3 {
    width: 100%;
}

.project-revenue-chart-image {
    width: 100%;
}

.project-gantt-chart-image {
    width: 100%;
}

@media (min-width: 900px) {
    .project-tool-image {
        width: 800px;
        height: 240px;
    }

    .project-tool-image-2 {
        width: 800px;
        height: 304px;
    }

    .project-tool-image-3 {
        width: 800px;
        height: 400/3px;
    }

    .project-revenue-chart-image {
        width: 800px;
        height: 340px;
    }

    .project-gantt-chart-image {
        width: 800px;
        height: 315px;
    }
}

.modal-body .table {
    background-color: #F1F1F1;
    border-color: #F1F1F1;
}
