﻿/*-------------------------------------------------------------------
  全体設定
-------------------------------------------------------------------*/
body {
    font-family: Osaka, ＭＳ Ｐゴシック, Arial, sans-serif;
    font-size: 14px;
    color: #404040;
    background-color: #ffffff;
    line-height: 150%;
    margin: 0 auto; /* 上下0、左右auto */
    max-width: none;
}

img {
    border: 0;
}

a {
    color: #4040ff;
}

    a:hover {
        color: #ff60ff;
    }

    a:active {
        color: #ff00ff;
    }

ul {
    margin: 0 0 0 20px;
    padding-left: 0;
    line-height: 150%;
}

/*
hr {
    color: #D0D0F0;
    border-style: solid;
    height: 2px;
    width: 100%;
}
    */
hr {
    border: 0;
    border-top: 2px solid #D0D0F0;
    opacity: 1;
    margin: 8px 0 12px;
}

/*-------------------------------------------------------------------
  ヘッダーや非表示テキスト
-------------------------------------------------------------------*/
.header_title {
    display: block;
    background: url(title.jpg) no-repeat left;
    height: 60px;
}

.alt {
    position: absolute;
    top: -5000px;
    left: -999px;
}

/*-------------------------------------------------------------------
  IMEコントロール
-------------------------------------------------------------------*/
.auto {
    ime-mode: auto;
}

.active {
    ime-mode: active;
}

.inactive {
    ime-mode: inactive;
}

.disabled {
    ime-mode: disabled;
}

/*-------------------------------------------------------------------
  進捗テーブル
-------------------------------------------------------------------*/
.table1 {
    font-size: 12px;
    line-height: 125%;
    vertical-align: middle;
    text-align: center;
}

/*-------------------------------------------------------------------
  テキストリンク
-------------------------------------------------------------------*/
.plain_text a {
    text-decoration: none;
}

    .plain_text a:hover {
        text-decoration: underline;
    }

/*-------------------------------------------------------------------
  ボタン
-------------------------------------------------------------------*/
.btn {
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.btn-select {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-select:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,123,255,0.3);
    }

/*-------------------------------------------------------------------
  入力系
-------------------------------------------------------------------*/
.txtb {
    padding: 1px;
    font-size: 0.9em;
    font-family: Arial, sans-serif;
    color: black;
    border: 1px solid #ccc;
    margin: 0;
    height: 23px;
    border-radius: 5px; /* .lst と同じ角丸 */
}

.txt {
    font-size: 1em;
    font-family: Arial, sans-serif;
    color: black;
}

/*.lst {
    background-color: #F3F3F3;
    font-size: 0.9em;
    font-family: Arial, sans-serif;
    color: black;
    border-radius: 5px;
}
*/
.lst {
    /*    background-color: #F3F3F3;*/
    font-size: 0.9em;
    font-family: Arial, sans-serif;
    color: #000;
    border: 1px solid #ccc; /* .txtb と揃える */
    border-radius: 5px;
    height: 23px; /* .txtb と同じ固定値 */
    padding: 1px 4px; /* 左右少し余白（上下 1px は高さ調整） */
    box-sizing: border-box; /* 念のため */
}

.up {
    font-weight: bold;
    cursor: pointer;
    color: #666;
    width: 300px;
}

/*-------------------------------------------------------------------
  モダンなGridView
-------------------------------------------------------------------*/
.modern-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    background: white;
}

    .modern-grid th {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: white;
        font-weight: 600;
        text-align: center;
        padding: 8px 10px;
        border: none;
    }

    .modern-grid td {
        padding: 8px 10px;
        border-bottom: 1px solid #ddd;
        vertical-align: middle;
    }

    .modern-grid tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    .modern-grid tr:hover {
        background-color: #eaf2ff;
        transition: background-color 0.2s ease;
    }

    /* GridView1専用ヘッダー色（背景ごと上書き） */
    .modern-grid tr.grid-header th {
        background: #507CD1 !important;
        color: white !important;
        font-weight: bold;
        text-align: center;
        font-size: 12px !important;
        padding: 4px 6px !important;
        line-height: 1.2;
    }
    /*.modern-grid tr.grid-header th {
        background: #507CD1;  既存色 
        color: #fff;
        font-weight: 600;
        text-align: center;
        font-size: 14px;
        padding: 5px 10px !important;
        line-height: 1.3;
    }*/


    /* 選択行の背景色をピンクに */
    .modern-grid tr.selected-row td {
        background-color: pink !important;
        color: black; /* 読みやすくするため */
    }

/* GridView1 交互色（白／水色） */
.gridview1 tbody tr:nth-child(odd) td {
    background-color: #ffffff; /* 白 */
}

.gridview1 tbody tr:nth-child(even) td {
    background-color: #EFF3FB; /* 薄い水色 */
}

/* 選択行はピンクを最優先 */
.gridview1 tr.selected-row td {
    background-color: pink !important;
    color: black; /* 読みやすく */
}

/* GridView1 のセルに枠線 */
.gridview1 th,
.gridview1 td {
    border: 1px solid #ccc; /* 薄いグレーの線 */
}

/* 枠線が重なって太くならないように */
.gridview1 {
    border-collapse: collapse;
}

/* 選択アイコン */
.icon-select {
    text-align: center;
    font-size: 1rem;
}
/* ●リンクを黒くする */
.modern-grid.gridview1 .icon-select a {
    color: #000 !important;
    text-decoration: none !important;
    font-weight: normal !important;
}

/*-------------------------------------------------------------------
  バッジ系
-------------------------------------------------------------------*/
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-review {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.issue-badge {
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.issue-yes {
    background: #28a745;
    color: white;
}

.issue-no {
    background: #6c757d;
    color: white;
}

.crf-badge {
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.crf-required {
    background: #dc3545;
    color: white;
}

.crf-not-required {
    background: #28a745;
    color: white;
}

/*-------------------------------------------------------------------
  アイコン色
-------------------------------------------------------------------*/
.icon-check {
    color: #28a745;
    font-weight: bold;
}

.icon-pending {
    color: #ffc107;
    font-weight: bold;
}

.icon-error {
    color: #dc3545;
    font-weight: bold;
}

/*-------------------------------------------------------------------
  情報テーブル
-------------------------------------------------------------------*/
.info-table {
    border-collapse: collapse;
    width: auto;
    font-family: Arial, sans-serif;
    margin-bottom: 10px;
}

    .info-table th {
        background-color: #507CD1;
        color: white;
        padding: 6px 10px;
        text-align: left;
        font-weight: bold;
        border: 1px solid #ccc;
    }

    .info-table td {
        padding: 6px 10px;
        border: 1px solid #ccc;
    }

.highlight-cell {
    background-color: #e3f2fd;
    font-weight: bold;
    color: #0d47a1;
}

/*-------------------------------------------------------------------
  レスポンシブ
-------------------------------------------------------------------*/
@media (max-width: 768px) {
    .modern-grid {
        font-size: 12px;
    }

        .modern-grid th, .modern-grid td {
            padding: 8px 4px;
        }
}

/*-------------------------------------------------------------------
  QueryEdit検索メニュー
-------------------------------------------------------------------*/
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    background: #f8f9fa;
    padding: 0px 2px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .form-group-inline label {
        font-size: 0.85rem;
        font-weight: 600;
        color: #333;
    }

.form-control {
    padding: 6px 8px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}

/* アクションバーの全体配置 */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.btn-primary {
    background: #007bff;
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
}

    .btn-primary:hover {
        background: #0056b3;
    }

.btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
}

    .btn-secondary:hover {
        background: #5a6268;
    }



/*-------------------------------------------------------------------
  QueryEditクエリ追加とかのメニュー
-------------------------------------------------------------------*/


.form-actions-left, .form-actions-right {
    display: flex;
    gap: 8px;
}

/* 共通ボタンスタイル（検索フォームと統一） */
.form-btn {
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .form-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* ホバー時の共通効果 */
    .form-btn:hover:not(:disabled) {
        background: #f5f5f5;
    }

/* 戻るボタンだけ強調色（検索ボタンと同じ） */
.form-btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    color: white;
}

    .form-btn-primary:hover:not(:disabled) {
        background: linear-gradient(135deg, #0069d9 0%, #004085 100%);
    }

/* 色なしバージョン（デフォルト） */
.form-btn-plain {
    background: white;
    border: 1px solid #ccc;
    color: #333;
}




/*-------------------------------------------------------------------
  QueryEdit　EPS回答
-------------------------------------------------------------------*/
/* パネル全体をカード風に */
.info-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    max-width: 575px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    background-color: white;
}

    /* ヘッダー */
    .info-card .card-header {
        background-color: #EFF3FB;
        padding: 0.5rem 1rem;
        font-weight: bold;
        font-size: 1rem;
    }

    /* タイトル */
    .info-card .card-title {
        display: inline-block;
    }

    /* 本文 */
    .info-card .card-body {
        padding: 0.5rem 1rem;
        background-color: white;
        font-size: 0.95rem;
    }



.button-group {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

    .button-group .btn {
        padding: 0.4rem 1rem;
        border: none;
        border-radius: 4px;
        font-weight: bold;
        cursor: pointer;
    }

    .button-group .btn-primary {
        background-color: #007bff;
        color: white;
    }

    .button-group .btn-danger {
        background-color: #dc3545;
        color: white;
    }

    .button-group .btn:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }

td input[type="radio"] {
    margin-left: 0;
}

td .form-check {
    justify-content: flex-start !important;
}

/* === ヘッダー専用スタイル === */
.header-title {
    font-family: Osaka, "ＭＳ Ｐゴシック", Arial, sans-serif; /* 古いフォントを継承 */
    font-size: 14px;
    color: #404040;
    line-height: 150%;
}

/* QueryEdit.aspx 全体に適用するフォント */
body {
    font-family: Osaka, "ＭＳ Ｐゴシック", Arial, sans-serif;
    font-size: 14px;
    color: #404040;
    line-height: 150%;
}
/* 古いスタイルのボタン */
.btn-old {
    border-top: 1px solid #ccc;
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
    border-left: 1px solid #ccc;
    padding: 2px 6px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    background-color: #f9f9f9;
}

/* GridView2専用 */
.gridview2 {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border: 1px solid #ccc;
}

    /* ヘッダー */
    .gridview2 th {
        background-color: #507CD1 !important; /* Bootstrapより優先 */
        color: white !important;
        font-weight: bold;
        text-align: center;
        padding: 8px 10px;
        border: 1px solid #ccc;
    }

    /* 交互行 */
    .gridview2 tbody tr:nth-child(odd) td {
        background-color: #ffffff !important;
    }

    .gridview2 tbody tr:nth-child(even) td {
        background-color: #EFF3FB !important;
    }

    /* ホバー時 */
    .gridview2 tbody tr:hover td {
        background-color: #eaf2ff !important;
        transition: background-color 0.2s ease;
    }

    /* 選択行 */
    .gridview2 tr.selected-row td {
        background-color: pink !important;
        color: black;
    }


/* パンくずリスト全体 */
.breadcrumb-custom {
    font-family: "ＭＳ Ｐゴシック", Osaka, Arial, sans-serif;
    font-size: 13px;
    color: #000; /* デフォルト文字色は黒 */
}

    /* パンくず内のリンク（例: メニュー / メニュー一覧 / 進捗メイン） */
    .breadcrumb-custom a {
        color: #0000EE !important; /* 標準リンクブルー */
        text-decoration: underline !important;
    }

        /* a 内の Label は親の色を継承 */
        .breadcrumb-custom a .asp-label {
            color: inherit !important;
        }

    /* パンくず内の非リンク部分（例: クエリ編集） */
    .breadcrumb-custom span,
    .breadcrumb-custom .current {
        color: #000;
        text-decoration: none;
    }

/* lblpat, lblblock のセルを白背景に */
.info-table td.highlight-cell {
    background-color: #ffffff !important;
}

/* lblpat, lblblock の Label 表示調整 */
#lblpat,
#lblblock {
    color: #000 !important;
    padding: 2px 4px;
    display: inline-block;
}


.page-header {
    background: #fff; /* 白背景 */
    padding: 5px 10px;
}

.page-header table {
    width: 100%;
    border-collapse: collapse;
}

.page-header .header_title {
    font-size: 20px;
    font-weight: bold;
    color: #000;
}

/* Panel4, Panel5 の外側テーブルのセルすべてを対象 */
#Panel4 table.outer-table > tbody > tr > th,
#Panel4 table.outer-table > tbody > tr > td,
#Panel5 table.outer-table > tbody > tr > th,
#Panel5 table.outer-table > tbody > tr > td {
    background-color: #EFF3FB;
}

/* Panel4, Panel5 のテーブル行をすべて同じ色にする */
#Panel4 table.table > tbody > tr > th,
#Panel4 table.table > tbody > tr > td,
#Panel5 table.outer-table > tbody > tr > th,
#Panel5 table.outer-table > tbody > tr > td {
    background-color: #EFF3FB;
}






/* テーブルスクロール＋ヘッダー固定 */
.grid-scroll {
    max-height: 400px; /* 必要な高さに調整 */
    overflow-y: auto;
    position: relative;
}

    /* sticky が効きやすいよう collapse を避けるケースもある */
    .grid-scroll table {
        border-collapse: separate;
    }

    /* ヘッダー固定 */
    .grid-scroll thead th {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #507CD1; /* 既存ヘッダー色を再指定（透過だと下が透ける） */
        color: #fff;
    }

    /* （任意）影を付けて固定感を出す */
    .grid-scroll thead th {
        box-shadow: 0 2px 3px rgba(0,0,0,0.15);
    }


/* 既存 grid-scroll を上書き/調整する場合は後ろに置く */
.grid-scroll {
    max-height: 80vh; /* ここを 600px, 70vh など好みで調整 */
    overflow-y: auto;
    position: relative;
}

    .grid-scroll table {
        border-collapse: separate;
    }

    .grid-scroll thead th {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #507CD1;
        color: #fff;
        box-shadow: 0 2px 3px rgba(0,0,0,0.15);
    }



/* Panel9 (EPS) を 70% 幅に拡張 */
#Panel9.info-card {
    width: 70%;
    max-width: none; /* 既存 575px 制限を解除 */
    margin: 0 0 1rem 0; /* 必要なら中央寄せ: margin:0 auto でも可 */
}

/* 画面幅が狭い時は 100% にフォールバック（任意） */
@media (max-width: 992px) {
    #Panel9.info-card {
        width: 100%;
    }
}

/* ヘッダー部の高さを低く（上下パディング縮小） */
#Panel9.info-card .card-header {
    padding: 4px 10px; /* 元: 0.5rem (≈8px)。上下を 4px に */
    font-size: 0.9rem; /* 少し小さく（元 1rem） */
    line-height: 1.2; /* 行間を詰める */
}

/* タイトル文字をさらに詰めたい場合（任意） */
#Panel9.info-card .card-title {
    display: inline-block;
    margin: 0;
    padding: 0;
}






/* GridView 共通スタイル（Create / Edit / Import で統一） */
.gridview {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 軽い影で浮かせる */
}

    /* ヘッダー */
    .gridview th {
        background-color: #337ab7; /* 濃い青 */
        color: #fff;
        text-align: center;
        font-weight: bold;
        padding: 8px;
        border: 1px solid #ddd;
    }

    /* 通常セル */
    .gridview td {
        padding: 8px;
        text-align: left;
        border: 1px solid #ddd;
    }

    /* 偶数行に薄いグレー背景 */
    .gridview tr:nth-child(even) td {
        background-color: #f9f9f9;
    }

    /* ホバー時に薄い青 */
    .gridview tr:hover td {
        background-color: #e6f2ff;
    }

    /* 最後の列（ボタン列）は中央寄せ */
    .gridview td:last-child {
        text-align: center;
    }

    /* ボタンの見た目を改善 */
    .gridview .aspNetButton,
    .gridview input[type="submit"],
    .gridview input[type="button"],
    .gridview button {
        background-color: #5bc0de; /* 水色ボタン */
        color: #fff;
        border: none;
        padding: 4px 10px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 12px;
    }

        .gridview .aspNetButton:hover,
        .gridview input[type="submit"]:hover,
        .gridview input[type="button"]:hover,
        .gridview button:hover {
            background-color: #31b0d5;
        }



/* GridView 共通スタイル(Query Import) */
.gridview {
    border-collapse: collapse;
    width: 100%; /* 画面幅に合わせて伸縮 */
    font-size: 14px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    table-layout: auto; /* 列幅を自動調整 */
}

/* 横スクロール対応（スマホや狭い画面用） */
.gridview-container {
    width: 100%;
    overflow-x: auto;
}

/* ヘッダー */
.gridview th {
    background-color: #507CD1;
    color: #fff;
    text-align: center;
    font-weight: bold;
    padding: 8px;
    border: 1px solid #ddd;
    white-space: nowrap; /* ヘッダー文字が折り返さないようにする */
}

/* セル */
.gridview td {
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
}

/* 交互行 */
.gridview tr:nth-child(even) td {
    background-color: #f9f9f9;
}

/* ホバー時 */
.gridview tr:hover td {
    background-color: #e6f2ff;
}

/* 最後の列（ボタン列） */
.gridview td:last-child {
    text-align: center;
    white-space: nowrap;
}

/* ボタン */
.gridview .aspNetButton,
.gridview input[type="submit"],
.gridview input[type="button"],
.gridview button {
    background-color: #5bc0de;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

    .gridview .aspNetButton:hover,
    .gridview input[type="submit"]:hover,
    .gridview input[type="button"]:hover,
    .gridview button:hover {
        background-color: #31b0d5;
    }





/* SubjectManage GridView */
.subject-grid {
    width: 100% !important; /* 親のPanel幅にフィットさせる */
    border: none !important;
    border-collapse: collapse;
    border-spacing: 0;
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-top:
0px;
}


    /* th / td の枠を完全に消す（他のCSSを上書き） */
    .subject-grid,
    .subject-grid th,
    .subject-grid td {
        border: none !important;
        box-shadow: none !important;
    }

        /* ヘッダー */
        .subject-grid th {
            background-color: #507CD1;
            color: #fff;
            text-align: center;
            font-weight: bold;
            padding: 8px 12px;
        }

        /* 奇数行 = #EFF3FB、偶数行 = 白 */
        .subject-grid tr:nth-child(odd) td {
            background-color: #EFF3FB;
        }

        .subject-grid tr:nth-child(even) td {
            background-color: #ffffff;
        }

        /* データセル */
        .subject-grid td {
            padding: 8px 12px;
            text-align: center;
        }

        /* 削除ボタン */
        .subject-grid .btn-delete {
            background: #5bc0de;
            border: none;
            color: #fff;
            padding: 4px 10px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: background 0.2s ease;
        }

            .subject-grid .btn-delete:hover {
                background: #a71d2a;
            }

/* パネルの枠を無効化（Panel の BorderWidth を消したい場合） */
.panel-no-border {
    border: none !important;
    box-shadow: none !important;
}



.panel-box {
    border: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 軽い影で浮かせる */
    border-radius: 6px; /* 角を少し丸めるとより柔らかい印象 */
    background-color: #fff; /* 白背景で影を際立たせる */
    padding: 10px;
}



/* QueryCreate 専用調整 */
.querycreate-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Panel4 内テーブルを軽量化 */
.panel-box .form-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .panel-box .form-table th {
        background: #EFF3FB;
        font-weight: 600;
        width: 120px;
        padding: 6px 8px;
        border: 1px solid #d5dbe5;
        text-align: center;
        vertical-align: middle;
    }

    .panel-box .form-table td {
        padding: 6px 8px;
        border: 1px solid #e2e6ec;
        background: #fff;
        vertical-align: middle;
    }

    .panel-box .form-table tr + tr th,
    .panel-box .form-table tr + tr td {
        border-top: 1px solid #dcdfe4;
    }

/* テキストエリア等を幅いっぱいに */
.panel-box textarea,
.panel-box select,
.panel-box input[type="text"] {
    max-width: 100%;
}

/* 過去クエリ一覧タイトル（任意） */
.panel-box .panel-header {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e6ec;
}

/* Grid エリアのスクロール感統一 */
.panel-box .grid-scroll {
    max-height: 405px;
    overflow-y: auto;
}

/* ボタン行の調整 */
.action-buttons .aspNetButton,
.action-buttons input[type="submit"],
.action-buttons input[type="button"],
.action-buttons button {
    background: linear-gradient(135deg,#007bff 0%,#0056b3 100%);
    color: #fff;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

    .action-buttons .aspNetButton:hover,
    .action-buttons input[type="submit"]:hover,
    .action-buttons input[type="button"]:hover,
    .action-buttons button:hover {
        filter: brightness(1.05);
        transform: translateY(-1px);
    }

/* スマホ時の縦並び最適化 */
@media (max-width: 768px) {
    .panel-box .form-table th {
        width: 100px;
        font-size: 12px;
    }

    .panel-box {
        padding: 12px;
    }
}









/* =========================
   QueryEdit 専用調整
   ========================= */

/* 左右カラムの上下間隔を少し詰める */
.queryedit-wrapper .row.g-3 > [class*="col-"] {
    margin-bottom: 12px;
}

/* Panel4, Panel5, Panel3 をカード化 */
.panel-box {
    border: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 6px;
    background-color: #fff;
    padding: 12px 14px;
}

    /* セクションタイトル（任意） */
    .panel-box .section-title {
        font-size: 14px;
        font-weight: 600;
        margin: 0 0 8px;
        padding-bottom: 4px;
        border-bottom: 1px solid #e2e6ec;
    }

    /* 既存 table を軽量化（table-bordered を外す前提） */
    .panel-box .form-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
        table-layout: fixed;
    }

        .panel-box .form-table th {
            background: #EFF3FB;
            font-weight: 600;
            padding: 6px 6px;
            border: 1px solid #d5dbe5;
            text-align: center;
            width: 70px;
            vertical-align: middle;
            word-break: break-all;
        }

        .panel-box .form-table td {
            padding: 6px 8px;
            border: 1px solid #e2e6ec;
            background: #fff;
            vertical-align: middle;
        }

    .panel-box textarea.form-control {
        resize: vertical;
        min-height: 90px;
    }

    /* ラジオボタンリスト縦詰め */
    .panel-box .form-table td .aspNetDisabled,
    .panel-box .form-table td .radio,
    .panel-box .form-table td .checkbox,
    .panel-box .form-table td .aspNetRadioButtonList {
        margin: 0;
    }

    /* GridView2 をカード内でオーバーフロー */
    .panel-box .grid-scroll {
        max-height: 405px;
        overflow-y: auto;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #fff;
    }

    /* GridView2 の幅調整 */
    .panel-box .gridview2 {
        margin: 0;
        width: 100% !important;
    }

    /* 右側の過去クエリヘッダー */
    .panel-box .history-header {
        font-size: 14px;
        font-weight: 600;
        margin: 0 0 6px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

        .panel-box .history-header .badge-count {
            background: #507CD1;
            color: #fff;
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 10px;
        }

/* ボタン群の見た目統一（QueryCreate と合わせる） */
.action-buttons .aspNetButton,
.action-buttons input[type="submit"],
.action-buttons input[type="button"],
.action-buttons button {
    background: linear-gradient(135deg,#007bff 0%,#0056b3 100%);
    color: #fff;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

    .action-buttons .aspNetButton:disabled,
    .action-buttons input[type="submit"]:disabled {
        filter: grayscale(40%);
        opacity: .55;
        cursor: not-allowed;
    }

    .action-buttons .aspNetButton:hover:not(:disabled),
    .action-buttons input[type="submit"]:hover:not(:disabled) {
        filter: brightness(1.05);
        transform: translateY(-1px);
    }

/* EPS カード (Panel9) を panel-box 風に寄せる */
#Panel9.info-card {
    border-radius: 6px;
    border: 1px solid #d8dde6;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
    background: #fff;
}

/* モバイル調整 */
@media (max-width: 768px) {
    .panel-box {
        padding: 10px 10px;
    }

        .panel-box .form-table th {
            font-size: 12px;
            width: 60px;
            padding: 4px;
        }

        .panel-box .form-table td {
            padding: 4px 6px;
        }

        .panel-box textarea.form-control {
            min-height: 70px;
        }
}

/* RadioButtonList の内部テーブルを透明化（Panel4 / Panel5 対象） */
#Panel4 table.outer-table td table,
#Panel5 table.outer-table td table {
    background: transparent !important;
    border: none !important;
}

    #Panel4 table.outer-table td table td,
    #Panel5 table.outer-table td table td {
        background: transparent !important;
        border: none !important;
        padding: 2px 4px; /* 余白を少しだけ */
    }


/* Panel4 ヘッダー内にボタンを並べるための行 */
.panel-box .panel-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
}

    /* 既存 .section-title を行内用に微調整（下線を残したくなければ border-bottom: none; に） */
    .panel-box .panel-header-inline .section-title {
        margin: 0;
        padding: 0;
        border-bottom: none; /* 下線を残したい場合はコメントアウト */
        font-size: 14px;
        font-weight: 600;
    }

    /* ヘッダー右側のボタンコンテナ */
    .panel-box .panel-header-inline .panel-btns {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

        /* ボタン基本（既存 action-buttons の書式に近づける） */
        .panel-box .panel-header-inline .panel-btns .aspNetButton,
        .panel-box .panel-header-inline .panel-btns input[type="submit"],
        .panel-box .panel-header-inline .panel-btns input[type="button"],
        .panel-box .panel-header-inline .panel-btns button {
            background: linear-gradient(135deg,#007bff 0%,#0056b3 100%);
            color: #fff;
            border: none;
            padding: 6px 14px;
            font-size: 13px;
            border-radius: 4px;
            font-weight: 600;
            cursor: pointer;
            transition: .2s;
        }

            .panel-box .panel-header-inline .panel-btns .aspNetButton:disabled,
            .panel-box .panel-header-inline .panel-btns input[type="submit"]:disabled {
                filter: grayscale(40%);
                opacity: .55;
                cursor: not-allowed;
            }

            .panel-box .panel-header-inline .panel-btns .aspNetButton:hover:not(:disabled),
            .panel-box .panel-header-inline .panel-btns input[type="submit"]:hover:not(:disabled) {
                filter: brightness(1.05);
                transform: translateY(-1px);
            }


/* まず常に隠す */
#Panel3 .badge-count {
    display: none;
}

    /* 内部ラベルが空でないときだけ表示 */
    #Panel3 .badge-count:has(#lblHistoryCount:not(:empty)) {
        display: inline-flex;
    }


/* 共通：カード風のテーブル */
.shadow-table {
    background: #CED8F6; /* 既存 bgcolor を CSS に寄せる（HTML属性は残しても可） */
    border-radius: 10px; /* 角丸（不要なら削除） */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* メインの影 */
    border: 1px solid #b9c7df; /* うっすら輪郭（不要なら削除） */
}

    /* 浮かせる演出を強めたい場合のホバー */
    .shadow-table:hover {
        box-shadow: 0 6px 18px rgba(0,0,0,0.22);
        transition: box-shadow .25s ease;
    }


/* === Panel3 過去クエリヘッダー：下線除去 === */
#Panel3 .panel-header {
    border-bottom: none !important;
    margin-bottom: 4px; /* 下線消しても余白は少し残す（調整可） */
    padding-bottom: 0; /* 余白を詰めたい場合 */
}


/* ===== Panel4（QueryCreate）専用 ===== */
.panel-wide .form-table {
    table-layout: auto;
}

    .panel-wide .form-table th {
        width: 120px;
        min-width: 120px;
        white-space: nowrap;
    }


/* QueryCreate 行の横gutterだけ拡大 */
.querycreate-wrapper .row.g-3 {
    --bs-gutter-x: 1rem; /* 好みで 1.25rem～2rem */
}

/* ===== Panel4 table 右はみ出し防止（最小セット）QueryCreate===== */
.panel-wide .form-table {
    width: 100%;
    box-sizing: border-box; /* width + padding/border を内側計算に */
    margin: 0;
    border-collapse: collapse;
    /* 角丸内に収めたい時だけ */
    border-radius: 4px;
    overflow: hidden; /* 角丸外へ罫線がはみ出るのを防止 (必要なければ削除) */
}

    .panel-wide .form-table th,
    .panel-wide .form-table td {
        padding: 6px 8px;
        vertical-align: middle;
        /* 右に若干余白欲しければ増やす: padding:6px 10px; */
        word-break: break-word;
    }

    .panel-wide .form-table select,
    .panel-wide .form-table input[type="text"],
    .panel-wide .form-table textarea {
        width: 100%; /* セレクトが内容で横に伸びすぎるのを防ぐ */
        max-width: 100%;
        box-sizing: border-box;
    }


/* QueryEdit ページだけで GridView2 ラッパを 575px に */
.page-queryedit #Panel3 .grid-scroll {
    max-height: 575px;
}

@media (max-height: 720px) {
    .page-queryedit #Panel3 .grid-scroll {
        max-height: 70vh;
    }
}


/* === GridView 共通ストライプ（奇数:#EFF3FB / 偶数:#FFFFFF） === */
.gv-striped .gv-row-odd td {
    background-color: #EFF3FB !important;
}

.gv-striped .gv-row-even td {
    background-color: #FFFFFF !important;
}

/* ホバー・選択行（必要なら） */
.gv-striped tr:hover td {
    background-color: #e6f2ff !important;
}

.gv-striped tr.selected-row td {
    background-color: pink !important;
}

/* Panel1 の上パディング縮小 */
#Panel1.panel-box {
    padding-top: 4px !important; /* 0 でも可 */
}

/* 最初の（＝GridView1 用）コンテナの余白を詰める */
#Panel1 .gridview-container:first-of-type {
    margin-bottom: 4px !important; /* 0 にすれば完全密着 */
}

/* （任意）検索テーブルの下余白もさらに詰めたい場合 */
.breadcrumb-custom > table {
    margin-bottom: 0 !important;
}





/* Enabled のとき（disabled 属性が無いとき） */
.gridview .aspNetButton:not([disabled]) {
    background-color: #cccccc !important;
    color: #333 !important;
    border: 1px solid #aaa !important;
}

/* Disabled のとき（必要なら別表現） */
.gridview .aspNetButton[disabled] {
    background-color: #eeeeee !important;
    color: #999 !important;
    border: 1px solid #ddd !important;
    cursor: not-allowed;
    opacity: 0.75;
}