/* このファイルは toban/scripts/build.mjs が toban/src/toban.css から写したものです。直すときは toban/src/toban.css を直してから、node toban/scripts/build.mjs を実行してください。 */
/* Toban ライト：アプリとデモで同じ見た目（直したら node toban/scripts/build.mjs で写す） */
:root { --blue: #1f78c1; --blue-d: #155e99; --ink: #0d2238; --muted: #5b6f82; --line: #c9dcec; --bg: #eef6fd; --card: #fff;
  --red: #c62828; --red-bg: #fde4e4; --amber: #8a5a00; --amber-bg: #fff3cf; --green: #1b7a3a; --green-bg: #e3f4e8;
  --k: #e8f1fb; --k-ink: #1f5f99; --h: #fdeee3; --h-ink: #a3511b; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-d); }
.tb-wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px 48px; }
.tb-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; }
.tb-brand { font-weight: 800; font-size: 20px; color: var(--blue-d); letter-spacing: .02em; margin: 0; }
.tb-brand small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.tb-top .tb-spacer { flex: 1; }
.tb-user { font-size: 13px; color: var(--muted); }
.tb-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 0 0 16px; }
.tb-card > h2 { margin: 0 0 10px; font-size: 18px; }
.tb-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.tb-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; font-weight: 700; color: var(--blue-d); }
.tb-tabs button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.tb-tabs.small button { padding: 4px 12px; font-size: 14px; }
.tb-primary { background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px; font-weight: 800; }
.tb-primary:hover { background: var(--blue-d); }
.tb-primary:disabled { opacity: .6; cursor: default; }
.tb-actions button:not(.tb-primary), .tb-btn { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-weight: 700; color: var(--blue-d); }
.tb-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 0; }
.tb-wide { width: 100%; padding: 14px; font-size: 17px; }
.tb-link { background: none; border: 0; padding: 0; color: var(--blue-d); text-decoration: underline; font-weight: 700; }
.tb-msg { font-weight: 700; font-size: 14px; }
.tb-msg.ok { color: var(--green); } .tb-msg.ng, .tb-err { color: var(--red); font-weight: 700; }
.tb-help, .tb-muted { color: var(--muted); font-size: 14px; margin: 4px 0 8px; }
.tb-note { background: var(--amber-bg); color: #5b3c00; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0 0 12px; }
.red { color: var(--red); } .green { color: var(--green); }
.tb-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input:not([type]), select { border: 1px solid #9fbcd6; border-radius: 8px; padding: 7px 10px; background: #fff; min-height: 40px; }
input[type=number] { width: 5.2em; }
.tb-field { display: block; margin: 10px 0; font-size: 14px; font-weight: 700; }
.tb-field input { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.tb-inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 12px 4px 0; }
.tb-check { display: inline-flex; align-items: center; gap: 6px; margin: 4px 12px 4px 0; }
.tb-check input { width: 20px; height: 20px; }
.tb-list { margin: 6px 0; padding-left: 1.2em; font-size: 14px; }
.tb-list.red { color: var(--red); } .tb-list.warn { color: var(--amber); }
.tb-export { list-style: none; padding: 0; } .tb-export li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 8px 0; } .tb-export .tb-btn { min-width: 11em; text-align: center; }
.tb-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; } .tb-acts .tb-inline { margin: 0; }
.tb-nowrap { white-space: nowrap; }
.tb-legend { font-size: 13px; color: var(--muted); margin: 6px 0; }
.tb-legend .lv-short, .tb-legend .lv-warn { padding: 0 6px; border-radius: 4px; font-weight: 700; }

/* 月の表 */
.tb-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.tb-month { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 18px; }
.tb-month button { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 36px; height: 36px; }
.tb-status { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #e6edf4; color: var(--muted); }
.tb-status.pub { background: var(--green-bg); color: var(--green); }
.tb-gridwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; -webkit-overflow-scrolling: touch; }
.tb-grid { border-collapse: separate; border-spacing: 0; font-size: 11px; width: 100%; }
.tb-grid th, .tb-grid td { border-bottom: 1px solid #e3edf6; border-right: 1px solid #eef3f8; padding: 0; text-align: center; }
.tb-grid .tb-n { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; padding: 4px 8px; min-width: 96px; max-width: 120px; border-right: 1px solid var(--line); }
.tb-grid thead .tb-n { z-index: 3; }
.tb-grid .tb-n b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-grid .tb-n small { display: block; color: var(--muted); white-space: nowrap; }
.tb-lead { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; background: #fff0c2; color: #6b4a00; font-weight: 700; }
.tb-d { min-width: 33px; }
.tb-d.lv-short, .tb-d.lv-warn { color: var(--ink); }
.tb-d button { display: block; width: 100%; border: 0; background: none; padding: 4px 0; font-weight: 800; font-size: 13px; line-height: 1.2; }
.tb-d small { display: block; font-size: 10px; font-weight: 600; }
.wd0 small, .wd0.tb-cw, .tb-avd.wd0, th.wd0 { color: #c0392b; } .wd6 small, .wd6.tb-cw, .tb-avd.wd6, th.wd6 { color: #1f63b5; }
.tb-d.lv-short { background: var(--red-bg); } .tb-d.lv-warn { background: var(--amber-bg); } .tb-d.lv-closed { background: #f1f3f5; color: #9aa5b1; }
.tb-d.sel, .tb-c.sel { box-shadow: inset 0 0 0 2px var(--blue); }
.tb-c { height: 44px; }
.tb-c button { display: block; width: 100%; height: 44px; border: 0; background: none; padding: 0 1px; position: relative; font-size: 10.5px; line-height: 1.25; }
.tb-c.on button { background: #f4f9ff; }
.tb-c.off { background: repeating-linear-gradient(45deg, #f4f6f8, #f4f6f8 4px, #eceff2 4px, #eceff2 8px); }
.tb-c.off button { cursor: default; }
.tb-c.pr-bad button { box-shadow: inset 0 0 0 2px #e0a800; background: #fff8e0; }
.tb-c.pr-note button { box-shadow: inset 0 0 0 1px #d9c27a; }
.tb-t { font-variant-numeric: tabular-nums; font-weight: 600; }
.tb-pos { position: absolute; right: 1px; top: 1px; font-style: normal; font-size: 9px; line-height: 1; padding: 1px 2px; border-radius: 3px; }
.tb-pos.p0, .tb-seg.p0 { background: var(--k); color: var(--k-ink); } .tb-pos.p1, .tb-seg.p1 { background: var(--h); color: var(--h-ink); }
.tb-w { font-weight: 800; font-size: 14px; } .tb-w.x, b.x { color: var(--red); } .tb-w.s, b.s { color: #b7791f; }
.tb-sum { min-width: 52px; padding: 2px 6px !important; font-weight: 700; font-size: 12px; white-space: nowrap; }
.tb-sum small { display: block; color: var(--muted); font-weight: 400; }
.tb-lackrow th, .tb-lackrow td { height: 26px; font-weight: 800; font-size: 11px; }
.tb-lackrow .lv-short { background: var(--red); color: #fff; } .tb-lackrow .lv-warn { background: var(--amber-bg); } .tb-lackrow .lv-closed { color: #9aa5b1; }
.lv-short { background: var(--red-bg); color: var(--red); } .lv-warn { background: var(--amber-bg); color: var(--amber); }
.tb-summary p { margin: 8px 0; } .tb-summary p > * { display: inline-block; margin-right: 12px; } .tb-summary details { margin: 4px 0; font-size: 14px; } .tb-summary summary { cursor: pointer; color: var(--blue-d); font-weight: 700; }
.tb-wishgrid .tb-c { height: 30px; } .tb-avsum { text-align: left !important; font-weight: 400 !important; font-size: 11px !important; white-space: normal !important; min-width: 150px; }

/* 1日の様子 */
.tb-day h3 { margin: 4px 0 10px; font-size: 17px; }
.tb-heat { position: relative; margin: 0 0 12px; padding-top: 18px; }
.tb-hours { position: absolute; left: 76px; right: 0; top: 0; height: 16px; font-size: 11px; color: var(--muted); }
.tb-hours span { position: absolute; transform: translateX(-50%); }
.tb-hrow { display: flex; align-items: stretch; margin: 2px 0; }
.tb-hl { width: 76px; flex: none; font-size: 12px; font-weight: 700; padding-right: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-hcells { flex: 1; display: flex; gap: 1px; }
.tb-hcells span { flex: 1; min-width: 0; text-align: center; font-size: 11px; font-weight: 800; padding: 3px 0; border-radius: 3px; background: #f2f5f8; color: #8193a5; line-height: 1.2; }
.tb-hcells span small { font-weight: 400; font-size: 9px; }
.tb-hcells .ok { background: var(--green-bg); color: var(--green); } .tb-hcells .short { background: var(--red); color: #fff; }
.tb-bars { margin: 6px 0 10px; }
.tb-bar { display: flex; align-items: center; margin: 3px 0; }
.tb-bl { width: 76px; flex: none; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.tb-bl small { margin-left: 3px; color: #6b4a00; background: #fff0c2; border-radius: 3px; padding: 0 3px; }
.tb-track { position: relative; flex: 1; height: 28px; background: #f6f9fc; border-radius: 6px; }
.tb-seg { position: absolute; top: 2px; height: 24px; border: 0; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; padding: 0 4px; text-align: left; }
.tb-seg.p0 { background: #cfe3f8; } .tb-seg.p1 { background: #fbdcc6; }
.tb-brk { position: absolute; top: 2px; height: 24px; background: repeating-linear-gradient(135deg, rgba(255,255,255,.85), rgba(255,255,255,.85) 3px, rgba(255,255,255,.4) 3px, rgba(255,255,255,.4) 6px); border-radius: 4px; pointer-events: none; }
.tb-reasons summary { cursor: pointer; font-weight: 700; color: var(--blue-d); font-size: 14px; }

/* 勤務を直す窓 */
.tb-modal { position: fixed; inset: 0; background: rgba(13, 34, 56, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.tb-dialog { background: #fff; border-radius: 14px; padding: 18px; width: min(420px, 100%); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.tb-dialog h3 { margin: 0 0 8px; font-size: 17px; }
.tb-dialog label { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 14px; }

/* 希望を出す（スマホ） */
.tb-wish h3 { font-size: 16px; margin: 14px 0 6px; }
.tb-who { font-weight: 800; margin: 0; color: var(--blue-d); }
.tb-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tb-cw { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.tb-cd { aspect-ratio: 1 / 1; min-height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; line-height: 1.1; padding: 0; }
.tb-cd b { font-size: 16px; height: 18px; }
.tb-cd.x { background: var(--red-bg); border-color: #f0a8a8; } .tb-cd.x b { color: var(--red); }
.tb-cd.s { background: #fff4dc; border-color: #edd08f; } .tb-cd.s b { color: #b7791f; }
.tb-cd.off { background: #f1f3f5; color: #9aa5b1; cursor: default; } .tb-cd.off b { font-size: 11px; }
.tb-cd.wd0 { color: #c0392b; } .tb-cd.wd6 { color: #1f63b5; }
.tb-av { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid #eef3f8; }
.tb-avd { width: 1.6em; font-weight: 800; }
.tb-avt { display: inline-flex; align-items: center; gap: 4px; } .tb-avt.hide { display: none; }
.tb-count { font-weight: 700; color: var(--muted); font-size: 14px; }

/* 決まったシフト（従業員） */
.tb-days { list-style: none; padding: 0; margin: 0; }
.tb-days li { display: flex; gap: 12px; padding: 8px 6px; border-bottom: 1px solid #eef3f8; }
.tb-days li.mine { background: #eef6ff; border-radius: 8px; }
.tb-days li.off { color: #9aa5b1; }
.tb-dd { width: 2.6em; flex: none; text-align: center; font-weight: 800; font-size: 18px; line-height: 1.1; }
.tb-dd small { display: block; font-size: 11px; }
.tb-days p { margin: 0; }
.tb-my { font-weight: 800; font-size: 16px; color: var(--blue-d); } .tb-my small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.tb-others { font-size: 12px; color: var(--muted); }

/* 決まり */
.tb-rules section { border-top: 1px solid #e3edf6; padding: 12px 0; }
.tb-rules h3 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.tb-no { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; align-items: center; justify-content: center; flex: none; }
.tb-hourtable { border-collapse: collapse; font-size: 14px; }
.tb-hourtable th, .tb-hourtable td { padding: 3px 8px 3px 0; text-align: left; }
.tb-need { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px; margin: 8px 0; }
.tb-need label { display: flex; align-items: center; justify-content: space-between; gap: 4px; background: #f6f9fc; border-radius: 8px; padding: 3px 6px; font-size: 13px; }
.tb-need label.has { background: #e6f0fb; font-weight: 700; }
.tb-need input { width: 3.6em; min-height: 34px; padding: 4px 6px; }
.tb-bulk { font-size: 14px; }
.tb-bulk button { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 700; color: var(--blue-d); }
.tb-sticky { position: sticky; bottom: 0; background: rgba(255,255,255,.96); padding: 10px 0; border-top: 1px solid var(--line); }

/* 従業員の一覧 */
.tb-staff { width: 100%; border-collapse: collapse; font-size: 14px; }
.tb-staff th, .tb-staff td { border-bottom: 1px solid #e3edf6; padding: 8px 6px; text-align: left; vertical-align: middle; }
.tb-staff input[type=text] { width: 9em; }
.tb-linkbox { display: flex; gap: 6px; } .tb-linkbox input { flex: 1; min-width: 0; font-size: 13px; }

/* ログイン */
.tb-login { max-width: 420px; margin: 40px auto; }

@media (max-width: 640px) {
  .tb-wrap { padding: 0 10px 40px; }
  .tb-card { padding: 14px 12px; border-radius: 12px; }
  .tb-grid .tb-n { min-width: 78px; max-width: 86px; padding: 3px 5px; }
  .tb-hl, .tb-bl { width: 66px; font-size: 11px; } .tb-hours { left: 66px; }
  .tb-hcells span small { display: none; }
  .tb-staff, .tb-staff tbody, .tb-staff tr, .tb-staff td { display: block; } .tb-staff thead { display: none; }
  .tb-staff tr { border-bottom: 1px solid var(--line); padding: 6px 0; } .tb-staff td { border: 0; padding: 3px 0; }
}
