:root {
  --ink: #1c2024;
  --muted: #5d6672;
  --line: #dfe3e8;
  --bg: #f6f7f9;
  --card: #ffffff;
  --accent: #1f5f8b;
  --accent-soft: #eaf2f8;
  --ok: #1d7a4d;
  --warn: #a8531b;
  --warn-soft: #fdf3e9;
  --danger: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}

header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  align-items: baseline;
  gap: 20px;
}
header h1 { font-size: 16px; margin: 0; font-weight: 700; }
header nav { margin-left: auto; display: flex; gap: 18px; }
header a { color: var(--muted); text-decoration: none; font-size: 14px; }
header a:hover { color: var(--accent); }

main { max-width: 940px; margin: 0 auto; padding: 28px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 18px;
}

h2 { font-size: 19px; margin: 0 0 6px; }
h3 { font-size: 15px; margin: 22px 0 10px; }
.lead { color: var(--muted); margin: 0 0 18px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

a.case { color: var(--accent); font-weight: 600; text-decoration: none; }
a.case:hover { text-decoration: underline; }

.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; background: var(--accent-soft); color: var(--accent);
}
.pill.frozen { background: #eceff2; color: var(--muted); }
.pill.late { background: #fdecea; color: var(--danger); }

/* ステップ */
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.steps a {
  font-size: 13px; padding: 5px 12px; border-radius: 6px;
  text-decoration: none; color: var(--muted); background: var(--card);
  border: 1px solid var(--line);
}
.steps a.here { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 入力欄 */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 3px; }
.field .goes-to { font-size: 12px; color: var(--accent); margin-top: 3px; }
input[type=text], input[type=number], input[type=time], input[type=date],
select, textarea {
  width: 100%; padding: 8px 10px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}
textarea { min-height: 80px; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
.checkbox label { margin: 0; }
.tag {
  font-size: 11px; padding: 1px 7px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent); margin-left: 6px;
  font-weight: 600;
}

button, .button {
  font: inherit; font-weight: 600; padding: 9px 20px; border-radius: 7px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  cursor: pointer; text-decoration: none; display: inline-block;
}
button.ghost, .button.ghost { background: #fff; color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; }
.actions .spacer { margin-left: auto; }

.notice {
  background: var(--warn-soft); border-left: 3px solid var(--warn);
  padding: 12px 16px; border-radius: 0 6px 6px 0; margin-bottom: 18px;
  font-size: 14px;
}
.notice.bad { background: #fdecea; border-color: var(--danger); }
.notice.good { background: #edf7f1; border-color: var(--ok); }

.check { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.check .mark { font-weight: 700; width: 20px; flex: none; }
.check.ok .mark { color: var(--ok); }
.check.ng .mark { color: var(--warn); }
.check .body strong { display: block; font-size: 14px; }
.check .body span { font-size: 13px; color: var(--muted); }

.amounts td:first-child { color: var(--muted); }
.amounts tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.empty { color: var(--muted); text-align: center; padding: 36px 0; }

/* 書類の読み取り・英訳 */
.upload {
  background: #fafbfc; border: 1px dashed var(--line);
  border-radius: 8px; padding: 16px 18px; margin-bottom: 22px;
}
.upload input[type=file] { width: auto; margin-right: 10px; border: none; padding: 0; }
.upload form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ocr-result { margin-top: 14px; }
.ocr-result table { margin: 8px 0 12px; }
.ocr-result td:first-child { color: var(--muted); width: 34%; font-size: 13px; }

/* 受入人数の早見表 */
.quota {
  background: #fafbfc; border: 1px solid var(--line);
  border-radius: 8px; padding: 16px 18px; margin-bottom: 22px;
}
.quota table { font-size: 13px; }
.quota tr.here { background: var(--accent-soft); font-weight: 700; }
.scroll { overflow-x: auto; }

/* 年間カレンダーなどの添付欄 */
.upload.required { border: 2px solid var(--danger); background: #fdecea; }
.upload.required h3 { color: var(--danger); }
.attach-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line);
}
.attach-row form { display: flex; gap: 8px; align-items: center; }
.attach-row input[type=file] { width: auto; border: none; padding: 0; }

.tag.req { background: #fdecea; color: var(--danger); }

/* 案件一覧の「消す」「元に戻す」。行の右端に小さく置きます */
.row-action { white-space: nowrap; }
button.link {
  background: none; border: none; padding: 2px 4px;
  color: var(--muted); text-decoration: underline;
  font-size: 12px; cursor: pointer; box-shadow: none;
}
button.link:hover { color: var(--accent); }
button.link.danger:hover { color: var(--danger); }

/* 「＋」で増やせる入力（実習実施場所・勤務時間） */
.repeat { margin: 18px 0 6px; }
.repeat-title { margin: 0 0 8px; font-size: 15px; }
.repeat-row {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px 2px; margin-bottom: 12px; background: #fafbfc;
}
.repeat-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.repeat-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}
.repeat-add { margin-top: 2px; }

/* 押したボタンの「処理中」の印 */
.spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff; border-radius: 50%;
  vertical-align: -2px;
  animation: spin .7s linear infinite;
}
button.ghost .spinner {
  border-color: rgba(0, 0, 0, .18); border-top-color: var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}

/* 介護の「受入人数（施設ごと）」 */
.site {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px; margin-bottom: 10px; background: #fafbfc;
}
.site-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.site.over { border-color: var(--danger); background: #fdecea; }
.over-note { color: var(--danger); font-weight: 700; margin: 6px 0 0; }

/* 一覧を打ち込んで絞り込む欄（職種・作業） */
input.find { margin-bottom: 6px; }
select[size] { height: auto; padding: 6px; }

/* 特定技能の案件の印。技能実習と取り違えると様式が丸ごと違います */
.pill.ssw { background: #eaf6ee; color: #1d6b3a; }
