* { box-sizing: border-box; }
body {
  font-family: 'Meiryo', 'メイリオ', 'Hiragino Sans', sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #222;
}
header.santa-header {
  background: #1b5e20;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
header.santa-header h1 {
  font-size: 18px;
  margin: 0;
  white-space: nowrap;
}
#santa-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.santa-nav-link {
  color: #e8f5e9;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 4px;
}
.santa-nav-link:hover { background: rgba(255,255,255,.15); }
.santa-nav-link.active { background: #fff; color: #1b5e20; font-weight: bold; }
.santa-nav-logout {
  margin-left: auto;
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.santa-nav-logout:hover { background: rgba(255,255,255,.15); }
main.santa-main {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.santa-card {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
table.santa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.santa-table th, table.santa-table td {
  border: 1px solid #ddd;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
table.santa-table th {
  background: #eef3ee;
  position: sticky;
  top: 0;
}
table.santa-table input, table.santa-table select {
  width: 100%;
  font-size: 13px;
  padding: 3px 4px;
  border: 1px solid #ccc;
  border-radius: 3px;
}
table.santa-table tr.needs-check { background: #fff8e1; }
.santa-btn {
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}
.santa-btn:hover { background: #1b5e20; }
.santa-btn.secondary { background: #607d8b; }
.santa-btn.secondary:hover { background: #455a64; }
.santa-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.santa-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.santa-login-box {
  background: #fff;
  border-radius: 10px;
  padding: 32px 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  width: 320px;
}
.santa-login-box h1 { font-size: 20px; margin: 0 0 20px; text-align: center; color: #1b5e20; }
.santa-login-box input {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 14px;
}
.santa-login-box button {
  width: 100%;
  padding: 10px;
  font-size: 15px;
}
.santa-upload-drop {
  border: 2px dashed #9ccc9c;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  color: #555;
  margin-bottom: 16px;
}
.santa-summary-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 10px; }
.santa-summary-item { font-size: 14px; }
.santa-summary-item b { font-size: 18px; display: block; color: #1b5e20; }

/* 施設を管理（チップ・人数入力） */
.santa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.santa-facility-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  padding: 3px 6px 3px 10px; border-radius: 999px; background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9;
}
.santa-facility-chip.selected { background: #2e7d32; border-color: #1b5e20; color: #fff; }
.santa-facility-chip button { appearance: none; border: none; background: transparent; color: inherit; cursor: pointer; font-size: 14px; padding: 2px; }
.santa-facility-chip-name { appearance: none; border: none; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.santa-facility-add { display: flex; gap: 8px; margin-bottom: 16px; }
.santa-facility-add input { font-size: 14px; padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; }
.santa-headcount-wrap[hidden] { display: none; }
table.santa-table.headcount td input[type="number"] { width: 70px; min-width: 70px; text-align: center; }
table.santa-table.headcount tfoot td { font-weight: bold; background: #eef3ee; }
.santa-headcount-status { font-size: 12px; color: #666; margin: 6px 0 0; min-height: 14px; }

/* バッジ（区分・性別・年・要確認） */
.santa-badge-cat, .santa-badge-gender, .santa-badge-year, .santa-badge-check {
  display: inline-block; font-size: 12px; font-weight: bold; padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}
.santa-badge-cat.cat-a { background: #d9f0ec; color: #1f6e63; }
.santa-badge-cat.cat-b { background: #dce8fb; color: #2a4f8f; }
.santa-badge-cat.cat-c { background: #ece0f8; color: #6b3fa0; }
.santa-badge-gender.gender-m { background: #e2eef7; color: #2b5d82; }
.santa-badge-gender.gender-f { background: #fbe3ea; color: #99305c; }
.santa-badge-year.year-2024 { background: #fae0ba; color: #8a5a12; }
.santa-badge-year.year-2025 { background: #dde1e6; color: #454c54; }
.santa-badge-year.year-2026 { background: #e8f5e9; color: #1b5e20; }
.santa-badge-check { background: #ffebee; color: #c0392b; border-radius: 999px; cursor: default; }
.santa-muted { color: #999; }

/* 区分・男女の複数選択チェックボックス */
.santa-check-group { display: flex; flex-wrap: wrap; gap: 3px 10px; }
.santa-check-item { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.santa-check-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: #2e7d32; cursor: pointer; margin: 0; }

/* 2024+2025実績の施設・区分・性別グループ見出し行 */
tr.santa-group-head td { background: #eef3ee; color: #1b5e20; font-size: 13px; font-weight: bold; padding: 5px 8px; }
tr.santa-row-year-2024 { background: #fdf2e0; }
tr.santa-row-year-2025 { background: #eceef0; }

/* 写真サムネイル・ライトボックス */
.santa-thumb-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.santa-thumb-btn {
  appearance: none; border: 1px solid #ddd; background: #f2ebdc; padding: 0; width: 42px; height: 42px;
  border-radius: 6px; overflow: hidden; cursor: zoom-in; flex: none;
}
.santa-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.santa-lightbox-overlay {
  position: fixed; inset: 0; background: rgba(10,8,4,.82); display: flex; align-items: center; justify-content: center;
  z-index: 60; padding: 24px;
}
.santa-lightbox-overlay[hidden] { display: none; }
.santa-lightbox-overlay img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.santa-lightbox-close {
  position: absolute; top: 16px; right: 16px; background: #fff; border: none; border-radius: 999px;
  width: 34px; height: 34px; font-size: 16px; cursor: pointer;
}
.santa-lightbox-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; }

/* 分配パネル・写真取得パネルなどのモーダル */
.santa-modal-overlay { position: fixed; inset: 0; background: rgba(10,8,4,.5); display: flex; align-items: center; justify-content: center; z-index: 55; padding: 20px; }
.santa-modal-overlay[hidden] { display: none; }
.santa-modal-box { background: #fff; border-radius: 10px; padding: 18px 20px; max-width: 760px; width: 100%; max-height: 86vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.santa-modal-box h3 { font-size: 17px; color: #1b5e20; margin: 0 0 8px; }
.santa-modal-item-name { font-size: 14px; color: #555; margin: 0 0 10px; }
.santa-modal-hint { font-size: 13px; color: #666; margin: 10px 0 0; min-height: 16px; }
.santa-modal-hint.error { color: #c0392b; }
tr.santa-row-incomplete td { background: #ffebee; }
.santa-link-chip { display: inline-flex; align-items: center; font-size: 13px; padding: 2px 8px; border-radius: 999px; background: #eef3ee; color: #1b5e20; text-decoration: none; border: 1px solid #ddd; }
.santa-notice { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; background: #f2ebdc; color: #666; font-size: 13px; }
.santa-notice.warn { background: #ffebee; border-color: #c0392b; color: #c0392b; font-weight: bold; }
