body {
  /* 最新のfont-familyを1箇所に統合 */
  background-color: #f5f5f5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}

/* ヘッダー */
.app-header {
  background: linear-gradient(90deg, #333 0%, #111 100%);
  color: #fff;
}
.app-header .navbar-brand {
  font-weight: 600;
  letter-spacing: .08em;
}
.app-header .nav-link {
  color: #eee !important;
  font-size: 0.9rem;
}
.app-header .nav-link i {
  margin-right: .25rem;
}
.app-header .btn-outline-light {
  font-size: 0.85rem;
}

/* メインコンテナ */
.app-main {
  padding: 1.5rem 1.25rem 2rem;
  max-width: 1180px;
}

/* パンくず */
.breadcrumb {
  background-color: transparent;
  padding-left: 0;
  margin-bottom: .75rem;
}
.breadcrumb a {
  text-decoration: none;
}

/* ページタイトル・タイトル */
.page-title {
  font-size: 1.6rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
}
.page-title i {
  font-size: 1.6rem;
  color: #555;
}

/* ページ説明 */
.page-description {
  font-size: 0.9rem;
}

/* セクション見出し */
.menu-section-title,
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
}
.menu-section-title {
  margin: 1.5rem 0 .75rem;
  border-left: 4px solid #333;
  padding-left: .5rem;
}
.section-title {
  margin-bottom: 1.2rem;
}

/* メニューのボタン */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: .75rem 1.25rem;
  margin-bottom: .75rem;
}
.btn-menu {
  background: linear-gradient(180deg, #2f6cae 0%, #24588c 100%);
  color: #fff;
  border-radius: 6px;
  border: 1px solid #1e4c78;
  padding: .65rem 1rem;
  font-size: 0.95rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.btn-menu:hover {
  background: linear-gradient(180deg, #3878bd 0%, #285f96 100%);
  color: #fff;
  text-decoration: none;
}
.btn-menu i {
  font-size: 1rem;
}

/* カード類共通（検索パネル・セクションカード・エントリーパネル） */
.search-panel .card,
.section-card .card,
.entry-panel .card {
  border-radius: 6px;
  border-color: #ddd;
}
.search-panel .card-header,
.section-card .card-header,
.entry-panel .card-header {
  background: #f2f2f2;
  border-bottom-color: #ddd;
  font-weight: 600;
  display: flex;
  align-items: center;
}
.search-panel .card-header i,
.section-card .card-header i,
.entry-panel .card-header i {
  margin-right: .4rem;
  color: #777;
}
.search-panel .card-body,
.section-card .card-body,
.entry-panel .card-body {
  padding: 1.2rem 1.4rem 1.4rem;
}

/* エントリーパネル .card-body 追加パディングのみ */
.entry-panel .card-body {
  padding-bottom: 1.6rem;
}

/* 検索条件カード（赤系） */
.transfer-panel .card {
  border-radius: 6px;
  border-color: #f5c2c7;
}
.transfer-panel .card-header {
  background: #f8d7da;
  border-bottom-color: #f5c2c7;
  font-weight: 600;
  display: flex;
  align-items: center;
}
.transfer-panel .card-header i {
  margin-right: .4rem;
  color: #b34b54;
}
.transfer-panel .card-body {
  padding: 1.2rem 1.4rem 1.4rem;
  background-color: #fff;
}

/* 年度選択行 */
.year-select-row {
  margin: 1.8rem 0 1.2rem;
}

/* フォーム共通 */
.search-panel .form-label,
.section-card .form-label,
.entry-panel .form-label,
.form-label {
  font-size: 0.9rem;
  font-weight: 600;
}
.search-panel .form-control,
.section-card .form-control,
.entry-panel .form-control,
.form-control,
.search-panel .form-select,
.section-card .form-select,
.entry-panel .form-select,
.form-select {
  font-size: 0.9rem;
  border-radius: 4px;
}

/* 必須ラベル */
.label-required {
  color: #d9534f;
  margin-right: .25rem;
}

/* 補助説明・ヘルプテキスト（統合） */
.form-text,
.search-help,
.help-text {
  font-size: 0.8rem;
  color: #555;
  padding-top: .45rem;
}
.search-help {
  padding-top: .45rem;
}

/* help-textだけの微調整 */
.help-text {
  padding-top: .4rem;
}

/* キーワード欄 */
.keyword-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.kg-addon {
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* 下部アクション */
.bottom-actions {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

/* 日付範囲入力 */
.input-daterange .input-group-text {
  border-radius: 0 4px 4px 0;
}

/* ボタン */
.btn-search {
  min-width: 160px;
}
.btn-issue,
.btn-update {
  background: linear-gradient(180deg, #f3a033 0%, #f08a00 100%);
  border-color: #ef8b00;
  color: #fff;
  font-weight: 600;
}
.btn-issue:hover,
.btn-update:hover {
  background: linear-gradient(180deg, #f7ad47 0%, #f2900a 100%);
  color: #fff;
}
.btn-confirm,
.btn-update {
  min-width: 140px;
}
.btn-confirm {
  min-width: 200px;
}
.btn-create {
  min-width: 90px;
}
.btn-select {
  min-width: 120px;
}
.btn-download {
  min-width: 150px;
}
.btn-detail {
  min-width: 100px;
}

/* ページネーション */
.pagination .page-link,
.pager-wrap .page-link {
  border-radius: 20px;
  padding: .35rem 1.2rem;
}

/* ページネーションラッパー */
.pager-wrap {
  display: flex;
  justify-content: center;
  margin: 1.2rem 0 .3rem;
}

/* 右側の注意書き */
.help-col {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.6;
}

/* 一覧・テーブル・テーブルラッパー */
.result-table-wrapper,
.month-list {
  margin-top: 1.5rem;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}
.result-head,
.month-header {
  padding: .35rem .75rem;
  border-bottom: 1px solid #ddd;
  font-size: 0.85rem;
  background-color: #f5f5f5;
  display: flex;
  justify-content: space-between;
}
.month-header {
  padding: .6rem 1rem;
  font-size: 0.9rem;
}
.result-body {
  padding: .75rem;
}
.result-row,
.month-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-size: 0.9rem;
  padding: .7rem 1rem;
  border-top: 1px solid #eee;
}
.month-row:nth-child(2) {
  border-top: none;
}
.result-name-label,
.month-label {
  min-width: 3em;
  color: #555;
  font-weight: 600;
}
.month-label {
  min-width: 8em;
}
.month-status {
  flex: 1;
}
.month-status strong {
  font-weight: 600;
}
.loading-row td {
  padding: 1.4rem 1rem;
  color: #555;
}
.message-empty {
  margin-top: 2rem;
  font-size: 0.95rem;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem 1rem;
  flex-wrap: wrap;
  gap: .75rem;
}
.table thead th {
  background-color: #f5f5f5;
  font-size: 0.85rem;
  white-space: nowrap;
}
.table thead th.sortable {
  cursor: pointer;
}
.table thead th.sortable i {
  font-size: 0.8rem;
  margin-left: .25rem;
  color: #888;
}
.table tbody td {
  font-size: 0.85rem;
  vertical-align: middle;
}

/* レポート系・明細テーブル */
.report-wrapper {
  max-width: 900px;
  margin: 40px auto 60px;
  text-align: center;
  padding: 0 12px;
}
.report-title {
  font-size: 2.0rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  margin-bottom: .2rem;
}
.report-period {
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}
.summary-block {
  font-size: 1.05rem;
  line-height: 2.2;
  margin-bottom: 3rem;
}
.summary-block .label {
  display: inline-block;
  min-width: 6em;
  text-align: left;
}
.summary-block .value {
  display: inline-block;
  min-width: 10em;
  text-align: right;
  font-size: 1.2rem;
  font-weight: 600;
}
.summary-block .value.small {
  font-size: 1rem;
  font-weight: 500;
}
.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  font-size: 0.9rem;
}
.detail-table th,
.detail-table td {
  border: 1px solid #000;
  padding: 4px 8px;
  white-space: nowrap;
}
.detail-table th {
  background-color: #f5f5f5;
  font-weight: 600;
}
.detail-table td:nth-child(2),
.detail-table td:nth-child(3),
.detail-table td:nth-child(5),
.detail-table td:nth-child(6) {
  text-align: right;
}
.detail-table td:nth-child(1),
.detail-table td:nth-child(4) {
  text-align: left;
}
@media (max-width: 768px) {
  .detail-table {
    font-size: 0.8rem;
  }
}

/* メディアクエリ重複統合+ページタイトルレスポンシブ統合 */
@media (max-width: 991.98px), (max-width: 767.98px) {
  .page-title {
    font-size: 1.4rem;
  }
  .table-responsive {
    font-size: 0.8rem;
  }
  .help-col {
    margin-top: 1rem;
  }
  .month-row {
    flex-wrap: wrap;
    gap: .4rem;
  }
  .month-status {
    flex-basis: 100%;
  }
}

/* .perm-title */
.perm-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: .3rem;
  margin-bottom: .5rem;
}

/* メインコンテナPC幅 */
@media (min-width: 992px) {
  .app-main {
    max-width: 1100px;
    margin: 0 auto;
  }
}
/* 未発行一覧 */
.status-badge {
  display: inline-block;
  background: #6c757d;  /* Bootstrap の secondary と同じ色 */
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

/* === CSV一括登録エリア === */

.csv-section-title {
  margin-top: 40px;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 600;
}

/* 全体のグレー背景ブロック */
.csv-block {
  padding: 20px 24px 24px;
  background: #f7f7f7;
  border-top: 1px solid #e0e0e0;
}

/* アップロード行：ファイル選択 + 緑ボタンを横並び */
.csv-upload-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

/* ファイル入力部分（左側） */
.csv-upload-row input[type="file"] {
  flex: 1 1 auto;
  border: 1px solid #dddddd;
  border-right: none;
  padding: 10px 12px;
  font-size: 14px;
  background: #ffffff;
}

/* 「ファイルを選択」ボタンぽさを維持するための調整（WebKit用） */
.csv-upload-row input[type="file"]::-webkit-file-upload-button {
  padding: 10px 16px;
  border: none;
  border-right: 1px solid #dddddd;
  background: #ffffff;
  font-size: 14px;
  cursor: pointer;
}

/* 右側の緑「アップロード」ボタン */
.btn-csv-upload {
  flex: 0 0 auto;
  padding: 0 32px;
  border: none;
  border-radius: 0 4px 4px 0;
  background: #158a3a; /* スクショに近いグリーン */
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-csv-upload:hover {
  background: #117132;
}

/* テンプレDLボタン（下のグレーの角丸ボタン） */
.csv-template-wrap {
  margin-top: 18px;
}

.btn-csv-template {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 4px;
  border: 1px solid #bbbbbb;
  background: #f5f5f5;
  color: #555555;
  font-size: 14px;
  text-decoration: none;
}

.btn-csv-template:hover {
  background: #e8e8e8;
  color: #333333;
}

.text-notice {
  color: #007bff;
}

/* 子ども食堂「変更」モーダルを確実にスクロールさせる */
#editModal .modal-dialog {
  margin: 1rem auto; /* 画面上下に余白 */
}

#editModal .modal-content {
  max-height: calc(100vh - 2rem); /* 画面からはみ出さない */
}

#editModal .modal-body {
  overflow-y: auto;
  max-height: calc(100vh - 200px); /* header + footer 分を差し引く（必要なら調整） */
  padding-bottom: 1.25rem; /* 一番下が見切れないように */
}

:root {
  --bg1: #f4f6f8;
  --bg2: #e9eef2;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(255, 255, 255, 0.75);
  --text: #1f2933;
  --sub: #5b6670;
  --accent: #2f7d67;
  --accent-soft: #e8f4ef;
  --shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
  --radius: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
      radial-gradient(circle at top left, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0) 35%),
      linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);
}

.eco-report-page {
  min-height: 100vh;
  padding: 48px 20px 30px;
}

.eco-report-container {
  max-width: 1080px;
  margin: 0 auto;
}

.eco-hero {
  max-width: 900px;
  margin: 0 auto 36px;
  text-align: center;
}

.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.05);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

.eco-badge::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.eco-report-title {
  margin: 0;
  font-size: 50px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: var(--text);
}

.eco-report-period {
  margin-top: 14px;
  font-size: 18px;
  color: var(--sub);
  font-weight: 500;
}

.eco-report-desc {
  max-width: 720px;
  margin: 60px auto 30px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--sub);
}

.eco-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 42px;
}

/* 集計表 */
.eco-card {
  position: relative;
  padding: 28px 26px 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.eco-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent) 0%, #67b39d 100%);
}

.eco-card-label {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}

.eco-card-value {
  font-size: clamp(28px, 2.2vw, 46px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  word-break: break-word;
  text-align: right;
}

.eco-card-sub {
  margin-top: 12px;
  font-size: 24px;
  color: var(--sub);
  font-weight: 700;
  text-align: right;
}

.eco-card-note {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31, 41, 51, 0.08);
  font-size: 13px;
  line-height: 1.7;
  color: #6a7480;
}

.eco-footer-note {
  max-width: 900px;
  margin: 28px auto 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  color: #6a7480;
}

.eco-error {
  max-width: 760px;
  margin: 40px auto 0;
  padding: 16px 18px;
  background: #fff3f3;
  border: 1px solid #f0caca;
  border-radius: 14px;
  color: #b13d3d;
  text-align: left;
  font-size: 14px;
  line-height: 1.8;
  box-shadow: 0 10px 25px rgba(177, 61, 61, 0.08);
}

@media (max-width: 960px) {
  .eco-summary-grid {
      grid-template-columns: 1fr;
      max-width: 680px;
      margin-left: auto;
      margin-right: auto;
  }
}

@media (max-width: 640px) {
  .eco-report-page {
      padding: 28px 16px 56px;
  }

  .eco-card {
      padding: 22px 18px 20px;
      border-radius: 20px;
  }
  .eco-report-title {
    font-size: 40px;
  }

  .eco-report-desc {
      font-size: 14px;
  }

  .eco-card-value {
      font-size: 32px;
  }
}