.w2ui-grid .w2ui-even {
    background-color: #f9f9f9 !important;
}

.w2ui-grid .w2ui-grid-header {
    height: 20px !important;
    line-height: 20px !important; /* テキストの縦位置中央揃え */
    padding: 0 4px !important;    /* 高さが狭いため上下パディングを詰める */
}

.w2ui-grid .w2ui-grid-body table td.my-border,
.w2ui-grid .w2ui-grid-body table td.my-border[colspan] {
    border: 1px solid #000000 !important;


/* 奇数行の背景色を設定（0始まりのインデックスのため）*/
.pq-grid-oddRow > td {
    background-color: #f9f9f9 !important;
}


/* 偶数行の背景色を設定 */
.pq-grid-evenRow > td {
    background-color: #ffffff !important;
}

/* 1. 外側のフィールド行（得意先名など）の上下余白を極限まで詰める */
.w2ui-form .w2ui-field {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    clear: both !important; /* 行ごとの回り込みをリセット */
}

/* 2. アンカーで内部に入れ子になったフィールド（納品先住所など）の余白を完全にゼロにする */
.w2ui-form .w2ui-field .w2ui-field-inline {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    display: inline-block !important; /* 縦に広がらないようインラインブロック化 */
}

/* 3. ラベル（文字部分）の縦位置や余白を調整して高さを圧縮する */
.w2ui-form .w2ui-field > label,
.w2ui-form .w2ui-field .w2ui-field-inline label {
    margin: 0 !important;
    padding-top: 2px !important;   /* 入力欄(23px)とのバランスを見て調整 */
    padding-bottom: 2px !important;
    line-height: 23px !important;  /* 入力欄のheight:23pxに合わせる */
}

/* 4. フィールドの中身を包むdiv（inputの親要素）の不要な隙間を排除する */
.w2ui-form .w2ui-field > div,
.w2ui-form .w2ui-field .w2ui-field-inline > div {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
}

/* グリッド全体の上部タイトルヘッダーのサイズ変更例 */
.w2ui-grid .w2ui-grid-header {
    height: 23px;
    padding: 8px 14px;
    font-size: 4px;
}

/* カラム名が表示される行の高さ変更例 */
.w2ui-grid .w2ui-grid-columns .w2ui-head {
    height: 23px;
}

/* 1. 自動生成（generateHTML）の行要素(row)と列要素(column)の余白を強制リセット */
.w2ui-form .w2ui-field-row,
.w2ui-form .w2ui-field-column {
    margin-top: 1px !important;     /* 上の隙間を1pxに */
    margin-bottom: 1px !important;  /* 下の隙間を1pxに */
    padding-top: 1px !important;    /* 内側の上の余白を1pxに */
    padding-bottom: 1px !important; /* 内側の下の余白を1pxに */
}

/* 2. もし従来の古いクラスが混在していても網羅するための指定 */
.w2ui-form .w2ui-field,
.w2ui-form .w2ui-field > div {
    margin-top: 1px !important;
    margin-bottom: 1px !important;
    padding: 1px 0 !important;
}

/* 3. 各入力ボックス自体のマージンを排除 */
.w2ui-form .w2ui-field input, 
.w2ui-form .w2ui-field select, 
.w2ui-form .w2ui-field textarea {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}

/* グリッド全体でカラムヘッダーの背景色を変更する場合 */
#grid_grid_id .w2ui-head {
    background-color: #c0c0c0 !important;
}

//ポップアップのタイトル行の背景色
div#w2ui-popup[style*="custom-red-title"] .w2ui-popup-title {
    background: #ff0000 !important; /* 背景色（グラデーションをリセットするため background-color ではなく background を推奨） */
    color: #ffffff !important;      /* 文字色 */
}