/* =====================================================================
   労働者名簿システム 画面のデザイン
   会員管理システムと同じ作り。色の変数名（--green など）は会員管理と共通のまま、値を紺色にしています。
   区分の色は前の労働者名簿Excelと同じ：赤＝退職、緑＝下請、青＝パート。期限：赤＝過ぎた、オレンジ＝30日以内、黄＝90日以内。
   ===================================================================== */
:root {
  --paper: #F3F5F7;
  --sheet: #FFFFFF;
  --ink: #1B2733;
  --ink-2: #4A5866;
  --ink-3: #737F8C;
  --rule: #D6DEE6;
  --rule-2: #A9B9C9;
  --green: #2C5F8A;
  --green-2: #1F476A;
  --green-wash: #E5EEF6;
  --green-wash-2: #F1F6FA;
  --leaf: #2E7A4E;
  --leaf-wash: #E6F3EA;
  --sky: #1F63B3;
  --sky-wash: #E6F0FB;
  --orange: #B4530F;
  --orange-wash: #FDEBDD;
  --yellow-wash: #FFF5C9;
  --yellow-ink: #6E5600;
  --red: #B3372D;
  --red-wash: #FBECEA;
  --red-margin: #CF8A82;
  --amber: #8F6210;
  --amber-wash: #FBF2DF;
  --focus: #1F6FD1;
  --font: "BIZ UDPGothic", "BIZ UDPゴシック", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-num: "BIZ UDGothic", "BIZ UDゴシック", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-mincho: "BIZ UDPMincho", "BIZ UDP明朝 Medium", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  font-feature-settings: "palt" 0;
}
h1, h2, h3 { line-height: 1.35; }
a { color: var(--green-2); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.boot { display: grid; place-items: center; min-height: 60vh; color: var(--ink-3); }
.noscript { padding: 24px; text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 6px; }

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.is-neg { color: var(--red); }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.strong { font-weight: 700; }
.red { color: var(--red); }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }
.mt { margin-top: 20px; }
.mt-s { margin-top: 8px; }
.t-right { text-align: right; }
.t-center { text-align: center; }

/* ---------------------------------------------------------------- 外枠 */
.app { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--sheet); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
}
.side-head { padding: 18px 18px 10px; }
.side-app { font-weight: 700; font-size: 17px; letter-spacing: .04em; color: var(--green); }
.side-assoc { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.45; }
.side-year { padding: 4px 14px 14px; border-bottom: 1px solid var(--rule); }
.side-year-label { display: block; font-size: 11.5px; color: var(--ink-3); margin: 0 0 3px 2px; }
.year-select { font-weight: 700; background-color: var(--green-wash); border-color: var(--rule-2); }
.nav { padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 6px; border: 0; background: none; width: 100%;
  color: var(--ink); text-decoration: none; font-size: 15px; text-align: left; cursor: pointer;
}
.nav-link .ico { color: var(--ink-2); flex: none; }
.nav-link:hover { background: var(--green-wash-2); }
.nav-link.is-active { background: var(--green-wash); color: var(--green-2); font-weight: 700; }
.nav-link.is-active .ico { color: var(--green); }
.nav-link.is-active::before { content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--green); }
.nav-sep { font-size: 12px; color: var(--ink-3); padding: 14px 12px 4px; }
.side-foot { margin-top: auto; padding: 8px; border-top: 1px solid var(--rule); }
.nav-user { display: flex; flex-direction: column; line-height: 1.3; }
.nav-user small { font-size: 11.5px; color: var(--ink-3); }
.nav-logout { color: var(--ink-2); }

.main-wrap { min-width: 0; }
.topbar { display: none; }
.scrim { display: none; }
.main { padding: 28px 32px 72px; max-width: 1280px; outline: none; }
.page-narrow { max-width: 820px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: .02em; }
.page-sub { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 14px; border-radius: 6px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-2); }
.btn-secondary { background: #fff; color: var(--green-2); border-color: var(--rule-2); }
.btn-secondary:hover:not(:disabled) { background: var(--green-wash-2); border-color: var(--green); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #93291F; }
.btn-danger-ghost { background: transparent; color: var(--red); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--red-wash); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13.5px; }
.btn-block { width: 100%; height: 42px; margin-top: 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 6px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--green-wash-2); color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--green-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; }
.spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- 入力 */
.form { display: block; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.req { margin-left: 6px; font-size: 11px; color: var(--red); font-weight: 600; }
.field-hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.field-error { font-size: 12.5px; color: var(--red); line-height: 1.5; }
.input {
  width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--rule-2); border-radius: 6px;
  background: #fff; color: var(--ink); font-size: 15px;
}
textarea.input { height: auto; padding: 8px 10px; line-height: 1.55; resize: vertical; }
select.input {
  padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234B5B56' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(44, 95, 138, .18); }
.input:disabled { background-color: #F1F4F2; color: var(--ink-2); }
.input-auto { width: auto; min-width: 150px; }
.input-date { max-width: 200px; }
.has-error .input { border-color: var(--red); }
.grid2, .grid3, .grid-zip { display: grid; gap: 0 16px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-zip { grid-template-columns: 170px minmax(0, 1fr); }
.money { position: relative; }
.money .input { padding-left: 26px; text-align: right; }
.money-yen { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; pointer-events: none; }
.check { display: inline-flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 14.5px; line-height: 1.5; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--green); flex: none; }
.check.is-disabled { opacity: .6; cursor: default; }
.radios { display: flex; gap: 6px 18px; align-items: center; min-height: 38px; flex-wrap: wrap; }
.radio { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.radio input { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.form-sec { font-size: 14px; font-weight: 700; color: var(--green-2); margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.form-sec:first-child { margin-top: 0; }
.form-error { display: flex; gap: 8px; align-items: flex-start; background: var(--red-wash); color: var(--red); border: 1px solid #F0C4BF; border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; font-size: 14px; }
.form-error .ico { margin-top: 3px; flex: none; }
.zipinfo { font-size: 13px; margin: -6px 0 12px; padding: 6px 10px; border-radius: 6px; }
.zipinfo-ok { background: var(--green-wash-2); color: var(--green-2); }
.zipinfo-warn { background: var(--amber-wash); color: var(--amber); }
.zipinfo-ask { background: #F4F6F5; color: var(--ink-2); }
.row-end { display: flex; justify-content: flex-end; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.row-start { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.row-center { display: flex; justify-content: center; margin-top: 14px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.indent { padding-left: 26px; }
.pw { position: relative; }
.pw .input { padding-right: 58px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--green-2); font-size: 13px; cursor: pointer; padding: 4px 6px; }
.pw-gen { display: flex; gap: 8px; }
.field-static { height: 38px; display: flex; align-items: center; font-weight: 700; }

/* ---------------------------------------------------------------- ダイアログ・お知らせ */
.overlay { position: fixed; inset: 0; background: rgba(27, 39, 51, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; width: 100%; max-width: 640px; box-shadow: 0 18px 48px rgba(27, 39, 51, .28); display: flex; flex-direction: column; max-height: 88vh; outline: none; }
.modal-lg { max-width: 880px; }
.modal-sm { max-width: 470px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--rule); }
.modal-head h2 { font-size: 18px; margin: 0; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 20px; border-top: 1px solid var(--rule); background: #FAFBFA; border-radius: 0 0 10px 10px; flex-wrap: wrap; }
.foot-space { flex: 1; }
.dialog-msg p { margin: 0 0 8px; }
body.modal-open { overflow: hidden; }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 80; width: min(560px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-size: 14.5px; animation: toast-in .18s ease-out; pointer-events: auto; }
.toast .ico { flex: none; }
.toast-error { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

.notice { background: var(--green-wash-2); border: 1px solid #CFE2D8; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }
.notice p { margin: 0 0 6px; }
.notice-warn { background: var(--amber-wash); border-color: #EBD7A8; }
.notice-plain { background: #F7F9F8; border-color: var(--rule); }
.notice-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert .ico { flex: none; margin-top: 3px; }
.alert-danger { background: var(--red-wash); border: 1px solid #F0C4BF; color: var(--red); }
.check-line { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--green-2); margin: -4px 0 12px; }
.check-line.is-red { color: var(--red); }
.empty { text-align: center; padding: 44px 20px; background: #fff; border: 1px dashed var(--rule-2); border-radius: 8px; }
.empty-title { font-weight: 700; font-size: 16px; margin: 0 0 6px; }
.empty-text { color: var(--ink-2); margin: 0 auto 14px; font-size: 14px; max-width: 520px; }
.loading { display: flex; gap: 10px; align-items: center; color: var(--ink-2); padding: 24px 4px; }

/* ---------------------------------------------------------------- 表 */
.panel { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; }
.panel h2 { font-size: 16.5px; margin: 0 0 12px; }
.panel h2.mt { margin-top: 26px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.panel-quiet { background: transparent; }
.more { font-size: 13.5px; }

.toolbar { display: flex; gap: 10px 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar-sub { justify-content: flex-start; gap: 8px; }
.toolbar-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar-group .search { flex: 0 1 260px; min-width: 200px; }
.toolbar-space { flex: 1; }
.search { position: relative; min-width: 240px; flex: 0 1 340px; }
.search-wide { flex-basis: 460px; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 34px; }
.chip { display: inline-flex; gap: 4px; align-items: center; border: 1px solid #EBD7A8; background: var(--amber-wash); color: var(--amber); border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.count-line { font-size: 13px; color: var(--ink-3); margin: 2px 2px 8px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.tab { border: 0; background: none; padding: 8px 14px 9px; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: 14.5px; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--green-2); border-bottom-color: var(--green); font-weight: 700; }
.tab-badge { margin-left: 6px; font-size: 12px; background: #EDF1EE; border-radius: 999px; padding: 0 7px; color: var(--ink-2); font-weight: 600; }
.tab-body { margin-top: 16px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--rule); border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-bottom: 2px solid var(--green); background: #fff; white-space: nowrap; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .t-right { text-align: right; }
.table .t-center { text-align: center; }
.table td.num, .table td .num, .doc-table td.num { white-space: nowrap; }
.table td.wrap { white-space: normal; }
.table-hover tbody tr { cursor: pointer; }
.table-hover tbody tr:hover td { background: var(--green-wash-2); }
.table-compact td, .table-compact th { padding: 6px 10px; font-size: 13.5px; }
.table-plain { width: 100%; border-collapse: collapse; }
.table-plain td { padding: 8px 4px; border-bottom: 1px solid var(--rule); }
.table-edit td { padding: 6px 8px; }
.table tfoot td, .table-plain .row-total td { border-top: 3px double var(--ink); border-bottom: 0; font-weight: 700; }
.row-total td { font-weight: 700; }
.row-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.kana { font-size: 12px; color: var(--ink-3); margin-top: 1px; line-height: 1.4; }
.kana-inline { margin-left: 8px; font-size: 12px; color: var(--ink-3); }
tr.is-left td { color: var(--ink-3); }
tr.is-left .row-link { color: var(--ink-2); }
.col-no { white-space: nowrap; width: 1%; }
.col-check { width: 40px; }
.col-check input { width: 17px; height: 17px; accent-color: var(--green); }
.col-act { white-space: nowrap; text-align: right; width: 1%; }
.col-act .btn + .btn { margin-left: 6px; }
.col-order { width: 48px; }
.col-date { width: 1%; white-space: nowrap; }
.cell-memo { max-width: 220px; font-size: 13px; color: var(--ink-2); }
.table-billing td { white-space: nowrap; }
.table-billing th, .table-billing td { padding-left: 10px; padding-right: 10px; }
.table-billing td.cell-name { white-space: normal; min-width: 150px; }
.memo-line { font-size: 12px; color: var(--amber); margin-top: 2px; white-space: normal; }
.remain { display: block; font-size: 12px; color: var(--amber); }
.cell-sub { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.cell-year { white-space: nowrap; }
.cell-year .cell-sub .tag { margin-left: 4px; }
.cell-period { white-space: nowrap; }
.cell-addr { font-size: 13.5px; }
.cat { font-size: 13.5px; white-space: nowrap; }
tr.is-overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.row-fee td { background: var(--green-wash-2); }
.row-opening td { color: var(--ink-2); }
.is-click { cursor: pointer; }
.is-click:hover td { background: var(--green-wash); }
.auto { font-size: 11px; color: var(--green-2); border: 1px solid var(--rule-2); border-radius: 3px; padding: 0 4px; margin-left: 4px; vertical-align: 1px; }
.table-years tr.is-current td { background: var(--green-wash-2); }
.mismatch { font-size: 12px; color: var(--amber); margin-top: 2px; white-space: normal; }

/* 状況（入金済は「済」の印） */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; white-space: nowrap; }
.st-paid { color: var(--green-2); }
.stamp {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border: 1.5px solid var(--green); border-radius: 50%; color: var(--green);
  font-family: var(--font-mincho); font-weight: 700; font-size: 12.5px; line-height: 1;
  transform: rotate(-8deg);
}
.st-unpaid { color: var(--red); font-weight: 600; }
.st-unpaid.is-overdue { background: var(--red-wash); padding: 1px 8px; border-radius: 4px; }
.st-note { display: block; font-size: 12px; color: var(--red); margin-top: 2px; }
.st-partial { color: var(--amber); font-weight: 600; }
.st-exempt { color: var(--ink-3); }

.tag { display: inline-block; font-size: 12px; line-height: 1.6; padding: 0 8px; border-radius: 999px; background: #EEF1EF; color: var(--ink-2); border: 1px solid var(--rule); white-space: nowrap; vertical-align: 1px; font-weight: 500; }
.tag-green { background: var(--green-wash); color: var(--green-2); border-color: #C5DCD1; }
.tag-amber { background: var(--amber-wash); color: var(--amber); border-color: #EBD7A8; }
.tag-red { background: var(--red-wash); color: var(--red); border-color: #F0C4BF; }

.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 8px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.summary-strip > div { padding: 11px 16px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.summary-strip > div:last-child { border-right: 0; }
.ss-label { font-size: 12.5px; color: var(--ink-2); }
.ss-v { font-size: 19px; font-weight: 700; white-space: nowrap; }
.ss-n { font-size: 12.5px; color: var(--ink-3); min-height: 1em; }
.summary-strip .is-red .ss-v, .summary-strip .is-red .ss-label { color: var(--red); }
.ss-total { background: var(--green-wash-2); }

/* ---------------------------------------------------------------- ホーム */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ledger-card { border-left: 6px double var(--red-margin); padding-left: 22px; }
.sumtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.sumtable th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 9px 0; border-bottom: 1px solid var(--rule); width: 34%; white-space: nowrap; }
.sumtable td { padding: 9px 0 9px 12px; border-bottom: 1px solid var(--rule); text-align: right; font-weight: 600; white-space: nowrap; }
.sumtable td .num { font-size: 18px; margin-right: 2px; }
.sumtable td.sumtable-sub { font-size: 12.5px; font-weight: 400; color: var(--ink-3); text-align: left; padding-left: 16px; white-space: normal; width: 34%; }
.sumtable .is-red th, .sumtable .is-red td { color: var(--red); }
.sumtable .is-red td.sumtable-sub { color: var(--red); }
.sumtable-gap th, .sumtable-gap td { padding-top: 22px !important; }
.sumtable-total th, .sumtable-total td { border-top: 3px double var(--ink); border-bottom: 0; font-weight: 700; color: var(--ink); }
.sumtable-total td .num { font-size: 23px; }
.ledger-card-links { display: flex; gap: 18px; margin-top: 12px; font-size: 14px; flex-wrap: wrap; }
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 11px 14px; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--ink); background: #fff; }
.todo-item:hover { border-color: var(--green); background: var(--green-wash-2); }
.todo-text { font-weight: 600; }
.todo-sub { grid-column: 1; font-size: 12.5px; color: var(--ink-3); }
.todo-go { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--ink-3); }
.todo-red { border-left: 3px solid var(--red); }
.todo-red .todo-text { color: var(--red); }
.todo-amber { border-left: 3px solid var(--amber); }
.todo-none { color: var(--green-2); display: flex; gap: 8px; align-items: center; margin: 0; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.recent { list-style: none; padding: 0; margin: 0; }
.recent li { display: grid; grid-template-columns: 128px 110px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.recent li:last-child { border-bottom: 0; }
.recent-at { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.recent-who { color: var(--ink-2); }

/* ---------------------------------------------------------------- 会員の詳しい情報 */
.back { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-2); text-decoration: none; font-size: 13.5px; margin-bottom: 8px; }
.back:hover { color: var(--ink); }
.chips-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: -8px 0 16px; }
.member-no { font-weight: 700; color: var(--ink-2); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.info { margin: 0; }
.info-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.info-row:last-child { border-bottom: 0; }
.info dt { color: var(--ink-2); font-size: 13.5px; }
.info dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.tl-head { display: flex; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.tl-sum { font-size: 14px; }
.diff { list-style: none; padding: 6px 0 0; margin: 0; font-size: 12.5px; }
.diff li { display: flex; gap: 6px; flex-wrap: wrap; padding: 2px 0; }
.diff-k { color: var(--ink-2); min-width: 7em; }
.diff-a { color: var(--ink-3); text-decoration: line-through; }
.diff-b { color: var(--ink); }
.danger-zone { display: flex; gap: 12px; align-items: center; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); flex-wrap: wrap; font-size: 13px; }

/* ---------------------------------------------------------------- 請求・収支・設定ほか */
.bill-head { margin-bottom: 14px; }
.bill-name { font-size: 17px; font-weight: 700; }
.pay-box { background: var(--green-wash-2); border: 1px solid #CFE2D8; border-radius: 8px; padding: 14px 14px 4px; margin-bottom: 14px; }
.pay-box p { margin: -4px 0 10px; }
.statement { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.statement-bottom { grid-column: 1 / -1; }
.settings-form { max-width: 940px; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(to top, var(--paper) 70%, rgba(243, 245, 247, 0)); padding: 14px 0; display: flex; gap: 12px; align-items: center; z-index: 5; }
.seal-row { display: flex; gap: 10px; align-items: center; min-height: 38px; flex-wrap: wrap; }
.seal-preview { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--rule); border-radius: 4px; background: #fff; }
.role-choices { display: grid; gap: 8px; }
.role-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: 8px; cursor: pointer; }
.role-choice input { grid-row: 1 / 3; margin-top: 4px; accent-color: var(--green); }
.role-name { font-weight: 700; }
.role-desc { font-size: 12.5px; color: var(--ink-2); }
.role-choice.is-on { border-color: var(--green); background: var(--green-wash-2); }
.credentials dd { font-size: 17px; }
.export-grid { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.file-btn { cursor: pointer; }
.file-btn.is-busy { opacity: .6; pointer-events: none; }
.restore-sum { margin: 6px 0 10px; padding-left: 20px; }
.restore-sum li { margin: 2px 0; }
.table-backups .col-act .btn-sm { vertical-align: middle; }
.file-name { margin-left: 10px; font-size: 13.5px; color: var(--ink-2); }
.import-box { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 4px; }
.found { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 4px; }
.found li { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.found .ico { color: var(--green); flex: none; }
.import-result { margin-top: 16px; border: 1px solid var(--rule-2); border-radius: 8px; padding: 12px 16px; background: #FAFBFA; }
.import-result.is-done { border-color: var(--green); background: var(--green-wash-2); }
.import-result h3 { margin: 0 0 8px; font-size: 15px; }
.import-result ul { margin: 0; padding-left: 20px; }
.import-errors { margin-top: 10px; color: var(--red); font-size: 13px; }
.help .bullets { padding-left: 20px; margin: 0; }
.help .bullets li { margin: 4px 0; }
.help-credit, .auth-credit { text-align: center; opacity: .5; margin: 8px 0 0; }

/* ---------------------------------------------------------------- ログイン・初期設定 */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 18px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 28px; }
.auth-card-wide { max-width: 640px; }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.auth-mark { width: 40px; height: 40px; border-radius: 8px; background: var(--green); display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 9px; flex: none; }
.auth-mark span { display: block; height: 2.5px; background: #fff; border-radius: 2px; }
.auth-mark span:nth-child(3) { width: 58%; }
.auth-app { font-weight: 700; font-size: 18px; color: var(--green-2); line-height: 1.3; }
.auth-assoc { font-size: 13px; color: var(--ink-2); }
.auth-title { font-size: 21px; margin: 0 0 14px; }
.auth-lead { color: var(--ink-2); font-size: 14px; margin: -6px 0 16px; }
.auth-help { font-size: 12.5px; color: var(--ink-3); margin: 14px 0 0; text-align: center; }
.checks { list-style: none; padding: 0; margin: 0 0 14px; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.checks li { display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.checks li:last-child { border-bottom: 0; }
.checks .ok { color: var(--green-2); }
.checks .ng { color: var(--red); background: var(--red-wash); }
.checks-v { margin-left: auto; color: var(--ink-2); font-size: 12.5px; text-align: right; }

/* ---------------------------------------------------------------- スマホ・タブレット */
@media (max-width: 1280px) {
  .col-opt3 { display: none; }
}
@media (max-width: 1100px) {
  .col-opt2 { display: none; }
}
@media (max-width: 980px) {
  .home-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 60; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
  .nav-open .side { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(27, 39, 51, .35); z-index: 55; }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--rule); padding: 6px 10px; }
  .topbar-title { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
  .year-select-sm { width: auto; height: 34px; font-size: 13.5px; }
  .main { padding: 18px 16px 56px; }
  .page-head h1 { font-size: 21px; }
}
@media (max-width: 760px) {
  .col-opt { display: none; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip > div:nth-child(2) { border-right: 0; }
  .summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .statement { grid-template-columns: minmax(0, 1fr); }
  .search { flex: 1 1 100%; min-width: 0; }
}
@media (max-width: 640px) {
  /* 表をカードの形にする（スマホ） */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { position: relative; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
  .table-cards tbody tr:last-child { border-bottom: 0; }
  .table-cards td { border: 0 !important; padding: 1px 0 !important; text-align: left !important; white-space: normal !important; }
  .table-cards td[data-label]::before { content: attr(data-label) "　"; color: var(--ink-3); font-size: 12px; }
  .table-cards td.col-check { position: absolute; right: 12px; top: 10px; width: auto; }
  .table-cards td.col-no { color: var(--ink-3); font-size: 12.5px; }
  .table-cards td.col-act { padding-top: 8px !important; }
  .table-cards .col-opt, .table-cards .col-opt2, .table-cards .col-opt3 { display: none; }
  .table-cards tr.is-overdue td:first-child { box-shadow: none; }
  .table-cards tr.is-overdue { box-shadow: inset 3px 0 0 var(--red); }
  .table-cards .cell-name { padding-right: 34px !important; }
  .table-cards .cell-sub, .table-cards .st-note { display: inline; margin: 0 0 0 8px; }
  .sumtable td.sumtable-sub { display: none; }
  .grid2, .grid3, .grid-zip { grid-template-columns: minmax(0, 1fr); }
  .overlay { padding: 0; }
  .modal, .modal-lg, .modal-sm { max-width: none; max-height: none; min-height: 100%; border-radius: 0; }
  .modal-foot { border-radius: 0; position: sticky; bottom: 0; }
  .recent li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .info-row { grid-template-columns: 88px minmax(0, 1fr); }
  .auth-card { padding: 22px 18px; }
  .table th, .table td { padding: 8px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .spin { animation-duration: 2.4s; }
  .toast { animation: none; }
  .side { transition: none; }
}

/* =====================================================================
   印刷
   ===================================================================== */
body.print-mode { background: #E3E7E4; }
.print-root { padding: 78px 16px 40px; }
.print-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--rule); display: flex; gap: 10px 16px; align-items: center; padding: 10px 16px; flex-wrap: wrap; }
.print-bar-title { display: flex; gap: 8px; align-items: center; }
.print-bar-tools { display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; flex: 1; }
.print-bar-actions { display: flex; gap: 8px; }
.pb-field { display: flex; gap: 6px; align-items: center; font-size: 13.5px; white-space: nowrap; }
.pb-field .input { height: 32px; width: auto; }
.input-xs { width: 76px !important; }
.pb-note { font-size: 12.5px; color: var(--ink-3); }
.print-empty { text-align: center; padding: 60px; }

.sheet { width: 210mm; height: 297mm; margin: 0 auto 16px; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); position: relative; overflow: hidden; color: #111; page: sheet; }
.doc { width: 210mm; min-height: 297mm; margin: 0 auto 16px; background: #fff; padding: 12mm; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); color: #111; font-size: 10pt; line-height: 1.5; }
.doc-wide { width: 297mm; min-height: 210mm; page: wide; }

/* 請求書 */
.invoice { padding: 18mm 18mm 16mm; font-size: 10.5pt; line-height: 1.6; }
.inv-meta { position: absolute; top: 15mm; right: 18mm; font-size: 9.5pt; line-height: 1.7; }
.inv-meta div { display: flex; gap: 4mm; justify-content: flex-end; }
.inv-meta span:first-child { color: #555; }
.inv-title { font-family: var(--font-mincho); font-size: 22pt; font-weight: 700; text-align: center; margin: 13mm 0 10mm; letter-spacing: .12em; }
.inv-parties { display: grid; grid-template-columns: minmax(0, 1fr) 84mm; gap: 6mm; align-items: start; min-height: 44mm; }
.inv-zip, .inv-addr { font-size: 10pt; }
.inv-name { font-size: 14pt; font-weight: 700; margin-top: 3mm; padding-bottom: 1.5mm; border-bottom: .4mm solid #111; display: inline-block; min-width: 82mm; }
.inv-hon { margin-left: 4mm; font-weight: 400; font-size: 12pt; }
.inv-attn { font-size: 10pt; margin-top: 2mm; }
.inv-from { position: relative; font-size: 9.5pt; line-height: 1.65; padding-top: 1mm; min-height: 26mm; }
.inv-org { font-size: 11.5pt; font-weight: 700; margin-bottom: 1mm; }
.has-seal .inv-org { padding-right: 18mm; }
.inv-seal { position: absolute; right: 0; top: 2mm; width: 22mm; height: 22mm; object-fit: contain; opacity: .9; }
.inv-msg { margin: 8mm 0 3mm; }
.inv-total { display: flex; align-items: baseline; gap: 8mm; padding: 2mm 0 2mm; border-bottom: 3px double #111; width: 112mm; margin-bottom: 8mm; }
.inv-total-label { font-size: 11pt; }
.inv-total-v { font-size: 20pt; font-weight: 700; }
.inv-total-v small { font-size: 12pt; margin-left: 1mm; }

.inv-table { width: 100%; border-collapse: collapse; font-size: 10pt; }
.inv-table th, .inv-table td { border: .3mm solid #444; padding: 1.5mm 3mm; height: 9mm; }
.inv-table th { background: #EEF2EF; font-weight: 600; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.inv-table tfoot td { font-weight: 700; background: #F5F7F5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.w-qty { width: 16mm; }
.w-unit { width: 28mm; }
.w-amt { width: 30mm; }
.w-amt2 { width: 40mm; }
.inv-pay { margin: 8mm 0 0; display: flex; flex-direction: column; gap: 2mm; }
.inv-pay div { display: grid; grid-template-columns: 28mm minmax(0, 1fr); }
.inv-pay dt { color: #444; }
.inv-pay dd { margin: 0; }
.inv-note { margin-top: 6mm; font-size: 9pt; color: #333; }

/* 宛名ラベル A4 12面（86.4 × 42.3mm、上 21.5mm・左 18.6mm） */
.labels { padding: calc(21.5mm + var(--dy, 0mm)) 0 0 calc(18.6mm + var(--dx, 0mm)); display: grid; grid-template-columns: repeat(2, 86.4mm); grid-auto-rows: 42.3mm; align-content: start; }
.label { padding: 5.5mm 6mm 3mm 8mm; overflow: hidden; font-size: 10pt; line-height: 1.45; outline: .2mm dashed #C9D2CD; outline-offset: -.1mm; }
.lb-zip { font-size: 10pt; }
.lb-name { font-size: 13pt; font-weight: 700; margin-top: 2mm; line-height: 1.35; }
.lb-hon { margin-left: 3mm; font-weight: 400; font-size: 11pt; }
.lb-attn { font-size: 10pt; margin-top: .5mm; }

/* 帳票（収支表・名簿など） */
.doc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; border-bottom: .6mm solid #111; padding-bottom: 3mm; margin-bottom: 4mm; }
.doc-head h1 { font-family: var(--font-mincho); font-size: 17pt; margin: 0; }
.doc-head-meta { text-align: right; font-size: 9pt; line-height: 1.5; }
.doc-head-center { flex-direction: column; align-items: center; border: 0; text-align: center; gap: 0; }
.doc-head-center p { margin: 1mm 0; font-size: 10pt; }
.doc-org { font-weight: 700; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.doc-table thead { display: table-header-group; }
.doc-table th { border-top: .4mm solid #111; border-bottom: .4mm solid #111; padding: 1.6mm 2mm; text-align: left; font-weight: 600; background: #F1F4F2; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-table td { border-bottom: .2mm solid #BBB; padding: 1.5mm 2mm; vertical-align: top; }
.doc-table th.t-right, .doc-table td.t-right { text-align: right; }
.doc-table tr { break-inside: avoid; }
.doc-table tfoot td { border-top: 3px double #111; border-bottom: 0; font-weight: 700; }
.doc-table .w-date { width: 22mm; }
.w-acc { width: 26mm; }
.w-no { width: 22mm; }
.w-cat { width: 30mm; }
.w-rep { width: 30mm; }
.w-tel { width: 30mm; }
.w-mail { width: 46mm; }
.w-st { width: 18mm; }
.st-table { max-width: 150mm; margin: 6mm auto; }
.st-sec td { font-weight: 700; background: #F5F7F5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.st-indent { padding-left: 8mm !important; }
.st-table .sub td { border-top: .3mm solid #111; font-weight: 600; }
.roster .kana { font-size: 7.5pt; color: #555; }

@page { size: A4 portrait; margin: 12mm 12mm 14mm; @bottom-center { content: counter(page) " / " counter(pages); font-size: 8pt; color: #666; } }
@page sheet { size: A4 portrait; margin: 0; @bottom-center { content: none; } }
@page wide { size: A4 landscape; margin: 10mm 10mm 12mm; @bottom-center { content: counter(page) " / " counter(pages); font-size: 8pt; color: #666; } }

@media print {
  body, body.print-mode { background: #fff !important; }
  .print-bar, .toasts, .side, .topbar, .page-actions, .toolbar, .scrim { display: none !important; }
  .print-root { padding: 0; }
  .sheet { margin: 0; box-shadow: none; break-after: page; }
  .sheet:last-child { break-after: auto; }
  .doc { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  .label { outline: 0; }
  .app { display: block; }
  .main { padding: 0; }
}
.code { font-family: ui-monospace, "BIZ UDGothic", Consolas, monospace; font-size: 13px; background: #fff; border: 1px solid var(--rule-2); border-radius: 6px; padding: 8px 10px; overflow-x: auto; margin: 6px 0 0; white-space: pre-wrap; word-break: break-all; }
.changes { margin-top: 8px; font-size: 13px; }
.changes summary { cursor: pointer; color: var(--green-2); }
.changes ul { margin: 6px 0 0; padding-left: 20px; }

/* =====================================================================
   労働者名簿の部品
   ===================================================================== */
.grid4 { display: grid; gap: 0 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.t-left { text-align: left !important; }
.mb-s { margin-bottom: 8px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.tag-blue { background: var(--sky-wash); color: var(--sky); border-color: #C3D8F1; }
.tag-green { background: var(--leaf-wash); color: var(--leaf); border-color: #C2DFCB; }
.tag-k { font-weight: 600; }
.person { white-space: nowrap; }
.cell-dept { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.table-cars td.cell-name { min-width: 170px; }
.table-cars td { white-space: nowrap; }
.table-grant tbody th { border-bottom: 1px solid var(--rule); font-weight: 600; }
.link-plain { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; }
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.secret-row { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 38px; }
.table-wrap-flat { border-radius: 6px; }
.input-days { width: 64px; height: 32px; text-align: right; padding: 0 8px; }
.input-days.is-busy { opacity: .6; }
.input-note { height: 32px; min-width: 120px; font-size: 13.5px; }
.table-leave td { white-space: nowrap; }
.table-leave td.cell-name { white-space: normal; min-width: 150px; }
.table-grant th[scope=row] { white-space: nowrap; }
.months-row { display: flex; gap: 6px; flex-wrap: wrap; }
.takes-head { margin: 0 0 12px; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.plain-list li:last-child { border-bottom: 0; }
.sumtable-sm th { width: 40%; }
.sumtable-sm td .num { font-size: 16px; }
.car-list { list-style: none; padding: 0; margin: 0; }
.car-list li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.car-list li:last-child { border-bottom: 0; }
.car-dues { color: var(--ink-2); margin-top: 2px; }
.spare-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.spare-list { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.spare-list li { display: flex; gap: 12px; padding: 3px 0; }

/* 期限の色（赤＝過ぎた・オレンジ＝もうすぐ・黄＝近い） */
.due { display: inline-block; border-radius: 4px; padding: 0 6px; line-height: 1.6; white-space: nowrap; }
.due-expired { background: var(--red-wash); color: var(--red); font-weight: 700; box-shadow: inset 0 0 0 1px #F0C4BF; }
.due-soon { background: var(--orange-wash); color: var(--orange); font-weight: 700; box-shadow: inset 0 0 0 1px #F3CBAA; }
.due-warn { background: var(--yellow-wash); color: var(--yellow-ink); box-shadow: inset 0 0 0 1px #EBDB92; }
.due.legend { margin-right: 6px; font-size: 12px; }
.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.alert-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink); }
.alert-item:hover { border-color: var(--green); background: var(--green-wash-2); }
.due-row-expired { border-left: 4px solid var(--red); }
.due-row-soon { border-left: 4px solid #E07A2E; }
.due-row-warn { border-left: 4px solid #E3C33A; }
.alert-kind { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.alert-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.alert-sub { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-date { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; }
.is-compact .alert-item { padding: 7px 10px; }

/* メニューの件数・上の帯 */
.nav-badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 0 7px; line-height: 1.6; }
.topbar-sub { margin-left: 8px; font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.topbar-alert { display: inline-flex; gap: 4px; align-items: center; color: var(--red); font-weight: 700; text-decoration: none; padding: 4px 8px; border-radius: 6px; background: var(--red-wash); }
.summary-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.summary-strip > a { padding: 11px 16px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 1px; min-width: 0; text-decoration: none; color: var(--ink); }
.summary-strip > a:last-child { border-right: 0; }
.summary-strip > a:hover { background: var(--green-wash-2); }
.ss-v small { font-size: 13px; font-weight: 400; margin-left: 2px; }

@media (max-width: 1000px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .summary-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip > a { border-bottom: 1px solid var(--rule); }
  .spare-grid { grid-template-columns: minmax(0, 1fr); }
  .alert-item { grid-template-columns: minmax(0, 1fr) auto; }
  .alert-kind { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .grid4 { grid-template-columns: minmax(0, 1fr); }
  .table-leave thead { display: none; }
}

/* ---------------------------------------------------------------- 印刷：個人票 */
.kojin { font-size: 9.5pt; line-height: 1.45; padding: 11mm 13mm; break-after: page; }
.kojin:last-child { break-after: auto; }
.kojin-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: .6mm solid #111; padding-bottom: 2mm; margin-bottom: 3mm; }
.kojin-head h1 { font-family: var(--font-mincho); font-size: 18pt; margin: 0; letter-spacing: .1em; }
.kojin-meta { text-align: right; font-size: 9pt; }
.ktable { width: 100%; border-collapse: collapse; margin-bottom: 2mm; table-layout: fixed; }
.ktable col.k-l { width: 27mm; }
.ktable th, .ktable td { border: .25mm solid #888; padding: 1.1mm 2mm; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.ktable th { background: #EEF2F6; font-weight: 600; font-size: 8.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ktable .k-sec td { border: 0; padding: 2.2mm 0 .8mm; font-weight: 700; font-size: 10pt; background: none; }
.k-h { font-size: 10pt; margin: 2.2mm 0 .8mm; }
.k-name { font-size: 12pt; font-weight: 700; }
.k-kana { margin-left: 3mm; font-size: 8pt; color: #555; }
.ktable-list { table-layout: auto; }
.ktable-list thead th { text-align: left; }
.doc-table .w-n { width: 10mm; }
.doc-table .w-sex { width: 10mm; }
.doc-table .w-ten { width: 18mm; }
.doc-table .w-job { width: 26mm; }
.doc-table .w-plate { width: 34mm; }
.doc-table .w-etc { width: 46mm; }
.doc-table .w-sm { width: 12mm; }
.doc-table .w-five { width: 18mm; }
.leave-doc td { vertical-align: top; }
@media print {
  .kojin { padding: 0; }
}
