/* ── シフト丸め設定 ── */
.rule-current {
  background: var(--paper-warm);
  border: 1.3px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.7;
}
.rounding-reset-notice {
  border: 1.3px solid var(--warn);
  background: var(--warn-soft);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.rounding-dirty {
  color: var(--warn);
  font-size: 11px;
  font-weight: 700;
}
.rounding-rule-card {
  --rounding-section-color: var(--line);
  --rounding-section-soft: var(--paper-warm);
  background: #fff;
  border: 1.5px solid var(--rounding-section-color);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--rounding-section-soft);
  margin: 0 0 18px;
  min-width: 0;
  padding: 14px 16px 16px;
}
.rounding-rule-card--clock-in {
  --rounding-section-color: var(--sky);
  --rounding-section-soft: var(--sky-soft);
}
.rounding-rule-card--clock-out {
  --rounding-section-color: var(--accent);
  --rounding-section-soft: var(--accent-soft);
}
.rounding-rule-card--break {
  --rounding-section-color: var(--ok);
  --rounding-section-soft: var(--ok-soft);
}
.rounding-rule-card legend {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: var(--rounding-section-color);
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
  padding: 0 10px;
}
.rounding-rule-card legend > span:last-child {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.25;
}
.rounding-rule-card legend small {
  color: var(--ink-mute);
  font-size: 10px;
  font-weight: 500;
}
.rounding-section-mark {
  align-items: center;
  background: var(--rounding-section-color);
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  height: 30px;
  justify-content: center;
  letter-spacing: .03em;
  min-width: 30px;
  padding: 0 6px;
}
.rounding-section-help {
  background: var(--rounding-section-soft);
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
  margin: 4px 0 14px;
  padding: 8px 10px;
}
.rounding-rule-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.rounding-rule-empty {
  background: var(--rounding-section-soft);
  border: 1px dashed var(--rounding-section-color);
  border-radius: 8px;
  color: var(--ink-mute);
  font-size: 11px;
  padding: 12px;
  text-align: center;
}
.rounding-rule-row {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--rounding-section-color);
  border-radius: 9px;
  display: grid;
  gap: 12px;
  grid-template-columns: 26px minmax(0, 1fr);
  padding: 12px;
}
.rounding-rule-order {
  align-items: center;
  background: var(--rounding-section-soft);
  border-radius: 50%;
  color: var(--rounding-section-color);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 22px;
  justify-content: center;
  width: 22px;
}
.rounding-rule-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.rounding-rule-heading {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.rounding-rule-type {
  align-items: center;
  color: var(--ink-mute);
  display: grid;
  font-size: 11px;
  font-weight: 600;
  gap: 8px;
  grid-template-columns: 68px minmax(0, 390px);
  min-width: 0;
}
.rounding-rule-type select {
  background: #fff;
  min-width: 0;
  width: 100%;
}
.rounding-rule-values,
.rounding-rule-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.rounding-rule-values label {
  display: inline-flex;
}
.rounding-rule-values {
  background: var(--paper-warm);
  border-radius: 7px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.8;
  padding: 8px 10px;
}
.rounding-inline-field input[type="time"] {
  font-weight: 700;
  width: 104px;
}
.rounding-inline-field input[type="number"] {
  font-weight: 700;
  text-align: right;
  width: 68px;
}
.rounding-inline-field .sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
.rounding-rule-controls {
  flex-wrap: nowrap;
  justify-content: flex-end;
}
.rounding-rule-controls .btn-icon {
  min-height: 30px;
  min-width: 30px;
  padding: 3px 7px;
}
.rounding-rule-card > .btn {
  background: var(--rounding-section-soft);
  border-color: var(--rounding-section-color);
  color: var(--rounding-section-color);
}
.rounding-counts {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  font-size: 11px;
}
.rounding-counts span {
  background: var(--paper-warm);
  border-radius: 6px;
  padding: 7px 8px;
}
table.round-cmp {
  width: 100%; border-collapse: collapse;
  font-size: 12px; margin-top: 10px;
}
table.round-cmp th {
  background: var(--paper-warm);
  padding: 6px 8px;
  border-bottom: 1.5px solid var(--ink);
  text-align: center; font-size: 11px;
  font-weight: 600; color: var(--ink-soft);
}
table.round-cmp td {
  padding: 5px 8px; border-bottom: 1px solid var(--line-soft);
  text-align: center;
}
.rounding-preview-basis {
  background: var(--sky-soft);
  border-left: 3px solid var(--sky);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
  margin-top: 10px;
  padding: 8px 10px;
}
.rounding-current-time,
.rounding-original-time,
.td-value-changed {
  display: inline-block;
  white-space: nowrap;
}
.rounding-original-time {
  color: var(--ink-mute);
  font-size: 10px;
  margin-left: 3px;
}
.td-changed { color: var(--ok); font-weight: 700; background: var(--ok-soft); }
.td-value-changed { color: var(--ok); font-weight: 700; }

/* ── 本部送付 ── */
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  background: var(--paper-warm); color: var(--ink-soft);
  flex-shrink: 0;
}
.step-num.active {
  background: var(--accent); color: #fff;
  box-shadow: 2px 2px 0 var(--ink);
}
.send-step {
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 2px 2px 0 rgba(43,42,39,.08);
}
.send-step .step-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.send-step .step-head .step-title { font-size: 15px; font-weight: 700; }
.send-step .step-body { margin-left: 38px; }

.check-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.check-card.ok { background: var(--ok-soft); border: 1.3px solid var(--ok); }
.check-card.ng { background: var(--bad-soft); border: 1.3px solid var(--bad); }
.check-card .check-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.check-card.ok .check-icon { background: var(--ok); }
.check-card.ng .check-icon { background: var(--bad); }
.check-card .check-label { font-size: 13px; font-weight: 600; }
.check-card.ok .check-label { color: var(--ok); }
.check-card.ng .check-label { color: var(--bad); }
.check-card .check-detail { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

.send-result {
  margin-top: 12px;
  background: var(--ok-soft); border: 1.3px solid var(--ok);
  border-radius: 8px; padding: 10px;
  font-size: 12px; display: none; line-height: 1.6;
}

/* ── マスター ── */
.master-csv-area {
  background: var(--paper-warm);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  display: none;
}
.master-csv-area.show { display: block; }
.master-csv-area .csv-help { font-size: 11px; color: var(--ink-mute); margin: 8px 0; line-height: 1.6; }
.csv-prev table { width: 100%; font-size: 12px; border-collapse: collapse; }
.csv-prev th { background: #fff; padding: 4px 6px; border-bottom: 1.2px solid var(--ink); }
.csv-prev td { padding: 4px 6px; border-bottom: 1px solid var(--line-soft); }

/* ── モーダル ── */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(40,30,20,.5);
  z-index: 100;
  align-items: center; justify-content: center;
  overflow-y: auto; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-bg.open { display: flex; }
.modal-shell {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 28px;
  width: 520px; max-width: 96vw;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
}
.modal-shell--wide {
  width: min(920px, 96vw);
}
.modal-shell h3 { flex: 0 0 auto; font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.modal-body-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.form-row { margin-bottom: 14px; }
.form-row label {
  display: block; font-size: 11px;
  color: var(--ink-mute); margin-bottom: 4px;
  letter-spacing: .3px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 8px 10px;
  border: 1.3px solid var(--ink); border-radius: 6px;
  font-size: 13px;
}
.form-row .radio-row {
  display: flex; flex-direction: row; gap: 16px;
  align-items: center; padding: 6px 0;
}
.form-row .radio-row label {
  display: inline-flex;
  align-items: center; gap: 6px;
  margin: 0; padding: 0;
  font-size: 13px; color: var(--ink);
  cursor: pointer; white-space: nowrap;
}
.form-row .radio-row input[type=radio] {
  width: auto; margin: 0; cursor: pointer;
}
.form-row .radio-help { font-size: 10px; color: var(--ink-mute); margin-top: 2px; }
.modal-btns {
  display: flex; gap: 8px;
  justify-content: flex-end;
  margin-top: 22px;
  flex: 0 0 auto;
}

/* ── プログレスバー (ホーム) ── */
.progress-multi {
  height: 14px;
  background: var(--paper-warm);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

/* ── ホーム フィルタ用 ── */
.home-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.dynamic-error {
  text-align: center;
  color: var(--bad);
  padding: 30px;
  font-size: 12px;
}
.missing-alert-icon { font-size: 18px; }
.alert-detail {
  font-size: 12px;
  color: var(--ink-soft);
}
.alert-action {
  margin-left: auto;
  flex-shrink: 0;
}
.missing-list-card { padding: 14px; }
.missing-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.missing-list-title {
  font-size: 13px;
  font-weight: 700;
}
.missing-save-all { margin-left: auto; }
.missing-table { font-size: 12px; }
.missing-time-input {
  font-family: monospace;
  font-size: 12px;
  border: 1.5px solid var(--bad);
  border-radius: 4px;
  padding: 3px 6px;
  background: var(--bad-soft);
  width: 88px;
  color: var(--bad);
  font-weight: 700;
}
.row-action-button {
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 700;
}
.action-secondary { margin-left: 4px; }
.missing-badge {
  display: inline-block;
  background: var(--bad-soft);
  color: var(--bad);
  border: 1px solid var(--bad);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
}
.muted-inline {
  font-size: 11px;
  color: var(--ink-mute);
}
.staff-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
  vertical-align: middle;
}
.staff-status-dot--ok { background: var(--ok); }
.staff-status-dot--bad { background: var(--bad); }
.name-cell { font-weight: 700; }
.name-cell--medium { font-weight: 600; }
.kana-cell {
  color: var(--ink-mute);
  font-size: 11px;
}
.service-type-cell { font-size: 11px; }
.unit-suffix {
  color: var(--ink-mute);
  font-size: 11px;
}
.confirm-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.empty-table-cell {
  text-align: center;
  padding: 30px;
  color: var(--ink-mute);
}
.empty-table-cell--compact {
  text-align: center;
  color: var(--ink-mute);
  padding: 14px;
}
.empty-table-cell--normal {
  text-align: center;
  color: var(--ink-mute);
  padding: 20px;
}
.weekday-sun { color: var(--bad); }
.weekday-sat { color: var(--sky); }
.weekday-normal { color: var(--ink-soft); }
.service-cell { padding: 2px; }
.modal-message { font-size: 14px; }
.modal-message-sm { font-size: 13px; }
.modal-message-error { color: var(--bad); }
.modal-message-ok { color: var(--ok); }
/* ── 利用者設定: カード型一覧（クリックで詳細ページへ遷移） ── */
.user-csv-helper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.user-csv-helper.initially-hidden { display: none; }
.user-tools-sep { flex-basis: 100%; height: 0; }
.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.user-card:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-ink); }
.user-card.inactive { opacity: .55; background: var(--paper-warm); }
.user-card-body { flex: 1; min-width: 0; }
.user-card-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; letter-spacing: .3px; }
.user-card-meta {
  display: grid;
  grid-template-columns: 60px 170px 150px 160px 90px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.user-card-meta > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-card-meta .user-meta-svc .chip,
.user-card-meta .user-meta-status .pill {
  display: inline-flex;
  width: 100%;
  justify-content: center;
}
.user-card-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.user-list-empty { padding: 24px; text-align: center; color: var(--ink-mute); }
.filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  padding: 2px 4px;
}
.filter-checkbox input[type="checkbox"] { margin: 0; cursor: pointer; }

@media (max-width: 780px) {
  .rounding-rule-row {
    gap: 6px;
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 8px;
  }
  .rounding-rule-heading {
    gap: 8px;
  }
  .rounding-rule-type {
    grid-template-columns: minmax(0, 1fr);
  }
  .rounding-rule-controls {
    gap: 4px;
  }
  .rounding-rule-controls .btn-icon {
    min-width: 28px;
    padding-inline: 5px;
  }
  .user-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .user-card-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .user-card-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
