/* =========================================================
   テレアポ管理「最新アポ状態」（ポータル版）の見た目（2026-11-18）。中身は pages/telapo-board.js
   ⚠ スプレッドシートと同じ見た目にする（ご指示「見た目は同じにしたくて」）：罫線・灰色の見出し・黄色の列・2行で1件。
     色の決まり（行の色・担当の色・訪問の赤）はサーバー（server/lib/apo-board.js）から来る。ここでは書かない。
   ========================================================= */
.tb-day { flex-wrap: wrap; }
.tb-jump { width: auto; font-size: 13px; padding: 4px 6px; }
/* タブ（ご指示 2026-11-18「日付と都道府県と名前のタブをもう少し大きくして見やすく」）：
   1枚を2行（上＝日付と回る人、下＝地域）にして、折り返して全部見えるように並べる（横に流さない） */
.tb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0 0 8px; border-bottom: 3px solid #188038; }
.tb-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 150px; max-width: 300px;
  padding: 8px 14px 9px; font: inherit; text-align: left; color: #3c4043; background: #eef0ee;
  border: 1px solid #c7cdc9; border-radius: 10px; cursor: pointer; line-height: 1.35;
}
.tb-tab:hover { border-color: #188038; }
.tb-tab.is-teri { background: #f3f6f4; }
.tb-tab.is-on { background: #188038; border-color: #188038; color: #fff; box-shadow: 0 2px 6px rgba(24, 128, 56, .3); }
.tb-tab__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.tb-tab__day { font-size: 16px; font-weight: 800; letter-spacing: .02em; }
.tb-tab__who { font-size: 14px; font-weight: 700; }
.tb-tab__place { font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere; }
.tb-tab--add { justify-content: center; align-items: center; font-size: 14px; font-weight: 700; color: var(--green-800); background: #fff; border-style: dashed; }
.tb-tab__n { display: inline-block; padding: 0 7px; font-size: 12px; font-weight: 700; color: #fff; background: #188038; border-radius: 999px; }
.tb-tab.is-on .tb-tab__n { color: #188038; background: #fff; }
.tb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; }
.tb-bar__title { font-size: 15px; color: #202124; }
.tb-bar__acts { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.tb-empty { margin-top: 16px; }
.tb-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #3c4043; }
.tb-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tb-legend i { display: inline-block; width: 14px; height: 14px; border: 1px solid rgba(0, 0, 0, .2); border-radius: 3px; }
.tb-legend__sep { margin-left: 6px; font-weight: 700; }

/* ---- シート ---- */
.tb-wrap { overflow: auto; max-height: 78vh; border: 1px solid #c0c0c0; background: #fff; }
.tb-sheet { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-family: Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif; font-size: 13.5px; font-weight: 600; color: #000; background: #fff; }
.tb-sheet th, .tb-sheet td { border-right: 1px solid #d4d4d4; border-bottom: 1px solid #d4d4d4; padding: 2px 4px; line-height: 1.35; vertical-align: middle; overflow: hidden; word-break: break-all; }
.tb-sheet thead th { position: sticky; top: 17px; z-index: 3; background: #d9d9d9; font-weight: 700; font-size: 12px; line-height: 1.2; color: #202124; text-align: center; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; border-bottom: 1px solid #b0b0b0; height: 22px; }
.tb-sheet thead th.tb-y { background: #ffff00; }
.tb-sheet thead th.tb-b { background: #4a86e8; color: #fff; }
/* 左の5列（つかむ所・A・✅・採番・時間）は横に動かしても残す */
.tb-s { position: sticky; z-index: 2; background: #fff; }
thead .tb-s { z-index: 4; }
.tb-s0 { left: var(--tb-l0, 0); }
.tb-s1 { left: var(--tb-l1, 18px); }
.tb-s2 { left: var(--tb-l2, 66px); }
.tb-s3 { left: var(--tb-l3, 136px); }
.tb-s4 { left: var(--tb-l4, 194px); }
.tb-s5 { left: var(--tb-l5, 222px); border-right: 2px solid #b0b0b0 !important; }
.tb-c { white-space: pre-wrap; cursor: default; }
[tabindex].tb-c, [tabindex].tb-lbl, [tabindex].tb-time, [tabindex].tb-memo { cursor: text; }
.tb-c:focus, .tb-lbl:focus, .tb-time:focus, .tb-memo:focus { outline: 2px solid #1a73e8; outline-offset: -2px; }
.tb-c.is-edit, .tb-time.is-edit, .tb-lbl.is-edit, .tb-memo.is-edit, .tb-c:has(.tb-sel), .tb-c:has(.tb-inp) { outline: 2px solid #1a73e8; outline-offset: -2px; background: #fff !important; color: #000 !important; }
.tb-lab { background: #d9d9d9; text-align: left; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tb-choice { position: relative; padding-right: 14px; }
.tb-dd { position: absolute; right: 3px; top: 50%; margin-top: -7px; font-size: 9px; color: #5f6368; }
.tb-sel, .tb-inp { width: 100%; font: inherit; font-size: 13px; padding: 1px 2px; border: 0; background: #fff; }
.tb-a { text-align: right; font-size: 12.5px; white-space: nowrap; }
.tb-lbl { background: #efefef; text-align: center; font-size: 12.5px; font-weight: 700; white-space: pre-wrap; }
.tb-sheet td.tb-time { text-align: center; white-space: pre-wrap; font-size: 13px; font-weight: 700; word-break: keep-all; overflow-wrap: normal; }
.tb-grip { text-align: center; color: #9aa0a6; font-size: 11px; letter-spacing: -2px; cursor: grab; user-select: none; }
.tb-grip:active { cursor: grabbing; }
.tb-grip { touch-action: none; }
body.tb-dragging, body.tb-dragging * { cursor: grabbing !important; user-select: none; }
.tb-chk { text-align: center; padding: 1px 0 !important; }
.tb-chk input { width: 17px; height: 17px; margin: 0; accent-color: #d93025; cursor: pointer; }
/* ✅ の右のコピー（詳細変換と同じ形でコピー） */
.tb-chk__row { display: flex; align-items: center; justify-content: center; gap: 3px; }
.tb-copy { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; color: #444746; background: #fff; border: 1px solid #c4c7c5; border-radius: 5px; cursor: pointer; }
.tb-copy:hover { color: #0b57d0; border-color: #0b57d0; background: #e8f0fe; }
.tb-menu-btn { display: block; margin: 2px auto 0; padding: 0 4px; font: inherit; font-size: 10px; line-height: 1.5; color: #5f6368; background: #f1f3f4; border: 1px solid #dadce0; border-radius: 4px; cursor: pointer; }
.tb-google a.tb-map { display: inline-block; padding: 1px 6px; font-size: 13px; font-weight: 700; color: #1a0dab; background: rgba(255, 255, 255, .7); border-radius: 4px; text-decoration: underline; }
.tb-tantou { font-weight: 700; }
.tb-cm { font-size: 12.5px; }
/* 上の欄（注意書き・査定員・メモ） */
.tb-top td { height: 21px; }
.tb-magenta { background: #ff00ff !important; font-weight: 700; font-size: 12.5px; }
.tb-google-note { background: #ea4335; color: #fff; font-weight: 700; text-align: center; white-space: nowrap; }
.tb-blue { background: #c9daf8; }
.tb-peach { background: #f9cb9c !important; text-align: center; }
.tb-cream { background: #fff2cc; }
.tb-memo { white-space: pre-wrap; font-size: 12.5px; }
.tb-full { font-size: 17px; font-weight: 700; padding: 6px 4px !important; }
.tb-rule td, .tb-sec td { font-size: 13px; font-weight: 700; height: 22px; }
.tb-sec td[colspan] { background: #fff2cc; }
/* 1件（2行） */
.tb-r1 > td { border-top: 1px solid #9e9e9e; }
/* 空の枠も、シートと同じ高さ（1行21px）にする */
.tb-r1 > td, .tb-r2 > td { height: 21px; }
tr.is-sel > td { box-shadow: inset 0 0 0 9999px rgba(26, 115, 232, .07); }
tr.is-sel > td.tb-grip, tr.is-sel > td.tb-s1 { box-shadow: inset 3px 0 0 #1a73e8; }
tr.is-drag > td { opacity: .45; }
tr.is-drop > td { box-shadow: inset 0 0 0 9999px rgba(24, 128, 56, .14); }
tr.is-drop.tb-r1 > td { border-top: 3px solid #188038; }
.tb-who i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
/* 色・そのほかのメニュー */
.tb-pop { position: absolute; z-index: 70; min-width: 210px; padding: 6px; background: #fff; border: 1px solid #dadce0; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.tb-pop__ttl { margin: 6px 6px 2px; font-size: 11.5px; font-weight: 700; color: #5f6368; }
.tb-pop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; font: inherit; font-size: 13px; text-align: left; color: #202124; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.tb-pop button:hover:not(:disabled) { background: #f1f3f4; }
.tb-pop button:disabled { color: #b0b4b8; cursor: default; }
.tb-pop button i { flex: none; width: 16px; height: 16px; border: 1px solid rgba(0, 0, 0, .2); border-radius: 4px; }
.tb-crow { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.tb-crow .admin-input { flex: 1 1 auto; }
.tb-crow input[type="color"] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
/* シートごとの違い（2026-11-18）：業務代行の「屋根壁聞けなかったはNG」・「成約は色付ける」、LP の列と「注意⚠」 */
.tb-roof { font-size: 10.5px; white-space: pre-wrap; line-height: 1.3; }
.tb-deal { font-size: 11px; white-space: nowrap; }
.tb-sheet thead th.tb-ab { background: #cfe2f3; }
.tb-red { background: #ff0000 !important; color: #fff; font-weight: 700; white-space: pre-wrap; font-size: 12px; }
.tb-caution-btn { margin-left: 10px; padding: 2px 10px; font: inherit; font-size: 11.5px; font-weight: 700; color: #b3261e; background: #fff; border: 0; border-radius: 6px; cursor: pointer; }
tr.is-ro > td { color: #333; }
.tb-tab--caution { background: #fdecea; border-color: #e8a29b; color: #a1221b; }
.tb-tab--caution.is-on { background: #d93025; border-color: #d93025; color: #fff; }
/* 列の記号の行（シートの A・B・C…）。右の端をつかむと幅が変わる（ご指示 2026-11-18「スプシみたいに広げられるように」） */
.tb-sheet thead tr.tb-letters th { top: 0; height: 17px; padding: 0 2px; font-size: 11px; font-weight: 600; line-height: 17px; color: #5f6368; background: #f1f3f4; border-bottom: 1px solid #c0c0c0; position: sticky; overflow: visible; }
.tb-letter { position: relative; }
.tb-rs { position: absolute; top: 0; right: 0; z-index: 6; width: 7px; height: 100%; cursor: col-resize; touch-action: none; }
/* 左に残す列の見出しは、横に動かしたほかの見出しより上に出す */
.tb-sheet thead th.tb-s { z-index: 5; }
.tb-rs::after { content: ""; position: absolute; top: 2px; bottom: 2px; right: 0; width: 2px; border-radius: 1px; background: transparent; }
.tb-letter:hover .tb-rs::after, .tb-rs:hover::after { background: #1a73e8; }
body.tb-resizing, body.tb-resizing * { cursor: col-resize !important; user-select: none; }

/* 成約の ✓（お名前の左上）。2026-11-18 */
.tb-sheet td.tb-cust { position: relative; padding-left: 20px; }
.tb-deal-chk { position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; margin: 0; accent-color: #c2185b; cursor: pointer; }
.tb-deal-chk:disabled { cursor: default; }
/* Google：未入力＝赤、地図無し */
.tb-google { text-align: center; cursor: pointer; }
.tb-google.is-missing { color: #fff; }
.tb-mapmiss { font-size: 12px; font-weight: 800; color: #fff; }
.tb-nomap { font-size: 12px; font-weight: 800; color: #fff; }
.tb-pop--map { width: 300px; padding: 8px 10px 10px; }
.tb-pop--map .tb-map-inp { width: 100%; margin: 4px 0 0; font-size: 13px; }
.tb-pop__err { margin: 4px 2px 0; font-size: 12px; font-weight: 700; color: #b3261e; }
.tb-pop__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tb-pop .tb-pop__acts button { display: inline-flex; width: auto; padding: 5px 10px; font-size: 13px; border: 1px solid #dadce0; }
.tb-pop .tb-pop__acts button.admin-btn--primary { color: #fff; background: #188038; border-color: #188038; }
/* 再訪（いちばん右の列）。✓ を付けたら、その2行を回った人の色に */
.tb-sheet th.tb-rv-h { background: #fce8b2; }
.tb-sheet td.tb-rv { text-align: center; white-space: normal; font-size: 11.5px; line-height: 1.3; }
.tb-rv__lab { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.tb-rv__lab input { width: 15px; height: 15px; margin: 0; cursor: pointer; }
.tb-rv__to, .tb-rv__from { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; }
.tb-sheet tr.is-revisit > td { background: var(--tb-rv) !important; color: var(--tb-rv-ink) !important; }
.tb-sheet tr.is-revisit a.tb-map { color: #1a0dab; }
/* 電話番号・備考：ダブルクリックでクローザーの色 */
.tb-sheet td.tb-paint { user-select: text; }
/* 再訪の画面 */
.tb-rvf { flex-direction: column; align-items: stretch; gap: 8px; }
.tb-rvf label { display: flex; flex-direction: column; gap: 3px; font-weight: 700; }
.tb-rvu { margin: 0; padding: 6px 8px; font-size: 13px; color: #3c4043; background: #fff8e1; border-radius: 6px; }
/* 再訪の窓：当日・翌日のボタン */
.tb-rvday { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-rvday .admin-btn.is-on { color: #fff; background: #188038; border-color: #188038; }
/* 本枠の下の空いた行（離島などのイレギュラー） */
.tb-sheet tr.tb-under td { height: 30px; border-top: 2px solid #c00; border-bottom: 2px solid #c00; background: #fff; }
.tb-sheet td.tb-under__head { font-weight: 800; text-align: center; color: #b3261e; }

/* A列の上：受電担当者（▼で選ぶ） */
.tb-sheet td.tb-recv { position: relative; text-align: left; padding-right: 12px; font-size: 12px; font-weight: 700; line-height: 1.25; white-space: normal; word-break: break-all; }
.tb-sheet td.tb-cm { position: relative; }
/* 到着予定（B列の左） */
.tb-sheet th.tb-arr-h { font-size: 11.5px; }
.tb-sheet td.tb-arr { text-align: center; font-size: 13px; font-weight: 800; color: #b3261e; white-space: normal; }
/* 行の高さをそろえる（2026-11-18 ご指示「横の幅を統一」）：1件＝2行とも同じ高さ。長い字は1行で切って、マウスを置くと吹き出しで全部 */
.tb-sheet tr.tb-r1 > td, .tb-sheet tr.tb-r2 > td { height: 24px; }
.tb-sheet tr.tb-r1 > td.tb-c:not([rowspan]), .tb-sheet tr.tb-r2 > td.tb-c:not([rowspan]) { white-space: nowrap; text-overflow: ellipsis; word-break: normal; }
.tb-sheet tr.tb-r1 > td.tb-c.is-edit, .tb-sheet tr.tb-r2 > td.tb-c.is-edit { white-space: pre-wrap; text-overflow: clip; }
.tb-tip { position: absolute; z-index: 80; max-width: 380px; padding: 8px 11px; font-size: 14px; font-weight: 600; line-height: 1.5; color: #202124; white-space: pre-wrap; overflow-wrap: anywhere;
  background: #fffde7; border: 1px solid #e0c46c; border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); pointer-events: none; }
.tb-tip::before { content: ""; position: absolute; left: 16px; top: -7px; width: 12px; height: 12px; background: #fffde7; border-left: 1px solid #e0c46c; border-top: 1px solid #e0c46c; transform: rotate(45deg); }
.tb-tip.is-up::before { top: auto; bottom: -7px; transform: rotate(225deg); }
/* 2行ぶんのマス（アクセ・駐車場・到着予定）は2行まで（長い字で行が高くならないように。2026-11-18）。全部は吹き出しで */
.tb-cl2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; max-height: 2.6em; }


/* ---- 色塗り・再訪の右のメモ（2026-11-20）。動きは pages/telapo-board.js の penBar・paintCell、色を選ぶ窓は pages/color-pick.js ---- */
.tb-pen { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: 6px; padding-left: 10px; border-left: 1px solid #c7cdc9; }
.tb-pen__btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.tb-pen__sw { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); flex: 0 0 auto; }
.tb-pen__sw.is-none { background: conic-gradient(#ea4335 0 25%, #fbbc04 0 50%, #34a853 0 75%, #4285f4 0); }
.tb-pen__sw.is-reset { background: linear-gradient(135deg, #fff 44%, #e53935 44%, #e53935 56%, #fff 56%); }
.tb-pen.is-on .tb-pen__btn { border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26, 115, 232, .25); }
.tb-pen__hint { font-size: 12.5px; font-weight: 700; color: #1a56b0; background: #e8f0fe; border-radius: 999px; padding: 3px 10px; }
.tb-wrap.is-pen td[data-pk] { cursor: cell; }
/* 塗った色は、行の色・再訪の行の色より前に出す */
.tb-sheet td.is-painted, .tb-sheet tr.is-revisit > td.is-painted { background: var(--tb-paint) !important; color: var(--tb-paint-ink) !important; }
.tb-sheet td.is-painted.is-edit { background: #fff !important; color: #000 !important; }
/* 再訪の右のメモ（2行ぶん。長い字は2行まで・全部は吹き出し） */
.tb-sheet th.tb-fm-h { background: #e8f0fe; }
.tb-sheet td.tb-fm { white-space: normal; text-align: left; font-size: 12.5px; vertical-align: top; }
.tb-sheet td.tb-fm.is-edit { white-space: pre-wrap; }

/* 2026-11-20：訪問被りの × ・スタート時間／早上がり・女性CLの注釈・男性アポ・アポ変更 */
.tb-prevx { color: #d00000; font-weight: 800; font-size: 15px; }
.tb-cm.is-prevx { box-shadow: inset 0 0 0 2px #d00000; }
.tb-tmemo { font-size: 12px; white-space: nowrap; }
.tb-tmemo small { display: block; font-size: 10px; color: #6b6b6b; line-height: 1.1; }
.tb-tmemo.is-on { background: #fff2cc; font-weight: 700; }
.tb-female { display: inline-block; margin-left: 10px; padding: 1px 8px; border-radius: 6px; background: #d00000; color: #fff; font-weight: 700; font-size: 12px; }
.tb-male { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 5px; background: #d00000; color: #fff; font-size: 10px; font-weight: 700; vertical-align: middle; }
.tb-hk .tb-rv__from { color: #b45309; }
/* 男性のアポで、女性のクローザーの列（そのアポだけ「回れない」。2026-11-20） */
.tb-cm.is-ng { background-image: repeating-linear-gradient(135deg, rgba(208, 0, 0, .14) 0 4px, transparent 4px 8px); }
.tb-ng { color: #b00000; font-size: 10px; font-weight: 700; }
/* 性別が人材管理に無いクローザー（男性のアポがあるタブだけ） */
.tb-gunk { display: inline-block; margin-left: 10px; padding: 1px 8px; border-radius: 6px; background: #fff3cd; color: #7a4b00; border: 1px solid #e0b000; font-weight: 700; font-size: 12px; }
/* 駐車場の調べた URL（2026-11-20） */
.tb-sheet a.tb-park { display: inline-block; padding: 0 5px; font-size: 12px; font-weight: 700; color: #1a0dab; background: rgba(255, 255, 255, .8); border-radius: 4px; text-decoration: underline; }
/* アポ管の枠（2026-11-25）：係のアポ管の色でタブを囲む */
.tb-tab.has-apokan { border-color: var(--tb-ak); box-shadow: 0 0 0 3px var(--tb-ak); }
.tb-tab.has-apokan.is-on { box-shadow: 0 0 0 3px var(--tb-ak), 0 2px 6px rgba(24, 128, 56, .3); }
.tb-tab__ak { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; }
