/* ============================================================
   テーブル一元管理（logikan方式）
   ・table-layout: fixed + colgroup で列幅を厳密制御
   ・各テーブルに .tbl-XXX クラスで全幅 + col:nth-child(N) で各列幅
   ============================================================ */

.table-area { display: inline-block; min-width: 0; }
.table-wrap { overflow-x: auto; }
.pagination-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
}
.pagination-row .pagination { padding: 0; }
.page-size-select {
  padding: 4px 8px; font-size: 12px;
  border: 1px solid var(--gray-300); border-radius: 6px;
  background: #fff; cursor: pointer;
}

table.fixed-table { table-layout: fixed; border-collapse: collapse; }
table.fixed-table thead { background: var(--gray-50); }
table.fixed-table th {
  padding: 8px 6px;
  font-weight: 600; font-size: 12px;
  color: var(--gray-600); letter-spacing: .3px;
  border-bottom: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-100);
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.fixed-table td {
  padding: 6px 6px;
  border-bottom: 1px solid var(--gray-100);
  border-right: 1px solid var(--gray-100);
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle;
  position: relative;
}
table.fixed-table th:last-child, table.fixed-table td:last-child { border-right: none; }
table.fixed-table tr:hover td { background: var(--gray-50); }
table.fixed-table tr.row-clickable { cursor: pointer; }
table.fixed-table tr.row-clickable:hover td { background: var(--primary-light); }

table.fixed-table td.text-left, table.fixed-table th.text-left { text-align: left; }
table.fixed-table td.text-right, table.fixed-table th.text-right { text-align: right; }

table.fixed-table .badge { vertical-align: middle; }
.fixed-table .btn-sm { padding: 4px 8px; font-size: 12px; }

/* 見切れセルの全文ツールチップ（文字を範囲選択してコピー可） */
.cell-tip {
  position: absolute;
  z-index: 9999;
  display: none;
  max-width: 480px;
  padding: 6px 10px;
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  white-space: pre-wrap;
  word-break: break-all;
  user-select: text;        /* 文字選択を許可（選択してコピー） */
}
.cell-tip.show { display: block; }


/* ===== 商品管理 (products.html) =====
   チェック36 + Item_id110 + Brand110 + Name160 + Color180 + 入数70 + 在庫90 + 登録150 + 更新150 = 1056 */
.tbl-products { width: 946px; }
.tbl-products col:nth-child(1) { width:  36px; }
.tbl-products col:nth-child(2) { width: 110px; }
.tbl-products col:nth-child(3) { width: 160px; }
.tbl-products col:nth-child(4) { width: 180px; }
.tbl-products col:nth-child(5) { width:  70px; }
.tbl-products col:nth-child(6) { width:  90px; }
.tbl-products col:nth-child(7) { width: 150px; }
.tbl-products col:nth-child(8) { width: 150px; }

/* ===== ラックマスタ詳細 (右側パネル) =====
   Item_id110 + Brand110 + Name240 + Color110 + Num90 = 660 */
.tbl-rack-detail { width: 660px; }
.tbl-rack-detail col:nth-child(1) { width: 110px; } /* Item_id */
.tbl-rack-detail col:nth-child(2) { width: 110px; } /* Brand */
.tbl-rack-detail col:nth-child(3) { width: 240px; } /* Name */
.tbl-rack-detail col:nth-child(4) { width: 110px; } /* Color */
.tbl-rack-detail col:nth-child(5) { width:  90px; } /* Num */


/* ===== FBA予定 (fba.html) =====
   チェック36+ID60+Task120+Rack80+Item110+Brand90+Name160+Color180+取出待70+梱包待70+Box70+備考180+登録150 = 1376 */
.tbl-fba-plan { width: 1376px; }
.tbl-fba-plan col:nth-child(1) { width:  36px; } /* チェック */
.tbl-fba-plan col:nth-child(2) { width:  60px; } /* ID */
.tbl-fba-plan col:nth-child(3) { width: 120px; } /* Task */
.tbl-fba-plan col:nth-child(4) { width:  80px; } /* Rack_id */
.tbl-fba-plan col:nth-child(5) { width: 110px; } /* Item_id */
.tbl-fba-plan col:nth-child(6) { width:  90px; } /* Brand */
.tbl-fba-plan col:nth-child(7) { width: 160px; } /* Name */
.tbl-fba-plan col:nth-child(8) { width: 180px; } /* Color */
.tbl-fba-plan col:nth-child(9) { width:  70px; } /* 取出待 */
.tbl-fba-plan col:nth-child(10) { width: 70px; } /* 梱包待 */
.tbl-fba-plan col:nth-child(11) { width: 70px; } /* Box_num */
.tbl-fba-plan col:nth-child(12) { width: 180px; } /* 備考 */
.tbl-fba-plan col:nth-child(13) { width: 150px; } /* 登録日時 */

/* ===== FBA取り出し実績 ===== チェック36+ID40+Task120+取出元70+置場60+Item110+Brand90+Name160+Color180+Num60+完了135+User80 = 1141 */
.tbl-fba-pick { width: 1231px; }
.tbl-fba-pick col:nth-child(1)  { width:  36px; } /* チェック */
.tbl-fba-pick col:nth-child(2)  { width:  40px; } /* ID */
.tbl-fba-pick col:nth-child(3)  { width: 120px; } /* Task */
.tbl-fba-pick col:nth-child(4)  { width:  70px; } /* 取出元 */
.tbl-fba-pick col:nth-child(5)  { width:  60px; } /* 置場 */
.tbl-fba-pick col:nth-child(6)  { width: 110px; } /* Item_id */
.tbl-fba-pick col:nth-child(7)  { width:  90px; } /* Brand */
.tbl-fba-pick col:nth-child(8)  { width: 160px; } /* Name */
.tbl-fba-pick col:nth-child(9)  { width: 180px; } /* Color */
.tbl-fba-pick col:nth-child(10) { width:  60px; } /* Num */
.tbl-fba-pick col:nth-child(11) { width:  90px; } /* 入荷日 */
.tbl-fba-pick col:nth-child(12) { width: 135px; } /* 完了日時 */
.tbl-fba-pick col:nth-child(13) { width:  80px; } /* User */

/* ===== FBA実績 ===== チェック36+ID40+Task120+Rack60+Item110+Brand90+Name100+Color180+Num50+LOT100+備考180+登録135+完了135+User80+Elapsed90+Photo60 = 1566 */
.tbl-fba-record { width: 1816px; }
.tbl-fba-record col:nth-child(1)  { width:  36px; } /* チェック */
.tbl-fba-record col:nth-child(2)  { width:  40px; } /* ID */
.tbl-fba-record col:nth-child(3)  { width: 120px; } /* Task */
.tbl-fba-record col:nth-child(4)  { width:  60px; } /* Rack_id */
.tbl-fba-record col:nth-child(5)  { width: 110px; } /* Item_id */
.tbl-fba-record col:nth-child(6)  { width:  90px; } /* Brand */
.tbl-fba-record col:nth-child(7)  { width: 100px; } /* Name */
.tbl-fba-record col:nth-child(8)  { width: 180px; } /* Color */
.tbl-fba-record col:nth-child(9)  { width:  50px; } /* Num */
.tbl-fba-record col:nth-child(10) { width: 100px; } /* LOT */
.tbl-fba-record col:nth-child(11) { width:  90px; } /* 製造日 */
.tbl-fba-record col:nth-child(12) { width:  90px; } /* 入荷日 */
.tbl-fba-record col:nth-child(13) { width: 180px; } /* 備考 */
.tbl-fba-record col:nth-child(14) { width: 135px; } /* 登録日時 */
.tbl-fba-record col:nth-child(15) { width: 135px; } /* 完了日時 */
.tbl-fba-record col:nth-child(16) { width:  80px; } /* User */
.tbl-fba-record col:nth-child(17) { width:  90px; } /* 経過時間 */
.tbl-fba-record col:nth-child(18) { width:  60px; } /* 写真 */
/* 設定: 外箱QR→LOT対応表 */
.tbl-qr-lot { width: max-content; }
.tbl-lot-master { width: max-content; }   /* 設定: LOTマスタ(2026-10-07) */
.tbl-fba-record td.fba-photo-cell { padding: 2px; }
.tbl-fba-record td.fba-photo-cell img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; cursor: pointer; }


/* ===== 棚卸し予定 ===== チェック36+ID60+Rack80+Status100+作成日時160 = 436 */
.tbl-stocktaking-plan { width: 326px; }
.tbl-stocktaking-plan col:nth-child(1) { width:  36px; } /* チェック */
.tbl-stocktaking-plan col:nth-child(2) { width:  60px; } /* ID */
.tbl-stocktaking-plan col:nth-child(3) { width:  80px; } /* Rack_id */
.tbl-stocktaking-plan col:nth-child(4) { width: 150px; } /* 登録日時 */

/* ===== 棚卸し実績 ===== chk36+ID60+Rack80+Item110+Brand90+Name160+Color180+登録150+完了150+User80+Original90+入数70+箱数70+端数70+総数90+差異80 = 1646 */
.tbl-stocktaking-record { width: 1736px; }
.tbl-stocktaking-record col:nth-child(1) { width:  36px; } /* チェック */
.tbl-stocktaking-record col:nth-child(2) { width:  60px; } /* ID */
.tbl-stocktaking-record col:nth-child(3) { width:  80px; } /* Rack_id */
.tbl-stocktaking-record col:nth-child(4) { width: 110px; } /* Item_id */
.tbl-stocktaking-record col:nth-child(5) { width: 160px; } /* Name */
.tbl-stocktaking-record col:nth-child(6) { width: 180px; } /* Kind */
.tbl-stocktaking-record col:nth-child(7) { width: 150px; } /* 登録日時 */
.tbl-stocktaking-record col:nth-child(8) { width: 150px; } /* 完了日時 */
.tbl-stocktaking-record col:nth-child(9) { width:  80px; } /* User */
.tbl-stocktaking-record col:nth-child(10) { width:  90px; } /* Original_num */
.tbl-stocktaking-record col:nth-child(11) { width:  70px; } /* 入数 */
.tbl-stocktaking-record col:nth-child(12) { width:  70px; } /* 箱数 */
.tbl-stocktaking-record col:nth-child(13) { width:  70px; } /* 端数 */
.tbl-stocktaking-record col:nth-child(14) { width:  90px; } /* 総数 */
.tbl-stocktaking-record col:nth-child(15) { width:  80px; } /* 差異 */
.tbl-stocktaking-record col:nth-child(16) { width:  90px; } /* 製造日 */
.tbl-stocktaking-record col:nth-child(17) { width:  90px; } /* 入荷日 */


/* ===== ラック間移動 予定 ===== チェック36+ID60+Rack80+Moved100+Item110+Brand90+Name160+Color180+Num70+Box70 = 956 */
.tbl-rackmove-plan { width: 1016px; }
.tbl-rackmove-plan col:nth-child(1) { width:  36px; } /* チェック */
.tbl-rackmove-plan col:nth-child(2) { width:  60px; } /* ID */
.tbl-rackmove-plan col:nth-child(3) { width:  80px; } /* Rack_id */
.tbl-rackmove-plan col:nth-child(4) { width: 100px; } /* Moved_rack_id */
.tbl-rackmove-plan col:nth-child(5) { width: 110px; } /* Item_id */
.tbl-rackmove-plan col:nth-child(6) { width: 160px; } /* Name */
.tbl-rackmove-plan col:nth-child(7) { width: 180px; } /* Kind */
.tbl-rackmove-plan col:nth-child(8) { width:  70px; } /* Num */
.tbl-rackmove-plan col:nth-child(9) { width:  70px; } /* Box_num */
.tbl-rackmove-plan col:nth-child(10) { width: 150px; } /* 登録日時 */

/* ===== ラック間移動 実績 ===== チェック36+ID60+Datetime140+User80+Rack80+Moved100+Item110+Brand90+Name160+Color180+Num70 = 1106 */
.tbl-rackmove-record { width: 1506px; }
.tbl-rackmove-record col:nth-child(1) { width:  36px; } /* チェック */
.tbl-rackmove-record col:nth-child(2) { width:  60px; } /* ID */
.tbl-rackmove-record col:nth-child(3) { width:  80px; } /* Rack_id */
.tbl-rackmove-record col:nth-child(4) { width: 100px; } /* Moved_rack_id */
.tbl-rackmove-record col:nth-child(5) { width: 110px; } /* Item_id */
.tbl-rackmove-record col:nth-child(6) { width: 160px; } /* Name */
.tbl-rackmove-record col:nth-child(7) { width: 180px; } /* Kind */
.tbl-rackmove-record col:nth-child(8) { width:  70px; } /* Num */
.tbl-rackmove-record col:nth-child(9) { width:  70px; } /* Box_num */
.tbl-rackmove-record col:nth-child(10) { width:  90px; } /* 入荷日 */
.tbl-rackmove-record col:nth-child(11) { width: 150px; } /* 登録日時 */
.tbl-rackmove-record col:nth-child(12) { width: 150px; } /* 完了日時 */
.tbl-rackmove-record col:nth-child(13) { width:  80px; } /* User */
.tbl-rackmove-record col:nth-child(14) { width:  90px; } /* 計測時間 */


/* ===== 入荷 / 移動 予定 ===== チェック36+ID60+Rack80+Item110+Brand90+Name160+Color180+Num70 = 786 */
.tbl-simple-plan { width: 846px; }
.tbl-simple-plan col:nth-child(1) { width:  36px; } /* チェック */
.tbl-simple-plan col:nth-child(2) { width:  60px; } /* ID */
.tbl-simple-plan col:nth-child(3) { width:  80px; } /* Rack_id */
.tbl-simple-plan col:nth-child(4) { width: 110px; } /* Item_id */
.tbl-simple-plan col:nth-child(5) { width: 160px; } /* Name */
.tbl-simple-plan col:nth-child(6) { width: 180px; } /* Kind */
.tbl-simple-plan col:nth-child(7) { width:  70px; } /* Num */
.tbl-simple-plan col:nth-child(8) { width: 150px; } /* 登録日時 */

/* ===== 入荷 / 移動 実績 ===== チェック36+ID60+Datetime140+User80+Rack80+Item110+Brand90+Name160+Color180+Num70 = 1006 */
.tbl-simple-record { width: 1166px; }
.tbl-simple-record col:nth-child(1) { width:  36px; } /* チェック */
.tbl-simple-record col:nth-child(2) { width:  60px; } /* ID */
.tbl-simple-record col:nth-child(3) { width:  80px; } /* Rack_id */
.tbl-simple-record col:nth-child(4) { width: 110px; } /* Item_id */
.tbl-simple-record col:nth-child(5) { width: 160px; } /* Name */
.tbl-simple-record col:nth-child(6) { width: 180px; } /* Kind */
.tbl-simple-record col:nth-child(7) { width:  70px; } /* Num */
.tbl-simple-record col:nth-child(8) { width:  90px; } /* 入荷日 */
.tbl-simple-record col:nth-child(9) { width: 150px; } /* 登録日時 */
.tbl-simple-record col:nth-child(10) { width: 150px; } /* 完了日時 */
.tbl-simple-record col:nth-child(11) { width:  80px; } /* User */

/* ===== 不良・破損 実績 ===== */
.tbl-defect-record { width: 1446px; }
.tbl-defect-record col:nth-child(1)  { width:  36px; } /* チェック */
.tbl-defect-record col:nth-child(2)  { width:  60px; } /* ID */
.tbl-defect-record col:nth-child(3)  { width:  80px; } /* Rack_id */
.tbl-defect-record col:nth-child(4)  { width: 110px; } /* Item_id */
.tbl-defect-record col:nth-child(5)  { width:  90px; } /* Brand */
.tbl-defect-record col:nth-child(6)  { width: 160px; } /* Name */
.tbl-defect-record col:nth-child(7)  { width: 180px; } /* Color */
.tbl-defect-record col:nth-child(8)  { width:  70px; } /* Num */
.tbl-defect-record col:nth-child(9)  { width: 120px; } /* 理由 */
.tbl-defect-record col:nth-child(10) { width:  90px; } /* 製造日 */
.tbl-defect-record col:nth-child(11) { width:  90px; } /* 入荷日 */
.tbl-defect-record col:nth-child(12) { width: 150px; } /* 登録日時 */
.tbl-defect-record col:nth-child(13) { width:  80px; } /* User */
.tbl-defect-record col:nth-child(14) { width:  60px; } /* 画像 */


/* ===== 在庫変動履歴 (stock-history.html) =====
   Rack90 + Item110 + Brand90 + Name160 + Color180 + 日時150 + Kind110 + 変動80 + RackOri100 + RackAft100 + TotalOri100 + TotalAft100 = 1370 */
.tbl-stock-history { width: 1750px; }
.tbl-stock-history col:nth-child(1) { width:  90px; } /* Rack_id */
.tbl-stock-history col:nth-child(2) { width: 110px; } /* Item_id */
.tbl-stock-history col:nth-child(3) { width: 160px; } /* Name */
.tbl-stock-history col:nth-child(4) { width: 180px; } /* Kind（商品の種類） */
.tbl-stock-history col:nth-child(5) { width: 150px; } /* 日時 */
.tbl-stock-history col:nth-child(6) { width: 110px; } /* 種別 */
.tbl-stock-history col:nth-child(7) { width: 110px; } /* 移動先（種別=移動のとき） */
.tbl-stock-history col:nth-child(8) { width: 100px; } /* 担当者 */
.tbl-stock-history col:nth-child(9) { width:  80px; } /* 変動数 */
.tbl-stock-history col:nth-child(10) { width: 100px; } /* Rack_ori_num */
.tbl-stock-history col:nth-child(11) { width: 100px; } /* Rack_aft_num */
.tbl-stock-history col:nth-child(12) { width: 100px; } /* Total_ori_num */
.tbl-stock-history col:nth-child(13) { width: 100px; } /* Total_aft_num */
.tbl-stock-history col:nth-child(14) { width: 260px; } /* 備考（メモ） */


/* ===== レポート FBA集計 =====
   Task160 + 件数90 + 合計Num90 + 合計時間110 + 平均時間110 = 560 */
.tbl-reports-fba { width: 560px; }
.tbl-reports-fba col:nth-child(1) { width: 160px; } /* Task */
.tbl-reports-fba col:nth-child(2) { width:  90px; } /* 件数 */
.tbl-reports-fba col:nth-child(3) { width:  90px; } /* 合計Num */
.tbl-reports-fba col:nth-child(4) { width: 110px; } /* 合計時間 */
.tbl-reports-fba col:nth-child(5) { width: 110px; } /* 平均時間 */


/* ===== 設定 ユーザー管理 =====
   ID60 + ユーザー名220 + ロール130 + 登録日160 = 570 */
.tbl-settings-users { width: 570px; }
.tbl-settings-users col:nth-child(1) { width:  60px; } /* ID */
.tbl-settings-users col:nth-child(2) { width: 220px; } /* ユーザー名 */
.tbl-settings-users col:nth-child(3) { width: 130px; } /* ロール */
.tbl-settings-users col:nth-child(4) { width: 160px; } /* 登録日 */

/* 入荷日セル（製造日と色で見分ける） */
td.dlv-cell { font-size: 11px; color: #8d4e00; white-space: nowrap; }

/* ===== 移動（他拠点へ）予定 ===== 高ヶ坂: 入荷予定の列に 移動先・メモ を足したもの */
.tbl-move-plan { width: 1146px; }
.tbl-move-plan col:nth-child(1) { width:  36px; } /* チェック */
.tbl-move-plan col:nth-child(2) { width:  60px; } /* ID */
.tbl-move-plan col:nth-child(3) { width:  80px; } /* Rack_id */
.tbl-move-plan col:nth-child(4) { width: 110px; } /* Item_id */
.tbl-move-plan col:nth-child(5) { width: 160px; } /* Name */
.tbl-move-plan col:nth-child(6) { width: 180px; } /* Kind */
.tbl-move-plan col:nth-child(7) { width:  70px; } /* Num */
.tbl-move-plan col:nth-child(8) { width: 100px; } /* 移動先 */
.tbl-move-plan col:nth-child(9) { width: 200px; } /* メモ */
.tbl-move-plan col:nth-child(10) { width: 150px; } /* 登録日時 */

/* ===== 移動（他拠点へ）実績 ===== */
.tbl-move-record { width: 1556px; }
.tbl-move-record col:nth-child(1) { width:  36px; } /* チェック */
.tbl-move-record col:nth-child(2) { width:  60px; } /* ID */
.tbl-move-record col:nth-child(3) { width:  80px; } /* Rack_id */
.tbl-move-record col:nth-child(4) { width: 110px; } /* Item_id */
.tbl-move-record col:nth-child(5) { width: 160px; } /* Name */
.tbl-move-record col:nth-child(6) { width: 180px; } /* Kind */
.tbl-move-record col:nth-child(7) { width:  70px; } /* Num */
.tbl-move-record col:nth-child(8) { width: 100px; } /* 移動先 */
.tbl-move-record col:nth-child(9) { width: 200px; } /* メモ */
.tbl-move-record col:nth-child(10) { width: 150px; } /* 製造日（入荷日） */
.tbl-move-record col:nth-child(11) { width:  90px; } /* LOT */
.tbl-move-record col:nth-child(12) { width: 150px; } /* 登録日時 */
.tbl-move-record col:nth-child(13) { width: 150px; } /* 完了日時 */
.tbl-move-record col:nth-child(14) { width:  80px; } /* User */
