:root {
  --row-h: 34px;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #1d2733;
  --ink-soft: #5a6877;
  --line: #dce3ea;
  --line-strong: #c4cfd9;
  --accent: #1971c2;
  --accent-ink: #ffffff;
  --hover: #f0f5fb;
  --closed: #eef1f4;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
          "Malgun Gothic", "맑은 고딕", "Noto Sans KR", Roboto, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- 상단 바 ---------- */
.bar {
  flex: 0 0 auto;
  height: 48px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 12px;
}
.bar-left, .bar-right { display: flex; align-items: center; gap: 10px; }
.bar-title { font-weight: 700; letter-spacing: 0.5px; font-size: 15px; }
.board-link {
  color: #cfe3ff; text-decoration: none; font-size: 13px; font-weight: 700;
  padding: 3px 10px; border-radius: 6px; background: rgba(255,255,255,.1);
}
.board-link:hover { background: rgba(255,255,255,.2); }
.empty-msg {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: #9aa7b3; font-size: 14px; font-weight: 600; text-align: center;
}
.arch-summary { font-size: 13px; font-weight: 700; color: var(--ink-soft); padding: 6px 4px; }
.conn {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.conn-on  { background: rgba(43,138,62,.35);  color: #b2f2bb; }
.conn-off { background: rgba(224,49,49,.35);  color: #ffc9c9; }

.role-badge {
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
}
.rb-host   { background: rgba(25,113,194,.4); color: #d0ebff; }
.rb-editor { background: rgba(245,159,0,.35); color: #ffe8cc; }
.rb-driver { background: rgba(255,255,255,.16); color: #dee2e6; }

/* 업체 변경 알람 버튼 (헤더 바) */
.vendor-alarms { display: flex; align-items: center; gap: 6px; }
.valarm-wrap { position: relative; }
.valarm-btn {
  height: 26px; padding: 0 9px; border: none; border-radius: 6px; cursor: pointer;
  background: rgba(255,255,255,.12); color: #e9ecef; font-family: var(--font);
  font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px;
}
.valarm-btn:hover { background: rgba(255,255,255,.22); }
.valarm-btn.has-alarm { background: rgba(245,159,0,.85); color: #fff; }
.valarm-count {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: #e03131; color: #fff; font-size: 10.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.valarm-count:empty { display: none; }   /* 알람 없을 때 빨간 점 숨김 */
.valarm-panel {
  display: none; position: absolute; top: 32px; left: 0; z-index: 60;
  width: 320px; max-height: 60vh; overflow-y: auto;
  background: #fff; color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.valarm-panel.open { display: block; }
.valarm-head {
  position: sticky; top: 0; background: #eef2f6; border-bottom: 1px solid var(--line-strong);
  padding: 8px 12px; font-size: 12px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.valarm-clear {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 6px;
  font-size: 11px; font-weight: 700; color: #e03131; padding: 3px 8px; cursor: pointer;
}
.valarm-clear:hover { background: #fff5f5; }
.valarm-empty { padding: 18px 12px; text-align: center; color: var(--ink-soft); font-size: 12.5px; }
.valarm-item {
  display: flex; align-items: stretch; border-bottom: 1px solid var(--line);
}
.valarm-info { flex: 1 1 auto; padding: 8px 12px; cursor: pointer; }
.valarm-info:hover { background: #f1f3f5; }
.valarm-route { font-size: 12px; font-weight: 700; color: var(--ink); }
.valarm-detail { font-size: 11.5px; color: #1971c2; margin-top: 2px; }
.valarm-x {
  flex: 0 0 auto; width: 34px; border: none; border-left: 1px solid var(--line);
  background: #fff; color: #adb5bd; font-size: 13px; cursor: pointer;
}
.valarm-x:hover { background: #fff5f5; color: #e03131; }

.search {
  height: 30px; width: 220px; border: none; border-radius: 6px;
  padding: 0 10px; font-size: 13px; font-family: var(--font);
  background: rgba(255,255,255,.14); color: #fff;
}
.search::placeholder { color: rgba(255,255,255,.55); }
.search:focus { outline: 2px solid var(--accent); background: rgba(255,255,255,.2); }

.btn {
  height: 30px; border: none; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-family: var(--font); padding: 0 12px; font-weight: 600;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }

.peers { display: flex; align-items: center; gap: -4px; padding-left: 4px; }
.peer-dot {
  width: 24px; height: 24px; border-radius: 50%; margin-left: -6px;
  display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700;
  border: 2px solid var(--ink); box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}

/* ---------- 어제/오늘/내일 탭 ---------- */
.tabs {
  flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: space-between;
  background: #e3e9ef; padding: 4px 8px 0;
}
.tabs-left { display: flex; gap: 2px; }
.tabs-right { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.type-filter {
  height: 28px; border: 1.5px solid var(--line-strong); border-radius: 6px;
  background: #fff; font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--ink); padding: 0 8px; cursor: pointer;
}
.type-filter:focus { outline: none; border-color: var(--accent); }
/* 예상배차 출신 표시: 차량번호 셀 좌상단 코너 뱃지 */
.plate-planned::before {
  content: ''; position: absolute; top: 0; left: 0; z-index: 3; pointer-events: none;
  border-style: solid; border-width: 11px 11px 0 0; border-color: #7048e8 transparent transparent transparent;
}
/* 예상배차 필터 버튼 */
.planned-filter-btn { display: inline-flex; align-items: center; gap: 5px; }
.planned-filter-btn .pf-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #7048e8; display: inline-block; flex: 0 0 auto;
}
.planned-filter-btn.is-active { border-color: #7048e8; background: #7048e8; color: #fff; }
.planned-filter-btn.is-active .pf-dot { background: #fff; }
.tab {
  border: none; cursor: pointer; font-family: var(--font); font-size: 13px; font-weight: 700;
  padding: 8px 18px; border-radius: 8px 8px 0 0; color: var(--ink-soft);
  background: transparent; display: flex; align-items: center; gap: 6px;
}
.tab:hover { background: #d7dfe7; }
.tab.is-active { background: var(--panel); color: var(--ink); box-shadow: 0 -2px 0 var(--accent) inset; }
.tab-count {
  font-size: 11px; font-weight: 700; background: #c4cfd9; color: #fff;
  border-radius: 999px; padding: 0 7px; min-width: 18px; text-align: center;
}
.tab.is-active .tab-count { background: var(--accent); }
/* 비차단 토스트 */
#mrm-toast.mrm-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); z-index: 4000; max-width: 80vw; padding: 11px 18px; border-radius: 10px; background: #1f2d3a; color: #fff; font-size: 14px; font-weight: 600; white-space: pre-line; box-shadow: 0 8px 28px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
#mrm-toast.mrm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#mrm-toast.mrm-toast.err { background: #b02a37; }
/* 계정 구분: main(어제/오늘/내일) | 삼양 탭 사이 구분선 + 삼양 색조 */
.tab-sep { width: 1px; align-self: stretch; margin: 6px 6px 0; background: #c4cfd9; }
.tab-samyang { color: #0b7285; }
.tab-samyang:hover { background: #cdeaf0; }
.tab-samyang.is-active { box-shadow: 0 -2px 0 #0b7285 inset; }
.tab-samyang.is-active .tab-count { background: #0b7285; }

/* 마감보드 월 탭 — 보관된 달들이 자동으로 탭이 됨("26년 6월" 등) + 전체 */
.month-tabs { display: flex; gap: 2px; align-items: flex-end; }
.month-tab {
  border: none; cursor: pointer; font-family: var(--font); font-size: 13px; font-weight: 700;
  padding: 8px 14px; border-radius: 8px 8px 0 0; color: var(--ink-soft);
  background: transparent;
}
.month-tab:hover { background: #d7dfe7; }
.month-tab.is-active { background: var(--panel); color: var(--ink); box-shadow: 0 -2px 0 var(--accent) inset; }
.month-tab-all { font-weight: 600; }

.pending-toggle {
  margin-bottom: 4px; border: 1.5px solid #f08c00; background: #fff; color: #e8590c;
  cursor: pointer; font-family: var(--font); font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
}
.pending-toggle:hover { background: #fff4e6; }
.pending-toggle.is-on { background: #f08c00; color: #fff; }

/* 수배중 행 표시: 왼쪽 주황 띠 */
.row.is-pending { box-shadow: inset 3px 0 0 #f08c00; }

/* 쿠팡상태별 행 배경 (SUBMITTED는 기본) */
.row.cs-confirmed { background: #d8d8d8; }
.row.cs-back      { background: #91d891; }
.row.cs-canceled  { background: #fcd1d1; }
.row.cs-confirmed:hover { background: #cfcfcf; }
.row.cs-back:hover      { background: #84cf84; }
.row.cs-canceled:hover  { background: #f7c2c2; }
/* 상태색이 있을 때 coupang 컬럼 반투명 배경이 덮지 않도록 */
.row.cs-confirmed .cell-coupang,
.row.cs-back .cell-coupang,
.row.cs-canceled .cell-coupang { background: transparent; }

/* 소속(affil) 기반 행 배경 — cStatus 색보다 우선(뒤에 선언 → 동일 specificity 에서 승) */
.row.affil-hold   { background: #b757ff; }   /* 보류 */
.row.affil-cancel { background: #fcd1d1; }   /* 취소 = canceled 와 동일 */
.row.affil-hold:hover   { background: #ab47f0; }
.row.affil-cancel:hover { background: #f7c2c2; }
.row.affil-hold .cell-coupang,
.row.affil-cancel .cell-coupang { background: transparent; }

/* 편집자에게 잠긴 칸(쿠팡 행의 쿠팡 컬럼) */
.cell-locked .cell-input,
.cell-locked .cell-select { cursor: default; color: #495057; }
.cell-locked .cell-input:focus,
.cell-locked .cell-select:focus { outline: none; background: transparent; }
.cell-locked { background: rgba(0,0,0,.025); }

/* 표시 전용 칸(LS정보일치) */
.cell-display {
  width: 100%; padding: 0 8px; display: flex; align-items: center;
  font-weight: 700; font-size: 12px; color: #868e96;
}
.cell-display.match-ok { color: #2b8a3e; }
.cell-display.match-no { color: #e03131; }
.cell-child.match-ok { color: #2b8a3e; font-weight: 700; }
.cell-child.match-no { color: #e03131; font-weight: 700; }

/* 쿠팡 등록 상태 */
.row.assign-pending { box-shadow: inset 3px 0 0 #1971c2; }
.row.assign-fail { box-shadow: inset 3px 0 0 #e03131; }
.row.assign-fail .cell-display { color: #e03131; }

/* ---------- coupang/user 컬럼 구분 ---------- */
.hcell-coupang { background: #e7eef5; }
.hcell-user    { background: #fff6e6; color: #9a6a00; }
.cell-coupang  { background: rgba(231,238,245,.35); }
.row:hover .cell-coupang { background: rgba(231,238,245,.6); }
.row.is-closed .cell-coupang { background: transparent; }
.cell-coupang .cell-input { color: #324a5e; }
.cell-input.cell-num { text-align: right; font-variant-numeric: tabular-nums; }
.sicol-btn {
  font-size: 11px; padding: 2px 8px; border: 1px solid #1971c2; background: #e7f0fa;
  color: #1971c2; border-radius: 5px; cursor: pointer; font-weight: 700; font-family: var(--font);
}
.sicol-btn:hover { background: #1971c2; color: #fff; }
.sicol-btn:disabled { opacity: .5; cursor: default; }
.sicol-more-btn {
  min-width: 20px; padding: 1px 6px; font-size: 13px; font-weight: 900; line-height: 1.2;
}
.callno-menu-pop {
  position: fixed; z-index: 2100; display: flex; flex-direction: column; gap: 4px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 6px;
}
.callno-menu-pop .sicol-btn { width: 100%; text-align: center; white-space: nowrap; padding: 5px 10px; }
.callno-menu-pop .mrm-call-btn { width: 100%; text-align: center; white-space: nowrap; padding: 5px 10px; }
.mrm-more-btn { min-width: 18px; padding: 1px 6px !important; font-size: 12px !important; font-weight: 900; line-height: 1.3; }
/* 화물등록번호 칸: 번호 + 재등록 버튼 가로 정렬 */
.cell[data-field="callNo"] { display: flex; align-items: center; gap: 6px; }
.callno-text { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.sicol-rebtn {
  font-size: 10px; padding: 1px 6px; border-color: #adb5bd; background: #f1f3f5;
  color: #5a6877; font-weight: 600; flex: 0 0 auto;
}
.sicol-rebtn:hover { background: #868e96; color: #fff; border-color: #868e96; }
.sicol-cancel-alloc-btn {
  font-size: 10px; padding: 1px 6px; border-color: #adb5bd; background: #f1f3f5;
  color: #5a6877; font-weight: 600; flex: 0 0 auto;
}
.assign-btn {
  font-size: 11px; padding: 1px 8px; border: 1px solid #1971c2; background: #e7f5ff;
  color: #1971c2; font-weight: 800; flex: 0 0 auto; line-height: 1.3; border-radius: 4px; cursor: pointer;
}
.assign-btn:hover { background: #1971c2; color: #fff; }
.assign-pending-txt { font-size: 11px; color: #1971c2; font-weight: 700; flex: 0 0 auto; }
.cell[data-field="match"] { display: flex; align-items: center; gap: 5px; }
.cell[data-field="match"] .cell-display { flex: 0 1 auto; }
.sms-resend-btn {
  font-size: 10px; padding: 1px 6px; border: 1px solid #f08c00; background: #fff4e6;
  color: #e8590c; font-weight: 800; flex: 0 0 auto; line-height: 1.3; border-radius: 4px; cursor: pointer;
}
.sms-resend-btn:hover { background: #f08c00; color: #fff; }
.sms-resend-btn:disabled { opacity: .6; cursor: default; }
.cell[data-field="sms"] { display: flex; align-items: center; gap: 5px; }
.cell[data-field="sms"] .cell-display { flex: 0 1 auto; }
.sicol-cancel-alloc-btn:hover { background: #868e96; color: #fff; border-color: #868e96; }
.sicol-cancel-order-btn {
  font-size: 11px; padding: 1px 6px; border-color: #e03131; background: #fff0f0;
  color: #e03131; font-weight: 800; flex: 0 0 auto; line-height: 1.2;
}
.sicol-cancel-order-btn:hover { background: #e03131; color: #fff; }
.nts-badge {
  font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 4px;
  background: #e6fcf5; color: #0ca678; border: 1px solid #63e6be; flex: 0 0 auto; cursor: help;
}
.tax-issued { color: #0ca678; font-weight: 700; }
.tax-none { color: #e8590c; font-weight: 700; }
.cell[data-field="taxInvoice"] { display: flex; align-items: center; gap: 6px; }
/* 고정노선 모달 */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: #fff; width: 600px; max-width: 92vw; max-height: 82vh;
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: #f8f9fb;
}
.modal-title { font-weight: 800; font-size: 15px; color: var(--ink); }
.modal-close {
  border: none; background: transparent; font-size: 18px; color: var(--ink-soft);
  cursor: pointer; padding: 2px 8px; border-radius: 6px; line-height: 1;
}
.modal-close:hover { background: rgba(0,0,0,.08); color: var(--ink); }
.modal-box .fixed-help { padding: 10px 18px; }
.modal-box .fixed-list { flex: 1; overflow-y: auto; min-height: 120px; }
/* 고정노선 헤더 필터 셀 */
.fixed-table-head .fxh { position: relative; display: flex; align-items: center; }
.fixed-table-head .fxh .col-filter-btn { position: static; transform: none; margin-left: 4px; }

/* 고정노선 패널 (모달 내부) */
.fixed-help { padding: 10px 14px; font-size: 13px; color: var(--ink-soft); background: #f8f9fb; border-bottom: 1px solid var(--line); }
.fixed-table-head { display: flex; background: #eef2f6; border-bottom: 2px solid var(--line-strong); font-weight: 700; font-size: 13px; color: var(--ink); position: sticky; top: 0; }
.fixed-list { overflow-y: auto; }
.fixed-row { display: flex; border-bottom: 1px solid var(--line); }
.fixed-row:hover { background: #f6f9fc; }
.fx-col { padding: 7px 12px; font-size: 13px; display: flex; align-items: center; }
.fx-origin { flex: 1 1 0; min-width: 0; border-right: 1px solid var(--line); }
.fx-dest   { flex: 1 1 0; min-width: 0; border-right: 1px solid var(--line); }
.fx-affil  { flex: 0 0 340px; gap: 4px; }   /* 소속 입력 + 적용 시작일 date 나란히 */
.fx-affil-input { flex: 1 1 60px; min-width: 80px; width: auto; border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; font-size: 13px; font-family: var(--font); }
.fx-start-input { flex: 0 0 122px; }
.fx-affil-input:focus { outline: none; border-color: var(--accent); }
.fx-affil-input.fx-saved { border-color: #2f9e44; background: #ebfbee; }
.fixed-loading { padding: 16px; color: var(--ink-soft); font-size: 13px; }
/* 콜등록 계정(ddID) 모달 */
.ddid-g { flex: 1 1 0; min-width: 0; border-right: 1px solid var(--line); font-weight: 700; }
.ddid-v { flex: 0 0 240px; border-right: 1px solid var(--line); }
.ddid-x { flex: 0 0 48px; justify-content: center; }
.ddid-del { border: 1px solid #f0b0b0; background: #fff; color: #e03131; border-radius: 5px; padding: 2px 8px; font-size: 12px; cursor: pointer; line-height: 1.5; }
.ddid-del:hover { background: #ffecec; }

/* 차량정보 모달 (2026-11-01 개편: 소속 탭 + 체크박스 표 + 접히는 등록 패널) */
.veh-box { width: 920px; max-width: 94vw; max-height: 88vh; }
.veh-box .modal-head { gap: 12px; }
.veh-head-tools { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; justify-content: flex-end; }
.veh-search { flex: 0 1 300px; min-width: 140px; height: 30px; font-size: 13px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; font-family: var(--font); }
.veh-search:focus { outline: none; border-color: var(--accent); }
.veh-add-panel { padding: 10px 18px 12px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.veh-add-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.veh-add-tab { height: 26px; border: 1px solid var(--line-strong); background: #fff; border-radius: 6px; padding: 0 10px; font-size: 12px; font-weight: 700; color: var(--ink-soft); cursor: pointer; font-family: var(--font); }
.veh-add-tab.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.veh-add-hint { margin-left: 10px; font-size: 12px; color: var(--ink-soft); }
.veh-quick-row { display: flex; gap: 6px; align-items: center; }
.vq-inp { height: 30px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 9px; font-size: 13px; font-family: var(--font); min-width: 0; }
.vq-inp:focus { outline: none; border-color: var(--accent); }
.vq-affil { flex: 1 1 150px; } .vq-plate { flex: 1 1 130px; } .vq-driver { flex: 1 1 100px; } .vq-phone { flex: 1 1 140px; }
.vq-pending { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.vq-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; }
.vq-chip b { color: var(--accent); font-weight: 700; }
.vq-chip.vq-new { border-color: #74c69d; background: #ebfbee; }
.vq-chip.vq-upd { border-color: #ffd43b; background: #fff9db; }
.vq-chip button { border: none; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px; }
.vq-chip button:hover { color: #e03131; }
.veh-input { width: 100%; box-sizing: border-box; min-height: 120px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 7px; padding: 8px 10px; font-family: var(--mono, monospace); font-size: 12.5px; line-height: 1.5; color: var(--ink); }
.veh-input:focus { outline: none; border-color: var(--accent); }
.veh-input-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.veh-save-msg { font-size: 12.5px; color: var(--ink-soft); margin-right: auto; }
.veh-save-msg.ok { color: #2f9e44; }
.veh-save-msg.err { color: #e03131; }
.veh-count { color: var(--ink-soft); font-weight: 500; font-size: 13px; }
/* 소속 탭 */
.veh-affil-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.veh-tab { height: 28px; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; padding: 0 11px; font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer; font-family: var(--font); display: inline-flex; align-items: center; gap: 5px; }
.veh-tab .n { color: var(--ink-soft); font-weight: 600; font-size: 11.5px; }
.veh-tab:hover { background: #f1f5f9; }
.veh-tab.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.veh-tab.on .n { color: inherit; opacity: .85; }
.veh-tab.none { color: #c92a2a; }
/* 선택 작업 바 */
.veh-selbar { display: flex; align-items: center; gap: 8px; padding: 7px 18px; background: #e7f1fb; border-bottom: 1px solid #c5dcf2; font-size: 13px; }
.veh-sel-count { font-weight: 800; color: #1971c2; margin-right: 6px; }
.veh-move-box { display: inline-flex; gap: 6px; align-items: center; }
.veh-move-box .vq-inp { height: 28px; width: 160px; }
.veh-danger { color: #c92a2a; border-color: #f0b0b0; }
.veh-danger:hover { background: #ffecec; }
/* 표 */
.veh-thead { display: flex; align-items: center; background: #eef2f6; border-bottom: 2px solid var(--line-strong); font-size: 12.5px; font-weight: 700; color: var(--ink); padding: 0 8px; position: sticky; top: 0; }
.veh-thead .vc { padding: 7px 8px; }
.veh-list { overflow-y: auto; min-height: 120px; }
.veh-row { display: flex; align-items: center; padding: 0 8px; border-bottom: 1px solid var(--line); font-size: 13px; min-height: 34px; }
.veh-row:hover { background: #f6f9fc; }
.veh-row.sel { background: #e7f1fb; }
.veh-row .vc { padding: 4px 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-chk { flex: 0 0 34px; display: flex; align-items: center; justify-content: center; }
.vc-chk input { width: 15px; height: 15px; margin: 0; cursor: pointer; }
.vc-plate { flex: 0 0 130px; font-weight: 700; color: var(--ink); }
.vc-driver { flex: 0 0 100px; }
.vc-phone { flex: 0 0 140px; color: var(--ink-soft); }
.vc-affil { flex: 0 0 130px; }
.vc-tags { flex: 1 1 0; display: flex; gap: 4px; }
.vc-gear { flex: 0 0 84px; text-align: right; white-space: nowrap; }
.veh-row .vc.edit { cursor: text; border-radius: 5px; }
.veh-row .vc.edit:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
.veh-row .vc.edit:empty::before, .veh-row .vc.edit.blank::before { content: '—'; color: #c3ccd6; }
.veh-row .vc input.vc-inp { width: 100%; box-sizing: border-box; height: 26px; border: 1px solid var(--accent); border-radius: 5px; padding: 0 6px; font-size: 13px; font-family: var(--font); }
.veh-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 9px; border: 1px solid var(--line-strong); color: var(--ink-soft); background: #fff; white-space: nowrap; }
.veh-tag.direct { color: #1971c2; border-color: #74b0e4; background: #e7f1fb; }
.veh-tag.wolde { color: #9c36b5; border-color: #d0a2e0; background: #f8f0fc; }
.veh-gear { border: 1px solid #d6dee6; background: #f8fafc; color: #5c6b7a; border-radius: 6px; font-size: 13px; line-height: 1; padding: 3px 7px; cursor: pointer; flex: none; }
.veh-gear:hover { background: #eef2f6; color: #1d2733; }
.veh-foot { padding: 7px 18px; font-size: 11.5px; color: var(--ink-soft); border-top: 1px solid var(--line); background: #f8f9fb; }
/* ── 모바일: 차량정보 모달 전체화면 + 카드 리스트 ───────────────────────── */
html.mobile .veh-box { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
html.mobile .veh-box .modal-head { flex-wrap: wrap; padding: 10px 12px 8px; gap: 8px; position: relative; }
html.mobile .veh-box .modal-title { font-size: 16px; }
html.mobile .veh-head-tools { flex: 1 1 100%; order: 2; gap: 6px; }
html.mobile .veh-search { flex: 1 1 0; min-width: 0; max-width: none; height: 40px; font-size: 16px; border-radius: 10px; }
html.mobile #veh-add-toggle { flex: none; height: 40px; padding: 0 12px; font-size: 13px; white-space: nowrap; max-width: 42%; overflow: hidden; text-overflow: ellipsis; }
html.mobile .veh-box .modal-close { position: absolute; right: 8px; top: 8px; font-size: 22px; padding: 4px 10px; }
html.mobile .veh-affil-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 8px 12px; gap: 6px; }
html.mobile .veh-affil-tabs::-webkit-scrollbar { display: none; }
html.mobile .veh-tab { flex: none; height: 32px; font-size: 13px; padding: 0 12px; }
html.mobile .veh-thead { padding: 0 6px; }
html.mobile .veh-thead .vc:not(.vc-chk) { display: none; }
html.mobile .veh-thead .vc-chk { flex: none; gap: 8px; padding: 9px 10px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
html.mobile .veh-thead .vc-chk::after { content: '전체 선택'; }
html.mobile .veh-thead .vc-chk input { width: 18px; height: 18px; }
html.mobile .veh-selbar { position: sticky; top: 0; z-index: 3; flex-wrap: wrap; padding: 8px 12px; gap: 6px; }
html.mobile .veh-selbar .type-filter { min-height: 38px; font-size: 13px; flex: 1 1 auto; }
html.mobile .veh-sel-count { flex: none; font-size: 14px; margin-right: 2px; }
html.mobile .veh-move-box { flex: 1 1 100%; } html.mobile .veh-move-box .vq-inp { flex: 1; width: auto; height: 36px; font-size: 16px; }
html.mobile .veh-list { padding: 6px 8px 90px; background: #f3f5f8; }
html.mobile .veh-row.veh-card { display: flex; align-items: flex-start; gap: 6px; padding: 10px 8px 10px 4px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); min-height: 0; }
html.mobile .veh-row.veh-card.sel { background: #e7f1fb; border-color: #a5c8ea; }
html.mobile .veh-card .vc-chk { flex: 0 0 38px; padding-top: 4px; }
html.mobile .veh-card .vc-chk input { width: 20px; height: 20px; }
html.mobile .vcard-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
html.mobile .vcard-l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html.mobile .vcard-l1 .vc-plate { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
html.mobile .vcard-l1 .vc-affil.chip { font-size: 12px; font-weight: 700; color: #1971c2; background: #e7f1fb; border: 1px solid #b6d4f2; border-radius: 10px; padding: 2px 9px; }
html.mobile .vcard-l1 .vc-affil.chip.blank { color: #c3ccd6; background: #fff; border-style: dashed; }
html.mobile .vcard-l2 { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #34465a; flex-wrap: wrap; }
html.mobile .vcard-l2 .vc-phone { color: #1864ab; font-variant-numeric: tabular-nums; }
html.mobile .vcard-dot { color: #c3ccd6; }
html.mobile .vcard-tags { display: flex; flex-wrap: wrap; gap: 4px; }
html.mobile .veh-card .vc { padding: 0; overflow: visible; white-space: normal; flex: none; }
html.mobile .veh-card .vc.edit:hover { background: transparent; box-shadow: none; }
html.mobile .veh-card .vc input.vc-inp { width: 150px; max-width: 55vw; height: 34px; font-size: 16px; }
html.mobile .vcard-acts { flex: none; display: flex; flex-direction: row; gap: 6px; align-self: center; }
html.mobile .vcard-acts .veh-dof, html.mobile .vcard-acts .veh-gear { width: 38px; height: 38px; margin: 0; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; padding: 0; }
html.mobile .veh-foot { display: none; }
html.mobile .veh-add-panel { padding: 8px 12px 10px; max-height: 60dvh; overflow-y: auto; }
html.mobile .veh-add-tabs { flex-wrap: wrap; }
html.mobile .veh-add-hint { flex: 1 1 100%; margin: 4px 0 0; font-size: 11.5px; }
html.mobile .veh-quick-row { flex-wrap: wrap; gap: 6px; }
html.mobile .veh-quick-row .vq-inp { flex: 1 1 46%; height: 40px; font-size: 16px; min-width: 0; }
html.mobile .veh-quick-row .vq-affil { flex: 1 1 100%; }
html.mobile .veh-quick-row #vq-add { flex: 1 1 100%; min-height: 38px; }
html.mobile .veh-input { min-height: 140px; font-size: 14px; }
html.mobile .veh-input-row { flex-wrap: wrap; }
html.mobile .veh-input-row .btn { min-height: 42px; flex: 1 1 0; white-space: nowrap; font-size: 15px; }
html.mobile .veh-save-msg { flex: 1 1 100%; margin: 0 0 4px; }
/* 모바일 진입 버튼: 배차보드 — 좌하단 플로팅(🚚) */
html.mobile #vehicle-info-btn { display: inline-flex !important; align-items: center; justify-content: center; position: fixed; left: 10px; bottom: 12px; z-index: 9998; width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%; font-size: 0; background: #1971c2; color: #fff; border-color: #1971c2; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
html.mobile #vehicle-info-btn::before { content: '🚚'; font-size: 22px; line-height: 1; }
html.mobile body.hk #vehicle-info-btn, html.mobile body.feat-off-veh #vehicle-info-btn { display: none !important; }
html.mobile body:has(#vehicle-modal:not([style*="none"])) #auth-mgr-btn, html.mobile body:has(#vehicle-modal:not([style*="none"])) #sys-mgr-btn, html.mobile body:has(#vehicle-modal:not([style*="none"])) #vehicle-info-btn { display: none !important; }
/* 휴무 관리·상세설정 모달도 모바일 전체폭 */
html.mobile .dof-box { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 0; }
html.mobile .dof-add-row .vq-inp, html.mobile .dof-edit .vq-inp { height: 38px; font-size: 16px; flex: 1 1 40%; }
html.mobile .dof-item { flex-wrap: wrap; } html.mobile .dof-item-acts { flex: 1 1 100%; justify-content: flex-end; }
html.mobile #veh-detail-modal .modal-box { width: 96vw; }
html.mobile #veh-detail-modal .vd-inp { font-size: 16px; height: 38px; }
/* 휴무체크 모달 */
.dayoff-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.dayoff-datelbl { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.dayoff-date { font-size: 13px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px; }
.dayoff-search { flex: 1 1 140px; font-size: 13px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 6px; }
.dayoff-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 18px;
  border-bottom: 1px solid var(--line); font-size: 12.5px; cursor: pointer;
}
.dayoff-row:hover { background: #f6f9fc; }
.dayoff-row.is-off { background: rgba(224,49,49,.06); }
.dayoff-row.is-off .veh-plate { color: #e03131; }
.dayoff-cb { flex: 0 0 auto; width: 16px; height: 16px; cursor: pointer; }
.dayoff-affil { flex: 0 0 100px; color: var(--ink-soft); text-align: right; }
/* 엑셀식 컬럼 필터 */
.hcell { position: relative; }
.col-filter-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: #8795a3; font-size: 14px;
  cursor: pointer; padding: 3px 5px; line-height: 1; border-radius: 4px;
}
.col-filter-btn:hover { background: rgba(0,0,0,.08); color: var(--ink); }
.col-filter-btn.is-active { color: var(--accent); font-weight: 900; }
.col-filter-pop {
  position: fixed; z-index: 2100; width: 260px; background: #fff;
  border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.18);
  display: flex; flex-direction: column; font-size: 13px;
}
.cfp-search { padding: 8px; border-bottom: 1px solid var(--line); }
.cfp-search-input { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px; font-size: 13px; font-family: var(--font); }
.cfp-search-input:focus { outline: none; border-color: var(--accent); }
.cfp-range { display: flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 12px; color: #93a2b1; border-bottom: 1px solid #2a2f3a; }
.cfp-range input { width: 74px; height: 26px; border: 1px solid #3a4250; border-radius: 6px; background: #12161d; color: #e6e9ee; padding: 0 7px; font-size: 12px; text-align: right; }
.cfp-actions { display: flex; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.cfp-actions button { flex: 1; border: 1px solid var(--line); background: #f7f9fb; border-radius: 5px; padding: 4px; font-size: 12px; cursor: pointer; font-family: var(--font); }
.cfp-actions button:hover { background: #eef2f6; }
.cfp-list { height: 280px; max-height: 280px; overflow-y: auto; padding: 0; position: relative; }
.cfp-item { display: flex; align-items: center; gap: 7px; padding: 0 10px; cursor: pointer; box-sizing: border-box; }
.cfp-item:hover { background: #f3f7fb; }
.cfp-item input { cursor: pointer; flex: 0 0 auto; }
.cfp-item-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.cfp-count { margin-left: auto; font-size: 11px; color: #868e96; align-self: center; }
.cfp-more { padding: 6px 10px; font-size: 11.5px; color: #868e96; font-style: italic; border-top: 1px solid #eef2f6; }
.cfp-foot { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.cfp-foot button { flex: 1; border-radius: 5px; padding: 6px; font-size: 13px; cursor: pointer; font-family: var(--font); font-weight: 600; }
.cfp-cancel { border: 1px solid var(--line); background: #fff; }
.cfp-apply { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.cfp-apply:hover { filter: brightness(1.05); }

/* ---------- 그리드 ---------- */
.grid-wrap {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--panel);
  border-top: 1px solid var(--line-strong);
  position: relative;
}
.grid-head {
  flex: 0 0 auto; overflow: hidden;
  background: #eef2f6;
  border-bottom: 2px solid var(--line-strong);
}
.head-inner { display: flex; height: 36px; will-change: transform; }
.hcell {
  flex: 0 0 auto; display: flex; align-items: center;
  padding: 0 8px; font-weight: 700; color: var(--ink-soft);
  font-size: 12px; border-right: 1px solid var(--line);
  user-select: none; white-space: nowrap;
  position: relative; overflow: hidden;
}
.hcell-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcell-idx { justify-content: center; color: #9aa7b3; }
/* 컬럼 너비 조절 핸들 */
.col-resizer {
  position: absolute; top: 0; right: 0; width: 7px; height: 100%;
  cursor: col-resize; z-index: 2;
}
.col-resizer:hover { background: rgba(25,113,194,.35); }
body.col-resizing { cursor: col-resize; user-select: none; }
body.col-resizing * { cursor: col-resize !important; }

/* 엑셀식 셀 선택 */
body.cells-selecting { user-select: none; }
body.cells-selecting .cell-input,
body.cells-selecting .cell-select { pointer-events: none; } /* 드래그 중 입력칸 텍스트 선택 방지 */
.cell.sel { background: rgba(25,113,194,.16) !important; box-shadow: inset 0 0 0 1px rgba(25,113,194,.35); }
/* 선택 블록 강조(행 요소 클래스식) — 첫/끝 행 라인 + 사이 배경, 번호칸 포함 */
.row.selrow-in { background: rgba(47,92,255,.05); }
.row.selrow-top { box-shadow: inset 0 2px 0 rgba(47,92,255,.7); }
.row.selrow-bot { box-shadow: inset 0 -2px 0 rgba(47,92,255,.7); }
.row.selrow-top.selrow-bot { box-shadow: inset 0 2px 0 rgba(47,92,255,.7), inset 0 -2px 0 rgba(47,92,255,.7); }
/* 편집 중(입력 포커스)인 행 은은한 강조 — 선택 블록은 selrow-* 클래스가 담당 */
.row:has(.cell-input:focus),
.row:has(.cell-select:focus),
.row:has(.cell input:focus) {
  box-shadow: inset 3px 0 0 rgba(47,92,255,.8);
}
.cell.sel .cell-input,
.cell.sel .cell-select { background: transparent; }

/* 복사됨 토스트 */
#copied-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: #1971c2; color: #fff; padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none;
  transition: opacity .15s, transform .15s; z-index: 9999;
}
#copied-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 컬럼 표시/숨김 패널 */
.col-panel {
  position: fixed; z-index: 1000; background: #fff;
  border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 8px;
  min-width: 180px; max-height: 70vh; overflow: auto;
}
.col-panel-title { font-size: 12px; font-weight: 800; color: var(--ink-soft); padding: 4px 8px 8px; }
.col-panel-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  font-size: 13px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.col-panel-item:hover { background: rgba(0,0,0,.04); }
.col-panel-item input { width: 15px; height: 15px; cursor: pointer; }
.col-panel-item .col-grip { cursor: grab; color: var(--ink-soft); font-size: 13px; line-height: 1; user-select: none; }
.col-panel-item.col-dragging { opacity: .45; }
.col-panel-item.col-dragover { box-shadow: inset 0 2px 0 #4263eb; }   /* 드롭 위치 표시(위쪽 선) */
.col-panel-actions { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.col-panel-actions button {
  width: 100%; height: 30px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: #f5f7f9; font-family: var(--font); font-size: 12px; font-weight: 700;
  color: var(--ink); cursor: pointer;
}
.col-panel-actions button:hover { background: #e9edf1; }

.grid-scroller { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; }
.grid-spacer { position: relative; }
.grid-viewport { position: absolute; top: 0; left: 0; will-change: transform; }

.row {
  display: flex; height: var(--row-h);
  border-bottom: 1px solid var(--line);
}
.row:hover { background: var(--hover); }
.row.is-closed { background: var(--closed); color: #95a1ac; }
.row.is-closed .cell-input { color: #95a1ac; }

.cell {
  flex: 0 0 auto; position: relative;
  border-right: 1px solid var(--line);
  display: flex; align-items: stretch;
}
.cell-idx {
  justify-content: center; align-items: center;
  color: #aab4be; font-size: 11px; font-variant-numeric: tabular-nums;
  background: #fafbfc;
}

/* 입력 요소 */
.cell-input, .cell-select {
  width: 100%; height: 100%; border: 0; background: transparent;
  padding: 0 8px; font: inherit; color: inherit; font-family: var(--font);
}
.cell-input:focus, .cell-select:focus {
  outline: 2px solid var(--accent); outline-offset: -2px;
  background: #fff;
}
.cell[data-field="phone"] .cell-input,
.cell[data-field="vehicle"] .cell-input { font-variant-numeric: tabular-nums; }
.cell-select { cursor: pointer; -webkit-appearance: none; appearance: none; }

/* 상태 색 */
.cell-select[data-val="회차"]   { color: #e8590c; font-weight: 600; }
.cell-select[data-val="취소"]   { color: #e03131; font-weight: 600; }
.cell-select[data-val="선착불"] { color: #1971c2; font-weight: 600; }

/* 마감 토글 */
.toggle {
  width: 100%; height: 100%; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.toggle-box {
  width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--line-strong);
  display: grid; place-items: center; color: #fff; font-size: 12px; line-height: 1;
}
.toggle[data-on="1"] .toggle-box { background: #2b8a3e; border-color: #2b8a3e; }

/* 행 삭제 */
.cell-del { justify-content: center; align-items: center; background: #fafbfc; }
.del-btn {
  width: 20px; height: 20px; border: 0; border-radius: 4px; cursor: pointer;
  background: transparent; color: #c4cfd9; font-size: 15px; line-height: 1;
}
.row:hover .del-btn { color: #e03131; }
.del-btn:hover { background: #ffe3e3; }

/* ---------- 프레즌스(다른 사람 편집중) ---------- */
.cell.has-peer { box-shadow: inset 0 0 0 2px var(--peer); z-index: 1; }
.peer-chip {
  position: absolute; top: -9px; right: -1px; z-index: 3;
  background: var(--peer); color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px 4px 4px 0; white-space: nowrap;
  pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

/* ---------- 입장 게이트 ---------- */
.gate {
  position: fixed; inset: 0; z-index: 50;
  background: linear-gradient(160deg, #1d2733, #2b3a4a);
  display: grid; place-items: center;
}
.gate.hidden { display: none; }
.gate-card {
  width: 320px; background: #fff; border-radius: 14px; padding: 26px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.gate-title { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 18px; }
.gate-label { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }
.gate-input {
  width: 100%; height: 40px; border: 1.5px solid var(--line-strong); border-radius: 8px;
  padding: 0 12px; font-size: 15px; font-family: var(--font); margin-bottom: 12px;
}
.gate-input:focus { outline: none; border-color: var(--accent); }
.gate-error { color: #c92a2a; font-size: 12px; font-weight: 600; margin: -4px 0 10px; }
.gate-roles { display: flex; gap: 8px; margin: 14px 0; }
.role-btn {
  flex: 1; height: 38px; border: 1.5px solid var(--line-strong); border-radius: 8px;
  background: #fff; cursor: pointer; font-family: var(--font); font-size: 13px; font-weight: 600;
  color: var(--ink-soft);
}
.role-btn.is-active { border-color: var(--accent); background: var(--accent); color: #fff; }
.gate-enter {
  width: 100%; height: 42px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; font-family: var(--font);
}
.gate-enter:hover { filter: brightness(1.15); }
.gate-hint { margin-top: 12px; font-size: 11px; color: #9aa7b3; text-align: center; }

/* 기사(읽기 전용) 모드 */
body.role-driver .cell-input,
body.role-driver .cell-select { pointer-events: none; }
body.role-driver .toggle,
body.role-driver .del-btn,
body.role-driver #call-all-btn,
body.role-driver #add-row { display: none; }

/* ---------- LS 합짐 펼치기/접기 ---------- */
/* 부모 행 순번칸의 ▸/▾ 캐럿(클릭 시 자식 구간 토글) + 순번. */
.cell-idx .ls-caret {
  color: var(--accent); font-weight: 700; font-size: 16px; line-height: 1;
  cursor: pointer; padding: 0 4px; user-select: none;
}
.cell-idx .ls-caret:hover { color: #0c5aa6; }
.cell-idx .idx-no { font-size: 12px; }
.row.ls-parent .cell-idx { gap: 1px; flex-wrap: wrap; padding: 1px; }
/* LS 합짐 쿠팡 등록 버튼(밀크런 자식 기사 반영 후 등록) */
.cell-idx .ls-reg-btn {
  font-size: 10px; font-weight: 700; line-height: 1; cursor: pointer;
  border: 1px solid var(--accent); color: var(--accent); background: #eaf3fc;
  border-radius: 4px; padding: 2px 4px; font-family: var(--font); white-space: nowrap;
}
.cell-idx .ls-reg-btn:hover { background: var(--accent); color: #fff; }

/* 자식 구간(읽기전용 가짜 행) — 옅은 음영 + 첫 칸 들여쓰기 막대. 행높이는 데이터행과 동일. */
.row-lschild { background: #f3f7fc; cursor: default; }
.row-lschild:hover { background: #eef4fb; }
.row-lschild .cell-idx { color: #9fb6cf; background: #eef4fb; }
.row-lschild .cell-child {
  display: flex; align-items: center; padding: 0 8px;
  font-size: 12px; color: #51657a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-lschild .cell-child.cell-coupang { background: transparent; }
.row-lschild .cell-child:first-of-type { box-shadow: inset 3px 0 0 #9ec5ec; }

/* ===== 수배 현황 요약바 (배차보드) ===== */
.supply-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 6px 14px; font-size: 12.5px; background: #f3f6f9; border-bottom: 1px solid #e1e8ef; color: #46545f; }
.supply-bar .sb-item { display: inline-flex; align-items: center; gap: 5px; }
.supply-bar .sb-lab { color: #6b7785; font-weight: 700; }
.supply-bar .sb-num { font-weight: 800; padding: 1px 7px; border-radius: 6px; color: #fff; min-width: 14px; text-align: center; }
.supply-bar .sb-total .sb-num { background: #2b3a4a; }
.supply-bar .sb-ip .sb-num { background: #b8860b; }
.supply-bar .sb-un .sb-num { background: #c92a2a; }
.supply-bar .sb-done .sb-num { background: #2f9e44; }
.supply-bar .sb-sep { color: #c2ccd6; padding: 0 2px; }
.supply-bar .sb-affils { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.supply-bar .sb-chip { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid #dbe3ea; border-radius: 14px; padding: 2px 10px; font-size: 12px; line-height: 1.5; }
.supply-bar .sb-chip-name { font-weight: 800; color: #2b3a4a; }
.supply-bar .sb-chip-done { color: #2f9e44; font-weight: 700; }
.supply-bar .sb-chip-slash { color: #ced4da; }
.supply-bar .sb-chip-left { color: #868e96; font-weight: 700; }
.supply-bar .sb-chip-left.has { color: #e8590c; }
.supply-bar .sb-empty { color: #98a4b0; }
/* 클릭 가능한 수배현황 칩 + 활성 강조 */
.supply-bar .sb-click { cursor: pointer; border-radius: 12px; padding: 1px 6px; transition: background .1s, box-shadow .1s; }
.supply-bar .sb-click:hover { background: #eef3f8; }
.supply-bar .sb-item.sb-click.active { background: #e7f0ff; box-shadow: inset 0 0 0 2px #4263eb; }
.supply-bar .sb-chip.sb-click.active { background: #e7f0ff; border-color: #4263eb; box-shadow: inset 0 0 0 1px #4263eb; }
body.role-driver #supply-bar { display: none; }

/* ===== 임의 부모/자식 페어 (코어볼륨↔부자재) 자식행 ===== */
.row.pair-child { background: #fbf4ff; }
.row.pair-child:hover { background: #f6ecff; }
.row.pair-child .cell-idx { color: #9b6dc9; background: #f3e8ff; font-weight: 800; }
.row.pair-child > .cell:nth-child(2) { box-shadow: inset 3px 0 0 #b08cdb; }
/* 경리보드 계정 구분 */
.src-samyang { color: #1971c2; font-weight: 700; }
.src-main { color: #495057; }

/* 예상배차 탭 + 패널 */
.tab-add-planned { color: var(--accent, #1971c2); font-weight: 700; }
.planned-tabs { display: inline-flex; align-items: flex-end; gap: 2px; flex-wrap: wrap; }
.callbatch-badge {
  position: fixed; top: 8px; left: 50%; transform: translateX(-50%);
  z-index: 9999; pointer-events: none;
  background: rgba(25,113,194,.85); color: #fff;
  font-weight: 800; font-size: 14px; letter-spacing: .3px;
  padding: 7px 18px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  animation: callBatchPulse 1.3s ease-in-out infinite;
}
@keyframes callBatchPulse {
  0%, 100% { opacity: .45; box-shadow: 0 0 0 rgba(25,113,194,0); }
  50%      { opacity: .95; box-shadow: 0 0 16px rgba(25,113,194,.55); }
}
.planned-tab { background: #f1f6fb; }
.planned-tab.is-active { background: #d0ebff; }
.planned-tab .tab-x { margin-left: 5px; opacity: .5; font-size: 11px; }
.planned-tab .tab-x:hover { opacity: 1; color: #e03131; }
.planned-panel { display: flex; flex-direction: column; flex: 1 1 auto; overflow: hidden; padding: 0 14px 14px; }
.planned-head { display: flex; align-items: center; gap: 12px; padding: 12px 4px; }
.planned-title { font-size: 15px; font-weight: 700; }
#planned-date-label { color: #1971c2; }
.planned-search { flex: 0 0 220px; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; }
.planned-section-head { font-size: 12.5px; color: var(--ink-soft); padding: 10px 4px 6px; margin-top: 4px; }
.planned-routes-headrow, .planned-list-head { display: flex; gap: 8px; padding: 6px 12px; font-size: 12px; color: var(--ink-soft); font-weight: 700; border-bottom: 2px solid var(--line-strong); }
.planned-routes { overflow-y: auto; max-height: 46vh; border-bottom: 1px solid var(--line); }
.planned-rrow { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.planned-rrow-click { cursor: pointer; }
.planned-rrow-click:hover { background: #eef6ff; }
.prr-route { flex: 1 1 260px; font-weight: 600; }
.prr-src { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 8px; margin-right: 6px; vertical-align: middle; }
.prr-src-mn { background: #e7f0ff; color: #1864ab; }
.prr-src-sy { background: #fff0e6; color: #d9480f; }
.prr-times { flex: 0 0 80px; color: var(--ink-soft); font-size: 12px; }
.prr-cnt { flex: 0 0 60px; color: var(--ink-soft); font-size: 12px; }
.prr-go { flex: 0 0 20px; text-align: right; color: #adb5bd; font-size: 16px; }
.planned-list { overflow-y: auto; flex: 1 1 auto; max-height: 30vh; }
.planned-row { display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.planned-row:hover { background: #f6f9fc; }
.pl-route { flex: 1 1 220px; font-weight: 600; }
.pl-hour { flex: 0 0 60px; color: var(--ink-soft); }
.pl-plate { flex: 0 0 120px; font-weight: 600; }
.pl-driver { flex: 0 0 80px; }
.pl-phone { flex: 1 1 120px; color: var(--ink-soft); }
.pl-del { flex: 0 0 30px; text-align: right; }

/* 노선 분단위 모달 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.route-modal-box { background: #fff; border-radius: 12px; width: min(1080px, 96vw); max-height: 84vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.route-modal-box .modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.route-modal-box .modal-title { font-size: 16px; font-weight: 700; margin-right: auto; }
.rm-bulk-btn { font-size: 12.5px; padding: 6px 12px; white-space: nowrap; }
.route-modal-box .modal-x { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--ink-soft); }
.route-modal-hint { padding: 10px 20px; font-size: 12.5px; color: var(--ink-soft); background: #f8fafc; }
.route-modal-headrow { display: flex; gap: 8px; padding: 8px 20px; font-size: 12px; color: var(--ink-soft); font-weight: 700; border-bottom: 2px solid var(--line-strong); }
.route-modal-times { overflow-y: auto; padding: 4px 0; }
.route-modal-row { display: flex; gap: 8px; align-items: center; padding: 6px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.route-modal-row:hover { background: #f6f9fc; }
.rm-hm { flex: 0 0 56px; font-weight: 600; }
.rm-cnt { flex: 0 0 44px; color: var(--ink-soft); font-size: 12px; }
.rm-plate.rm-in { flex: 1 1 130px; }
.rm-rec { flex: 0 0 150px; font-size: 12px; padding: 5px 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: #1864ab; }
.rm-rec:disabled { color: var(--ink-soft); background: #f4f6f8; }
.rm-rec .rm-rec-off { color: #adb5bd; }
.rm-driver.rm-in { flex: 0 0 90px; }
.rm-phone.rm-in { flex: 0 0 130px; }
.rm-in { font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 5px; }
.rm-act { flex: 0 0 56px; text-align: right; }
.rm-add { font-size: 12px; padding: 5px 12px; }

/* ── HK 업체 계정: 컬럼 버튼·검색·날짜탭(어제/오늘/내일)·그리드만. 나머지 기능 전부 숨김 ── */
body.hk .tabs-right > *:not(#col-toggle-btn) { display: none !important; }  /* 우측 툴바: 컬럼만 */
body.hk #planned-tabs,
body.hk #add-planned-tab,
body.hk #add-row,
body.hk #supply-bar,
body.hk .board-link { display: none !important; }                          /* 예상배차/행추가/현황바/보드링크 숨김 (삼양 탭은 업체 소속 삼양건 위해 노출) */

/* 보조연동(straggler): 경리보드에서 운행일 기준으로 끌어온 행 — 좌측 표식 */
.row.straggler { box-shadow: inset 3px 0 0 #f59e0b; background: rgba(245,158,11,0.04); }
.row.straggler .cell-idx::after { content: '보조'; font-size: 9px; color: #b45309; display: block; line-height: 1; }


/* ===== 모바일 최적화 =====
   판정은 JS(app.js isNarrow)가 기기 특성(터치 여부 + 실제 화면폭)으로 동적으로 해서
   <html> 에 .mobile 클래스를 켜고 끔 — 폰마다 폭이 달라도(폴드 접힘/펼침, 회전 포함) 자동 적응.
   고정 640px 미디어쿼리는 폴더블/대화면 폰에서 안 걸리는 문제가 있어 클래스 방식으로 전환. */
.mobile-only { display: none; }
html.mobile { --row-h: 44px; }                                  /* 행 키워 터치·가독성 */
html.mobile .mobile-only { display: inline-flex !important; }
html.mobile .bar { flex-wrap: wrap; gap: 6px; padding: 6px 8px; height: auto; min-height: 44px; }
html.mobile .bar-left, html.mobile .bar-right { flex-wrap: wrap; gap: 6px; row-gap: 6px; }
html.mobile .bar-title { font-size: 13px; }
html.mobile .search { min-width: 0; flex: 1 1 130px; height: 36px; font-size: 16px; }   /* 16px=iOS 확대 방지 */
html.mobile .btn, html.mobile .type-filter, html.mobile .role-btn { min-height: 38px; font-size: 14px; padding: 0 10px; }
html.mobile .cell-input, html.mobile .cell-select { font-size: 16px; }            /* 16px=iOS 자동확대 방지 */
html.mobile .cell-display { font-size: 14px; }
html.mobile .grid-head { font-size: 13px; }
html.mobile .grid-head .cell, html.mobile .grid-head [class*="head"] { font-size: 13px; }
/* 상단 간소화 — 예상배차 탭·툴바 버튼 무리 숨김. 수배현황은 요약(전체/수배중/미수배/수배완료)만 표시 */
/* 모바일: tabs-right 는 박스 제거(display:contents)하고 자식 전부 숨김 — 계정관리 버튼만 예외로 노출.
   (부모를 display:none 하면 자식 표시 강제가 불가능해 계정관리가 안 보였음) */
html.mobile .tabs-right { display: contents !important; }
html.mobile .tabs-right > *:not(#auth-mgr-btn):not(#sys-mgr-btn):not(#vehicle-info-btn) { display: none !important; }
html.mobile #auth-mgr-btn { display: inline-flex !important; align-items: center; justify-content: center; line-height: 1; padding: 0 14px; min-height: 42px; position: fixed; right: 10px; bottom: 12px; z-index: 9998; background: #2f5cff; color: #fff; border-color: #2f5cff; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
html.mobile #auth-mgr-btn[style*="display:none"], html.mobile #auth-mgr-btn[style*="display: none"] { display: none !important; }   /* 권한 없으면 그대로 숨김 */
/* 모바일 시스템 버튼 — 계정관리 왼쪽에 플로팅 */
html.mobile #sys-mgr-btn { display: inline-flex !important; align-items: center; justify-content: center; line-height: 1; padding: 0 14px; min-height: 42px; position: fixed; right: 104px; bottom: 12px; z-index: 9998; background: #343a40; color: #fff; border-color: #343a40; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
html.mobile #sys-mgr-btn[style*="display:none"], html.mobile #sys-mgr-btn[style*="display: none"] { display: none !important; }
html.mobile body:has(#auth-modal:not([style*="none"])) #sys-mgr-btn { display: none !important; }
html.mobile #auth-modal .modal-box { width: 96vw !important; max-height: 92vh; overflow: auto; }
/* 추가 바: 입력칸 전체폭 스택 */
html.mobile #auth-modal .fixed-addbar { flex-wrap: wrap; gap: 6px; }
html.mobile #auth-modal .fixed-addbar .fx-add-inp { max-width: none !important; flex: 1 1 45%; min-height: 38px; }
html.mobile #auth-modal .fixed-addbar select.fx-add-inp { flex: 1 1 30%; width: auto !important; }
html.mobile #auth-modal #au-add { flex: 1 1 100%; min-height: 38px; }
/* 계정 행: 1줄 = 이름·비번 / 등급 / 날짜, 2줄 = 버튼 3개(줄바꿈 글자 깨짐 방지) */
html.mobile #auth-modal .fixed-row { flex-wrap: wrap; row-gap: 6px; padding: 8px 2px; }
html.mobile #auth-modal .fixed-row .fx-col { white-space: nowrap; }
html.mobile #auth-modal .fixed-row .fx-col:nth-child(2) { width: auto !important; color: #748294; }
html.mobile #auth-modal .fixed-row .fx-col:nth-child(3) { width: auto !important; margin-left: auto; }
html.mobile #auth-modal .fixed-row .fx-col:last-child { width: 100% !important; display: flex; gap: 6px; }
html.mobile #auth-modal .fixed-row .fx-col:last-child .type-filter { flex: 1; white-space: nowrap; min-height: 36px; font-size: 13px; padding: 0 4px; }
/* 권한 패널 */
html.mobile #auth-modal .auth-perm-sec { gap: 8px; }
html.mobile #auth-modal .auth-perm-sec b { min-width: 100%; }
html.mobile #auth-modal .auth-perm-cb { min-height: 30px; }
html.mobile #auth-modal .auth-perm-colgrid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); padding-left: 8px; }
/* 모달 열려 있는 동안 우하단 플로팅 버튼 숨김(겹침 방지) */
html.mobile body:has(#auth-modal:not([style*="none"])) #auth-mgr-btn { display: none !important; }

html.mobile .planned-tabs, html.mobile #add-planned-tab { display: none !important; }
html.mobile #supply-bar .sb-affils, html.mobile #supply-bar .sb-empty, html.mobile #supply-bar .sb-sep-affil { display: none !important; }
html.mobile #supply-bar { flex-wrap: wrap; padding: 5px 8px; gap: 6px; }
html.mobile #supply-bar .sb-item { min-height: 32px; }
html.mobile #mobile-cols-btn { display: none !important; }   /* 카드 방식이라 컬럼 토글 불필요 */
html.mobile .tabs { padding: 4px 6px; }
html.mobile .tabs-left { flex-wrap: wrap; gap: 4px; }
html.mobile .tab { min-height: 36px; font-size: 14px; }
/* 상단바 요소 정리 */
html.mobile .vendor-alarms { gap: 4px; }
html.mobile .valarm-btn { font-size: 11px; padding: 3px 7px; min-height: 30px; }
html.mobile #peers { display: none; }
html.mobile #add-row { min-height: 36px; }

/* ===== 모바일 편집 시트(배차보드 행 탭 — 소속/차량/기사/연락처). mrm.html 과 동일 클래스 ===== */
.mrm-edit-sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 3000; display: flex; align-items: flex-end; }
.mrm-edit-sheet { width: 100%; background: #fff; border-radius: 16px 16px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.25); }
.mes-title { font-weight: 900; font-size: 15px; color: #1d2733; margin-bottom: 10px; }
.mes-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mes-lab { flex: none; width: 62px; font-size: 13px; font-weight: 700; color: #495a6a; }
.mes-inp { flex: 1 1 auto; min-width: 0; height: 42px; border: 1px solid #d6dee6; border-radius: 8px; padding: 0 10px; font-size: 16px; }
.mes-inp:focus { outline: 2px solid #1971c2; border-color: #1971c2; }
.mes-btns { display: flex; gap: 8px; margin-top: 12px; }
.mes-btn { flex: 1; min-height: 44px; border: 1px solid #d6dee6; border-radius: 10px; background: #f1f4f7; color: #1d2733; font-size: 15px; font-weight: 800; cursor: pointer; }
.mes-save { background: #1971c2; border-color: #1971c2; color: #fff; }

/* ===== 모바일: 배차보드 카드 리스트 (밀크런보드와 동일 방식) ===== */
.board-cards { display: none; }
html.mobile .grid-head, html.mobile .grid-scroller { display: none !important; }
html.mobile .board-cards { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px; background: #eef1f4; -webkit-overflow-scrolling: touch; }
.b-card { background: #fff; border: 1px solid #d6dee6; border-radius: 12px; margin-bottom: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.b-card-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #1d2733; color: #fff; font-weight: 800; font-size: 14px; }
.b-card-head .tk { font-size: 12px; font-weight: 700; background: #2b3a4a; border-radius: 6px; padding: 2px 6px; }
.b-card-head .cs { margin-left: auto; font-size: 12px; font-weight: 800; color: #ffd43b; }
.b-card-route { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 15px; font-weight: 800; color: #1d2733; }
.b-card-route .arr { color: #d9480f; }
.b-card-route .via { font-size: 12px; color: #5c6b7a; font-weight: 600; }
.b-card-veh { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 6px 10px; background: #f7f9fb; font-size: 13px; border-top: 1px solid #e6ebf0; }
.b-card-veh b { color: #1d2733; }
.b-card-actions { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid #e6ebf0; }
.b-card-actions .callno { font-weight: 800; font-size: 14px; color: #1d2733; }
.b-card-actions .sicol-btn { font-size: 13px; padding: 6px 12px; min-height: 36px; }
.b-card-actions .sicol-more-btn { min-width: 40px; font-size: 16px; }
.board-cards-empty { text-align: center; color: #8795a3; padding: 40px 0; font-size: 14px; }

/* 경리보드 화물등록번호 수기 수정 버튼 */
.arch-callno-btn {
  margin-left: 4px; border: 1px solid #d6dee6; background: #f8fafc; color: #5c6b7a;
  border-radius: 6px; font-size: 11px; line-height: 1; padding: 3px 6px; cursor: pointer; flex: none;
}
.arch-callno-btn:hover { background: #eef2f6; color: #1d2733; }

/* 차량 상세설정(⚙) 모달 */
.veh-tags { font-size: 11px; color: #7a6a2f; background: #fdf6dd; border: 1px solid #f0e2ad; border-radius: 6px; padding: 2px 6px; flex: none; white-space: nowrap; }
.vd-body { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.vd-row { display: flex; align-items: center; gap: 8px; }
.vd-lab { width: 86px; flex: none; font-size: 12px; color: #5c6b7a; }
.vd-inp { flex: 1; border: 1px solid #d6dee6; border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.vd-chk { display: flex; align-items: center; gap: 4px; font-size: 13px; margin-right: 14px; cursor: pointer; }

/* 알람 클릭 → 모바일 카드 이동 하이라이트 */
.b-card.alarm-hl, .mrm-card.alarm-hl { outline: 3px solid #f59e0b; outline-offset: -1px; box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); }

/* 월대현황 모달 */
.wolde-box { width: min(1180px, 96vw); max-height: 86vh; display: flex; flex-direction: column; }
.wolde-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-bottom: 1px solid #2a2f3a; }
.wolde-tab { padding: 4px 10px; border: 1px solid #3a4152; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; font-size: 13px; }
.wolde-tab.is-active { background: #2f5cff; border-color: #2f5cff; color: #fff; }
.wolde-table-wrap { overflow: auto; flex: 1; padding: 0 12px; }
.wolde-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wolde-table th { position: sticky; top: 0; background: #1b1f27; color: #e5e9f0; white-space: nowrap; text-align: left; padding: 6px 8px; border-bottom: 1px solid #3a4152; z-index: 1; }
.wolde-table td { padding: 4px 8px; border-bottom: 1px solid #232833; white-space: nowrap; }
.wolde-table tr.wolde-day-first td { border-top: 2px solid #3a4152; }
.wolde-table .wolde-route { white-space: normal; min-width: 220px; }
.wolde-table .wolde-pay { text-align: right; font-variant-numeric: tabular-nums; }
.wolde-table .wolde-empty { text-align: center; color: #8b93a5; padding: 24px 0; }
.wolde-badge { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 12px; }
.wolde-badge.b-ok { background: #16a34a33; color: #4ade80; }
.wolde-badge.b-miss { background: #dc262633; color: #f87171; }
.wolde-badge.b-dup { background: #d9770633; color: #fbbf24; }
/* 상행 표시: 셀 안 컴팩트(좁은 거리 컬럼에서 안 튀어나오게) — 파란 텍스트 + ↑ + 옅은 배경 */
.uphill-dist { color: #74c0fc; font-weight: 800; white-space: nowrap; }
.uphill-cell { background: #1971c21a; }
.downhill-dist { color: #fbbf24; font-weight: 800; white-space: nowrap; }
.downhill-cell { background: #d977061a; }
/* 차량정보 직영/월대 표시 (소속 칸): 배경 없는 작은 컬러 텍스트 — 셀 오른쪽에 조용히 */
.veh-badge { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); font-size: 10px; font-weight: 700; letter-spacing: .5px; opacity: .85; pointer-events: none; }
.vb-direct { color: #69db7c; }
.vb-wolde { color: #da77f2; }
.vb-extra { color: #fbbf24; }   /* 추가탕 */
.pct-rate { font-size: 11.5px; color: #4dabf7; font-weight: 600; margin-left: 4px; }   /* 지입료 율 표기 */
.vb-direct + .vb-wolde, .vb-wolde + .vb-direct { right: 32px; }
.cell[data-field="affil"], .cell[data-field="real_dist"] { position: relative; }
.wolde-summary { padding: 10px 14px; border-top: 1px solid #2a2f3a; font-size: 13px; color: #c6cbd6; }
.wolde-summary.warn { color: #fbbf24; }
.wolde-table .wolde-lsid { font-size: 12px; color: #9aa3b5; }

/* 경리보드 헤더 고정 합계(탭 전체) */
.tab-totals { margin-left: 12px; font-size: 13px; color: #9fb0c8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wolde-dl { margin-left: auto; margin-right: 10px; }

/* 하이물류 단가표 모달 */
.hi-box { width: min(1180px, 96vw); max-height: 90vh; display: flex; flex-direction: column; }
.hi-table-wrap { overflow: auto; flex: 1; padding: 0 12px; }
.hi-num { width: 110px; background: #0f1218; color: #e5e9f0; border: 1px solid #3a4152; border-radius: 6px; padding: 4px 8px; text-align: right; font-variant-numeric: tabular-nums; }
tr.hi-detail td { background: #151922; padding: 8px 10px; }
.hi-lab { margin-right: 18px; color: #c6cbd6; font-size: 13px; }
.hi-hint { color: #8b93a5; font-size: 12px; margin-left: 8px; }
.hi-foot { padding: 10px 14px; border-top: 1px solid #2a2f3a; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.hi-foot .hi-hint { margin-right: auto; margin-left: 0; }
.hi-apply { background: #2f5cff; border-color: #2f5cff; color: #fff; }
.hi-fbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #2a2f3a; align-items: center; }
.hi-fsel { background: #0f1218; color: #e5e9f0; border: 1px solid #3a4152; border-radius: 6px; padding: 4px 8px; }

/* 선택 셀 통계 칩(합계/빼기/평균/갯수) — 오른쪽 아래 합계행 위 */
#sel-stats { position: fixed; right: 14px; bottom: 40px; z-index: 60; background: #1d2733; color: #e6e9ee;
  border: 1px solid #3a4250; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; box-shadow: 0 4px 14px rgba(0,0,0,.35); pointer-events: none; }
#sel-stats b { color: #74c0fc; font-weight: 700; margin-right: 2px; }

/* 고정노선 모달: 추가 바 / 예정 뱃지 */
.fixed-addbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 14px 0; }
.fx-add-inp { height: 28px; border: 1px solid #3a4250; border-radius: 7px; background: #12161d; color: #e6e9ee; padding: 0 9px; font-size: 12.5px; flex: 1 1 110px; min-width: 90px; max-width: 170px; }
.fixed-addbar .type-filter { white-space: nowrap; flex: 0 0 auto; }
.fx-pending { margin-left: 6px; font-size: 10.5px; font-weight: 700; color: #fbbf24; }
.fx-del { margin-left: 4px; border: 0; background: transparent; color: #f87171; cursor: pointer; font-size: 12px; }

.fx-sel { width: 15px; height: 15px; margin: 0 0 0 10px; accent-color: #2f5cff; cursor: pointer; align-self: center; }
.fixed-table-head .fx-sel { margin-left: 10px; }

/* 사용자 배지: 이름 · 역할 · 로그아웃 */
.rb-user { display: inline-flex; align-items: center; gap: 7px; background: transparent; padding: 0; }
.rb-user .rb-name { font-size: 12px; font-weight: 700; color: #e6e9ee; }
.rb-user .rb-role { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgba(25,113,194,.4); color: #d0ebff; }
.rb-user .rb-logout { font-size: 11px; font-weight: 700; padding: 2.5px 9px; border-radius: 999px; border: 1px solid #4a5261; background: rgba(255,255,255,.07); color: #dee2e6; cursor: pointer; }
.rb-user .rb-logout:hover { background: rgba(255,99,99,.18); border-color: #b06060; color: #ffc9c9; }

/* 보드변경 드롭다운 */
.rb-switch { border-color: #3f5a86; color: #a5c8ff; background: rgba(47,92,255,.12); }
.rb-switch:hover { background: rgba(47,92,255,.25); border-color: #4a76d0; color: #d0e2ff; }
#board-switch-pop { position: fixed; z-index: 99999; background: #1d2733; border: 1px solid #3a4250; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
#board-switch-pop .bsw-item { text-align: left; border: 0; background: transparent; color: #e6e9ee; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 7px; cursor: pointer; }
#board-switch-pop .bsw-item:hover { background: #2f5cff; color: #fff; }

/* 계정 권한 편집 패널 */
.auth-perm-panel { background: #161c25; border: 1px solid #2c3442; border-radius: 8px; padding: 8px 12px; margin: 2px 0 8px; display: flex; flex-direction: column; gap: 6px; }
.auth-perm-sec { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.auth-perm-sec b { color: #aeb6c6; font-size: 12px; min-width: 66px; }
.auth-perm-cb { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: #e6e9ee; }
.auth-perm-cb input { accent-color: #2f5cff; }

/* 계정별 기능 권한: 꺼진 기능 — 상단 버튼은 .feat-disabled(회색+클릭 시 안내),
   행 단위 동적 버튼은 body 클래스로 회색+클릭 차단(pointer-events) */
.feat-disabled { opacity: .38; filter: grayscale(1); cursor: not-allowed !important; }
body.feat-off-bdCall .sicol-btn:not(.sicol-more-btn),
body.feat-off-bdCall .sicol-more-btn,
body.feat-off-coupangBatch .assign-btn,
body.feat-off-sms .sms-resend-btn,
body.feat-off-mrCall .mrm-call-btn,
body.feat-off-coupangBatch .mrm-sreg-btn,
body.feat-off-sms .mrm-sms-resend-btn {
  opacity: .35; filter: grayscale(1); pointer-events: none;
}

/* 기능 꺼짐: 예상배차 탭/수배현황 필터/업체알람은 통째로 숨김(데이터 자체가 차단됨) */
body.feat-off-planned #planned-tabs, body.feat-off-planned #add-planned-tab, body.feat-off-planned #planned-filter-btn { display: none !important; }
body.feat-off-supplyBar #supply-bar { display: none !important; }
body.feat-off-alarms #vendor-alarms { display: none !important; }
body.feat-off-ddid #ddid-btn.feat-disabled { }

/* 밀크런 기능 꺼짐: 요약바/알람 숨김 */
body.feat-off-mrSupply #mrm-supply { display: none !important; }
body.feat-off-mrAlarms #mrm-alarm-btn, body.feat-off-mrAlarms #mrm-alarm-panel { display: none !important; }

body.feat-off-history #hist-btn { opacity: .35; filter: grayscale(1); pointer-events: none; }

.auth-perm-colgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 4px 10px; padding: 6px 4px 8px 70px; }

/* 경리 합계 표시 꺼짐: 하단 합계바 + 상단 탭 합계 숨김 */
body.feat-off-clSums #sum-bar, body.feat-off-clSums #tab-totals, body.feat-off-clSums #sel-stats { display: none !important; }

/* 시스템 관리 모달 버튼 */
.sys-b { border: 1px solid #ced4da; background: #f8f9fa; border-radius: 7px; padding: 4px 10px; cursor: pointer; font-size: 12.5px; margin-left: 4px; }
.sys-b:hover { background: #e9ecef; }
.sys-b:disabled { opacity: .5; cursor: default; }
.sys-b-red { background: #fff5f5; border-color: #ffc9c9; color: #c92a2a; }
.sys-b-green { background: #ebfbee; border-color: #b2f2bb; color: #2b8a3e; }

/* 경리보드 금액 컬럼 우측 정렬(값·자동표시·입력칸·배지 텍스트 일관) */
.money-cell { text-align: right; justify-content: flex-end; }
.money-cell > span { width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
.money-cell .cell-input { text-align: right; font-variant-numeric: tabular-nums; }
.money-cell .cell-display { justify-content: flex-end; }   /* 합계류(cell-display 는 flex 라 text-align 무시됨) */

/* 재생성 배지(경리 날짜칸) */
.veh-badge.vb-regen { background: #fff4e6; color: #d9480f; border: 1px solid #ffd8a8; }

/* ── 지급현황(memo2) 버튼식 팝업 + 잠금 배지 ─────────────────────────────── */
.payst-pop { position: fixed; z-index: 3000; background: #fff; border: 1px solid #cfd8e1; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .28); padding: 10px 12px; width: 400px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.payst-pop .payst-row { display: flex; align-items: center; gap: 6px; }
.payst-pop .payst-row > label:first-child:not(.payst-hold) { flex: 0 0 34px; color: #5c6b7a; font-size: 12.5px; }
.payst-pop .payst-sts { flex-wrap: wrap; }
.payst-pop .payst-sts button { border: 1px solid #d6dee6; background: #f4f7fa; color: #2c3a48; border-radius: 8px; padding: 5px 10px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.payst-pop .payst-sts button:hover { background: #e7f0f9; }
.payst-pop .payst-sts button.on { background: #1971c2; border-color: #1971c2; color: #fff; }
.payst-pop input[type="text"], .payst-pop input[type="date"] { flex: 1; height: 30px; border: 1px solid #d6dee6; border-radius: 8px; padding: 0 8px; font-size: 13px; min-width: 0; }
.payst-pop [data-dclr] { border: 1px solid #d6dee6; background: #fff; border-radius: 8px; height: 30px; width: 30px; cursor: pointer; color: #8795a3; flex: 0 0 30px; }
.payst-pop .payst-hold { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #2c3a48; cursor: pointer; }
.payst-pop .payst-actions button { border: 1px solid #d6dee6; background: #fff; border-radius: 8px; padding: 6px 12px; font-weight: 800; cursor: pointer; font-size: 12.5px; }
.payst-pop .payst-actions button.pri { background: #1971c2; border-color: #1971c2; color: #fff; }
.payst-lock { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); font-size: 11px; pointer-events: none; }
.cell.payst-held .cell-input { padding-right: 18px; background: #fff8e6; }
.payst-ro { cursor: pointer; }

/* ── 컬럼 사용자 정렬(개인 화면 전용) — 머리글 클릭 ▲/▼ 표시 ─────────────── */
.hcell-sortable { cursor: pointer; user-select: none; }
.hcell-sortable:hover .hcell-label { text-decoration: underline; text-underline-offset: 2px; }
.sort-ind { margin-left: 2px; font-size: 9px; color: #1971c2; flex: 0 0 auto; }

/* +2일/+3일 탭 접기 토글 + 추가 탭 */
.tab-extra-toggle { opacity: .7; font-size: 12px; padding-left: 8px; padding-right: 8px; }
.tab-extra-toggle:hover { opacity: 1; }

/* ── 휴무 신청(dayoff.js) ─────────────────────────────────────────────── */
body.feat-off-dayoff .dof-wrap, body.hk .dof-wrap, body.vendor .dof-wrap { display: none !important; }
.dof-panel { width: 360px; }
.dof-kind { display: inline-block; color: #fff; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 8px; margin-right: 4px; vertical-align: 1px; }
.dof-affil { color: var(--ink-soft); font-weight: 600; font-size: 11.5px; }
.dof-sub { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
#dof-toast { position: fixed; right: 16px; bottom: 16px; z-index: 5000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.dof-toast-item { background: #1f2b38; color: #fff; font-size: 13px; font-weight: 700; padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); opacity: 0; transform: translateY(8px); transition: all .25s; max-width: 360px; border-left: 4px solid #f59f00; }
.dof-toast-item.show { opacity: 1; transform: none; }
.dof-box { width: 640px; max-width: 94vw; }
.dof-body { padding: 0 0 8px; overflow-y: auto; }
.dof-sec { padding: 10px 18px; border-bottom: 1px solid var(--line); }
.dof-sec-h { font-size: 12px; font-weight: 800; color: var(--ink-soft); margin-bottom: 6px; }
.dof-list { display: flex; flex-direction: column; gap: 6px; }
.dof-item { display: flex; align-items: flex-start; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.dof-item-main { flex: 1 1 auto; min-width: 0; }
.dof-item-d { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.dof-item-s { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.dof-item-acts { display: flex; gap: 4px; flex: none; }
.dof-now { font-size: 10.5px; color: #fff; background: #c92a2a; border-radius: 8px; padding: 1px 6px; font-weight: 800; vertical-align: 1px; }
.dof-src-d { color: #1971c2; font-weight: 700; } .dof-src-s { color: #2b8a3e; font-weight: 700; } .dof-src-x { color: #c92a2a; font-weight: 700; }
.dof-edit { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.dof-edit .vq-inp, .dof-add-row .vq-inp { height: 28px; }
.dof-add-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dof-add-row #dof-memo { flex: 1 1 120px; }
.dof-tilde { color: var(--ink-soft); }
.dof-hist { padding: 8px 18px; font-size: 12px; color: var(--ink-soft); }
.dof-hist summary { cursor: pointer; font-weight: 700; }
.dof-h-row { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.veh-tag.off { color: #c92a2a; border-color: #f0b0b0; background: #fff5f5; cursor: pointer; }
.veh-tag.off:hover { background: #ffe3e3; }
.veh-dof { border: 1px solid #d6dee6; background: #f8fafc; color: #5c6b7a; border-radius: 6px; font-size: 12px; line-height: 1; padding: 4px 6px; cursor: pointer; flex: none; margin-right: 4px; }
.veh-dof:hover { background: #fff5f5; color: #c92a2a; border-color: #f0b0b0; }
.veh-tab.offtab { color: #c92a2a; border-color: #f0b0b0; }
.veh-tab.offtab.on { background: #c92a2a; border-color: #c92a2a; color: #fff; }
/* 소속변경노선 컬럼: 시작일 전(예정)=파랑, 적용 중=회색 */
.cell-display.rs-pending { color: #1971c2; font-weight: 700; }
.cell-display.rs-applied { color: #868e96; }
/* 차량정보 모달 직영/월대 탭 칩 */
.veh-tab.dirtab { color: #1971c2; border-color: #74b0e4; } .veh-tab.dirtab.on { background: #1971c2; border-color: #1971c2; color: #fff; }
.veh-tab.woltab { color: #9c36b5; border-color: #d0a2e0; } .veh-tab.woltab.on { background: #9c36b5; border-color: #9c36b5; color: #fff; }
