/* =========================================================
   内勤管理・自分の勤怠（2026-11-06）
   ⚠ 色だけで区別しない（「休」「有」「欠」・「！」「●」の文字も出す）
   ========================================================= */
.nk-help { font-size: 12.5px; color: var(--muted); line-height: 1.8; margin: 0 0 10px; }
.nk-range { font-size: 12.5px; color: var(--muted); margin: -4px 0 10px; }
.nk-h3 { font-size: 14px; margin: 18px 0 6px; color: var(--green-900); }
.nk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.nk-tools label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.nk-tools select { padding: 5px 8px; font: inherit; font-size: 13px; border: 1px solid #c9ced6; border-radius: 6px; background: #fff; }
.nk-tools__sp { flex: 1; }
.nk-check input { width: 16px; height: 16px; }
.nk-lock { font-size: 12.5px; font-weight: 700; color: #8a4b00; background: #fff1dc; border: 1px solid #f0c584; border-radius: 999px; padding: 3px 10px; }
.nk-lock[hidden] { display: none; }
.nk-msg { min-height: 1.2em; font-size: 13px; margin: 4px 0 8px; }
.nk-msg.is-ok { color: #1a7f4b; }
.nk-msg.is-ng { color: #b42318; font-weight: 700; }
.nk-msg.is-warn { color: #8a4b00; }
.nk-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; }
.nk-steps { font-size: 13px; line-height: 1.8; padding-left: 1.3em; margin: 0 0 10px; }
.nk-code { font-size: 30px; font-weight: 700; letter-spacing: .14em; text-align: center; color: var(--green-900); margin: 6px 0 10px; font-variant-numeric: tabular-nums; }

/* シフト表（人×日） */
.nk-grid-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.nk-grid { border-collapse: separate; border-spacing: 0; font-size: 11.5px; min-width: 100%; }
.nk-grid th, .nk-grid td { border-right: 1px solid #edf0ee; border-bottom: 1px solid #edf0ee; padding: 0; text-align: center; }
.nk-grid thead th { position: sticky; top: 0; z-index: 2; background: #f3f8f0; padding: 4px 2px; font-weight: 700; min-width: 52px; }
.nk-grid thead th small { font-weight: 400; color: var(--muted); }
.nk-grid .is-sat { color: #2f5aa8; }
.nk-grid .is-sun { color: #b42318; }
/* 曜日（土・日・祝）も同じ色に（2026-11-09 ご指示「土→青、日祝→赤」） */
.nk-grid thead th.is-sat small, .nk-grid thead th.is-sun small { color: inherit; font-weight: 700; }
/* シフト提出の共有 URL */
.nk-share { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nk-share__lbl { font-size: 12.5px; font-weight: 700; color: var(--green-900); }
.nk-share input { width: 270px; max-width: 64vw; padding: 5px 8px; font: inherit; font-size: 13px; color: #1f2a37; background: #f8faf9; border: 1px solid #c9ced6; border-radius: 6px; }
.nk-grid .nk-grid__name { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; padding: 4px 8px; min-width: 120px; white-space: nowrap; }
.nk-grid thead .nk-grid__name { z-index: 3; background: #f3f8f0; }
.nk-grid__name span { display: block; font-size: 12.5px; }
.nk-grid__name small { display: block; color: var(--muted); font-weight: 400; }
.nk-grid__cell { height: 42px; cursor: pointer; vertical-align: middle; }
.nk-grid__cell:hover, .nk-grid__cell:focus-visible { background: var(--green-50); outline: 2px solid var(--gold-500); outline-offset: -2px; }
.nk-grid .is-today { background: #fffbea; }
.nk-c { position: relative; display: block; padding: 2px 10px 2px 3px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.nk-c + .nk-c { border-top: 1px dashed #dfe4e1; }
.nk-c--holiday { color: #a3245f; background: #fde6f1; }   /* 休み（休日・振替休日）はピンク（2026-11-09 ご指示「シフト表の休みの色はピンクにして」） */
.nk-c--paid_leave { color: #1b6b3a; background: #e3f4e8; }
.nk-c--absent { color: #b42318; background: #fdecea; }
.nk-c--none { color: #8a4b00; background: #fff1dc; }
.nk-swap { display: inline-block; margin-right: 1px; padding: 0 2px; font-style: normal; font-size: 9px; font-weight: 700; color: #fff; background: #2f5aa8; border-radius: 3px; }
.nk-mk { position: absolute; top: 1px; right: 2px; font-style: normal; font-size: 9px; line-height: 1; }  /* 時刻に重ならないよう右の余白に置く */
.nk-mk.is-done { color: #2f5aa8; }
.nk-mk.is-on { color: #1b6b3a; }
.nk-mk.is-issue { color: #b42318; font-weight: 700; }
.nk-viewonly .nk-grid__cell { cursor: default; }
/* つまんで並び替え（2026-11-09）：名前の左の「⋮⋮」 */
.nk-grid .nk-grid__name.is-sortable { padding-left: 26px; }
.nk-drag {
  position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 20px; height: 30px; padding: 0;
  border: 0; border-radius: 5px; background: none; color: #9aa1a9; font: inherit; font-size: 13px; line-height: 1; letter-spacing: -4px;
  cursor: grab; touch-action: none;   /* 指でつまんだときに画面が動かないように */
}
.nk-drag:hover, .nk-drag:focus-visible { background: var(--green-50); color: var(--green-800); outline: 2px solid var(--gold-500); outline-offset: -2px; }
.nk-grid.is-sorting { user-select: none; -webkit-user-select: none; }
.nk-grid.is-sorting .nk-drag { cursor: grabbing; }
.nk-grid tr.is-dragging > th, .nk-grid tr.is-dragging > td { background: #fffbea; }
.nk-grid tr.is-dragging > th { box-shadow: inset 4px 0 0 var(--gold-500); }

/* PC 補助機能の入れ方（試験版の札） */
.nk-trial { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #8a4b00; background: #fff1dc; border: 1px solid #f0c584; vertical-align: middle; }
.nk-steps small { display: block; color: var(--muted); }
.nk-steps code { padding: 0 4px; background: #f3f5f4; border-radius: 4px; }

/* シフト提出の一覧 */
#nkRGrid .nk-grid__cell { cursor: default; font-size: 10.5px; line-height: 1.2; }
.nk-grid .nk-grid__st { min-width: 150px; text-align: left; padding: 4px 6px; white-space: normal; }
.nk-grid__st .admin-btn { display: block; margin-top: 4px; }
.nk-grid__st small { display: block; color: var(--muted); }
.nk-req--work { background: #eef7f1; color: #1b6b3a; }
.nk-req--off { background: #fde6f1; color: #a3245f; }   /* 休み希望もピンク（2026-11-09 ご指示「休日がピンク色になってない」） */
.nk-req--any { color: #9aa1a9; }
/* 自分の勤怠：シフト提出の表 */
.nk-reqform td, .nk-reqform th { padding: 4px 6px; font-size: 13px; vertical-align: middle; }
.nk-reqform select, .nk-reqform input[type="time"], .nk-reqform input[type="text"] { padding: 4px 6px; font: inherit; font-size: 13px; border: 1px solid #c9ced6; border-radius: 6px; }
.nk-reqform tr.is-sat th { color: #2f5aa8; }
.nk-reqform tr.is-sun th { color: #b42318; }
.nk-reqform tr.has-shift td { background: #fffbea; }

/* 表・判定の印 */
.nk-table-wrap { overflow-x: auto; }
.nk-table td small { display: block; color: var(--muted); font-size: 11px; }
/* 日付・氏名・予定・時刻は 1 行で（縦に細く折り返さない） */
.nk-rows td:nth-child(-n+4), #nkLRows td:nth-child(-n+5), .nk-sum td:nth-child(-n+2), #nmRows td:nth-child(-n+4) { white-space: nowrap; }
.nk-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nk-table tr.is-issue td { background: #fff8f6; }
.nk-table tr.is-off td { color: #9aa1a9; }
.nk-ops { white-space: nowrap; }
.nk-ops .admin-btn { margin: 2px 4px 2px 0; }
.nk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.nk-chip { display: inline-block; margin: 1px 3px 1px 0; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; background: #eceef2; color: #3d4652; white-space: nowrap; }
.nk-chip.is-issue { background: #fdecea; color: #b42318; font-weight: 700; }
.nk-chip--late, .nk-chip--early { background: #fff1dc; color: #8a4b00; }
.nk-list { margin: 0 0 10px; padding-left: 1.2em; font-size: 13px; line-height: 1.8; }

/* ---- 部署ごとのまとまり（2026-11-07 ご指示「部署毎にまとめて綺麗に」） ---- */
.nk-dept { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 8px; margin: 0 0 14px; }
.nk-dept--all { background: #fbfdfb; }
/* 見出し：部署名（色はポータル共通の dept-color.js が付ける。色の無い部署・「部署ごとの合計」は灰の線） */
.nk-dept__h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 8px; font-size: 15.5px; color: var(--green-900); }
.nk-dept__h:not(.kd-sec) { box-shadow: inset 4px 0 0 #c9ced6; padding-left: .5em; }
.nk-dept__h .nk-chip { font-size: 12px; font-weight: 700; }
.nk-dept__hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.nk-dept__body:not(.kd-secbody) { padding-left: 10px; box-shadow: inset 4px 0 0 #e3e7e5; }
/* 合計の表：どの部署の表も列の幅をそろえる */
.nk-sum { width: 100%; min-width: 880px; table-layout: fixed; }
.nk-sum th:first-child, .nk-sum td:first-child { width: 190px; }
.nk-sum thead th { font-size: 13px; }
.nk-sum thead th:not(:first-child) { text-align: right; }
.nk-rows { width: 100%; }   /* 日ごとの表は箱の幅いっぱい（人の見出しの帯が右まで届く） */
.nk-sum td.num small { font-size: 11px; }
.nk-sum td:first-child small, .nk-sum th:first-child small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.nk-dept-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.nk-link { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--green-800); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nk-link:hover, .nk-link:focus-visible { color: var(--green-900); }
.nk-table tfoot th, .nk-table tfoot td { background: var(--green-50); font-weight: 700; border-top: 2px solid #cfe3d3; }
.nk-table tfoot th { text-align: left; white-space: nowrap; }
.nk-days { margin: 10px 0 4px; border-top: 1px dashed #dfe4e1; padding-top: 6px; }
.nk-days > summary { cursor: pointer; padding: 6px 2px; font-size: 13.5px; font-weight: 700; color: var(--green-900); }
.nk-days > summary small { margin-left: 8px; font-weight: 400; color: var(--muted); }
.nk-days > summary:hover, .nk-days > summary:focus-visible { color: var(--green-700); }
/* 表の中の見出しの行：部署（緑の帯）・人（うすい帯） */
.nk-grp > th, .nk-person > th { text-align: left; padding: 5px 8px; font-size: 12.5px; font-weight: 700; }
.nk-grp > th { background: #e6f1e9; color: var(--green-900); border-top: 2px solid #cfe3d3; }
.nk-person > th { background: #f6f8f7; color: #2b3440; border-top: 1px solid #e3e7e5; }
.nk-grp__lbl { position: sticky; left: 8px; display: inline-block; }
.nk-grp__lbl small { display: inline; margin-left: 8px; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.nk-grid .nk-grp > th { padding: 5px 8px; text-align: left; }
.nk-empty { margin: 8px 0; font-size: 13px; color: var(--muted); }

/* ---- 勤怠管理：表で見る（左に氏名・上に日付と曜日・マスに出勤と退勤）（2026-11-07） ---- */
.nk-seg { display: inline-flex; border: 1px solid #c9ced6; border-radius: 8px; overflow: hidden; background: #fff; }
.nk-seg__btn { padding: 6px 12px; font: inherit; font-size: 13px; background: #fff; color: #3d4652; border: 0; cursor: pointer; }
.nk-seg__btn + .nk-seg__btn { border-left: 1px solid #c9ced6; }
.nk-seg__btn[aria-pressed="true"] { background: var(--green-700); color: #fff; font-weight: 700; }
.nk-seg__btn:focus-visible { outline: 2px solid var(--gold-500); outline-offset: -2px; }
.nk-legend { margin: 4px 0 8px; }
.nk-lg { padding: 0 4px; border-radius: 4px; }
.nk-lg--plan { color: #9aa1a9; }
.nk-lg--late { background: #fff1dc; color: #8a4b00; }
.nk-lg--issue { background: #fdecea; color: #b42318; font-weight: 700; }
.nk-agrid .nk-grid__cell { height: 40px; }
.nk-agrid .nk-grid__name { min-width: 110px; }
.nk-agrid thead th.nk-agrid__sum { min-width: 66px; padding: 4px 6px; font-size: 11px; line-height: 1.3; }
.nk-agrid td.num { padding: 4px 8px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; background: #fafcfb; }
.nk-agrid td.num small { display: block; font-size: 10.5px; color: var(--muted); }
.nk-agrid .nk-agrid__first { border-left: 2px solid #cfe3d3; }
.nk-agrid .nk-chip { margin: 0; }
.nk-c--work { color: #1f2a37; }
.nk-c--late { background: #fff1dc; color: #8a4b00; }
.nk-c--plan { color: #9aa1a9; }
.nk-c--on { color: #1b6b3a; font-weight: 700; }
.nk-c.is-issue { background: #fdecea; color: #b42318; }
/* マス全体を塗る（2026-11-16 ご指示「休みのやつ、白い余白なくし、1マスすべてピンクに。他の同じようになってるのも」）：
   1日に1つだけ入っているマスは、札（.nk-c）の帯ではなくマス（td）そのものに色を付ける。色は札と同じ。
   ⚠ 1日に2つ入っている日は、今までどおり段ごとの帯（2つの色が混ざらないように）。きょうの列の黄色より、こちらを先に見せる */
.nk-grid .nk-grid__cell.nk-fill--holiday { background: #fde6f1; }
.nk-grid .nk-grid__cell.nk-fill--paid_leave { background: #e3f4e8; }
.nk-grid .nk-grid__cell.nk-fill--absent, .nk-grid .nk-grid__cell.nk-fill--issue { background: #fdecea; }
.nk-grid .nk-grid__cell.nk-fill--none, .nk-grid .nk-grid__cell.nk-fill--late { background: #fff1dc; }
.nk-grid .nk-grid__cell[class*="nk-fill--"] > .nk-c { background: transparent; }
.nk-grid .nk-grid__cell[class*="nk-fill--"].is-today { box-shadow: inset 0 0 0 2px #f3d97a; }   /* きょうの列の目印は、枠で残す */
.nk-grid__cell.is-dim .nk-c { opacity: .35; }
.nk-agrid__tot > th, .nk-agrid__tot > td { background: var(--green-50); font-weight: 700; border-top: 2px solid #cfe3d3; }
.nk-agrid__tot > th.nk-grid__name { background: var(--green-50); }
.nk-agrid__all > th, .nk-agrid__all > td { background: #e6f1e9; }
.nk-agrid__all > th.nk-grid__name { background: #e6f1e9; }
.nk-agrid__blank { padding: 4px 10px !important; text-align: left !important; }
.nk-agrid__blank span { font-size: 11.5px; font-weight: 400; color: var(--muted); }
/* マスを押したときの窓：その日のくわしい内容 */
.nk-day { border-collapse: collapse; margin: 0 0 8px; font-size: 13.5px; }
.nk-day th { padding: 5px 14px 5px 0; text-align: left; font-weight: 400; color: var(--muted); white-space: nowrap; vertical-align: top; }
.nk-day td { padding: 5px 0; }
.nk-day small { display: block; font-size: 11.5px; color: var(--muted); }

/* 入力の窓（naikin-common.js の form） */
.nk-ask__box--wide { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.nk-ask__box .nk-ask__lbl { margin: 0 0 8px; }
.nk-ask__box .nk-ask__lbl input, .nk-ask__box .nk-ask__lbl select {
  display: block; width: 100%; margin-top: 4px; padding: 7px 8px; font: inherit; font-size: 14px; border: 1px solid #c9ced6; border-radius: 8px; box-sizing: border-box; background: #fff;
}
.nk-ask__hint { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.nk-req { margin-left: 6px; font-size: 10.5px; color: #b42318; font-weight: 700; }
.nk-ask__chk { display: inline-flex; align-items: center; gap: 4px; margin: 0 12px 6px 0; font-size: 13px; }
.nk-ask__chk small { color: var(--muted); }
.nk-ask__people, .nk-ask__wd, .nk-ask__breaks { border: 1px solid #e3e7e5; border-radius: 8px; padding: 6px 10px; margin: 0 0 10px; }
.nk-ask__people { max-height: 180px; overflow: auto; }
.nk-ask__people legend, .nk-ask__wd legend, .nk-ask__breaks legend { font-size: 12.5px; font-weight: 700; padding: 0 4px; }
.nk-br { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.nk-br input[type="time"] { padding: 5px 6px; font: inherit; border: 1px solid #c9ced6; border-radius: 6px; }
.nk-ask__btns button.is-danger { color: #b3261e; border-color: rgba(179, 38, 30, .4); }
@media (max-width: 600px) {
  .nk-grid__name { min-width: 90px; }
  .nk-tools label { width: 100%; }
  /* 部署のまとまり：スマホでは余白と名前の列をつめる（表は箱の中で横に動く） */
  .nk-dept { padding: 10px 8px 6px; }
  .nk-sum { min-width: 760px; }
  .nk-sum th:first-child, .nk-sum td:first-child { width: 118px; }
}

/* ---- 自分の勤怠（月の表 #nmRows）：シフト表と同じ色分け（2026-11-10 ご指示「土日祝の休みや有休など色付け見やすく」）----
   日付の文字＝土は青・日祝は赤（.is-sat／.is-sun・祝日の名前を小さく）。予定の札＝休はピンク・有休は緑・当欠は赤（.nk-c--*）。
   行のうすい色＝休み・有休・当欠・土曜。⚠ 確認が要る日（is-issue）の色は今までどおり（休みの日より先に目に入るように） */
#nmRows .nm-plan { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; line-height: 1.6; }
#nmRows .nm-plan + small, #nmRows td small { display: block; }
#nmRows td .nk-swap { font-size: 10px; margin-right: 4px; vertical-align: 1px; }
#nmRows tr.is-sat .nm-date { color: #2f5aa8; font-weight: 700; }
#nmRows tr.is-sun .nm-date { color: #b42318; font-weight: 700; }
#nmRows .nm-date small { font-weight: 400; color: inherit; opacity: .85; }
#nmRows tr.nm-r--holiday td { background: #fdf2f8; }
#nmRows tr.nm-r--paid_leave td { background: #f0f9f2; }
#nmRows tr.nm-r--absent td { background: #fdf3f2; }
#nmRows tr.is-sat.nm-r--work td { background: #f3f7fd; }
#nmRows tr.is-issue td { background: #fff8f6; }
/* 自動で足した休憩の印（2026-11-19・NK.breakText） */
.nk-auto { display: block; font-size: 11px; color: #6b5b00; }

/* ---- 未来のシフトの変更（2026-11-25）---- */
.nk-chip--wait { background: #fff4d6; border-color: #e3b341; color: #6b4a00; }
.nk-chip--sc-pending { background: #fff4d6; border-color: #e3b341; color: #6b4a00; }
.nk-chip--sc-approved, .nk-chip--sc-applied { background: #e4f5ea; border-color: #8cc9a1; color: #0b5c33; }
.nk-chip--sc-rejected { background: #fde8e8; border-color: #e3a0a0; color: #8a1f1f; }
.nk-chip--sc-withdrawn { background: #eef0f2; border-color: #c9ced3; color: #555; }
.nk-sc-h { margin-top: 26px; }

/* ---- 修正の申請：直すほうのチェック（出勤・退勤）（2026-11-25）---- */
.nk-ask__chk--big { display: inline-flex; align-items: center; gap: 8px; margin: 4px 18px 10px 0; padding: 8px 14px; border: 1px solid #b9c7bf; border-radius: 10px; font-weight: 700; font-size: 16px; background: #fff; cursor: pointer; }
.nk-ask__chk--big input { width: 20px; height: 20px; }
.nk-ask__chk--big:has(input:checked) { background: #e4f5ea; border-color: #2e8b57; }
.nk-ask [data-when][hidden] { display: none !important; }
