/* 見た目は「勤怠管理 画面デザイン」（README.md 第27章）に合わせている */
:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #1b2733;
  --sub: #5a6878;
  --label: #2e3b4a;
  --line: #dce2ea;
  --line-strong: #8c98a8;
  --navy: #14304f;
  --primary: #1f5fbf;
  --primary-dark: #174a96;
  --primary-bg: #e8f0fc;
  --ok: #17602d;
  --ok-bg: #e6f4ea;
  --warn: #7e3f00;
  --warn-bg: #fff1e0;
  --danger: #c62828;
  --danger-text: #b42318;
  --danger-bg: #fdecec;
  --holiday: #4535a8;
  --holiday-bg: #eeecfb;
  --leave: #055e60;
  --leave-solid: #08787a;
  --leave-bg: #e0f4f3;
  --streak: #4d3b00;
  --streak-bg: #fff6cc;
  --streak-line: #e2b500;
  --select: #ffe58a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px; line-height: 1.75; letter-spacing: .02em;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; }
.ico { display: inline-block; vertical-align: -0.15em; flex: none; }

/* ===== ヘッダー ===== */
.top {
  background: var(--navy); color: #fff; padding: 10px 16px; min-height: 56px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.top .title { font-weight: 700; font-size: 18px; }
.top .title small { font-weight: 500; font-size: 12px; background: rgba(255,255,255,.16); border-radius: 6px; padding: 2px 8px; margin-left: 8px; }
.top .branch { font-size: 13px; color: #c9d6e6; display: flex; align-items: center; gap: 8px; }
.top select { height: 36px; border-radius: 8px; border: none; padding: 0 10px; font-size: 14px; color: var(--text); min-width: 130px; }
.top .who { margin-left: auto; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.top .who button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 13px; }
.fakebar { background: #8f4700; color: #fff; text-align: center; font-size: 13px; padding: 4px 8px; }
.fakebar a { color: #fff; }

nav.tabs { background: #fff; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; padding: 0 8px; }
nav.tabs a {
  padding: 12px 14px; color: #3f4c5c; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; font-size: 15px;
  display: flex; align-items: center; gap: 6px;
}
nav.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
nav.tabs .ico { display: none; }
/* メンバー画面：スマートフォンでは下に並べる（親指で押しやすい） */
@media (max-width: 767px) {
  nav.tabs.member {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 0 0 env(safe-area-inset-bottom, 0);
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: none; border-top: 1px solid var(--line);
  }
  nav.tabs.member a { flex-direction: column; gap: 2px; padding: 8px 0 10px; font-size: 12px; border-bottom: none; color: var(--sub); }
  nav.tabs.member a.on { color: var(--primary); }
  nav.tabs.member .ico { display: block; }
  body.member-page { padding-bottom: 76px; }
}

main { max-width: 1200px; margin: 0 auto; padding: 20px 16px; }
main.narrow { max-width: 600px; }
@media (min-width: 900px) { main { padding: 24px 40px; } }
footer { text-align: center; font-size: 12px; color: var(--sub); padding: 24px 16px 40px; }

h1 { font-size: 22px; margin: 4px 0 14px; }
h2 { font-size: 18px; margin: 30px 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h3 { font-size: 16px; margin: 16px 0 6px; }
/* 見出しの件数（「○件」「○人」）は丸い札にする */
h2 > .muted { font-size: 13px; font-weight: 700; color: #3f4c5c; background: #e6eaf0; border-radius: 999px; padding: 0 10px; line-height: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; margin-bottom: 20px; }
.muted { color: var(--sub); font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }

/* ===== ボタン ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  border: 1px solid #b7c0cc; background: #fff; color: var(--text);
  border-radius: 10px; padding: 0 16px; cursor: pointer; text-decoration: none; font-size: 15px; font-weight: 500;
}
.btn:hover { background: #f0f3f7; color: var(--text); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--primary-dark); color: #fff; }
.btn.danger { background: #fff; border-color: #e0a39e; color: var(--danger-text); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.big { min-height: 56px; font-size: 18px; width: 100%; }
.btn.holiday { background: #5b4bc4; border-color: #5b4bc4; color: #fff; font-weight: 700; }
.btn.leave { background: var(--leave-solid); border-color: var(--leave-solid); color: #fff; font-weight: 700; }
.btn.streak { border-color: #c9a000; color: var(--streak); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 打刻画面 ===== */
.punch-card { display: flex; flex-direction: column; gap: 18px; }
.punch-date { text-align: center; font-size: 17px; color: #3f4c5c; }
.punch-clock { text-align: center; font-size: 52px; font-weight: 700; letter-spacing: 2px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.status { text-align: center; font-size: 26px; font-weight: 700; padding: 12px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.status.notyet { background: #eef1f5; color: #3f4c5c; }
.status.working { background: var(--ok-bg); color: var(--ok); }
.status.done { background: var(--primary-bg); color: var(--primary-dark); }
.status.holiday { background: var(--holiday-bg); color: var(--holiday); }
.status.leave { background: var(--leave-bg); color: var(--leave); }
.pb {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 96px; border-radius: 18px; border: none;
  font-size: 30px; font-weight: 700; color: #fff; background: var(--primary); box-shadow: 0 3px 0 var(--primary-dark); cursor: pointer;
}
.pb:hover { background: var(--primary-dark); }
.pb.mid { height: 72px; font-size: 22px; }
.pb:disabled, .pb.off { height: 56px; background: #e6eaf0; color: #6b7684; font-size: 17px; font-weight: 500; box-shadow: none; cursor: not-allowed; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.stat .k { font-size: 14px; color: var(--sub); line-height: 1.4; }
.stat .v { font-size: 22px; font-weight: 700; line-height: 1.3; margin-top: 4px; }
.stats.boxed .stat { background: #f7f9fb; border-radius: 10px; padding: 10px 12px; }
.hint { font-size: 14px; color: var(--sub); line-height: 1.7; background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 0; }
.span-now { background: var(--primary-bg); color: var(--primary-dark); border-radius: 12px; padding: 10px 14px; text-align: center; }
.tip { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: #3f4c5c; }
.rec { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 10px; }
.rec dt { color: var(--sub); }
.rec dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
/* パソコンでは、打刻の欄と数字の欄を左右に並べる */
@media (min-width: 900px) {
  .punch-layout { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .punch-clock { font-size: 64px; }
  main.punch-main { max-width: 1100px; }
}

/* ===== お知らせ ===== */
.notice { border-radius: 14px; padding: 16px; margin-bottom: 20px; font-size: 15px; }
.notice:has(> .ico) { display: flex; gap: 10px; align-items: flex-start; }
.notice > .nb { flex: 1; min-width: 0; }
.notice .ico { margin-top: 2px; }
.notice.danger { background: var(--danger-bg); color: #8e1b1b; border: 1px solid #f0b4b4; }
.notice.warn { background: var(--warn-bg); color: #6b3500; border: 1px solid #e9a659; }
.notice.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #b8dfc2; }
.notice.info { background: #eef1f5; color: var(--navy); border: 1px solid #aeb8c5; }
.notice.streak { background: var(--streak-bg); color: var(--streak); border: 1px solid var(--streak-line); }
.notice.ret { background: #fbebd9; color: #5e3200; border: 1px solid #d9a066; }
.notice ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.notice a { font-weight: 700; }

/* ===== 表 ===== */
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 13px 16px; border-bottom: 1px solid #e8ecf1; text-align: left; white-space: nowrap; }
th { background: #f0f3f7; font-weight: 700; font-size: 13px; color: #3f4c5c; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.memo { white-space: normal; min-width: 120px; }
tr.missing td { background: #fdf3f3; }
tr.weekend td:first-child { color: var(--sub); }
tr.total td { font-weight: 700; background: #f0f3f7; border-top: 2px solid var(--line-strong); }
tr.warnrow td { background: #fff7ec; }
tr.streakrow td { background: #fffbe6; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f5f8ff; }

/* ===== 印（色だけでなく文字・形・マークでも見分ける） ===== */
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 0 7px; margin-right: 3px; line-height: 20px; white-space: nowrap; border: 1px solid transparent; }
.tag.miss { background: var(--danger); color: #fff; }
.tag.ot { background: var(--warn-bg); color: var(--warn); border-color: #e39a4c; }
.tag.mod { background: #eef1f5; color: #3f4c5c; border-color: #aeb8c5; }
.tag.req { background: #fff; color: var(--primary); border: 1.5px dashed var(--primary); }
.tag.ret { background: #fbebd9; color: #6b3800; border-color: #d9a066; }
.tag.holiday { background: var(--holiday-bg); color: var(--holiday); border-color: #b9b1ee; }
.tag.leave { background: var(--leave-bg); color: var(--leave); border-color: #8fcfcb; }
.tag.closed { background: var(--navy); color: #fff; }
.tag.changed { background: #fbe7f2; color: #7a1652; border-color: #e3a3c8; }
.tag.stop { background: #f1f2f4; color: #4b5563; border: 1px dashed #8c95a1; }
.tag.streak { background: var(--streak-bg); color: var(--streak); border-color: var(--streak-line); }
.tag.now { background: var(--ok-bg); color: var(--ok); border-color: #9fd3ae; }

/* ===== フォーム ===== */
label.f { display: block; margin: 14px 0 6px; font-size: 15px; color: var(--label); font-weight: 700; }
label.f .sub, .f-sub { font-size: 13px; color: var(--sub); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], input[type=month], input[type=datetime-local], select, textarea {
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; min-height: 48px; background: #fff; max-width: 100%; font-size: 16px; color: var(--text);
}
textarea { padding: 10px 12px; }
input.full, select.full, textarea.full { width: 100%; }
textarea { min-height: 76px; }
.hm { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.hm select { width: 90px; }
.err { color: var(--danger-text); font-size: 14px; font-weight: 700; margin-top: 6px; white-space: pre-wrap; }
.err:empty { display: none; }
.okmsg { color: var(--ok); font-size: 14px; margin-top: 6px; white-space: pre-wrap; }

/* ===== 月の切り替え ===== */
.monthnav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.monthnav .cur { font-size: 20px; font-weight: 700; min-width: 130px; text-align: center; }

/* ===== 勤務履歴（スマートフォンでも読みやすい1日1行のリスト） ===== */
.days { list-style: none; margin: 0 0 14px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.day { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-top: 1px solid #e8ecf1; }
.day:first-child { border-top: none; }
.day .d { font-weight: 700; font-size: 17px; line-height: 1.2; }
.day .d small { display: block; font-weight: 400; font-size: 13px; color: var(--sub); }
.day .d.sun small { color: var(--danger-text); }
.day .d.sat small { color: var(--primary); }
.day .t { font-size: 15px; font-variant-numeric: tabular-nums; min-width: 0; }
.day .t small { display: block; font-size: 13px; color: var(--sub); overflow-wrap: anywhere; }
.day .w { font-weight: 700; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.day.missing { background: var(--danger-bg); }
.day.off { background: #fafbfc; }
.day .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

/* ===== カレンダー ===== */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .h { text-align: center; font-size: 13px; color: var(--sub); padding: 2px 0; }
.cal .h:first-child { color: var(--danger-text); }
.cal .h:nth-child(7) { color: var(--primary); }
.cal .d {
  min-height: 66px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 4px 2px; font-size: 13px;
  cursor: pointer; user-select: none; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.cal .d .n { font-weight: 700; font-size: 16px; line-height: 1.2; }
.cal .d .s { font-size: 11px; font-weight: 700; display: block; line-height: 1.2; text-align: center; }
.cal .d.empty { border: none; background: transparent; cursor: default; }
.cal .d.dis { background: #f0f2f5; color: #8a94a1; cursor: not-allowed; }
.cal .d.holiday { background: var(--holiday-bg); border-color: #8e80e0; color: var(--holiday); }
.cal .d.leave { background: var(--leave-bg); border-color: #5db8b3; color: var(--leave); }
.cal .d.work { background: #f6f8fa; }
.cal .d.work .s { color: var(--sub); font-weight: 500; }
.cal .d.missing { background: var(--danger-bg); border-color: #d35050; color: #a31f1f; }
.cal .d.today { box-shadow: inset 0 0 0 3px var(--primary); }
.cal .d.sel { background: var(--select) !important; border: 2px solid #a07d00; color: var(--streak); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: #3f4c5c; margin: 14px 0; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.calbar { position: sticky; bottom: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 12px; box-shadow: 0 -2px 10px rgba(20,48,79,.08); display: flex; flex-direction: column; gap: 10px; }
.calbar .acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.calbar .acts .btn { min-height: 52px; font-size: 16px; }
@media (max-width: 767px) { body.member-page .calbar { bottom: 76px; } }

/* ===== 有給 ===== */
.big-num { font-size: 44px; font-weight: 700; line-height: 1.1; }
.big-num small { font-size: 20px; }
.meter { height: 12px; background: #e6eaf0; border-radius: 6px; overflow: hidden; margin: 6px 0; }
.meter i { display: block; height: 100%; background: var(--leave-solid); border-radius: 6px; }
.meter.warn i { background: #c25e00; }

/* ===== ログイン ===== */
.login { max-width: 420px; margin: 0 auto; }
.login-top { background: var(--navy); color: #fff; padding: 40px 24px 64px; display: flex; flex-direction: column; align-items: center; gap: 10px; margin: -20px -16px 0; }
.login-top .logo { width: 64px; height: 64px; border-radius: 16px; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.login-top .nm { font-size: 22px; font-weight: 700; }
.login .card.main { margin-top: -44px; position: relative; box-shadow: 0 4px 16px rgba(20,48,79,.08); padding: 22px 20px; }
.login h1 { margin: 0 0 6px; font-size: 20px; }
.accounts { font-size: 13px; }
.accounts td { padding: 4px 6px; }

/* ===== 管理画面ホーム ===== */
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.counts .stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.counts .stat .v { font-size: 28px; }

.mail { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: #fff; font-size: 14px; }
.mail .sub { font-weight: 700; }
.mail pre { white-space: pre-wrap; margin: 4px 0; font-family: inherit; }

/* ===== 確認ダイアログ ===== */
.modal-back { position: fixed; inset: 0; background: rgba(15, 30, 45, .5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.modal { background: var(--card); border-radius: 16px; padding: 20px; max-width: 440px; width: 100%; box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.modal-msg { font-size: 17px; font-weight: 700; }
.modal .acts { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 16px; }
.modal .acts .btn { min-height: 48px; width: 100%; }
@media (min-width: 600px) { .modal .acts { flex-direction: row; justify-content: flex-end; } .modal .acts .btn { width: auto; } }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #7fb0ff; outline-offset: 2px; }

/* ===== 印刷 ===== */
@media print {
  .top, nav.tabs, footer, .noprint, .fakebar { display: none !important; }
  body { background: #fff; font-size: 11px; padding: 0 !important; }
  main { max-width: none; padding: 0; }
  .tablewrap { border: none; overflow: visible; }
  th, td { padding: 3px 5px; }
  .card { border: none; padding: 0; }
  .tag { border: 1px solid #555; }
}

/* ===== 打刻漏れのお知らせ：1件ずつ白い枠に分け、行き先はボタンにする（読みやすさのため） ===== */
.miss-box { background: var(--danger-bg); border: 1px solid #f0b4b4; border-radius: 16px; padding: 16px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.miss-box .ttl { display: flex; align-items: center; gap: 8px; color: #8e1b1b; font-size: 17px; font-weight: 700; line-height: 1.4; }
.miss-item { background: #fff; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.miss-item .when { font-size: 17px; font-weight: 700; line-height: 1.4; }
.miss-item .what { font-size: 15px; color: #3f4c5c; line-height: 1.5; margin-top: -6px; }
.lk { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid #c9d3e0; background: #fff; color: var(--primary); font-size: 15px; font-weight: 700; text-decoration: none; }
.lk:hover { background: #f5f8ff; }
.lks { display: flex; flex-direction: column; gap: 8px; }

/* ===== 有給の内訳（付与分ごとの枠）と取得した日 ===== */
.grants { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 8px; }
.grant { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grant .t { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; }
.grant .k { font-size: 13px; color: var(--sub); }
.grant b { font-size: 20px; }
.grant b.rest { color: var(--leave); }
.grant .e { grid-column: 1 / -1; font-size: 14px; color: var(--sub); }
.hist { list-style: none; margin: 0 0 14px; padding: 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.hist li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 0; border-top: 1px solid #e8ecf1; }
.hist li:first-child { border-top: none; }

/* ===== 管理画面ホームの一覧：スマートフォンでは1件ずつのカードにする ===== */
@media (max-width: 767px) {
  .tablewrap.cards { background: transparent; border: none; overflow: visible; }
  .tablewrap.cards table, .tablewrap.cards tbody { display: block; }
  .tablewrap.cards thead { display: none; }
  .tablewrap.cards tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
  }
  .tablewrap.cards tr.missing { border-left: 5px solid var(--danger); }
  .tablewrap.cards tr.missing td, .tablewrap.cards tr.streakrow td, .tablewrap.cards tr.warnrow td { background: transparent; }
  .tablewrap.cards tr.streakrow { background: #fffbe6; border-color: var(--streak-line); }
  .tablewrap.cards tr.warnrow { background: #fff7ec; }
  .tablewrap.cards td { display: block; grid-column: 1 / -1; padding: 2px 0; border: none; white-space: normal; text-align: left; font-size: 15px; }
  .tablewrap.cards td:empty { display: none; }
  .tablewrap.cards td:nth-child(1) { grid-column: 1; font-weight: 700; font-size: 17px; }
  .tablewrap.cards td:nth-child(2) { grid-column: 2; font-size: 13px; color: var(--sub); align-self: center; }
  .tablewrap.cards td[data-label]::before { content: attr(data-label) "　"; color: var(--sub); font-size: 13px; }
  .tablewrap.cards td:last-child .btn { width: 100%; min-height: 44px; margin-top: 8px; }
}

/* ===== 列の多い表（月末締めの集計など）：パソコンの幅に収まるよう、すき間を少し詰め、見出しは折り返す ===== */
.tablewrap.wide th, .tablewrap.wide td { padding: 12px 10px; }
.tablewrap.wide th { white-space: normal; line-height: 1.4; vertical-align: bottom; }

/* 見出しの件数の札：種類ごとの色（1件以上のとき） */
h2 > .muted.hot { background: var(--danger); color: #fff; }
h2 > .muted.warn { background: #ffe7c2; color: var(--warn); }
h2 > .muted.streak { background: var(--select); color: var(--streak); }

/* ===== 2列の並び（パソコンでは左右、スマートフォンでは上下） ===== */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split.side { grid-template-columns: minmax(0, 1fr) 360px; }
  .split.side.wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}
.acts2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acts2 .btn { min-height: 48px; }

/* 必須の印と、目立たせる入力欄 */
.reqmark { color: var(--danger-text); font-size: 12px; font-weight: 700; margin-left: 6px; border: 1px solid #e0a39e; border-radius: 4px; padding: 0 5px; }
input.need { border: 2px solid var(--primary); }

/* 選んでいる行・利用停止の行 */
tr.selrow td { background: var(--primary-bg) !important; font-weight: 700; }
tr.selrow td:first-child { box-shadow: inset 4px 0 0 var(--primary); }
tr.stoprow td { color: var(--sub); background: #fafafb; }

/* 札：年5日が足りない人・役割 */
.tag.warnsolid { background: #c25e00; color: #fff; }
.tag.role-admin { background: var(--navy); color: #fff; }
.tag.role-manager { background: var(--primary-bg); color: var(--primary-dark); border-color: #a9c3ee; }
.tag.role-member { background: #fff; color: #3f4c5c; border-color: #aeb8c5; }
