/* 勤務実績：上に月送り、左に名簿、右に中身 */
.attendance-report {
  /* .main-content は縦flex。cross軸に margin:auto があると stretch が効かず中身の幅に縮むため、width:100% を明示する */
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px 24px 24px;
  box-sizing: border-box;
  color: #263238;
}

/* 月送り（左の列のいちばん上）。締めはこのすぐ下に出す */
/* 締めの枠が「名前で探す」と同じく左の列の端から端まで来るよう、左右の余白はつけない */
.attendance-report__month-bar { display: grid; justify-items: center; gap: 6px; padding: 4px 0 12px; border-bottom: 1px solid #e3e6ef; }
/* 矢印は連打するので、月の文字の長さ（9月・10月）で位置が動かないよう、幅を決めた3列にする */
/* その月の全体を見るボタン（月送りの下、締めの箱と同じ幅） */
.attendance-report__overview-link { display: block; box-sizing: border-box; width: 100%; margin-top: 2px; padding: 7px 12px; border: 1px solid #d9dbea; border-radius: 8px; color: #3f4775; background: #fff; font-weight: 700; text-align: center; text-decoration: none; }
.attendance-report__overview-link:hover { background: #f4f6fb; }
.attendance-report__overview-link--active { border-color: #2f5fb3; color: #1f4b99; background: #e8eefb; }
/* 締め：バッジとボタンだけの1行。バッジを押すとくわしく（だれがいつ締めたか・記録）が下に重なって開く */
/* 締め：箱やバッジを重ねず、はんこ1つで状態を見せる。締めた月は朱色の「済」、締める前は点線の空いた丸（まだ押していない） */
.attendance-report__month-bar .attendance-closing-status { position: relative; flex-wrap: nowrap; gap: 8px; width: 100%; margin: 4px 0 0; padding: 0 2px; border: 0; background: none; box-sizing: border-box; }
.attendance-closing-status__more { min-width: 0; }
.attendance-closing-status__summary { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 2px 4px 2px 0; border-radius: 8px; cursor: pointer; list-style: none; }
.attendance-closing-status__summary::-webkit-details-marker { display: none; }
.attendance-closing-status__summary:hover .attendance-closing-status__badge { text-decoration: underline; text-underline-offset: 3px; }
.attendance-closing-status__seal { display: inline-grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; box-sizing: border-box; font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; font-size: 17px; font-weight: 700; line-height: 1; }
.attendance-closing-status--closed .attendance-closing-status__seal { border: 2.5px double #c8323a; color: #c8323a; background: radial-gradient(circle, rgba(200, 50, 58, .06) 40%, transparent 72%); transform: rotate(-12deg); }
.attendance-closing-status--open .attendance-closing-status__seal { border: 1.5px dashed #b4bccd; }
.attendance-closing-status__label { display: grid; min-width: 0; line-height: 1.3; text-align: left; }
.attendance-report__month-bar .attendance-closing-status__badge { padding: 0; border-radius: 0; background: none; font-size: 14px; }
.attendance-closing-status__badge--closed { color: #9b2730; }
.attendance-closing-status__badge--open { color: #3f4775; }
.attendance-closing-status__meta { overflow: hidden; color: #8a93a6; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
/* ボタンは小さく。締めるは紺、解除は文字だけ（危ない操作なので目立たせない） */
.attendance-report__month-bar .attendance-closing-status__button { padding: 5px 12px; border-radius: 999px; font-size: 13px; }
/* 1人だけ解除中の人。締め直し忘れに気づけるよう、はんこの下に黄色で出しっぱなしにする */
.attendance-report__month-bar .attendance-closing-status:has(.attendance-closing-status__unlocked) { flex-wrap: wrap; }
.attendance-closing-status__unlocked { flex-basis: 100%; padding: 6px 10px; border: 1px solid #f0c36d; border-radius: 8px; background: #fff8e8; font-size: 12px; }
.attendance-closing-status__unlocked-title { margin: 0; color: #8a5a00; font-weight: 700; }
.attendance-closing-status__unlocked-list { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 2px 0 0; padding: 0; list-style: none; }
.attendance-closing-status__unlocked-list a { color: #8a5a00; font-weight: 700; }
.attendance-report__unlocked-notice { margin: 0 0 10px; padding: 8px 12px; border: 1px solid #f0c36d; border-radius: 8px; color: #6b4700; background: #fff8e8; font-size: 13px; font-weight: 700; line-height: 1.5; }
.attendance-closing-status__more-body { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; width: 100%; padding: 10px 12px; border: 1px solid #d9dbea; border-radius: 8px; box-sizing: border-box; background: #fff; box-shadow: 0 6px 20px rgba(31, 41, 55, 0.15); }
.attendance-closing-status__more-body .attendance-closing-status__text { font-size: 12px; line-height: 1.6; }
.attendance-closing-status__logs-title { margin: 8px 0 2px; color: #596275; font-size: 12px; font-weight: 700; }
.attendance-closing-status__more-body .attendance-closing-status__logs { flex-basis: auto; margin: 0; padding-left: 16px; font-size: 12px; }

/* 左の列（月送り・締め・名簿）と右の中身を、仕切り線だけで分ける
   ページ全体はスクロールさせず、画面の高さに収めて左右それぞれの中だけをスクロールする（右を動かしても左は動かない） */
/* 右の列のスクロールバーが画面の右端に来るよう、この画面は幅いっぱいにして右の余白は右の列の中でとる */
.attendance-report--workspace { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; max-width: none; padding-right: 0; padding-bottom: 0; }
.attendance-report__workspace { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.attendance-report__main { position: relative; min-width: 0; min-height: 0; padding: 0 24px 24px; overflow-y: auto; }
/* 締めた月の大きなはんこ。画面の右上に固定し、スクロールしてもいつも見えるようにする。少し傾けて押し、朱肉のにじみは重ねた輪と multiply で出す */
.attendance-closed-seal { position: fixed; top: 72px; right: 44px; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 1px; width: 118px; height: 118px; border: 5px double #c8323a; border-radius: 50%; box-sizing: border-box; color: #c8323a; background: radial-gradient(circle, rgba(200, 50, 58, .07) 30%, rgba(200, 50, 58, .02) 70%, transparent 72%); box-shadow: inset 0 0 0 2px rgba(200, 50, 58, .12); font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; font-weight: 700; line-height: 1.1; opacity: .88; mix-blend-mode: multiply; pointer-events: none; transform: rotate(-14deg); animation: attendance-closed-seal-press .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.attendance-closed-seal__month { font-size: 12px; letter-spacing: .08em; }
.attendance-closed-seal__main { padding: 2px 0; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; font-size: 30px; letter-spacing: .06em; }
.attendance-closed-seal__date { font-size: 11px; letter-spacing: .04em; }
/* ポンと押したように、大きく浮いたところから押しつける */
@keyframes attendance-closed-seal-press {
  0% { opacity: 0; transform: rotate(-14deg) scale(1.9); }
  70% { opacity: .9; transform: rotate(-14deg) scale(.94); }
  100% { opacity: .88; transform: rotate(-14deg) scale(1); }
}
/* シフト管理は右上に月送りがあるので、右下に押す */
.attendance-closed-seal--bottom { top: auto; bottom: 40px; right: 48px; }
@media (prefers-reduced-motion: reduce) { .attendance-closed-seal { animation: none; } }
@media print { .attendance-closed-seal { display: none; } }
/* 締めた月の表を押したときの吹き出し。はんこと同じ朱色で、押したところの上に少しだけ出す */
.attendance-person__locked-rows .attendance-person__stamp-cell,
.attendance-person__locked-rows .attendance-person__plan-cell,
.shift-matrix-table-wrapper--locked .shift-matrix-table__row:not([data-attendance-unlocked]) .shift-matrix-cell,
[data-attendance-locked="true"] :is(input, select, textarea, button, label, .staff-item, .slot, .staff-time):not(.tab-navigation__button, .tab-navigation__button *, .slot-rule-help, .schedule-page__print-button) { cursor: not-allowed; }
.attendance-locked-bubble { position: fixed; z-index: 5000; max-width: min(360px, calc(100vw - 24px)); padding: 8px 12px; border: 1px solid #e6b3b6; border-radius: 8px; color: #9b2730; background: #fff7f7; box-shadow: 0 8px 24px rgba(155, 39, 48, .18); font-size: 13px; font-weight: 700; line-height: 1.5; pointer-events: none; animation: attendance-locked-bubble-in .15s ease-out; }
@keyframes attendance-locked-bubble-in { from { opacity: 0; transform: translateY(4px); } }

.attendance-report__side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 12px 16px 0;
  border-right: 1px solid #d9dbea;
}
.attendance-report__roster-tools { display: grid; gap: 8px; padding: 12px 0 8px; }
.attendance-report__roster-search { width: 100%; padding: 8px 10px; border: 1px solid #cbd1df; border-radius: 6px; box-sizing: border-box; font: inherit; }
.attendance-report__roster-list { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.attendance-report__roster-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 15px;
  color: #263238;
  text-decoration: none;
}
.attendance-report__roster-link:hover { background: #f4f6fb; }
.attendance-report__roster-link--active { color: #1f4b99; background: #e8eefb; font-weight: 700; }
.attendance-report__roster-link { border-radius: 6px; }
.attendance-report__roster-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attendance-report__roster-empty { margin: 0; padding: 12px; color: #8a93a6; font-size: 13px; }

.attendance-report__footer { margin-top: 28px; text-align: right; }
.attendance-report__rules-link { color: #8a93a6; font-size: 13px; text-decoration: underline; white-space: nowrap; }
.attendance-report__rules-link:hover { color: #525b91; }

.attendance-report__report-section { margin-top: 24px; }
.attendance-report__section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.attendance-report__section-heading { margin: 0; color: #3f4775; font-size: 20px; }
.attendance-report__section-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* 残業が多い人（要確認の打刻と月の合計のあいだ） */
.attendance-report__alerts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
@media (max-width: 1280px) { .attendance-report__alerts { grid-template-columns: minmax(0, 1fr); } }
.attendance-report__alerts-side { display: grid; gap: 16px; min-width: 0; }
.attendance-report__overtime { margin-top: 0; padding: 14px 16px; border: 1px solid #e3e6f0; border-radius: 10px; background: #fff; }
.attendance-report__overtime-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; color: #3f4775; font-size: 20px; }
.attendance-report__overtime-empty { margin: 0; color: #64748b; }
.attendance-report__overtime-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.attendance-report__overtime-item { display: grid; grid-template-columns: minmax(0, 1fr) 4.5em; gap: 12px; align-items: center; padding: 4px 10px; border-radius: 6px; background: #f8f9fc; color: inherit; text-decoration: none; }
.attendance-report__overtime-item:hover { background: #eef1fa; }
.attendance-report__overtime-name { color: #1f2937; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attendance-report__overtime-value { padding: 0 8px; border-radius: 6px; text-align: right; font-variant-numeric: tabular-nums; }
.attendance-report__overtime-more summary { color: #3f4775; }

.attendance-report__csv-button,
.attendance-report__print-button { display: inline-block; padding: 9px 16px; border-radius: 6px; font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.attendance-report__csv-button { border: 0; color: #fff; background: #27765a; }
.attendance-report__print-button { border: 1px solid #cbd1df; color: #3f4775; background: #fff; }
.attendance-report__print-button:hover { background: #f4f6fb; }

/* 月の合計 */
.attendance-report__table-wrap { max-height: 70vh; overflow: auto; border: 1px solid #d5d9e5; background: #fff; }
.attendance-report__table { width: 100%; border-collapse: separate; border-spacing: 0; white-space: nowrap; }
.attendance-report__table th,
.attendance-report__table td { padding: 9px 12px; border-right: 1px solid #e4e7ef; border-bottom: 1px solid #e4e7ef; text-align: left; }
.attendance-report__table th { position: sticky; top: 0; z-index: 1; color: #fff; background: #4f577d; font-size: 13px; }
.attendance-report__table tbody tr:nth-child(even) { background: #f8f9fc; }
.attendance-report__empty { padding: 28px !important; color: #6b7280; text-align: center !important; }
.attendance-report__table--summary { min-width: 720px; }
.attendance-report__table--summary th { background: #697057; }
/* 名前は押すとその人を見る */
.attendance-report__person-link { color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: #b8c0dc; text-underline-offset: 3px; }
.attendance-report__person-link:hover { color: #3f4bb0; text-decoration-color: currentColor; }
.attendance-report__warning-count-icon { display: inline-block; width: 15px; height: 13px; margin-right: 4px; vertical-align: -1px; }

/* 要確認の打刻（打刻忘れなど） */
.attendance-report__warnings { padding: 14px 16px; border: 1px solid #f3d29a; border-radius: 10px; background: #fffaf0; }
.attendance-report__warnings--compact { margin-bottom: 20px; padding: 10px 12px; }
.attendance-report__warnings-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; color: #3f4775; font-size: 20px; }
.attendance-report__warnings--compact .attendance-report__warnings-heading { margin-bottom: 6px; font-size: 16px; }
.attendance-report__warnings-total { display: inline-flex; align-items: center; color: #9a3412; font-size: 15px; }
.attendance-report__warnings-empty { margin: 0; color: #64748b; }
.attendance-report__warning-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.attendance-report__warning-item { display: grid; grid-template-columns: 6.5em 9em 1fr; gap: 12px; align-items: center; padding: 4px 10px; border-radius: 6px; background: #fff; color: inherit; text-decoration: none; }
.attendance-report__warning-item:hover { background: #ffedd5; }
.attendance-report__warning-item--compact { grid-template-columns: 6.5em 1fr; }
.attendance-report__warning-date { color: #475569; font-variant-numeric: tabular-nums; }
.attendance-report__warning-name { font-weight: 700; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attendance-report__warning-text { color: #7c2d12; }
.attendance-report__warning-more { margin-top: 6px; }
.attendance-report__warning-more summary { margin-bottom: 4px; color: #9a3412; font-weight: 700; cursor: pointer; }

/* 全員のタイムカード（印刷用のページ） */
/* 印刷・CSV：残業が多い人と同じ形のパネルに、資料を1行ずつ並べる。行の線で区切り、ボタンは縦にそろえる */
.attendance-report__exports { padding: 14px 16px 6px; border: 1px solid #e3e6f0; border-radius: 10px; background: #fff; }
.attendance-report__export-list { margin: 0; padding: 0; list-style: none; }
.attendance-report__export-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 16px; padding: 10px 0; }
.attendance-report__export-card + .attendance-report__export-card { border-top: 1px solid #edf0f5; }
.attendance-report__export-title { margin: 0; color: #1f2937; font-size: 15px; }
/* オプション（勤怠計算もつける）は、その行のボタンのすぐ左 */
.attendance-report__export-option:empty { display: none; }
.attendance-report__export-card .attendance-report__export-option { grid-column: 2; }
.attendance-report__export-card .attendance-report__export-actions { grid-column: 3; }
.attendance-report__export-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 14px; }
.attendance-report__calc-toggle { display: inline-flex; align-items: center; gap: 6px; color: #3f4775; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; user-select: none; }
.attendance-report__calc-toggle input { width: 17px; height: 17px; margin: 0; accent-color: #2f5fb3; cursor: pointer; }
.attendance-report__export-actions { display: grid; grid-template-columns: repeat(2, 7em); gap: 8px; flex: none; }
.attendance-report__export-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .15s, transform .15s; }
.attendance-report__export-button:hover { transform: translateY(-1px); }
.attendance-report__export-button--print { border: 1px solid #cbd1df; color: #3f4775; background: #fff; }
.attendance-report__export-button--print:hover { background: #f4f6fb; }
.attendance-report__export-button[aria-busy="true"] { color: #64748b; background: #f4f6fb; cursor: progress; }
.attendance-report__export-button--csv { border: 1px solid #27765a; }
.attendance-report__export-button--csv:hover { background: #1f6249; }
.attendance-report__export-icon { flex: none; }
@media (max-width: 520px) {
  .attendance-report__export-card { grid-template-columns: minmax(0, 1fr); }
  .attendance-report__export-card .attendance-report__export-option,
  .attendance-report__export-card .attendance-report__export-actions { grid-column: 1; }
  .attendance-report__export-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.attendance-report--print-page { max-width: 860px; }
.attendance-report__timecard-sheet.attendance-report__timecard-sheet--calc { max-width: none; }
/* 勤怠計算つきは列が多いので、右が切れないよう広げる */
.attendance-report--print-page.attendance-report--print-calc { max-width: 1120px; }
/* 月の合計の印刷ページは横に広い（A4横） */
.attendance-report--summary-print { max-width: 1200px; page: summary-landscape; }
.attendance-report--summary-print .attendance-report__table-wrap { max-height: none; overflow: visible; }
.attendance-report__print-title { display: none; margin: 0 0 10px; color: #1f2937; font-size: 18px; }
@page summary-landscape { size: A4 landscape; margin: 10mm; }
.attendance-report__print-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.attendance-report__print-bar p { margin: 0; color: #3f4775; font-weight: 700; }
.attendance-report__timecards { display: grid; gap: 16px; }
.attendance-report__timecard-sheet { max-width: 640px; padding: 14px; border: 1px solid #dde2ee; border-radius: 10px; background: #fff; }
/* 名前と期間は1行に並べて、タイムカードに使える高さを少しでも広くする */
.attendance-report__timecard-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.attendance-report__timecard-name { margin: 0; color: #1f2937; font-size: 20px; }
.attendance-report__timecard-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: #64748b; font-size: 13px; }

/* 人を選んだとき：名前 → 要確認の打刻 → 勤怠集計 → 勤怠計算 → タイムカード */
.staff-time-record.attendance-person { max-width: none; min-width: 0; margin: 0; padding: 0; }
.attendance-person__header { margin-bottom: 14px; }
.attendance-person__name { margin: 0; color: #1f2937; font-size: 26px; }
.attendance-person__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 6px 0 0; color: #475569; font-size: 14px; }
.attendance-person__pattern { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #3f4775; }
.attendance-person__section + .attendance-person__section { margin-top: 28px; }
.attendance-person__section-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.attendance-person__section-header .attendance-person__section-title { margin: 0 auto 0 0; }
.attendance-person__section-title { margin: 0 0 10px; color: #1f2937; font-size: 18px; }
.attendance-person .staff-time-record__day-list { overflow-x: auto; }
.attendance-person__print-only { display: none; }

/* タイムカード・勤怠計算：1つの表の左にタイムカード（正味の打刻）、右に勤怠計算 */
.attendance-person__sheet { font-size: 13px; }
.attendance-person__sheet th,
.attendance-person__sheet td { padding-left: 6px; padding-right: 6px; }
.attendance-person__sheet thead .attendance-person__sheet-groups th { padding-top: 6px; padding-bottom: 6px; font-size: 12px; text-align: center; }
.attendance-person__sheet .attendance-person__group--sheet { color: #3f4775 !important; background: #e8ebf5 !important; }

/* 左のタイムカードは紙のタイムカードに似せる：クリーム色の紙に青い罫線、出・退の見出しは青く塗る */
.attendance-person__sheet .attendance-person__stamp-head,
.attendance-person__sheet .attendance-person__stamp-sub { text-align: center !important; color: #2f6fc0 !important; background: #fffdf3 !important; border: 0 !important; border-right: 1px solid #3f86d6 !important; border-bottom: 1px solid #3f86d6 !important; letter-spacing: 0.3em; }
.attendance-person__sheet .attendance-person__stamp-head { font-size: 11px; }
.attendance-person__sheet .attendance-person__stamp-sub { font-size: 15px; font-weight: 700; }
.attendance-person__sheet .attendance-person__stamp-head--main,
.attendance-person__sheet .attendance-person__stamp-sub--main { color: #fff !important; background: #3f86d6 !important; }
.attendance-person__sheet .attendance-person__stamp-cell { text-align: center; white-space: nowrap; background: #fffdf3; border-left: 0; border-right: 1px solid #3f86d6; border-bottom: 1px solid #3f86d6; color: #4b4b3c; font-family: "Courier New", ui-monospace, monospace; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* 線は1本ずつにする（表は線を重ねない設定なので、となり同士で2本引くと太く見える）。
   マスごとに右と下だけ引き、いちばん左は日付の列の右の線を青くし、上は見出しに足してかこむ */
.attendance-person__sheet.staff-time-record__table .staff-time-record__date-cell { border-right-color: #3f86d6; }
.attendance-person__sheet .attendance-person__sheet-groups .attendance-person__stamp-head,
.attendance-person__sheet .attendance-person__sheet-groups .attendance-person__stamp-sub { border-top: 1px solid #3f86d6 !important; }
/* タイムカードの4列は、打刻が無い日ばかりの月でも同じ幅にする（24:00 と右上の⚠️が入る幅） */
.attendance-person__sheet .attendance-person__stamp-cell { width: 80px; min-width: 80px; }
/* 要確認の打刻があるマスだけオレンジにする（マウスを乗せると中身が出る） */
.attendance-person__sheet .attendance-person__warning-cell { position: relative; background: #ffe3c2 !important; }
.attendance-person__sheet .attendance-person__cell-warning { position: absolute; top: 3px; right: 2px; width: 12px; height: 11px; margin: 0; }
.attendance-person__sheet .staff-time-record__date-cell.attendance-person__warning-cell { cursor: pointer; }
/* タイムカードのマスは押すと打刻を追加、打刻を押すと編集できる */
.attendance-person__stamp-cell[data-action] { cursor: pointer; }
.attendance-person__stamp-cell[data-action]:hover { background: #f3f8ff !important; }
.timecard__edit-button { padding: 0 2px; border: 0; border-radius: 4px; background: none; color: inherit; font: inherit; cursor: pointer; }
.timecard__edit-button:hover,
.timecard__edit-button:focus-visible { background: #dbe9fb; color: #1d4f91; text-decoration: underline; }
/* 出勤〜退勤（計算）は見るだけ。⚠️は無いので時刻を左から並べる */
.attendance-person__segments { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 6px; white-space: nowrap; }
/* 予定・メモのマスは1つのボタン。予定とメモがあるときは上下に並べる */
.attendance-person__plan-cell { width: 86px; }
.attendance-person__plan-cell .staff-time-record__plan-memo { flex-basis: 100%; }
.timecard__line { display: block; min-height: 1.4em; line-height: 1.4; }
/* 要確認の打刻の一覧から来た日は、日付のマスを青くして目印にする（オレンジの要確認とまぎれないように） */
.staff-time-record__day { scroll-margin-top: 120px; }
.staff-time-record__day:target .staff-time-record__date-cell { background: #e8eefb; }

@media (max-width: 900px) {
  .attendance-report { padding: 14px; }
  /* せまい画面ではふつうに上から並べ、ページ全体をスクロールする。左の列は上に置いて高さをおさえる */
  .attendance-report--workspace { display: block; padding-right: 14px; padding-bottom: 14px; }
  .attendance-report__workspace { display: block; }
  .attendance-report__main { padding: 0; overflow: visible; }
  .attendance-report__side { max-height: 420px; margin-bottom: 16px; padding-right: 0; border-right: 0; border-bottom: 1px solid #d9dbea; }
  .attendance-report__warning-item { grid-template-columns: 1fr auto; }
  .attendance-report__warning-text { grid-column: 1 / -1; }
  .attendance-report__section-header { flex-wrap: wrap; gap: 8px; }
  .attendance-report__timecard-sheet { padding: 10px; }
}

/* 印刷はタイムカードだけを出す（全員の印刷ページは1人1ページ） */
@media print {
  .main-navigation,
  .flash-messages,
  .attendance-report__side,
  .attendance-report__print-bar,
  .attendance-report__footer,
  .attendance-person__header,
  .attendance-person__warnings,
  .attendance-person__section { display: none !important; }
  .attendance-report--workspace,
  .attendance-report__workspace { display: block; }
  .attendance-report__main { padding: 0; overflow: visible; }
  .attendance-report__timecards { display: block; }
  .attendance-report__timecard-sheet { max-width: none; padding: 0; border: 0; break-after: page; }
  .attendance-report__timecard-sheet:last-child { break-after: auto; }
  .attendance-person__print-only { display: block; }
  .attendance-report--summary-print { max-width: none; padding: 0; }
  .attendance-report__print-title { display: block; }
  .attendance-report--summary-print .attendance-report__table th { position: static; }
  .attendance-report--summary-print .attendance-report__person-link { text-decoration: none; }
  /* ページの継ぎ目で外の枠だけが下に伸びたり、次のページの見出しの上の線が消えたりしないよう、枠はマスごとに引く */
  .attendance-report--summary-print .attendance-report__table-wrap { border: 0; }
  .attendance-report--summary-print .attendance-report__table { border-collapse: collapse; }
  .attendance-report--summary-print .attendance-report__table th,
  .attendance-report--summary-print .attendance-report__table td { border: 1px solid #d5d9e5; }
  .attendance-report--summary-print .attendance-report__table tr { break-inside: avoid; }
}
.attendance-person__sheet .timecard__line { min-height: 24px; line-height: 24px; }

/* 月の合計は13列あるので、横にはみ出さないよう詰める。見出しは短くして小さい文字で1行にする（折り返すと最後の1文字だけ落ちる） */
.attendance-report__table--summary { min-width: 0; font-size: 13px; }
.attendance-report__table--summary th,
.attendance-report__table--summary td { padding: 7px 8px; }
.attendance-report__table--summary th { white-space: nowrap; line-height: 1.3; vertical-align: bottom; font-size: 11px; }
.attendance-report__table--summary td { font-variant-numeric: tabular-nums; }
/* 名前の列は、ふつうの名前（全角6文字ほど）が入る幅にする。長い名前は文字を小さくして収める（summary_name_style） */
.attendance-report__table--summary .attendance-report__name-cell { width: 6.5em; white-space: nowrap; }
