/* =========================================================
   テレアポ管理「シフト管理」「勤怠管理」の見た目（2026-11-07）。中身は pages/telapo-kintai.js
   ⚠ 表の土台は催事のシフトと同じ .sh-table・.ca-wrap、月の帯は .nm-period（styles.css）。ここは足りない分だけ。
   ========================================================= */
.tk-offices { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.tk-office {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 700;
  color: var(--green-900); background: #fff; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.tk-office small { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.tk-office.is-on { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.tk-office.is-on small { color: rgba(255, 255, 255, .8); }

.tk-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.tk-h3 { margin: 0 0 10px; font-size: 16px; color: var(--green-900); }
.tk-muted { color: var(--muted); font-size: 12.5px; margin: 6px 0; }
.tk-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.tk-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--green-900); }
.tk-form .admin-input, .tk-grow .admin-input { font-size: 14px; }
.tk-grow { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; font-size: 12.5px; font-weight: 700; color: var(--green-900); margin: 8px 0; }
.tk-radios, .tk-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.tk-radios > span { font-size: 12.5px; font-weight: 700; color: var(--green-900); }
.tk-radio { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; cursor: pointer; }
.tk-kinds { margin: 4px 0 10px; }
.tk-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tk-acts--wrap { margin: 8px 0; }

.tk-pill { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 9px; font-size: 12px; font-weight: 700; border-radius: 999px; white-space: nowrap; }
.tk-pill--open { color: #1d6b3f; background: #e3f3e8; }
.tk-pill--closed, .tk-pill--plain { color: #4b5550; background: #eef0ee; }
.tk-pill--no, .tk-pill--warn { color: #b3261e; background: #fdecea; }
.tk-pill--paid { color: #8a4f00; background: #fff1d6; }
.tk-pill--info { color: #1f4e8c; background: #e7eef8; }
.tk-ptable tr.is-on td, .tk-ptable tr.is-on th { background: var(--green-50); }

/* 日付の表（提出・シフト表） */
.tk-grid { font-size: 12px; }
.tk-grid th, .tk-grid td { padding: 4px 5px; }
.tk-grid .tk-name, .tk-atable .tk-name, .tk-mtable .tk-name {
  position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; min-width: 7.5em; white-space: nowrap;
}
.tk-grid thead .tk-name, .tk-atable thead .tk-name, .tk-mtable thead .tk-name { z-index: 3; background: var(--green-50); }
.tk-dh { text-align: center !important; min-width: 3.2em; line-height: 1.15; }
.tk-dh small { display: block; font-size: 10.5px; font-weight: 400; }
.sh-table thead .tk-dh.is-sun { color: #c0392b; }
.sh-table thead .tk-dh.is-sat { color: #1f4e8c; }
.tk-c { text-align: center !important; vertical-align: middle !important; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-c--btn { cursor: pointer; }
.tk-c--btn:hover, .tk-c--btn:focus { outline: 2px solid var(--green-700); outline-offset: -2px; }
.is-sun { color: #c0392b; }
.is-sat { color: #1f4e8c; }
td.is-sun, td.is-sat { background: #fbfbfa; }
.tk-c--work, .tk-c--ok { background: #e3f3e8; color: #14532d; font-weight: 700; }
.tk-c--paid { background: #fff1d6; color: #8a4f00; font-weight: 700; }
.tk-c--off, .tk-c--ng { background: #eef0ee; color: #4b5550; }
.tk-c--absent { background: #fdecea; color: #b3261e; font-weight: 700; }
.tk-legend { display: flex; gap: 6px; margin: 6px 0; font-size: 12px; }
.tk-legend span { padding: 2px 10px; border-radius: 6px; }
.tk-notecell { white-space: normal !important; min-width: 12em; font-size: 12px; }
.tk-grid tfoot th, .tk-grid tfoot td { background: var(--green-50); font-weight: 700; }

/* 勤怠 */
.tk-views { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tk-view { padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--green-900); background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.tk-view.is-on { background: var(--green-800); border-color: var(--green-800); color: #fff; cursor: default; }
.tk-daybar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; }
.tk-daybar .nm-period__sel { min-width: 12em; }
.tk-check-lbl { font-size: 13px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.tk-atable td, .tk-mtable td { vertical-align: middle; font-variant-numeric: tabular-nums; }
.tk-atable tr.tk-check td { background: #fff8f7; }
.tk-num { text-align: right !important; white-space: nowrap; }
.tk-warn { color: #b3261e; font-weight: 700; }
.tk-linkbtn { padding: 0; font: inherit; font-weight: 700; color: var(--green-800); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.tk-sumline { font-size: 14px; margin: 6px 0 10px; }
.tk-brow { margin: 6px 0; }

/* 勤怠URL */
.tk-url { font-size: 13px; word-break: break-all; }
.tk-notes { font-size: 13px; color: var(--muted); padding-left: 1.2em; line-height: 1.8; }
.tk-warnbox { color: #b3261e; background: #fdecea; border-radius: 10px; padding: 10px 12px; font-weight: 700; }

/* アポ本数早見表（pages/telapo-hayami.js。表の土台は上の .tk-grid） */
.hy-table .hy-total { font-weight: 800; background: var(--green-50); }
.hy-n { background: #e3f3e8; color: #14532d; font-weight: 700; }
.hy-rest { background: #eef0ee; color: #4b5550; }
.hy-mark { display: block; font-size: 10.5px; color: #6b7570; }
.hy-today { outline: 2px solid var(--gold-500); outline-offset: -2px; }
.hy-sep th, .hy-sep td { background: var(--gold-100) !important; color: #8a4f00; font-size: 12px; text-align: left !important; white-space: normal !important; }
.hy-guest th { color: #8a4f00; }
.hy-more { margin: 12px 0; }
.hy-more > summary { cursor: pointer; font-weight: 700; color: var(--green-900); padding: 6px 0; }
.hy-chips { line-height: 2; }
.tk-office.hy-outside { border-style: dashed; }
.hy-x { margin-left: 4px; padding: 0 4px; font: inherit; font-size: 11px; color: inherit; background: none; border: 0; cursor: pointer; }

/* 成績・歩合（pages/telapo-more.js）：キャンセル・成約チェック／歩合／出張CL候補／成績推移・自社外 */
.tm-table th, .tm-table td { padding: 5px 8px; font-size: 12.5px; vertical-align: middle; }
.tm-table thead th { white-space: nowrap; text-align: center; }
.tm-table tbody th { text-align: left; white-space: nowrap; }
.tm-table tfoot th, .tm-table tfoot td, .tm-table tr.tm-total th, .tm-table tr.tm-total td { background: var(--green-50); font-weight: 700; }
.tm-table tr.tm-today th, .tm-table tr.tm-today td { box-shadow: inset 0 2px 0 var(--gold-500), inset 0 -2px 0 var(--gold-500); }
.tm-table tr.tm-sep th, .tm-table tr.tm-sep td { border-top: 2px solid var(--line); }
.tm-table tr.tm-sub th, .tm-table tr.tm-sub td { color: #4b5550; }
.tm-table tr.tm-five th, .tm-table tr.tm-five td { background: #f1f8f3; }
.tm-table tr.tm-detail > td { background: #fafbfa; padding: 8px 12px 12px 28px; }
.tm-inner { width: auto; min-width: 420px; font-size: 12.5px; }
.tm-h3 { margin-top: 22px; }
/* 率の色（スプレッドシートと同じ意味：水色＝よい・黄＝注意・赤＝わるい）。色だけにせず、下に決まりを書いてある */
.tm-cyan { background: #d9f3fb !important; color: #0b4f63; font-weight: 700; }
.tm-yellow { background: #fff3c4 !important; color: #6b4e00; font-weight: 700; }
.tm-red { background: #fde0dc !important; color: #a1221b; font-weight: 700; }
.tm-chip { display: inline-block; padding: 0 8px; border-radius: 6px; font-size: 11.5px; }
.tm-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.tm-tile { display: flex; flex-direction: column; gap: 2px; min-width: 104px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.tm-tile__lbl { font-size: 11.5px; color: var(--muted); }
.tm-tile__val { font-size: 18px; color: var(--green-900); font-variant-numeric: tabular-nums; }
.tm-tile.tm-cyan .tm-tile__val, .tm-tile.tm-yellow .tm-tile__val, .tm-tile.tm-red .tm-tile__val { color: inherit; }
/* 歩合の決まり */
.tm-rule__grid { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-start; }
.tm-rule__big { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 150px; padding: 12px 16px; background: var(--green-50); border-radius: 12px; }
.tm-rule__big span { font-size: 12.5px; font-weight: 700; color: var(--green-900); }
.tm-rule__big b { font-size: 44px; line-height: 1.1; color: var(--green-800); }
.tm-rule__big small { font-size: 11px; color: var(--muted); text-align: center; max-width: 12em; }
.tm-rule__steps { flex: 1 1 260px; margin: 0; padding-left: 1.4em; font-size: 14px; line-height: 2; }
.tm-rule__ex { width: auto; font-size: 12.5px; }
.tm-rule__ex th, .tm-rule__ex td { padding: 3px 10px; }
.tm-calc { margin-top: 12px; align-items: center; }
.tm-calc__out { margin: 0; font-size: 15px; }
.tm-target { width: 7em; text-align: right; font-size: 14px; padding: 4px 6px; }
/* 出張CL候補 */
.tm-cl { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; }
.tm-cl__card { margin: 0; }
.tm-cl__del { float: right; }
/* グラフ（成績推移） */
.tm-chartbox { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0 12px; max-width: 900px; }
.tm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: #2b332f; margin-bottom: 4px; }
.tm-legend__item { display: inline-flex; align-items: center; gap: 5px; }
.tm-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; flex: none; }
.tm-chart { position: relative; }
.tm-chart svg { display: block; width: 100%; height: auto; }
.tm-grid { stroke: #e7eae8; stroke-width: 1; }
.tm-axis { font-size: 11px; fill: #6b7570; }
.tm-guide { stroke: #6b7570; stroke-width: 1.5; stroke-dasharray: 5 4; }
.tm-guide__lbl { fill: #4b5550; }
.tm-line { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tm-dot { stroke: #fff; stroke-width: 2; }
.tm-cross { stroke: #9aa39e; stroke-width: 1; }
.tm-tip { position: absolute; top: 8px; z-index: 2; min-width: 180px; padding: 8px 10px; font-size: 12px; color: #2b332f; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 14px rgba(15, 30, 22, .14); pointer-events: none; }
.tm-tip__row { display: flex; align-items: center; gap: 4px; margin-top: 3px; white-space: nowrap; }
.tm-tip__row b { margin-left: auto; padding-left: 10px; font-variant-numeric: tabular-nums; }
.tm-tip__row small { color: var(--muted); min-width: 5.5em; text-align: right; }

/* 小さな入力の窓 */
.tk-dialog { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(15, 30, 22, .45); padding: 16px; }
.tk-dialog[hidden] { display: none; }
.tk-dialog__box { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; padding: 18px 18px 14px; box-shadow: var(--shadow-lg); }

/* フリーウェイの CSV を勤怠に取り込む（2026-11-20） */
.tk-fw { margin: 6px 0 14px; padding: 10px 12px; border: 1px dashed var(--line, #d9d4e8); border-radius: 12px; }
.tk-fw .tk-acts .tk-muted { flex: 1 1 260px; }
.tk-fw .ca-edit { margin-top: 10px; }

/* 人材管理（打電事業部だけ・2026-11-20）telapo-hr.js */
.thr-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 10px; font-size: 14px; }
.thr-sum b { font-size: 18px; }
.thr-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 10px; }
.thr-bar .tk-views { margin: 0; }
.thr-q { flex: 1 1 200px; max-width: 320px; }
.thr-table tr.thr-left > * { color: var(--muted); }
.thr-form { margin-top: 16px; padding: 14px; border: 1px solid var(--line, #d9d4e8); border-radius: 14px; background: var(--surface, #fff); }
/* シフト表：SV とアポインターの見出し（2026-11-20） */
.tk-grid tr.tk-grp th.tk-name { position: static; text-align: left; background: #e8f0fe; color: #1a3d7c; font-weight: 700; padding: 4px 8px; }
.tk-grid tr.tk-grp th.tk-name small { font-weight: 400; margin-left: 6px; }
.tk-grid tr.tk-sv th.tk-name { background: #f3f7ff; }
.tk-pos { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; background: #1a3d7c; color: #fff; font-size: 10px; }
