/* v1053：部内アプリ連携（renkei/）の画面の共通の見た目 */
:root { --bg: #f4f6f9; --panel: #ffffff; --text: #1f2933; --muted: #6b7785; --line: #dde3ea; --primary: #1d4ed8; --primary-dark: #1e40af; --danger: #c62828; --header: #0f1f3a; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Yu Gothic UI", "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
header { background: var(--header); color: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 40; }
header h1 { font-size: 18px; margin: 0; font-weight: 600; letter-spacing: .05em; }
header .crumb { font-size: 12px; opacity: .7; margin-bottom: 2px; }
.menu-back { margin-left: auto; font-family: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 4px; cursor: pointer; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.menu-back:hover { background: rgba(255,255,255,.12); }
header .mode-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; margin-left: 10px; vertical-align: middle; }
header .mode-badge.view { background: rgba(255,255,255,.15); color: #dbe4f3; }
header .mode-badge.edit { background: #fff1dc; color: #9a5b00; }
main { padding: 20px 24px 40px; }
.wrap { max-width: 640px; margin: 0 auto; }
button { font-family: inherit; font-size: 13px; cursor: pointer; padding: 7px 14px; border-radius: 4px; border: 1px solid #a9bdf0; background: #e8efff; color: #1e40af; font-weight: 600; white-space: nowrap; }
button:hover { background: #d6e2ff; border-color: #8aa6ea; }
button.primary { background: var(--primary); color: #fff; border-color: var(--primary); min-width: 90px; }
button.primary:hover { background: var(--primary-dark); }
button:disabled, button:disabled:hover { cursor: not-allowed; background: #f1f3f6; color: #a7afba; border-color: #dde3ea; }
.bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; }
.bar .spacer { flex: 1; }
.dirty { color: #9a5b00; font-size: 12px; font-weight: 600; }
.dirty[hidden] { display: none; }
body.viewing .ed { display: none !important; }
body:not(.viewing) .vw { display: none !important; }
input[type=text], select { font: inherit; font-size: 14px; height: 34px; padding: 0 8px; border: 1px solid #cfd6df; border-radius: 4px; background: #fff; color: var(--text); }
input[type=text]:focus, select:focus { outline: none; border-color: #93b4f5; }
body.viewing input[type=text], body.viewing select { border-color: transparent; background: transparent; pointer-events: none; appearance: none; -webkit-appearance: none; }
/* 大きなボタン（メニュー） */
.btns { display: grid; gap: 12px; }
.btns a, .btns button.big { display: flex; align-items: center; gap: 12px; width: 100%; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 16px; font-weight: 700; text-align: left; }
.btns a:hover, .btns button.big:hover { border-color: #93b4f5; background: #f5f8ff; }
.btns a::after { content: "›"; margin-left: auto; color: #9aa4b1; font-size: 22px; font-weight: 400; }
.btns .lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
/* 表 */
table.lk { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid #cfd6df; border-radius: 6px; overflow: hidden; }
table.lk th, table.lk td { border-bottom: 1px solid #e3e8ee; padding: 4px 10px; height: 40px; text-align: left; vertical-align: middle; }
table.lk tr:last-child > * { border-bottom: 0; }
table.lk thead th { background: #e8efff; color: #1e3a8a; font-size: 13px; font-weight: 700; height: 36px; }
table.lk td input[type=text], table.lk td select { width: 100%; }
table.lk td.c { text-align: center; width: 1%; white-space: nowrap; }
table.lk .del { padding: 0; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: #9aa4b1; font-size: 16px; }
table.lk .del:hover { background: #fdecec; color: #b42318; }
table.lk tr.off td:not(.c) { color: #9aa4b1; }
.sec-h { margin: 22px 2px 8px; font-size: 14px; font-weight: 700; }
.sec-h:first-child { margin-top: 4px; }
.row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.row label { font-weight: 700; white-space: nowrap; }
.addrow { margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #0f1f3a; color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; }
/* スマホ：入力は 16px（タップで拡大しないように） */
html.hs3-mfit input[type=text], html.hs3-mfit select { font-size: 16px; }
html.hs3-mfit table.lk th, html.hs3-mfit table.lk td { padding: 4px 6px; }
a.back { display: inline-block; margin: 0 0 10px 2px; color: #1e40af; font-weight: 600; font-size: 13px; text-decoration: none; }
a.back:hover { text-decoration: underline; }
input[type=text]::placeholder { color: #c4cad3; opacity: 1; }   /* v1056：入力例は薄く */
body.viewing input[type=text]::placeholder { color: transparent; }   /* 参照中は入力例を出さない */
/* v1057：変換の表（見出し 2 段）。v1058：列の区切りに罫線（勤務｜shift｜remarks）・表示順の変更は部員管理と同じ */
table.lk.cv thead tr:first-child th { background: #dbe6ff; text-align: center; height: 30px; border-bottom: 1px solid #c7d6f7; }
table.lk.cv thead tr:first-child th:nth-child(2), table.lk.cv thead tr:nth-child(2) th:nth-child(1), table.lk.cv thead tr:nth-child(2) th:nth-child(2) { border-right: 1px solid #c7d6f7; }
table.lk.cv thead tr:first-child th.order-th { border-right: 1px solid #c7d6f7; }
table.lk.cv tbody td:nth-child(1), table.lk.cv tbody td:nth-child(2), table.lk.cv tbody td:nth-child(3) { border-right: 1px solid #e3e8ee; }
th.order-th { cursor: pointer; text-align: center; width: 1%; white-space: nowrap; }
th.order-th a { color: var(--primary); text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
th.order-th:hover a { text-decoration: underline; }
th.order-th .ico { font-size: 10px; border: 1px solid #b9c8ee; background: #fff; color: var(--primary); border-radius: 3px; padding: 0 5px; font-weight: 600; }
td.order { width: 1%; white-space: nowrap; text-align: center; padding: 4px 8px; }
td.order .no { display: inline-block; min-width: 24px; color: #6b7785; font-variant-numeric: tabular-nums; }
.reorder-bar { display: none; align-items: center; gap: 12px; flex: 1 1 100%; color: #7a5200; font-size: 13px; flex-wrap: wrap; }
.reorder-bar .spacer { flex: 1; }
body.reordering .reorder-bar { display: flex; }
body.reordering .bar { background: #fff8e1; border-color: #f5d27a; }
body.reordering .bar > :not(.reorder-bar) { display: none !important; }
body.reordering th.order-th { background: #fff1c2 !important; }
body.reordering th.order-th .ico { background: var(--primary); color: #fff; border-color: var(--primary); }
.handle { display: inline-block; width: 22px; text-align: center; color: #9aa5b4; cursor: grab; font-size: 16px; vertical-align: middle; user-select: none; }
.handle:active { cursor: grabbing; }
td.order .mv { width: 26px; height: 24px; padding: 0; font-size: 10px; line-height: 1; color: #3d4a5c; vertical-align: middle; margin-left: 2px; }
tr.dragging { opacity: .4; }
tr.drop-before td { box-shadow: inset 0 3px 0 var(--primary); }
tr.drop-after td { box-shadow: inset 0 -3px 0 var(--primary); }
/* v1390（536・537）：ピンクの人（html.tp-pink。ライト・ダークとも）は、飾りの薄い青（札・行・枠）と紺・青の文字をグレーに。ダークは dark.js がこのグレーを暗い色に置き換える。完全に取り除くときはこのまとまりを消す */
html.tp-pink:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5):not(#_p6) table.lk.cv thead tr:first-child th { background: #e4e4e4 !important; color: #333 !important; }
html.tp-pink:not(#_p1):not(#_p2):not(#_p3):not(#_p4):not(#_p5):not(#_p6) table.lk thead th { color: #333 !important; }
