:root {
  --primary: #7b1a2e;
  --primary-dark: #5a0f1f;
  --primary-light: #a83250;
  --secondary: #64748b;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --primary-tint: #fbeff2;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { color: inherit; }
button { font-family: inherit; }

/* ---------- ログイン画面 ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #3d0b17 0%, #7b1a2e 45%, #5a0f1f 100%);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 18px;
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-md);
  padding: 36px 30px;
}
.login-card .logo-row { display: flex; justify-content: center; margin-bottom: 18px; }
.login-card .logo-row img { height: 48px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.login-card h1 {
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.10em;
  margin: 0 0 24px;
  color: var(--primary-dark);
}
.login-card .field { margin-bottom: 16px; }
.login-card label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.login-card .error-msg { color: var(--danger); font-size: 12.5px; margin: -8px 0 14px; min-height: 1em; }

/* ---------- フォーム部品 ---------- */
.form-control {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  transition: border-color .15s, background .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); background: #fff; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748b' d='M5.5 7.5l4.5 4.5 4.5-4.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  min-height: 40px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f8fafc; }
.btn-block { width: 100%; }

/* ---------- ヘッダー・ナビ ---------- */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 15px; }
.app-header .brand img { height: 28px; }
.app-header .user-menu { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.app-header .user-menu button { background: rgba(255,255,255,.15); color: #fff; border: none; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.app-header .user-menu button:hover { background: rgba(255,255,255,.28); }

.tab-nav {
  display: flex;
  gap: 4px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  overflow-x: auto;
}
.tab-nav a {
  display: block;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tab-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

main.container { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; }

/* ---------- カード ---------- */
.card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card h2 { font-size: 15px; font-weight: 900; margin: 0 0 16px; }
.card-row { display: flex; gap: 20px; flex-wrap: wrap; }
.card-row > .card { flex: 1 1 320px; margin-bottom: 0; }

/* ---------- KPIタイル ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-tile { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi-tile .kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }
.kpi-tile .kpi-value { font-size: 24px; font-weight: 900; color: var(--text); line-height: 1.2; }
.kpi-tile .kpi-value small { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-left: 2px; }
.kpi-tile .kpi-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* ---------- 検索フォーム ---------- */
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.filter-grid .field label { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.filter-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- テーブル ---------- */
.data-table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th, table.data-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
table.data-table th { color: var(--text-muted); font-weight: 700; font-size: 12px; }
table.data-table tbody tr:hover { background: #f8fafc; }
table.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-muted { background: #e2e8f0; color: var(--text-muted); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; font-size: 13px; }

.empty-state { text-align: center; color: var(--text-muted); padding: 40px 10px; font-size: 13.5px; }
.loading-state { text-align: center; color: var(--text-muted); padding: 40px 10px; font-size: 13.5px; }
.error-banner { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; margin-bottom: 16px; }

@media (max-width: 640px) {
  main.container { padding: 16px 10px 60px; }
  .card { padding: 16px; }
  table.data-table th, table.data-table td { padding: 8px 6px; }
}

/* ====================== アイシン仕掛管理 ====================== */
main.container-wide { max-width: 1680px; }
.mono { font-family: Consolas, 'Courier New', monospace; }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); font-weight: 700; }
.text-danger { color: var(--danger); font-weight: 700; }
.app-header .user-name { white-space: nowrap; }
.tab-nav a i { margin-right: 4px; }
.login-note { text-align: center; font-size: 12px; color: var(--text-muted); margin: 14px 0 0; }
.icon-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; font-size: 14px; }
.icon-btn:hover:not(:disabled) { background: #f1f5f9; color: var(--primary); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ツールバー（OMS直接オープン＋取込） */
.toolbar-card { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between;
  background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 14px; border-left: 4px solid var(--primary); }
.quick-open, .import-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quick-open label { font-size: 12px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.quick-open .form-control { width: 150px; padding: 7px 10px; }
.quick-preview { font-size: 12px; color: var(--text-muted); font-family: Consolas, monospace; white-space: nowrap; }
.quick-preview.ng { color: var(--warning); font-family: inherit; }
.last-import { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* シート切替 */
.sheet-tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.sheet-tab { border: none; background: #e2e8f0; color: var(--text-muted); padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.sheet-tab.active { background: var(--primary); color: #fff; }
.sheet-tab .count { font-size: 11px; opacity: .8; margin-left: 6px; }

/* 絞り込み */
.list-card { padding: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 10px; }
.filter-field { display: flex; flex-direction: column; gap: 3px; }
.filter-field label { font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.filter-field .form-control { padding: 7px 10px; width: auto; min-width: 120px; }
#f-search { width: 230px; }
.toggle-missing { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; padding-bottom: 9px; cursor: pointer; }
.result-count { margin-left: auto; font-size: 12px; color: var(--text-muted); white-space: nowrap; padding-bottom: 9px; }
.sheet-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.notice { background: #fffbeb; color: #92400e; border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; margin-bottom: 8px; }

/* 一覧表 */
.table-wrap { overflow: auto; }
.list-card .table-wrap { max-height: calc(100vh - 300px); min-height: 200px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table.grid th { position: sticky; top: 0; z-index: 2; background: #f1f5f9; }
table.grid td, table.grid th { padding: 6px 10px; }
table.grid tbody tr:nth-child(even) { background: #fafbfc; }
table.grid tbody tr:hover { background: var(--primary-tint); }
table.grid th.col-field { background: #f5ebee; color: var(--primary-dark); text-align: center; }
table.grid td.col-field { background: rgba(123, 26, 46, .025); }
table.grid th.col-kanri { color: var(--primary); }
.col-progress { text-align: center; }
.progress-text { font-size: 12px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
tr.row-missing td { color: #94a3b8; }
tr.row-missing { background: #f8fafc !important; }

a.oms-link { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-weight: 700; text-decoration: none;
  padding: 2px 8px; border-radius: 6px; background: var(--primary-tint); }
a.oms-link i { font-size: 10px; }
a.oms-link:hover { background: var(--primary); color: #fff; }

/* チェック欄 */
td.col-check { text-align: center; padding: 3px 6px !important; }
.chk { display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; background: none; cursor: pointer;
  padding: 4px 8px; border-radius: 6px; font-size: 16px; color: #cbd5e1; min-height: 32px; white-space: nowrap; }
.chk:hover { border-color: var(--border); color: var(--text-muted); background: #fff; }
.chk.on { color: var(--success); background: #dcfce7; }
.chk.on:hover { border-color: #86efac; color: var(--success); }
.chk-who { font-size: 11px; color: #166534; font-weight: 700; }
.cell-input { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 5px 7px; font-size: 13px;
  font-family: inherit; color: var(--text); width: 140px; }
.cell-input[type=date] { width: 135px; }
.cell-input:hover { border-color: var(--border); background: #fff; }
.cell-input:focus { outline: none; border-color: var(--primary); background: #fff; }

/* バッジ */
.badge-type-check { background: #dcfce7; color: #166534; }
.badge-type-text { background: #e0e7ff; color: #3730a3; }
.badge-type-date { background: #fef3c7; color: #92400e; }

/* 項目設定 */
.card-note { font-size: 12.5px; color: var(--text-muted); margin: -6px 0 14px; line-height: 1.7; }
.fields-table .form-control { padding: 6px 10px; width: 260px; }
.order-btns { display: flex; flex-direction: column; line-height: 1; }
.order-btns .icon-btn { padding: 0 6px; font-size: 15px; }
.toggle-btn { border: none; border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 700; cursor: pointer; background: #e2e8f0; color: var(--text-muted); }
.toggle-btn.on { background: var(--success); color: #fff; }
.add-field { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.add-field .form-control { width: auto; }
#new-label { flex: 0 1 320px; }

.empty-icon { font-size: 34px; color: var(--success); margin-bottom: 10px; }

/* モーダル */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; max-width: 640px; max-height: 85vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 900; }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); }
.modal-lead { margin: 0 0 12px; font-weight: 700; }
.modal-lead i { color: var(--success); }
.modal-note { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; margin: 12px 0 0; }

/* トースト */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1e293b; color: #fff; padding: 10px 18px;
  border-radius: 999px; font-size: 13px; opacity: 0; transition: all .25s; z-index: 200; box-shadow: var(--shadow-md); white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); }

@media (max-width: 640px) {
  .app-header .brand { font-size: 13px; }
  .app-header .user-name { display: none; }
  .toolbar-card { padding: 10px 12px; }
  #f-search { width: 100%; }
  .filter-field { flex: 1 1 140px; }
  .list-card .table-wrap { max-height: calc(100vh - 220px); }
}
.add-field select.form-control { min-width: 130px; }
.cell-input::placeholder { color: #cbd5e1; }
table.grid th.num { text-align: right; }

/* スマホ幅: 画面全体が横にはみ出さないよう、ツールバー・絞り込みは折り返しを許可（表だけ枠内で横スクロール） */
@media (max-width: 640px) {
  .app-header { padding: 0 12px; }
  main.container { padding-left: 12px; padding-right: 12px; }
  .toolbar-card { flex-direction: column; align-items: stretch; }
  .quick-open .form-control { flex: 1 1 120px; width: auto; }
  .import-box { justify-content: space-between; }
  .last-import, .toggle-missing { white-space: normal; }
  .filter-row { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-field { min-width: 0; }
  .filter-field:first-child, .toggle-missing, .result-count { grid-column: 1 / -1; }
  .filter-field .form-control { min-width: 0; width: 100%; }
  .result-count { margin-left: 0; padding-bottom: 0; }
}

/* ---------- レビュー反映（状態の見え方・列幅の安定・納期の色分け） ---------- */
/* 行の状態: 左端の色帯（未着手=なし / 途中=橙 / 完了=緑）、完了行は薄い緑 */
table.grid tbody tr { background: #fff; }
table.grid tbody tr:nth-child(even) { background: #fafbfc; }
table.grid tbody tr.st-done { background: #f0fdf4; }
table.grid tbody tr:hover { background: var(--primary-tint); }
tr.st-open td.sticky-1 { box-shadow: inset 4px 0 0 var(--warning); }
tr.st-done td.sticky-1 { box-shadow: inset 4px 0 0 var(--success); }
tr.row-missing td { opacity: .6; }
tr.row-missing td.sticky-1 { box-shadow: inset 4px 0 0 #94a3b8; }
.badge-num { font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-changed { background: #e0f2fe; color: #075985; cursor: help; }

/* 左固定（進捗・品名）: 横スクロールしても品が分かるように */
table.grid .sticky-1, table.grid .sticky-2 { position: sticky; z-index: 1; background: inherit; }
table.grid .sticky-1 { left: 0; width: 64px; min-width: 64px; max-width: 64px; }
table.grid .sticky-2 { left: 64px; box-shadow: 2px 0 0 var(--border); }
table.grid thead th.sticky-1, table.grid thead th.sticky-2 { z-index: 3; background: #f1f5f9; }
table.grid tbody tr td.sticky-1, table.grid tbody tr td.sticky-2 { background: inherit; }
tr.st-open td.sticky-2, tr.st-done td.sticky-2, tr.row-missing td.sticky-2, tr td.sticky-2 { box-shadow: 2px 0 0 var(--border); }

/* 並べ替え */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--primary); }
th .arrow { font-size: 10px; }

/* 社内項目の列をひとかたまりに見せる */
table.grid td.col-field { background: rgba(123, 26, 46, .04); }
table.grid tr.st-done td.col-field { background: rgba(22, 163, 74, .05); }
table.grid .field-first { border-left: 2px solid #e8cdd4; }
table.grid .field-last { border-right: 2px solid #e8cdd4; }

/* チェック欄: 幅を固定し、未チェックも押せる枠に見せる */
table.grid th.col-check, table.grid td.col-check { min-width: 128px; }
.chk { width: 100%; justify-content: center; color: #94a3b8; border: 1px dashed #cbd5e1; min-height: 30px; font-size: 15px; }
.chk:hover { border-style: solid; border-color: var(--primary-light); color: var(--primary); }
.chk.on { border: 1px solid #bbf7d0; }
.chk.on:hover { border-color: var(--danger); background: #fef2f2; }
.chk.on:hover i { color: var(--danger); }
.chk.on:hover i::before { content: "\f00d"; } /* 押すと外れることが分かるよう×を表示 */

/* 納期の色分け・変更セル */
td.due-over { background: #fee2e2 !important; color: #991b1b; font-weight: 700; }
td.due-soon { background: #fef3c7 !important; color: #92400e; font-weight: 700; }
td.cell-changed { box-shadow: inset 0 -2px 0 #38bdf8; cursor: help; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 11.5px; color: var(--text-muted); margin-bottom: 8px; align-items: center; }
.legend > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend .sheet-meta { margin: 0 0 0 auto; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.lg-over { background: #fee2e2; border: 1px solid #fca5a5; }
.lg-soon { background: #fef3c7; border: 1px solid #fcd34d; }

/* 取込確認画面 */
.modal { max-width: 720px; }
.imp-sheet { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.imp-sheet-title { font-weight: 900; font-size: 13.5px; margin-bottom: 6px; }
.imp-meta { font-size: 12px; color: var(--text-muted); background: #f8fafc; border-radius: var(--radius-sm); padding: 6px 10px; margin-bottom: 6px; }
.notice-danger { background: #fef2f2; color: #991b1b; }
.imp-list { margin-top: 6px; }
.imp-list-title { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.imp-list ul { margin: 4px 0 0; padding: 0 0 0 4px; list-style: none; max-height: 180px; overflow: auto; font-size: 12.5px; }
.imp-list li { padding: 3px 0; border-bottom: 1px dashed var(--border); }
.imp-diff { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--text-muted); font-size: 11.5px; }
.imp-diff .diff-due { color: #b45309; font-weight: 700; }

/* トーストの操作ボタン（元に戻す） */
.toast { display: flex; align-items: center; gap: 12px; }
.toast-action { background: none; border: none; color: #fcd34d; font-weight: 700; cursor: pointer; font-size: 13px; padding: 0; }

/* 項目設定: 項目名と種類・表示を離さない */
.fields-table { width: auto; }
.fields-table th, .fields-table td { padding-right: 24px; }
#new-type { min-width: 130px; padding-right: 34px; }

@media (max-width: 640px) {
  .list-card .table-wrap { max-height: none; }
  .legend .sheet-meta { margin-left: 0; }
}

/* ---------- 社内管理番号・取込の取り消し・列の並び順 ---------- */
.kanri-cell { display: flex; align-items: center; gap: 4px; }
.kanri-cell .cell-input { width: 118px; }
.kanri-link { display: inline-flex; width: 26px; justify-content: center; }
a.oms-mini { padding: 4px 7px; }
.kanri-ng { color: var(--warning); cursor: help; }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 12.5px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.undo-list { margin: 0 0 10px; padding-left: 20px; font-size: 13px; line-height: 1.8; }
tr.row-undone td { color: #94a3b8; text-decoration: line-through; }
tr.row-undone td:last-child { text-decoration: none; }
.badge-type-kanri { background: #fce7f3; color: #9d174d; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 20px; align-items: start; }
.settings-grid .card { margin-bottom: 0; }
.fields-table td.col-name { font-weight: 700; }
main.container:has(.settings-grid) { max-width: 1280px; }
@media (max-width: 640px) { .settings-grid { grid-template-columns: 1fr; } }

/* ---------- ドラッグ＆ドロップでの並べ替え ---------- */
.drag-cell { width: 34px; padding-right: 0 !important; }
.drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 32px; border-radius: 6px;
  color: #94a3b8; cursor: grab; touch-action: none; user-select: none; }
.drag-handle:hover { background: #f1f5f9; color: var(--primary); }
tr.dragging { opacity: .9; box-shadow: var(--shadow-md); background: var(--primary-tint) !important; }
tr.dragging .drag-handle { cursor: grabbing; color: var(--primary); }
table.grid th[draggable="true"] { cursor: grab; }
table.grid th.col-dragging { opacity: .4; }
table.grid th.drop-left { box-shadow: inset 3px 0 0 var(--primary); }
table.grid th.drop-right { box-shadow: inset -3px 0 0 var(--primary); }
