* { box-sizing: border-box; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: #f4f6f8;
  color: #222;
  margin: 0;
  padding: 0;
}
.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}
.wrap-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}
h1 { font-size: 1.4rem; margin-bottom: 4px; }
.form-header { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.form-header .brand-logo { height: 34px; width: auto; display: block; }
.form-header h1 { margin-bottom: 0; }
.school-search-wrap { position: relative; }
.school-suggestions {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border: 1px solid #dde3ea;
  border-top: none;
  max-height: 220px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}
.school-suggestion-item { padding: 8px 10px; cursor: pointer; font-size: 0.9rem; }
.school-suggestion-item:hover, .school-suggestion-item:active { background: #eef4fb; }
h2 { font-size: 1.1rem; margin-top: 32px; border-left: 4px solid #2c6fbb; padding-left: 8px; }
.subtitle { color: #666; font-size: 0.9rem; margin-bottom: 24px; }
fieldset {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fff;
}
legend { font-weight: bold; padding: 0 6px; color: #2c6fbb; }
label { display: block; font-size: 0.85rem; color: #444; margin-top: 10px; margin-bottom: 4px; }
input[type=text], input[type=date], input[type=tel], input[type=number], input[type=password],
select, textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  font-size: 1rem;
}
textarea { min-height: 70px; }
.row { display: flex; gap: 12px; }
.row > div { flex: 1; }
.radio-group label, .checkbox-group label { display: inline-flex; align-items: center; gap: 4px; margin-right: 14px; font-size: 0.9rem; }
.radio-group input, .checkbox-group input { width: auto; }
.hint { font-size: 0.78rem; color: #888; margin-top: 2px; }
/* 事務処理欄「コース」欄の複数選択(行追加/削除)UI(2026-08-05追加) */
/* 「＋」は行の下ではなく区分名の右側に並べることで、行が増えてもスクロール量が
   増えにくいようにする(2026-08-05更新)。ボタン文言は「＋ コースを追加」のような
   長い文字列ではなく、行の「－」ボタンと同じ大きさの「＋」だけにする(2026-08-05再更新)。 */
.course-field-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.course-field-header label { margin: 0; }
.course-multi { margin-top: 4px; }
.course-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }

/* 事務処理欄(教室長が実際に入力する欄)を、保護者入力・読み取り専用の内容と
   ひと目で区別できるよう背景色を変える(2026-08-06追加)。 */
.staff-input-section {
  background: #fff8e6;
  border: 1px solid #f0d999;
  border-radius: 10px;
  padding: 4px 16px 16px;
  margin-bottom: 16px;
}
.staff-input-section h2 { margin-top: 16px; border-left-color: #b8860b; color: #7a5b00; }
.staff-input-section fieldset { background: #fffdf5; }
.staff-input-section legend { color: #7a5b00; }
/* 自動採番される生徒コードは変更できないため、入力欄のような白枠は付けず、
   ただのテキスト表示にして編集不可であることを分かりやすくする(2026-08-06追加)。 */
.readonly-value {
  padding: 8px 0 2px;
  font-size: 1.05rem;
  font-weight: bold;
  color: #222;
}
.course-row select { flex: 1; margin-top: 0; }
.course-row-remove, .course-row-add {
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
}
.actions { margin-top: 24px; text-align: center; }
button, .btn {
  background: #2c6fbb;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
button.secondary, .btn.secondary { background: #7a8794; }
/* 表の中のボタン・リンクは行の幅が大きくなりすぎないよう、さらに小さくする(2026-08-04追加) */
td button, td .btn, th button, th .btn {
  padding: 5px 10px;
  font-size: 0.8rem;
}
.error { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c3; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.notice { background: #eef4fb; border: 1px solid #c9dcf0; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 0.9rem; }
table { width: 100%; border-collapse: collapse; background: #fff; margin-top: 8px; }
th, td { border: 1px solid #e0e5ea; padding: 8px 10px; font-size: 0.88rem; text-align: left; }
th { background: #f0f3f6; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; }
.badge.submitted { background: #fff4e0; color: #a66a00; }
.badge.processed { background: #e5f6e8; color: #1b7a30; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.topbar form { display: inline; }
.readonly-block { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 0.88rem; }
.readonly-block div { margin: 3px 0; }
.disabled-note { color: #999; font-size: 0.85rem; }

/* 一覧画面の絞り込みバー(2026-08-04追加): 縦に長いfieldsetではなく、
   1行にまとまったコンパクトな見た目にする。 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0 6px;
}
.filter-bar > div { display: flex; flex-direction: column; }
.filter-bar label { margin: 0 0 3px; font-size: 0.78rem; }
.filter-bar input, .filter-bar select { width: auto; padding: 6px 8px; font-size: 0.9rem; }
.filter-bar button, .filter-bar .btn { padding: 7px 16px; font-size: 0.9rem; }
.quick-links { font-size: 0.82rem; color: #666; margin: 0 0 16px; }
.quick-links a { margin-right: 12px; }

/* 管理者画面のヘッダー・ナビゲーション(2026-08-04追加): 社内の他システム
   (給与明細確認・交通費申請システム)と近い見た目に揃えるための共通スタイル。 */
.site-header {
  background: #fff;
  border-bottom: 1px solid #dde3ea;
  padding: 14px 24px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.site-header .brand { font-size: 1.1rem; font-weight: bold; color: #222; }
.site-header .brand-logo { height: 34px; width: auto; display: block; }
.site-header .system-note { font-size: 0.8rem; color: #b3261e; margin-left: 4px; }
.site-nav {
  background: #f8fafc;
  border-bottom: 1px solid #dde3ea;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.site-nav a {
  display: inline-block;
  padding: 11px 14px;
  color: #444;
  text-decoration: none;
  font-size: 0.88rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #2c6fbb; }
.site-nav a.active { color: #2c6fbb; border-bottom-color: #2c6fbb; font-weight: bold; }
.site-nav .nav-spacer { margin-left: auto; }
.site-nav form { display: inline; }
.site-nav button.secondary { padding: 6px 14px; font-size: 0.82rem; }
.card {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 10px;
  padding: 24px 28px;
  margin-top: 20px;
}
.card h2:first-child, .card h1:first-child { margin-top: 0; }
.home-section { margin-bottom: 28px; }
.home-section h3 { font-size: 0.95rem; color: #2c6fbb; border-left: 4px solid #2c6fbb; padding-left: 8px; margin-bottom: 10px; }
.home-links a { font-weight: bold; }
.home-links .count { color: #888; font-size: 0.85rem; margin-left: 8px; }
.home-links p { margin: 8px 0; }
