/* ============================================================
   共通（リセット・ヘッダー・ボタン・アイコン等、全画面共通のベーススタイル）
   スマートフォン優先
   ============================================================ */

:root {
  --red: #c00;
  
  --green: #2f7d5a;
  
  --e-green:#4c796a;
  
  --blue: #2f6c97;
  --blue-light: #e2f1fb;
  --blue-dark: #2f607d;
  
  --purple: #6b4570;
  
  --orange-light: #fff8e8;
  
  --gray-light: #f9f9f9;
  
  --pink-light: #fff2f2;
  --pink-dark: #e34267;
  
  --brown: #6e5855;
  
/* button */
  --bt-blue: #38789e;
  
  /* 日報一覧（admin/report_calendar.php）等の状態色 */
  --status-draft-color: #3b7ec9;
  --status-submitted-color: #f4742e;
  --status-confirmed-color: #2f7d5a;
  --status-none-color: #c62828;
}

* {
  box-sizing: border-box;
}

/* スマホのタップ時に一瞬付く既定のハイライト色を無効化。hover/:active等の明示的な状態表示には影響しない */
html {
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 16px;
  color: #333;
  /*background: #fbfbfb;*/
  background: #fcfcfc;
  /* ダークモード非対応のため明示。無指定だとOSがダークモードの場合にselect等のネイティブ部品が暗い配色になり文字が読めなくなることがある */
  color-scheme: light;
  
  line-height: 1.5;
}


/* 管理画面共通ヘッダー。世話人画面ヘッダー（.report-header__inner）と高さを揃えている。緑帯(.app-header)は全幅、内側(.app-header__inner)はmax-width:1000pxで中央寄せ */
.app-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  background: #2f7d5a;
  color: #fff;
  z-index: 10;
  box-sizing: border-box;
}
.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 16px;
  box-sizing: border-box;
}
.app-header ,.report-header{
  min-height: 65px;
}
.app-header__title {
  flex: 1;
  min-width: 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.app-main {
  padding: 20px;
  max-width: 480px;
  margin: 0 auto;
}

/* 管理画面本文を最大幅1000pxの白いブロックにまとめる（<main class="app-main app-main--wide">、admin/*.php専用。世話人画面の.app-main単体には影響しない） */
.app-main--wide {
  width: 94%;
  max-width: 1000px;
  margin: 28px auto 56px;
  padding: 50px 5%;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

@media (max-width: 699px) {
  .app-main--wide {
    margin: 20px auto 40px;
    padding: 20px 16px;
    border-radius: 8px;
  }
}

/* admin/index.php専用の例外。各区分(.admin-menu__group)が既に個別の白いカードのため、.app-main--wideの背景・枠線・影・paddingだけ打ち消す */
.app-main--wide.app-main--plain {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}


/* button/input/select/textareaはブラウザ既定でhtml/bodyのfont-familyを継承せずOS標準フォントになるため、明示的に継承させる */
button, input, select, textarea {
  font-size: 16px;
  font-family: inherit;
  line-height: 1.4;
}

label {
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
}

input[type="text"],
input[type="password"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* selectのfocus枠はキーボード操作時のみ表示（using-pointer/using-keyboard、common.js） */

input:focus,
textarea:focus {
  border-color: #bbb !important;
  box-shadow: 0 0 0 1px #bbb;
  outline: none;
}



select:focus {
  outline: none;
}

select:focus-visible {
  outline: 2px solid #2f7d5a;
  outline-offset: 1px;
}

html.using-pointer select:focus-visible {
  outline: none;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 14px;
  margin: 20px 0;
  border: none;
  border-radius: 8px;
  background: #4c9c79;
  color: #fff;
  text-align: center;
  text-decoration: none;
}

/* 共通アイコン（Lucide、src/views/parts/icons.php の icon()参照）。文字の高さに合わせ、常にテキストとセットで使う */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  margin-right: 0.35em;
  flex-shrink: 0;
}

.icon--only {
  margin-right: 0;
}

.btn--secondary {
  background: #888;
}

/* 「支援状況」ボタン専用。.btn--secondaryのまま使うと通常時から操作不可時と紛らわしいグレーに
   なるため、通常時だけ薄いグレーに変更する（.btn:disabledは.btn--secondaryより詳細度が高く、
   disabled時は従来どおり自動で優先される） */
.btn--status {
  background: #f5f5f5;
  border: 1px solid #ccc;
  color: #555;
}

/* 「確定を解除する」共通クラス（care/report.php・care/report_finalize.phpで共有）。
   他の.btn--secondary使用箇所（「世話人ページへ戻る」等）には影響させない */
.btn--unconfirm {
  background: #d24040;
  color: #FFF;
}

/* 「支援状況」の操作不可時は、.btn--statusの枠線（通常時専用の見た目）を消し、「支援を記録する」と
   同じ無効ボタン（.btn:disabled、背景・文字色のみでflatな見た目）に完全に揃える。確定済み時
   （disabled属性は付けずタップ可能なまま.btn--looks-disabledを付与するケース）も同様に扱う */
.btn--status:disabled,
.btn--status.btn--looks-disabled {
  border: none;
}

/*
 * 管理画面下部の「管理メニューへ戻る」共通配置。本文の白い角丸カード(.app-main--wide)の外に置き、中央寄せにする。
 * 各ページ側でfooter.php読み込み前に</main>を出力し$mainClosedByPage=trueをセットすることで実現している
 * （src/views/footer.php参照）。
 */
.admin-back-link {
  margin: 30px 0 40px 0;
  text-align: center;
}

.admin-back-link .btn {
  display: inline-block;
  min-width: 220px;
  padding: 12px 28px;
}

/* 世話人ホームの主要ボタンを役割で色分け。出勤/退勤＝塗りつぶし青、支援を記録する＝既存の.btn（緑）のまま */
.btn--work {
  background: var(--bt-blue);
}

/* 日報提出ボタン。警告色は使わず、緑系デザインと調和する薄い青緑にして.btn/.btn--workと区別する */
.btn--submit {
  background: #eaf4f1;
  border: 1px solid #9cc9b8;
  color: #1f5c47;
  font-weight: bold;
}

.btn--danger {
  background: var(--red);
}

/* admin/report.php「日報の確定」確認モーダルの「保存する」ボタン専用（#modal-confirm-secondary、
   openConfirmModal()のsecondaryLabel）。確定（緑）より目立ちすぎない、落ち着いた青にする */
.btn--save {
  background: #1565c0;
}

/* 世話人ホーム「日報を確定する」オレンジカード用（当日分がdraftで本人未確定）。.btn--submit
   （緑枠）と同じ「薄い塗り＋枠線＋濃い文字」構成で、.own-finalize-card--cautionと同じ配色を使う */
.btn--warning {
/*  background: #fdf2e3;
  border: 1px solid #eec98a;
  color: #8a4a12;*/
  background: #FFE5A7;
  border: 1px solid #b6a494;
  color: #7b4d25;
  font-weight: bold;
}

/* admin/report_calendar.php「ひな形予定」設定モーダルの「解除」ボタン用。.btn--danger（真っ赤）ほど
   強くせず、既存の落ち着いた配色に合わせた赤系にする */
.btn--danger-muted {
  background: var(--red);
}

/* 「＋勤務記録を追加」等、頻度の低い補助操作用の控えめなボタン。横幅を内容に合わせて中央配置し、主要操作(.btn)より目立たなくする */
.btn--tab-add {
  display: block;
  width: fit-content;
  margin: 15px auto 4px;
  padding: 6px 22px;
  background: #eee;
  color: #555;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 0.9rem;
  text-align: center;
}

/* disabled属性を付けたボタンの共通表示。状態によって押せなくするボタンで使う */
.btn:disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
}

/* 送信ボタンの連打防止スピナー（lockSubmitButton()、assets/js/common.js）。currentColorを使うため.btn:disabledの文字色に自動で追従する */
.btn--pending-spinner::after {
  content: '';
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.5em;
  vertical-align: -0.15em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.6;
  animation: btn-pending-spin 0.6s linear infinite;
}

@keyframes btn-pending-spin {
  to { transform: rotate(360deg); }
}

/* リンク・ボタン共通の操作反応。PCはhoverで薄く、タップ/クリック中はさらに薄くする */
a, button, .btn {
  transition: opacity 0.15s ease;
}

@media (hover: hover) {
  a:hover, button:not(:disabled):hover, .btn:not(:disabled):hover {
    opacity: 0.8;
  }
}

a:active, button:not(:disabled):active, .btn:not(:disabled):active {
  opacity: 0.7;
}

.actor-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 12px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #cbcbcb;
  border-radius: 8px;
}

.actor-confirm__change {
  color: #2f7d5a;
}

.card--gray{
  background: var(--gray-light);
}

/* 大見出しの下に置く、1段階小さい見出し。1つの大枠を機能ブロックへさらに分ける場合に使う */
.subsection-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.15rem;
  font-weight: bold;
  margin: 0 0 15px;
  color: var(--blue-dark);
}

/* 隣り合う2つの機能ブロック（例：admin/user_detail.phpの支援内容／予定項目）を、彩度を抑えた色分けだけで見分けられるようにする修飾クラス */
.subsection-title--plan {
  color: #3d6da3;
}

/* 各セクション冒頭の説明文（1〜3文程度）専用。.text-mutedと同じ抑えた色調だが行間・余白を詰めて操作領域より目立たないようにする */
.section-desc {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 2px 0 30px;
}

.section-desc:last-child {
  margin-bottom: 0;
}

/* 追加操作をまとめる（利用者管理の「利用者を追加」など）。囲み枠は付けず、ボタンだけを自然に配置する */
.add-section {
  margin-bottom: 20px;
}

.add-section .btn {
  margin: 0;
}

/* 「支援内容を追加」（広め）と「読み込み」（狭め）のように複数のボタンを横並びにする場合。最初のボタンが残り幅いっぱいに広がる */
.add-section--split {
  display: flex;
  gap: 8px;
}

.add-section--split .btn {
  width: auto;
}

.add-section--split .btn:first-child {
  /* flex-shrink:0で1行分の幅より縮まないようにする */
  flex: 1 0 auto;
}

/* 支援内容設定の「支援時刻（なし・あり・必須）」「基本セット（OFF・ON）」用の分割ボタン。枠で囲んだセグメント形式にし、選択中は主ボタンと同じ緑で塗りつぶす */
.segmented-control {
  display: inline-flex;
  border: 1px solid #cfe0d5;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 6px;
  vertical-align: middle;
}

.segmented-control__item {
  flex: 1 1 auto;
  padding: 8px 14px;
  margin: 0;
  width: auto;
  border: none;
  border-left: 1px solid #cfe0d5;
  background: #fff;
  color: #444;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
}

.segmented-control__item:first-child {
  border-left: none;
}

.segmented-control__item.is-selected {
  background: #2f7d5a;
  color: #fff;
}

.care-flag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 12px;
}

.care-flag-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.care-flag-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* 支援内容設定の「基本セット」など、.settings-groupの枠外に直接置く設定行用。専用の背景カードは付けずラベルと.segmented-controlを横並びにするだけの軽い見た目にする */
.care-flag-row--standalone {
  margin-top: 16px;
}

.care-flag-row__label {
  font-weight: bold;
}

/* 名前・支援内容・ひな形項目などを「全体を押せるブロック」として並べる共通部品。.list-block__mainが本体、.list-block__actionsが右側の操作ボタン */
.list-block {
  display: flex;
  align-items: stretch;
  background: #f6f7f6;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  /* カード同士が詰まって見えないよう、単体使用時（支援内容・利用者一覧など）の下余白 */
  margin-bottom: 5px;
  /* ドラッグ対象時に、タップ操作でのスクロールやテキスト選択と競合しないようにする */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* 管理画面の「名前の一覧行」（利用者管理・職員管理）専用の修飾クラス。白い本文ブロック(.app-main--wide)の中で埋もれないよう薄いグレー背景・枠線にする */
.list-block--row {
  background: #FFF;
  border-color: #e3e6e4;
}

@media (hover: hover) {
  .list-block--row:hover {
    background: var(--orange-light);
  }
}

.list-block--row:active {
  background: var(--orange-light);
}

/* .text-muted（0.85rem）は通常文字より小さくline-height:normalのまま混在するとline boxが微妙に広がるため、line-height:1に固定してカード高さを一致させる */
.list-block__main .text-muted {
  line-height: 1;
}

.list-block__main {
  flex: 1;
  min-width: 0;
  display: block;
  text-align: left;
  padding: 14px 12px;
  border: none;
  background: none;
  color: #222;
  font-size: 1rem;
  /* 左側の番号列（.sortable-columns__index）と行の高さをそろえるため、明示的に指定する */
  line-height: 1.4rem;
  text-decoration: none;
  cursor: pointer;
  overflow-wrap: anywhere;
}

/* ドラッグ機能を持たない単純な縦一覧のため、.list-block既定のtouch-action:none／user-select:noneを打ち消す */
#modal-care-content-picker .list-block {
  touch-action: auto;
  user-select: auto;
  -webkit-user-select: auto;
}

.list-block__main[disabled] {
  color: #999;
  cursor: default;
}

/* ドラッグはできるが編集リンクではない項目（ひな形の予定項目名など）用 */
.list-block__main--static {
  cursor: grab;
}

.list-block__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  touch-action: none;
}

.list-block__actions .btn {
  width: auto;
  margin: 0;
  padding: 8px 8px;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* 予定項目一覧（#templateItemList）の削除ボタンだけ、文字を出さないアイコンのみの表示にする */
.template-item-delete-btn {
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ドラッグ中：指・マウスに追従して動いていることが分かるよう浮かせる（position等はJSが設定） */
.list-block.is-dragging {
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  opacity: 0.95;
}

/*
 * 番号付きのカード一覧（予定項目一覧）。番号はカードの中（.list-block__index、.list-block__mainの先頭）へ直接組み込み、
 * 折り返しの有無に関わらず必ず一致するようにしている。.sortable-columnsの外枠自体は、ドラッグ＆ドロップの当たり判定
 * （JS側の.closest('.sortable-columns')）がそのまま使えるよう、名前・構造を変えずに残している。
 */
.sortable-columns {
  display: flex;
  align-items: flex-start;
}

.sortable-columns__list {
  flex: 1;
  min-width: 0;
}

/* カード内の先頭に置く番号（例：「1.」）。文字色を落とし、本文との間に余白を持たせる */
.list-block__index {
  color: #999;
  margin-right: 6px;
}

/* ドラッグ中、元の場所に代わりに置く空き枠（挿入候補位置が分かるようにする）。下余白は.list-blockの単体使用時の下余白（12px）と同じ値にし縦間隔を揃える */
.sortable-placeholder {
  box-sizing: border-box;
  background: rgba(47,125,90,0.08);
  border: 2px dashed #2f7d5a;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* ============================================================
   支援記録カード・予定項目カード（世話人・管理者の日報画面で共通）
   ============================================================ */

/* 支援記録一覧の1行（care/report.php・admin/report.php共通） */
.care-record-row {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

/* PC（700px以上）では「›」が折り返さないようnowrapにする。本文側は.care-record-row__bodyがmin-width:0で自身が縮むため影響しない */
@media (min-width: 700px) {
  .care-record-row {
    flex-wrap: nowrap;
  }
}

.care-record-row__body {
  flex: 1;
  min-width: 0;
}

/* 支援記録カード本文の1行目（時刻＋支援内容名＋値）。.care-record-row__detailと縦に並ぶブロック要素 */
.care-record-row__main {
  display: block;
  margin-bottom: 2px;
}

/* 支援記録カード本文の詳細（テキスト入力・固定文＋入力の回答、補足）。内容が無い場合はDOM上に出力しない */
.care-record-row__detail {
  display: block;
  line-height: 1.1;
}

/* admin/report.phpの支援記録一覧を、PC(900px以上)だけ内部スクロール化し画面が縦に伸びすぎないようにする。スマホはページ全体のスクロールに任せる */
@media (min-width: 900px) {
  .care-records-preview {
    max-height: 480px;
    overflow-y: auto;
    /* 縦スクロールバーが右端の「＋」ボタン(.plan-item-row__add)に重なるため、右paddingで避ける */
    padding-right: 14px;
  }
}

/* 編集可能な行は<a>タグ自体をカード化する（行内に編集・削除ボタンは置かない） */
.care-record-row--tappable {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

/* PC（hover:hover）でクリック可能なことが分かるよう背景色を変える。`.care-record-row--tappable`を持つカード全体に共通で反映される */
@media (hover: hover) {
  .care-record-row--tappable:hover {
    background: #f7f7f7;
  }
}

.care-record-row--tappable:active {
  background: #f5f5f5;
}

/* 確定済み（閲覧専用）の支援記録カード用。<button>のUA既定cursor/hover演出を打ち消す。
   .care-record-row--tappableとは排他 */
.care-record-row--locked {
  cursor: default;
}

button.care-record-row--locked:hover,
button.care-record-row--locked:active {
  opacity: 1;
}

.care-record-row__chevron {
  flex-shrink: 0;
  align-self: center;
  color: #999;
  font-size: 1.1rem;
  line-height: 1;
}

/* 「›」はPC（700px以上）だけ表示し、スマホでは省スペースのため非表示にする（カード全体が既にタップ対象のため） */
@media (max-width: 699px) {
  .care-record-row__chevron {
    display: none;
  }
}

/*
 * 登録した世話人名だけを示す小さな角丸ラベル（修正者名は表示しない。修正履歴自体はDBに残る）。
 * 自分が登録した記録＝青系、他の世話人・管理者画面＝グレー系。カード右下に小さく重ねて表示する。
 */
.care-record-row__staff-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: #e3ebf5;
  color: #45607a;
}

/* 支援記録カード専用の重ね表示。様子・特記事項側は本文内インライン表示のままのため、位置指定はこの修飾クラスに限定する */
.care-record-row__staff-badge--overlay {
  position: absolute;
  right: 6px;
  bottom: 3px;
  margin-top: 0;
  pointer-events: none;
}

.care-record-row__staff-badge--foreign {
  background: #ddd;
  color: #666;
}

/* 支援記録カードの枠線色（care/report.php専用）。自分の記録＝青系、他の世話人の記録＝グレー系。admin/report.phpには付与しない */
.care-record-row--mine {
  border-color: #a9c1d9;
}

.care-record-row--foreign {
  border-color: #bbb;
}

/* 他の世話人が登録した記録の支援内容名は、枠線と同系統だが読みやすい濃さ(#666)にする */
.care-record-row--foreign .care-record-name {
  color: #555;
}

/*
 * 支援記録一覧を「その日の予定項目をすべてカード表示する」形にする（care/report.php専用）。
 * 未入力の予定項目は白背景で名前だけ表示し、入力済みは.care-record-rowの表示にこの薄い背景色を足して見分ける。
 */
.plan-item-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-item-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.plan-item-row .actor-confirm {
  margin-bottom: 0;
}

.plan-item-row__card {
  flex: 1;
  min-width: 0;
  /* 左上の番号(.plan-item-row__number、position:absolute)を重ねる基準にする */
  position: relative;
  /* 登録済みカード・未登録カードで同じ箱組みにし、内容量が同じなら高さも揃える */
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  /* <button>要素のUA既定margin/appearanceを打ち消す（<a>/<div>との混在時の見た目ズレ防止） */
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  /* <button>のUA既定text-align:centerを打ち消し、未登録・自分の登録済み・他人の登録済みのどの状態でも左寄せに統一する */
  width: 100%;
  /* font: inherit（ショートハンド）は使わない：line-heightまで上書きしてしまうため */
  text-align: left;
}

/* 入力済みカードの背景色。未入力＝白（このルール）、自分の記録／他人の記録は下記で上書きする（admin/report.phpは常にこの白のまま） */
.care-record-row.plan-item-card--filled {
  background: #fff;
}

.care-record-row--mine.plan-item-card--filled {
  background: var(--blue-light);
}

.care-record-row--foreign.plan-item-card--filled {
  background: #e7e7e7;
}

/* 確定済み（閲覧専用）カードは、未入力／自分の記録／他人の記録いずれの背景・枠線色
   （すぐ上の各ルール）よりも優先し、ロック中と分かる薄いグレー系1色に統一する */
.care-record-row.care-record-row--locked,
.care-record-row.care-record-row--locked.plan-item-card--filled {
  background: #f3f3f3;
  border-color: #d0d0d0;
  color: #666;
}

/*
 * 予定項目カード外側・右側の「＋」ボタン（カード本体とは別のタップ対象。イレギュラー追加分・「その他」の行には付けない）。
 * align-self:centerで親(.plan-item-row)のstretchを打ち消し、カードの高さが変わっても常に上下中央の正円で表示する。
 */
.plan-item-row__add {
  flex-shrink: 0;
  align-self: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: #c0c0c0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (hover: hover) {
  .plan-item-row__add:hover {
    background: #adadad;
  }
}

.plan-item-row__add:active {
  background: #999;
}

/* トグルスイッチの共通部品。ON/OFFの文字は出さず、スイッチの位置・色だけで状態を示す（基調色#2f7d5aがON時の色） */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.toggle-switch__track {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.toggle-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}

.toggle-switch input:checked + .toggle-switch__track {
  background: #2f7d5a;
}

.toggle-switch input:checked + .toggle-switch__track .toggle-switch__thumb {
  transform: translateX(16px);
}

/* 「支援記録」見出し右側の「すべて表示」ラベル＋スイッチの横並び */
.records-show-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: normal;
  color: #666;
  margin-top: 0;
  margin-bottom: 0;
}

/* admin/report.php専用。支援記録セクション内の「すべて表示」「担当者表示」の2つの切替を横並びにする */
.records-toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* .records-toggle-row内、登録済みの支援記録が0件の時だけ出す注意書き。.toggle-switch（高さ20px）と
   縦中央が揃うよう、同じ高さをline-heightに指定する（他のトグル行・.records-show-allには影響しない） */
.records-toggle-row__hint {
  color: #888;
  font-size: 0.8rem;
  line-height: 20px;
}

/* 「担当者表示」がOFFの間、登録者／修正者名のバッジを隠す（保存データ自体は変更しない） */
.records-hide-staff .care-record-row__staff-badge {
  display: none;
}

/* 未登録カード専用の文字色（色分けの無い予定項目名を、記録済みカードの本文より少し落ち着いた色にする） */
.report-detail-body .plan-item-card--empty {
  background: #f0f0f0;
}
.plan-item-card--empty {
  color: #333;
}

/* 支援記録カードの通し番号。.plan-item-row__cardの左上へposition:absoluteで重ねる（レイアウト幅には参加しない） */
.plan-item-row__number {
  position: absolute;
  top: 3px;
  left: 6px;
  line-height: 1;
  color: #bbb;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* :not(.care-record-row--locked)が無いと、確定済み（閲覧専用）の未入力カードまで
   タップ可能に見えるcursor:pointer/hover/active背景が効いてしまう */
button.plan-item-card--empty:not(.care-record-row--locked) {
  cursor: pointer;
}

@media (hover: hover) {
  button.plan-item-card--empty:not(.care-record-row--locked):hover {
    background: var(--orange-light);
  }
}

button.plan-item-card--empty:not(.care-record-row--locked):active {
  background: #f0f0f0;
}

/* スキップ済みの予定項目一覧。支援済みの記録（実線枠）とはっきり区別できるよう破線枠・控えめな文字色にする */
.skipped-plan-items {
  margin-top: 12px;
}

.skipped-plan-items__title {
  display: flex;
  align-items: center;
  /* 件数表示＋開閉トグル(.toggle-switch)を右端に離す */
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: #999;
  margin: 0 0 6px;
}

.skipped-plan-items__title .toggle-switch {
  flex-shrink: 0;
}

.skipped-plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px dashed #ccc;
  border-radius: 8px;
  color: #888;
  font-size: 0.85rem;
}

.skipped-plan-item:last-child {
  margin-bottom: 0;
}

.skipped-plan-item__name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.skipped-plan-item .btn {
  width: auto;
  flex-shrink: 0;
  padding: 6px 10px;
  margin: 0;
  font-size: 0.8rem;
}

/* ============================================================
   共通：ヘッダー・利用者切替・モーダル・右メニュー
   （care/report.php・care/report_history.php・admin/report.php等で共通利用）
   ============================================================ */

/* 世話人日報画面のヘッダー */

/* .report-header__innerをheader全体の高さへstretchし、内側のalign-items:centerを安定させる */
.report-header {
  position: sticky;
  top: 0;
  display: flex;
  background: #2f7d5a;
  color: #fff;
  z-index: 20;
}

/* width:100%を明示し、flexアイテムになった後もブロック要素だった時と同じ「幅いっぱいに広がりmax-widthで上限」を維持する */
.report-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 16px;
}

/* PCでも見やすくしたい画面（利用者個人ページ等）のヘッダー用の広い幅 */
.report-header--wide .report-header__inner {
  max-width: 960px;
}

/* 利用者切替は中央のまとまりとして扱う（PC、700px以上）。スマホでは「戻る」ボタンを隠すのに合わせて中央寄せをやめる */
.report-header__switcher {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 699px) {
  .report-header__switcher {
    justify-content: flex-start;
  }
  /* 狭幅時、右上固定のメニューボタン(.menu-btn)と「次へ」ボタンが重ならないよう余白を確保 */
  .report-header .report-header__inner {
    padding-right: 88px;
  }
}

.report-header__nav-btn {
  flex-shrink: 0;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
}

.report-header__nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.report-header__user-select {
  flex: 1;
  min-width: 0;
  /* PCで横に広がりすぎないよう適度な最大幅を設ける */
  max-width: 320px;
  text-align: center;
  text-align-last: center;
  font-size: 1.05rem;
  font-weight: bold;
  padding: 8px 4px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* スマホでは上記max-width（PC向けの広がりすぎ防止）を外し、名前表示の横幅を優先する */
@media (max-width: 699px) {
  .report-header__user-select {
    max-width: none;
    text-align: left;
    text-align-last: left;
  }
}

/* <option>はcolorをそのまま継承すると開いた一覧（OS標準の白背景）でも白文字のままになるため、一覧内の文字色だけ黒系に上書きする */
.report-header__user-select option {
  color: #222;
}

/* スマホでは「戻る」ボタンを隠し、利用者名の横幅を優先する（care/report.php専用）。PC（700px以上）は両方表示する */
.report-header__nav-btn--prev {
  display: none;
}

@media (min-width: 700px) {
  .report-header__nav-btn--prev {
    display: inline-block;
  }
}

/* スマホの左右スワイプ（利用者切替、initReportUserSwipe()）のタッチ検知ゾーン。縦スクロールは維持する */
.report-swipe-page {
  touch-action: pan-y;
}

/* 内容が短い場合でも画面下端の空白からスワイプを開始できるよう、スマホ幅だけbodyをflex縦並びにする */
@media (max-width: 699px) {
  body.report-swipe-body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    /* Android Chromeの画面端横スクロール（戻る/進むジェスチャー）を打ち消す */
    overscroll-behavior-x: contain;
  }
  main.report-swipe-page {
    flex: 1 0 auto;
    width: 100%;
  }
}

/* top:65pxは.report-header/.app-headerのmin-height:65pxに合わせた値（ずれるとヘッダーの下に隠れる） */
.report-date-bar {
  position: sticky;
  top: 65px;
  background: #eef5f0;
  border-bottom: 1px solid #ddd;
  z-index: 15;
}

.report-date-bar__inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 16px;
}

.report-date-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfe0d5;
  border-radius: 6px;
  background: #fff;
  font-size: 1.00rem;
  text-align: center;
  font-weight: bold;
  color: #2f7d5a;
}

/* 世話人ホーム（care/report_input.php）の「世話人：(氏名)」表示専用。操作を持たない単純なテキストのため背景・枠は付けない */
.report-date-bar__staff-label {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: bold;
  color: #2f7d5a;
  padding: 3px 0;
}

.report-date-bar--wide .report-date-bar__inner {
  max-width: 960px;
}

/* 管理者の日報詳細画面の日付切替（前日／中央の日付ラベル／翌日）。利用者切替と近い構成にしている */
.report-date-bar__switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.report-date-bar__nav-btn {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #cfe0d5;
  color: #2f7d5a;
  font-size: 1.2rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
}

.report-date-bar__label {
  flex: 1;
  min-width: 0;
  max-width: 220px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 6px 4px;
  border: 1px solid #cfe0d5;
  border-radius: 6px;
  background: #fff;
  color: #2f7d5a;
  cursor: pointer;
}

/*
 * 管理者・世話人で共通のカレンダー中央ボタン（アイコン＋日付、admin/report.php・care/report.php・
 * report_history.php・report_history_calendar.php等で共通利用）。スマホ幅だけ日付文字を少し縮める。
 * .icon（src/views/parts/icons.php）はwidth/height:1emで自身の font-size に連動するため、
 * 親（このボタン）を縮めるとアイコンまで縮んでしまう。左右の矢印ボタン（.report-date-bar__nav-btn）
 * のサイズ・配置には触れず、アイコンも.report-date-bar__label .iconで元のサイズへ固定し直すことで、
 * 「日付の文字サイズだけ」を変える
 */
@media (max-width: 699px) {
  .report-date-bar__label {
    font-size: 1.05rem;
  }
  .report-date-bar__label .icon {
    font-size: 1.2rem;
  }
}

/* 日付切替の小型カレンダー：通常のカレンダーグリッドを、月選択なしのモーダル内で常にPC同様のグリッド表示にする */
.calendar-grid.mini-cal-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.mini-cal-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  padding: 0;
  box-sizing: border-box;
  cursor: pointer;
  transition: filter 0.1s ease;
}

/* .calendar-day（min-height:84px、後方で定義）と特異度を揃えて確実に打ち消す（グリッド列が固定幅に引っ張られ横スクロールするのを防ぐ） */
.calendar-day.mini-cal-day {
  min-height: auto;
}

/* 日付選択の小型カレンダー。背景色＝日報あり／なし、枠線色＝今日／現在表示中で役割を分ける */
.mini-cal-day.mini-cal-day--has {
  background: #cde4ff;
}

.mini-cal-day.mini-cal-day--none {
  background: #ececec;
}

.mini-cal-day.mini-cal-day--today {
  border: 2px solid #1565c0;
}

.mini-cal-day.mini-cal-day--selected {
  border: 2px solid #2f7d5a;
}

@media (hover: hover) {
  .mini-cal-day:hover {
    filter: brightness(0.94);
  }
}

.mini-cal-day:active {
  filter: brightness(0.9);
}

/* 選べない日（restrictToAvailable指定時）。文字を薄くしhover/active反応を付けない */
.mini-cal-day--disabled {
  color: #bbb;
  cursor: default;
}

@media (hover: hover) {
  .mini-cal-day--disabled:hover {
    filter: none;
  }
}

.mini-cal-day--disabled:active {
  filter: none;
}

/* 三本線メニューの開閉ボタン。アイコンはCSS描画。position:fixedで画面右上に固定 */
.menu-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.35);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  z-index: 60;
}

/* 印刷ボタン（管理者の日報詳細・印刷プレビュー共通）。三本メニュー（.menu-btn）の左に並ぶ
   正方形ボタン。日報詳細では印刷プレビューを開くリンク、印刷プレビューでは印刷を実行するボタンとして
   同じ見た目を使う。スマホでは常時表示せず、三本メニュー内の項目で代替する */
.print-preview-btn {
  position: fixed;
  top: 12px;
  right: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.35);
  border: none;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  z-index: 60;
}

.print-preview-btn .icon {
  width: 20px;
  height: 20px;
  margin: 0;
}

@media (max-width: 699px) {
  .print-preview-btn {
    display: none;
  }
}

.menu-btn__bar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  margin: -1px 0 0 -9px;
  background: #fff;
  border-radius: 1px;
  transition: background-color 0.2s ease;
}

.menu-btn__bar::before,
.menu-btn__bar::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.2s ease, top 0.2s ease;
}

.menu-btn__bar::before {
  top: -6px;
}

.menu-btn__bar::after {
  top: 6px;
}

/* メニューが開いている間は、三本線を×（閉じる）アイコンへ切り替える */
.menu-btn.is-open .menu-btn__bar {
  background-color: transparent;
}

.menu-btn.is-open .menu-btn__bar::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-btn.is-open .menu-btn__bar::after {
  top: 0;
  transform: rotate(-45deg);
}

/* 右から開く共通メニュー。表示切替はdisplayではなくtransform（画面外⇔定位置）のtransitionで行う */
.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 240px;
  max-width: 80vw;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  z-index: 55;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  /* 縦のflexにし、.menu-panel__action-section（記録なし／記録するボタン等）を
     margin-top:autoでパネル最下部へ固定できるようにする。通常メニューだけの画面
     （.menu-panel__action-sectionを持たない）では、これまでどおり上から積み上げる見た目のまま */
  display: flex;
  flex-direction: column;
}

.menu-panel.is-open {
  transform: translateX(0);
}

/* メニュー上部に、通常ヘッダー（.report-header）と同じ高さ・同じ緑色の帯を敷く（.menu-btnが浮いて見えないための背景） */
.menu-panel__header {
  height: 65px;
  background: #2f7d5a;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  /* 右側は固定表示の三本線／×ボタン（.menu-btn、幅40px + 右12px）と重ならないよう空けておく */
  padding: 0 64px 0 16px;
}

/* 右側メニュー上部の緑帯に表示するラベル（表示専用）。世話人画面は現在の世話人名、管理画面は「管理メニュー」を表示する。長くても1行に収めて省略する */
.menu-panel__header-text {
  color: #fff;
  font-size: 0.95rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-panel__body {
  padding: 8px 0;
}

/* 三本線メニュー・緑タイトル直下の「ひな形」エリア。.report-date-bar（日付選択欄）と同じ薄い背景色にする */
.menu-panel__template-bar {
  background: #eef5f0;
  border-bottom: 1px solid #ddd;
  padding: 10px 16px;
  flex-shrink: 0;
}

.menu-panel__template-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfe0d5;
  border-radius: 6px;
  background: #fff;
  font-size: 0.95rem;
}

.menu-panel__template-denied-msg {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #222;
}

.menu-panel__template-denied-msg small {
  display: block;
  margin-top: 2px;
  color: #666;
  font-size: 0.8rem;
}

/* 右メニュー、緑ヘッダー直下の対象利用者名の帯（render_care_user_menu()、src/common/functions.php）。
   .report-date-bar__staff-label（世話人ホームの「世話人：(氏名)」）と同系統の薄い黄緑背景にする */
.menu-panel__user-bar {
  background: #eef5f0;
  border-bottom: 1px solid #ddd;
  padding: 10px 16px;
  text-align: center;
  font-weight: bold;
  color: #2f7d5a;
}

/* 右メニュー最下部の操作ボタン専用区画（「記録なし」／「記録する」切替）。margin-top:autoで最下部に固定 */
.menu-panel__action-section {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid #ddd;
}

/* 通常のメニュー項目・.btnとは見た目を変えた背景色付きボタン。2クラスで.menu-panel buttonより詳細度を上げる */
.menu-panel__action-section .menu-panel__action-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: #4f8a80;
  color: #fff;
  text-align: center;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

@media (hover: hover) {
  .menu-panel__action-section .menu-panel__action-btn:hover {
    background: #457a71;
  }
}

.menu-panel__action-section .menu-panel__action-btn:active {
  background: #457a71;
}

/* 項目間の区切り線（ごく薄い下線）。押せる範囲は幅100%のまま、文字・アイコン側にだけ左右paddingを持たせhover背景がメニュー幅いっぱいに付くようにする */
.menu-panel a,
.menu-panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: none;
  color: #222;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

@media (hover: hover) {
  .menu-panel a:hover,
  .menu-panel button:hover {
    background: #eef5f0;
  }
}

.menu-panel a:active,
.menu-panel button:active {
  background: #eef5f0;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   機能共通：日報入力（支援記録・様子の登録モーダル）
   care/report.php・admin/report.php で共通利用
   ============================================================ */

/* 様子・特記事項の直接入力欄（世話人画面care/report.php専用、自分の分だけ）。モーダルを介さずこのtextareaへ直接入力し自動保存する */
.note-field {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  box-sizing: border-box;
  resize: vertical;
  /* textarea既定のtouch-action:autoのままだと左右スワイプ（initReportUserSwipe()）が効かないため明示する */
  touch-action: pan-y;
}

.note-field__status {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #666;
}

.note-field__status.is-error {
  color: #c00;
}

/*
 * 共通モーダル（背景オーバーレイ＋パネル）。マークアップはsrc/common/functions.phpのmodal_open()/modal_close()で出力し、
 * 開閉はassets/js/common.jsのopenModal()/closeModal()で行う。サイズ・余白・タイトル・ボタン配置はここで一括管理する。
 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 70;
  display: none;
}

.modal-overlay.is-open {
  display: block;
}

/* モーダル本体：「タイトル固定・本文スクロール・下部操作固定」の3段構成（flex縦並び） */
.modal-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 450px;
  max-height: calc(100vh - 64px);
  overflow: hidden;
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 71;
}

.modal-panel.is-open {
  display: flex;
}

/* モーダルを重ねて開いた場合、背面側の操作を無効化する（modalStack、common.jsが自動で付け外し） */
.modal-panel--bg-locked {
  pointer-events: none;
}

/* 入力項目が多いモーダル用のPC幅（modal_open()の第4引数$wide）。確認・メッセージ系には付けない */
@media (min-width: 700px) {
  .modal-panel--wide {
    max-width: 900px;
  }
}

/* 世話人側（body.care-app）のモーダルPC幅を一律600pxにする。詳細度で.modal-panel--wideより優先される */
@media (min-width: 700px) {
  body.care-app .modal-panel {
    max-width: 600px;
  }
}

/* 「日報の確定」確認モーダル（3ボタン、modal-confirm--triple）だけPCで少し広げ横一列にする */
@media (min-width: 700px) {
  #modal-confirm.modal-confirm--triple {
    max-width: 560px;
  }
  #modal-confirm.modal-confirm--triple .modal-actions {
    flex-wrap: nowrap;
  }
}

/* 確認モーダルは他モーダルの上に重ねて開くことがあるため高いz-index。重ね表示時は背面を濃くする */
#modal-confirm-overlay {
  z-index: 80;
}

#modal-confirm {
  z-index: 81;
}

#modal-confirm-overlay.is-stacked {
  background: rgba(0,0,0,0.6);
}

/* 処理結果のエラーモーダル（render_error_modal()）。入力フォーム再表示と同時に開くことがあるため、通常のモーダルより高いz-indexにする */
#modal-error-message-overlay {
  z-index: 78;
}

#modal-error-message {
  z-index: 79;
}

/* タイトル付きモーダルの共通ヘッダー（緑背景・左タイトル・右×） */
.modal-title {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 40px 14px 16px;
  /* 主要操作ボタン（.btn、#2f7d5a）と同じ緑だと役割が紛らわしいため、タイトル帯だけ少し濃く落ち着いたトーンにする */
  background: #468f6f;
  color: #fff;
  border-radius: 10px 10px 0 0;
  font-size: 1.05rem;
  font-weight: bold;
}

/* モーダル本文：中央のスクロール領域。flex:1+min-height:0+overflow-y:auto */
.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 15px 20px 20px;
  font-size: 0.95rem;
}

/* PC表示（700px以上）だけモーダル本文の内側余白を広げる。個別モーダル側ではpaddingを重複指定せず、この共通ルールだけで全モーダルに反映する */
@media (min-width: 700px) {
  .modal-body {
    padding: 30px 45px;
  }
}

/* 下部操作エリアの共通レイアウト（横並び・折り返し）。モーダル外でも流用するため位置指定は含めない */
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

/* モーダル内の下部操作エリアだけposition:stickyで下端に固定する（.modal-panel配下に限定） */
.modal-panel .modal-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
}

/* admin/user_detail.php（利用者の個人ページ、body.user-detail-page）だけ、下部操作エリアの固定表示をやめる。他画面には効かない */
.user-detail-page .modal-panel .modal-actions {
  position: static;
  background: none;
}

.modal-actions .btn,
.modal-actions form {
  flex: 1;
  min-width: 120px;
  margin: 0;
}

.modal-actions .btn {
  width: 100%;
}

/* 支援記録編集モーダルの「入力内容をクリア」ボタン。更新ボタン右横の小型アイコンボタンにする */
.modal-actions .record-form-clear-btn {
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ポップアップメニュー（支援内容編集モーダルの「その他の操作」）。.popup-menu__listは開閉時JSでbody直下へ移動しfixed配置 */
.modal-actions .popup-menu {
  flex: 1;
  min-width: 120px;
}

.modal-actions .popup-menu .btn {
  width: 100%;
  margin: 0;
}

.popup-menu__caret {
  margin-left: 0.35em;
}

.popup-menu__list {
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  max-width: calc(100vw - 16px);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  padding: 6px;
  z-index: 75;
}

.popup-menu__list.is-open {
  display: flex;
}

.popup-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: none;
  color: #222;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

@media (hover: hover) {
  .popup-menu__item:hover {
    background: #f5f5f5;
  }
}

.popup-menu__item:active {
  background: #eee;
}

.popup-menu__item--danger {
  color: #c00;
}

/* 支援記録モーダルのボタン配置。主ボタン（登録する/更新する）が残り幅いっぱい、右に「スキップ」を小さく並べる */
#modal-record-form #recordFormSubmitBtn {
  flex: 1 1 auto;
  width: auto;
}

/* 「Skip」ボタン。.care-note-toggle（「＋補足」等）と同じ系統の小さめ角丸・薄い枠のピル型にし、主ボタンより控えめな配色にする */
#modal-record-form #planItemSkipBtn {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  align-self: center;
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: #f2f2f2;
  color: #777;
  font-size: 0.85rem;
  font-weight: bold;
}

@media (hover: hover) {
  #modal-record-form #planItemSkipBtn:hover {
    background: #e6e6e6;
  }
}

#modal-record-form #planItemSkipBtn:active {
  background: #dcdcdc;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* モーダル本文中の強調表示（画面ごとの個別CSSではなく共通クラスを使う） */
.text-danger {
  color: #c00;
}

.text-muted {
  color: #666;
  font-size: 0.85rem;
}

/* 選択肢一覧（単一選択・複数選択・固定文＋入力の選択式）の「＋選択肢を追加」直上に置く説明文。
   3種類とも同じ位置・見た目にするため共通クラスにする */
.care-option-other-hint {
  margin: 8px 0;
  color: #666;
  font-size: 0.85rem;
}

.time-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4%;
}

/* 「支援時刻」「支援内容名」ラベルと右側のボタン（現時刻／リスト）を同じ行に並べる（care/report.php・admin/report.php共通）。labelの既定display:blockを打ち消しflexにする */
.time-input-label-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.care-input-block{
  margin-bottom: 10px;
}
.care-input-block:empty {
  margin-bottom: 0;
}

/* 支援記録モーダルの各入力タイプ（支援時刻・数値・単一選択・複数選択・テキスト）共通の見出し。ラベルと必須バッジ(.care-required-badge)を横並び・縦中央揃えでまとめる */
.care-value-block-title {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding-bottom: 7px;
}

/* .time-input-label-row内（支援時刻）では、行自体のmargin-bottomで下との間隔を確保するため、見出し側の余白は付けない */
.time-input-label-row .care-value-block-title {
  margin-bottom: 0;
}

/* 必須の入力タイプにだけ表示する小さな「必須」マーク。「必須」「施設共通」バッジ(.daily-field-view__required)と同じ控えめなサイズにする */
.care-required-badge {
  display: inline-block;
  flex-shrink: 0;
  padding: 1px 8px;
  border-radius: 10px;
  background: #eef6f1;
  color: #2f7d5a;
  font-size: 0.72rem;
  font-weight: bold;
  white-space: nowrap;
}

.time-input-row input[type="time"] {
  flex: 1;
  min-width: 0;
  font-size: 1.3rem;
  padding: 12px 10px;
}

/* admin/report.phpの「現在時刻を入力」ボタン専用。care/report.php側は.time-now-pill（下記）へ切り替え済みのためこちらは使っていない */
.time-input-row__now {
  flex-shrink: 0;
  width: auto;
  margin: 0;
  padding: 12px 16px;
  white-space: nowrap;
}

/* 「現時刻」ボタン（care/report.php専用）。使用頻度が低いためSkipボタンと同じ控えめな角丸ピルの見た目にする */
.time-now-pill {
  flex-shrink: 0;
  width: auto;
  min-width: 0;
  margin: 0 0 10px;
  padding: 6px 16px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #f5f5f5;
  color: #666;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
}

@media (hover: hover) {
  .time-now-pill:hover {
    background: #ececec;
  }
}

.time-now-pill:active {
  background: #e2e2e2;
}

/* 支援時刻の「時」「分」2欄入力（care/report.php専用。admin/report.phpはinput[type="time"]のまま） */
.time-input-hm {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* input[type="text"]の共通スタイル（width:100%等）より優先させるため、type属性とクラスの両方を指定する */
input[type="text"].time-input-hm__field {
  display: inline-block;
  width: 2.6em;
  flex-shrink: 0;
  text-align: center;
  font-size: 1.3rem;
  padding: 12px 2px;
  font-variant-numeric: tabular-nums;
}

.time-input-hm__colon {
  font-size: 1.3rem;
  font-weight: bold;
  color: #555;
  flex-shrink: 0;
}

/* 支援記録モーダルの各入力ブロック見出し。左に「●」を置いた太字表示（余白は親側で持つため0） */
.care-value-block-label {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: bold;
}
.care-value-block-label::before {
  content: '●';
  display: inline-block;
  margin-right: 6px;
  color: #2f7d5a;
  font-size: 0.6em;
  vertical-align: middle;
}

/* 数値入力欄。入力・単位側と◀／▶側の2グループに分け、スマホはspace-betweenで左右に分ける */
.value-number-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4%;
}

.value-number-field-group,
.value-number-step-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 699px) {
  .value-number-row,
  .time-input-row {
    justify-content: space-between;
  }
}

.value-number-input {
  flex: 0 0 140px;
  width: 140px;
  font-size: 1.3rem;
  padding: 12px 10px;
}

/* 数値入力欄はPC標準の上下スピナーを出さず、.value-number-step-btn（◀／▶）で増減させる（PC・スマホ共通の見た目にするため） */
.value-number-input[type="number"]::-webkit-outer-spin-button,
.value-number-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.value-number-input[type="number"] {
  -moz-appearance: textfield;
}

.value-number-unit {
  font-size: 1.1rem;
  color: #333;
}

/* 数値入力欄の増減ボタン（◀／▶）。支援時刻の増減ボタンも同じクラスで見た目を揃えている */
.value-number-step-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  border: none;
  border-radius: 8px;
  background: #9a9a9a;
  color: #fff;
  cursor: pointer;
  /* 長押しでの連続増減中、スクロール・テキスト選択・長押しメニューが割り込まないようにする */
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.value-number-step-btn:active {
  background: #868686;
}

/* 数値・単位と◀／▶ボタン群が詰まって見えないよう、各グループの最初のステップボタンにだけ追加の左余白を持たせる */
.value-number-step-btn--first {
  margin-left: 12px;
}

/* 体温入力（is_temperature）専用：整数部・小数第1位を2つの入力欄に分けて表示するだけの表示専用UI。保存はhidden #value_number 1本にまとめる */
.value-number-row--temperature .value-number-input--temp-int,
.value-number-row--temperature .value-number-input--temp-dec {
  flex: 0 0 auto;
  width: 56px;
  text-align: center;
}
.value-number-row--temperature .value-number-input--temp-dec {
  width: 44px;
}
.value-number-temp-dot {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
}

.value-textarea {
  min-height: 5.5em;
}

/* 選択式の選択肢UI。丸・チェックマークは出さず、ボタン全体の背景色・枠線で選択状態を示す */
.option-btn-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.option-btn-group--pair {
  grid-template-columns: 1fr 1fr;
}

/* 単一選択・複数選択・固定文＋入力の選択式で「その他」を選んだ場合だけ表示する自由入力欄 */
.option-other-text-wrap {
  margin-top: 8px;
}

.option-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 2%;
  min-height: 44px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  color: #444;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  margin: 0;
}

/* ネイティブのラジオ／チェックボックスは削除せず視覚的にだけ隠す（display:noneだとキーボード操作・スクリーンリーダーから見えなくなるため） */
.option-btn input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.option-btn.is-selected {
  border-color: #2f7d5a;
  background: #eef5f0;
  color: #1f4d38;
  font-weight: bold;
}

/* 支援記録モーダルの「＋補足」ボタン（care/report.php・admin/report.php共通）。小さめの角丸・薄い枠＋薄い背景で控えめな見た目にする */
.care-note-toggle {
  display: inline-block;
  width: auto;
  padding: 6px 12px;
  border:none;
  border-radius: 999px;
  background: #a2a2a2;
  color: #FFF;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 10px;
}

@media (hover: hover) {
  .care-note-toggle:hover {
    background: #b8b8b8;
  }
}

.care-note-toggle:active {
  background: #dcebe3;
}

/* 支援内容「固定文＋入力」のレイアウト。インライン文章の流れで入力欄を差し込む表示 */
.daily-field-card__template {
  margin-top: 6px;
  line-height: 2;
}

/* 固定文の中に差し込む短いインライン入力欄。共通スタイル（input[type="text"]のdisplay:block/width:100%）に負けないよう詳細度を上げて上書きする */
.daily-field-card__template .daily-field-card__blank {
  display: inline-block;
  width: 6em;
  min-width: 4em;
  margin: 0 2px;
  padding: 2px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
  vertical-align: middle;
}

/* 固定文＋入力欄が「選択式」の場合の見た目調整。タップで選択モーダルを開くreadonlyテキストエリア */
.daily-field-card__template .daily-field-card__blank--select {
  min-width: 8em;
  padding: 2px 4px;
  resize: none;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  background: #fff;
}

/* 表示用テキストエリア＋hidden inputの対（openTemplateBlankPicker()）を、元の1つの入力欄と
   同じインライン位置に収める入れ物 */
.daily-field-card__blank-wrap {
  display: inline-block;
  vertical-align: middle;
}

.daily-field-card__template .daily-field-card__blank--number[type="number"]::-webkit-outer-spin-button,
.daily-field-card__template .daily-field-card__blank--number[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.daily-field-card__template .daily-field-card__blank--number[type="number"] {
  -moz-appearance: textfield;
}

.daily-field-template__value {
  font-weight: bold;
}

.daily-field-template__value.is-empty {
  color: #999;
  font-weight: normal;
}

/* 「必須」「施設共通」等の小さな強調バッジ。警告色ではなく、支援内容の入力必須表示等と揃えた控えめな緑系にする */
.daily-field-view__required {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #eef6f1;
  color: #2f7d5a;
  font-size: 0.75rem;
  font-weight: bold;
  white-space: nowrap;
}

/* 利用者ごとの注意事項カード（世話人画面care/report.php。開閉式にしない・入力欄を持たない表示専用カード）。薄い黄色～ベージュ系にして支援記録カードと区別する */
.precaution-card {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #fdf6e3;
  border: 1px solid #c7b8b6;
  border-radius: 8px;
  color: #c00;
  text-align: center;
}

.precaution-card__title {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--brown);
}

.precaution-card__body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  font-size: 0.92rem;
}

/* 出勤・退勤の確認モーダル。時刻は常に単独行で中央表示。確認文はスマホ2行・PC1行にまとめる */
.attendance-confirm {
  text-align: center;
  margin: 4px 0 12px;
}

.attendance-confirm-time {
  display: block;
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.attendance-confirm-text {
  display: block;
}

.attendance-confirm-text__line {
  display: block;
}

@media (min-width: 700px) {
  .attendance-confirm-text__line {
    display: inline;
  }
}

#careNoteLabel{
  font-size: 0.90rem;
  margin-bottom: 5px;
}

.section-card.select-template{
  background: #FFF;
  padding: 25px 8%;
}
.section-card.select-template label{
  font-size: 0.95rem;
  color: #888;
}
#otherContentField .care-value-block-label{
  margin-bottom: 8px;
}
.submitted-msg{
  color:#666;
  font-size:0.9rem;
  border: 2px #da6969 solid;
  padding: 4%;
  border-radius: 8px;
  background: #FFF;
}
.submitted-msg span{
  color: #da5353;
}

/* ============================================================
   機能共通：開閉式セクションカード（care_section_open()共通部品）
   care/report.php・admin/report.php・care/report_finalize.php等で共通利用
   ============================================================ */

/* 日報詳細画面（admin/report.php）で「支援記録」「様子・特記事項」を独立した編集可能ブロックとして見せるカード枠 */
.section-card {
  margin-top: 20px;
  padding: 24px 8% 24px;
  /*background: #f7f9f8;*/
  background: var(--orange-light);
  border: 1px solid #cdcdcd;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* 「記録なし」状態の全画面オーバーレイ。.modal-overlayと同じ仕組みで色だけ白系にする。
   固定ヘッダー・日付バー・右メニューより低いz-indexにし、それらは操作可能なまま保つ */
.usage-none-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 150px 24px 0;
  text-align: center;
}

.usage-none-overlay__message {
  max-width: 320px;
  color: #666;
  line-height: 1.7;
}

.usage-none-overlay__message strong {
  display: block;
  color: #333;
  font-size: 1.05rem;
}

/*
 * 外側カードの背景・枠線・影・左右paddingを無くす修飾クラス（care/report.php「支援記録」専用）。
 * 他ブロックとの区切りは.section-card本来のmargin-topだけで確保し、見出し・折りたたみ機能
 * （.section-card--collapsible併用時）はそのまま維持する。左右paddingが無くなる分、
 * .app-main（page側の16px padding）までスマホの横幅を使える。
 */
.section-card > h2{
  color: var(--blue-dark);
}
.section-card--plain {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.section-card__title {
  font-size: 1.1rem;
  margin: 0 0 12px;
}

.section-card__title--with-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 見出しの右側に追加コンテンツ（「すべて表示」スイッチ等）を置くための修飾クラス */
.section-card__title--with-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section-card__title-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 見出し横に添える小さな角丸ステータスラベル。状態の意味ごとに背景色だけを変える（--active=緑系／--muted=グレー系） */
.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: normal;
  line-height: 1.6;
}

.status-pill--active {
  background: #e3f5ec;
  color: #1f7a4d;
}

.status-pill--muted {
  background: #eee;
  color: #666;
}

/* care/report_submit_bulk.php、他スタッフの担当時間未確定を示す赤系ピル */
.status-pill--danger {
  /*background: #fdecec;*/
  background: #fff9c6;
  color: #c00;
}

/* 折りたたみブロックの見出し。タップで.section-card__bodyのmax-heightを0⇔実際の高さへアニメーション */
.section-card__title--toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

/* 開閉のクリック対象はカード全体（.section-cardのpaddingも含む）。本文内は通常カーソルへ戻す */
.section-card--collapsible {
  cursor: pointer;
}

/* スイッチ操作だけで開閉するブロック（様子その他特記事項）は見出し全体タップでは開閉しないため、pointerカーソルを打ち消す */
.section-card--switch-toggle,
.section-card--switch-toggle .section-card__title--toggle {
  cursor: default;
}

.section-card--collapsible .section-card__body {
  cursor: default;
}

.section-card__title-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}

/* 折りたたみブロックが閉じている間だけ、未入力がある場合に見出しへ表示する（開いている間・固定表示では表示しない） */
.section-card__unfilled-badge {
  font-size: 0.8em;
  font-weight: normal;
}

/* 開閉の状態（閉＝▼／開＝▲）は文字自体を差し替えて示す（PHP初期描画・toggleSectionCard()の両方が出し分ける） */
.section-card__toggle-icon {
  flex-shrink: 0;
  display: inline-block;
  font-size: 0.75em;
  line-height: 1;
  color: #666;
  margin-right: 0;
}

.section-card--collapsible .section-card__body {
  overflow: hidden;
  transition: max-height 0.25s ease;
}

/* 閉じている間は見出しの下マージンがカードのpadding-bottomと二重に積み重なるため打ち消す（開状態・固定表示には影響しない） */
.section-card--collapsible:not(.is-open) .section-card__title--toggle {
  margin-bottom: 0;
}

/* .section-cardの上下paddingを、閉じている間だけ揃える（開いている状態・固定表示のブロックには影響しない） */
.section-card--collapsible:not(.is-open) {
  padding-bottom: 12px;
}

/* PCだけ開閉式セクションの内側余白を広げる（.section-card--plainは対象外） */
@media (min-width: 700px) {
  .section-card--collapsible:not(.section-card--plain) {
    padding: 30px 8% 30px;
  }
  .section-card--collapsible:not(.section-card--plain):not(.is-open) {
    /*padding-bottom: 20px;*/
  }
}

/* ============================================================
   機能共通：勤務実績・担当時間
   admin/report.php・admin/report_calendar.php で共通利用
   ============================================================ */

/* 勤務実績の編集モーダル内、世話人1名分の入力行。削除ボタンは見出し行（世話人名の右）に置く */
.attendance-row {
  padding: 3% 5%;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.attendance-row__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.attendance-row__staff {
  flex: 1;
  padding: 6px 8px;
  font-size: 1.1rem;
}

/* 既存記録は世話人を選ばせないため、プルダウンの代わりに表示するテキスト（編集不可） */
.attendance-row__staff-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: bold;
}

.attendance-row__times {
  display: flex;
  align-items: center;
  gap: 6px 12px;
  flex-wrap: wrap;
}

.attendance-row__time-label {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #666;
}

/* ラベルと時刻欄一式（.time-input-row、共通CSS）を1組として束ね、.attendance-row__timesのflex-wrapで自然に折り返す */
.attendance-row__time-block {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.attendance-row__delete {
  flex-shrink: 0;
  width: auto;
  margin: 0 0 0 auto;
}

/* 編集モーダル内、各行（カード）の削除ボタンの共通デザイン。.btn--dangerより控えめな角丸タブ風 */
.btn--delete-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 4px 14px;
  background: #c00;
  color: #FFF;
  border-radius: 999px;
  font-size: 0.8rem;
}

.btn--delete-tab .icon {
  margin-right: 0.3em;
}

/* ============================================================
   機能共通：日報確定・一括提出
   care/report_finalize.php・care/report_submit_bulk.php で共通利用
   ============================================================ */

/* 日報の一括提出確認（care/report_submit_bulk.php）のカード。.actor-confirmと同じ白背景・枠線・角丸 */
.submit-target {
  padding: 14px 12px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.submit-target__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* 「日報未作成」の1枚のカード内で複数利用者を縦に並べる場合の行間 */
.submit-target__row--stacked + .submit-target__row--stacked {
  margin-top: 10px;
}

.submit-target__name {
  min-width: 0;
  overflow-wrap: anywhere;
  /* care/report_finalize.phpでは<a>としても使う（利用者名タップで日報詳細へ移動）ため、
     リンクの既定色・下線を打ち消す（<span>で使う既存箇所には影響しない） */
  color: var(--e-green);
  text-decoration: none;
  font-weight: bold;
}

/* 利用者名左の目印の点。「日報未作成」で名前が赤字でも、この点自体は常に濃いグレーのまま */
.submit-target__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #444;
  vertical-align: middle;
}

/* 未処理件数タブ（薄い赤背景・赤文字のピル型）。タップできることが分かるよう角丸を大きくする */
.submit-target__toggle {
  flex-shrink: 0;
  padding: 4px 10px;
  background: #fdecec;
  border: 1px solid #f3b9b9;
  border-radius: 999px;
  color: #c00;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
}

.submit-target__toggle-mark {
  display: inline-block;
  font-size: 0.85em;
}

.submit-target__list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.submit-target__list-item {
  display: flex;
  align-items: center;
  padding: 4px 0;
}

/* 丸×アイコンだけ赤にする。項目名（テキスト）は通常の文字色のまま */
.submit-target__list-icon {
  color: #c00;
}

/* ============================================================
   機能共通：管理画面の設定カード
   admin/facility_setting.php・admin/user_detail.php・admin/user_manage.php で共通利用
   ============================================================ */

/* PCでは2カラム、スマホでは1カラムに戻す（利用者個人ページの支援内容・予定項目など） */
.detail-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .detail-columns {
    grid-template-columns: 1fr 1fr;
  }
}

/* システム設定画面（admin/facility_setting.php）：設定を種類ごとにまとめる枠。.detail-columnsの各セルに1つずつ置く */
.settings-group ,.settings-group-min{
  padding: 5%;
  border-radius: 8px;
}
.settings-group-min {
  padding: 20px 5%;
}

.template-group{
  border-radius: 8px;
  margin-bottom: 50px;
}
.template-group-sub{
  padding: 25px 30px;
  background: #f7f9f8;
  border-radius: 8px;
}

.settings-group__title {
  font-size: 1.2rem;
  margin: 0 0 20px;
  border-bottom: 1px #d8d8d8 solid;
  padding-bottom: 5px;
}
.settings-group__title-sub{
  font-size: 1.05rem;
  border-bottom: 1px #d8d8d8 solid;
  padding-bottom: 5px;
}

/* 見出しの外側に置く「内容だけを囲む枠」の修飾クラス（admin/facility_setting.php、admin/user_manage.php等） */
.settings-group--card {
  /*background: #fff;*/
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* ============================================================
   世話人：世話人ホーム
   care/report_input.php
   body: .page-care-report-input
   ============================================================ */

.btn.submit-bulk-link {
    background: #e39d52;
    margin-bottom:8px;
    display:block;
}
.btn.submit-bulk-link.btn--looks-disabled{
    background: #e0e0e0;
    /*padding: 2px;*/
}

/* お知らせ（管理者が対象世話人・対象日を指定して登録、admin/notice.php）。「勤務」エリアのすぐ上に
   表示する。未確認は内容が分かる通常カード、確認済みは1行の折りたたみへまとめて場所を取らないようにする */
.care-notice-block {
  margin-bottom: 12px;
}

.care-notice-card {
  background: #fff8e1;
  border: 1px solid #e8d382;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.care-notice-card__content {
  margin: 0 0 10px;
  white-space: pre-line;
  word-break: break-word;
}

.care-notice-card__form {
  text-align: right;
}

.care-notice-confirmed__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: #f2f4f2;
  border: 1px solid #dfe3e0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #56605a;
  cursor: pointer;
}

.care-notice-confirmed__toggle .icon {
  transition: transform 0.15s ease;
}

.care-notice-confirmed__toggle.is-open .icon {
  transform: rotate(180deg);
}

.care-notice-confirmed__list {
  padding: 10px 12px 2px;
}

.care-notice-confirmed__list .care-notice-card__content {
  background: #f8f9f8;
  border: 1px solid #e6e8e6;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

/* ============================================================
   世話人：支援状況
   care/report_status.php
   body: .page-care-report-status
   ============================================================ */

/* 支援状況画面。「次の支援」行は日報画面の未入力カード（.actor-confirm等）をそのまま流用する */
/* 「次の予定」見出しと「様子」トグルを両端に並べる。共通labelのmargin/section-card__titleの余白を打ち消す */
.support-status-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.support-status-heading-row .section-card__title {
  margin-bottom: 0;
}

.support-status-mode-toggle {
  display: flex;
  align-items: center;
  margin: 0;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: normal;
  color: #767c78;
}

.support-status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-status-card {
  /* 「予定」ポップオーバー（position:absolute）の位置基準にする */
  position: relative;
  background: var(--gray-light);
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  padding: 14px 5%;
}

/* 「次の予定あり」以外の正常系ステータスはカード全体を薄い黄色系にする（状態ごとに個別class） */
.support-status-card.support-status-status--none,
.support-status-card.support-status-status--no-usage,
.support-status-card.support-status-status--confirmed,
.support-status-card.support-status-status--submitted{
  background: #fff8db;
  border-color: #f0e0a0;
}
.support-status-card.support-status-status--template-undecided {
  background: #fff7fd;
  border-color: #fdcccc;
}

/* 利用者カードの見出し行。.support-status-card__nameは「名前列（固定幅）＋チェブロン列」の2列グリッド */
.support-status-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.support-status-card__name {
  display: grid;
  grid-template-columns: 6em auto;
  align-items: center;
  column-gap: 10px;
  min-width: 0;
  color: #222;
  text-decoration: none;
}

.support-status-card__name-text {
  min-width: 0;
  font-weight: bold;
  font-size: 1.05rem;
  color: var(--e-green);
  overflow-wrap: anywhere;
}

/* 名前列（固定幅）の直後に揃うチェブロン。大きなボタン風にはせず、名前と同じ行に添えるだけにする */
.support-status-card__name-chevron {
  color: #999;
  font-size: 1rem;
  line-height: 1;
}

/* 控えめなグレー系（既存の.btn--secondary）のまま、角丸を大きくした小さめのピル型にする */
.support-status-plan-btn {
  flex-shrink: 0;
  width: auto;
  margin: 0;
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 999px;
}

/* 一覧内だけ、再利用している予定カード・「予定」ボタンの色を上書きする */
.support-status-list .plan-item-row__card{
  background: #fff;
}
.support-status-list .support-status-plan-btn {
  background: #eee;
  color: #999;
  padding: 3px 15px;
  font-size: 0.8rem;
  border: solid 1px #ddd;
}

.support-status-card__next-wrap {
  margin-top: 8px;
}

/* タップ対象ではない状態表示（予定なし等）専用。カード背景・枠線色は外側の.support-status-card側で付ける */
.support-status-card__next--none {
  padding: 6px 0 0;
  color: #888;
  font-size: 0.95rem;
}

/* 「次の予定あり」以外の状態文字を、外側カードの黄色系に合わせた茶色にする（状態ごとに個別class） */
.support-status-card__next--none.support-status-status--none,
.support-status-card__next--none.support-status-status--no-usage,
.support-status-card__next--none.support-status-status--confirmed,
.support-status-card__next--none.support-status-status--submitted{
  color: #6b5a12;
}
.support-status-card__next--none.support-status-status--template-undecided {
  color: #D43E41;
}

/* 「予定」ボタンの小型ポップオーバー（モーダルにはしない）。予定確認専用で、ここから直接登録はしない */
.support-status-popover {
  position: absolute;
  top: 44px;
  right: 12px;
  z-index: 30;
  width: 220px;
  max-width: calc(100% - 24px);
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  padding: 10px 12px;
  font-size: 0.85rem;
}

.support-status-popover__list {
  margin: 0;
  padding-left: 18px;
}

.support-status-popover__list li {
  margin-bottom: 4px;
}

.support-status-popover__list li:last-child {
  margin-bottom: 0;
}

.support-status-popover__empty {
  margin: 0;
  color: #888;
}
.page-care-report-status .section-card__title{
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 5px;
}

/* ============================================================
   世話人：日報確定
   care/report_finalize.php
   body: .page-care-report-finalize
   ============================================================ */

/*
 * 「自分の日報を確定する」エリア、「対応した利用者」1件分。
 * .submit-targetの箱組みはそのまま、<a>としてカード全体をタップ可能にするための
 * リンク既定値の打ち消しと、状態に応じた色分けだけをここで追加する
 */
.own-finalize-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.own-finalize-card--filled {
  background: #eef4fb;
  border-color: #a9c8e8;
}

.own-finalize-card--missing {
  background: #fdecec;
  border-color: #f3b9b9;
}

/* 様子は入力済みだが自分の支援記録が0件（注意・オレンジ）。確定自体は妨げず、確定時に
   一度だけ確認ダイアログを出す（care/report_finalize.php） */
.own-finalize-card--caution {
  background: #fdf2e3;
  border-color: #eec98a;
}

/* UserDailyUsageModelが「利用なし」と判定した利用者（記録なし・グレー）。確定要件から除外する */
.own-finalize-card--none {
  background: #f0f0f0;
  border-color: #cdcdcd;
  color: #888;
  cursor: default;
}

/* care/report_finalize.php、本人が対象日分を確定済みの間の利用者カード。状態別の色分けをやめ、
   確定済み・閲覧のみであることが分かる中立なグレー系1色にする */
.own-finalize-card--confirmed {
  background: #f3f3f3;
  border: 1px solid #c7c7c7;
  color: #555;
}


/* 確定済みの担当時間（開始・終了）の読み取り専用表示。attendance_time_group_html()の
   入力欄と横幅・見た目の雰囲気を揃えつつ、編集できないことが分かるようにする */
.finalize-confirmed-time {
  margin: 0;
  padding: 12px 14px;
  background: #f3f3f3;
  border: 1px solid #c7c7c7;
  border-radius: 8px;
  color: #555;
  font-size: 1.1rem;
  font-weight: bold;
  width: fit-content;
}

.finalize-card__time-label {
  display: block;
  margin: 4px;
  font-size: 0.8rem;
  color: #666;
}

/* care/report_finalize.php「自分の日報を確定する」エリア用（care/report_input.php「未確定」
   モーダルの担当時間入力とも共用）。開始／終了それぞれにラベルを添えて縦に並べる */
.finalize-shared-time {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  
  border: 1px solid #ccc;
  padding: 12px;
  background: #FFF;
  border-radius: 8px;
  
}

.finalize-shared-time__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 開始時間側は変更せず、終了時間側の間隔だけ詰める */
.finalize-shared-time__group:nth-child(2) {
  margin-top: -10px;
}

/* 確定済みの担当時間表示だけ、開始・終了の2組を横並び＋外枠の中央へ寄せる（未確定側の.finalize-shared-timeは変更しない） */
.finalize-shared-time--confirmed {
  flex-direction: row;
  justify-content: center;
  gap: 24px;
}

.finalize-shared-time--confirmed .finalize-shared-time__group:nth-child(2) {
  margin-top: 0;
}

/* 「自分の日報を確定する」ボタン用。disabled属性は付けず見た目だけを.btn:disabledに揃える
   （タップ自体は許可し、押した時にJS側で理由を表示するため） */
.btn--looks-disabled {
  background: #d6d6d6;
  color: #888;
}

/* 確定不可の理由を表示する重ね通知。position:fixedでレイアウトを押し下げない。JSがis-visibleを付け外しする */
.finalize-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.finalize-toast.is-visible {
  opacity: 1;
}

/* スマホ表示時だけ、通知を画面幅いっぱいに近いサイズまで広げる（PC側のmax-widthは変更しない） */
@media (max-width: 699px) {
  .finalize-toast {
    width: calc(100% - 32px);
  }
}

/* ログイン画面共通の重ね通知（例：ログアウト完了）。画面中央よりやや上にposition:fixedで表示し、
   通常レイアウトを一切押し下げない。JSがis-visibleを付け外しする */
.login-toast {
  position: fixed;
  left: 50%;
  top: 32%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.login-toast.is-visible {
  opacity: 1;
}

.finalize-caution-row {
    display: grid;
    grid-template-columns: 130px auto;
    align-items: center;
    justify-content: start;
    column-gap: 14px;
    margin-bottom: 8px;
}

.finalize-caution-row__name {
    text-align: left;
}

.finalize-caution-badge {
    justify-self: start;
    padding: 3px 15px;
    border-radius: 50px;
    background: #fdeaea;
    color: #c62828;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

/*
 * care/report_finalize.php「日報の確定・提出」専用の補足クラス。カード自体は既存の
 * .submit-target（利用者名・状態バッジの並びも既存の.submit-target__row等）をそのまま使い、
 * ここでは件数・様子の入力有無・確定フォームまわりの余白だけを追加する
 */
.finalize-card__meta {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #666;
}

/* ============================================================
   世話人：日報の一括提出確認
   care/report_submit_bulk.php
   body: .page-care-report-submit-bulk
   ============================================================ */

/* 画面上部の対象期間・件数の見出し。薄い背景色を付けて中央寄せにする */
.submit-bulk-header {
  padding: 10px 12px;
  margin-bottom: 16px;
  background: #f2f4f3;
  border-radius: 8px;
  text-align: center;
}

.submit-bulk-header__label {
  font-weight: bold;
}

.submit-bulk-header__count {
  font-weight: normal;
  margin-left: 2px;
}

/* 下部の「提出する」「戻る」を横並びにする。「提出する」は.btnの既定(幅いっぱい)のまま残りの幅を取り、「戻る」は控えめな幅で右側に置く */
.submit-bulk-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 30px;
}

.submit-bulk-actions form {
  flex: 1;
  margin: 0;
}

.submit-bulk-actions .btn {
  margin: 0;
}

.submit-bulk-actions__back {
  flex-shrink: 0;
  width: auto;
  padding: 14px 18px;
  font-size: 0.9rem;
}

/* ============================================================
   管理者：管理メニュー
   admin/index.php
   body: .page-admin-index
   ============================================================ */

/* DBバックアップ失敗時の警告（直近の実行が失敗のままの間だけ表示）。既存の.btn--dangerと
   同系統の赤系にし、目立たせつつ新しい配色は増やさない */
.admin-home-warning {
  display: block;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fdecec;
  border: 1px solid #f3b8b8;
  border-radius: 8px;
  color: #ba2929;
  font-weight: bold;
  text-decoration: none;
}

/* 管理メニュー：ジャンルごとのカード。PCは横並び、スマホは縦並び */
.admin-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 700px) {
  .admin-menu {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

.admin-menu__group {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 30px 13% 40px;
}

.admin-menu__title {
  font-size: 1.1rem;
  margin: 0 0 15px;
  color: var(--blue);
  text-align: center;
}

.admin-menu__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* アイコンの横位置が文字数によってずれないよう、アイコン用の列幅を確保し文字を左寄せにする */
.admin-menu__links .btn {
  margin: 0;
  display: flex;
  align-items: center;
  text-align: left;
}

.admin-menu__links .btn .icon {
  flex-shrink: 0;
  width: 20px;
  margin-right: 10px;
}

/* ============================================================
   管理者：世話人切替（世話人として操作する職員を選択）
   admin/care_switch.php
   body: .page-admin-care-switch
   ============================================================ */

/* 職員ボタン一覧。auto-fit/minmaxで画面幅に応じて列数が変わる（PC3列程度／中間2列／スマホ1列） */
.page-admin-care-switch .care-switch-staff-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  column-gap: 12px;
}
.page-admin-care-switch .btn{
  margin: 10px 0;
}
.page-admin-care-switch .care-switch-staff-list .btn--secondary{
  background: var(--bt-blue);
}

/* ============================================================
   管理者：日報詳細
   admin/report.php
   body: .page-admin-report
   ============================================================ */

.page-admin-report .section-card{
  background: var(--gray-light);
}
/* 様子・特記事項の編集モーダル（admin/report.php）内、世話人1名分の入力カード。勤務実績モーダルと同じ構成に揃える */
.note-card {
  padding: 3% 5%;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.note-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.note-card__staff-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: bold;
}

.note-card__staff-select {
  flex: 1;
  padding: 6px 8px;
  font-size: 1.1rem;
}

.note-card__delete {
  flex-shrink: 0;
  width: auto;
  margin: 0 0 0 auto;
}

.note-card textarea {
  margin: 0;
}

/* 管理者の支援記録追加モーダル：記録時間に登録済みの世話人から担当者を選ぶ横並びの小さいボタン群 */
.recorder-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 12px;
}

.recorder-picker__btn {
  padding: 6px 14px;
  background: #fff;
  color: #555;
  border: 1px solid #ccc;
  border-radius: 999px;
  font-size: 0.85rem;
}

.recorder-picker__btn.is-selected {
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
}

  .section-card.new-card{
    padding: 30px 8% 30px;
  }
.section-card.new-card select{
  margin: 0 0 10px;
}

/* 各セクションは外側カードではなく、中の各行・表示エリアをタップして編集する */
.care-record-row--readonly {
  cursor: pointer;
}

/* 日報の状態（入力中／提出済み／確認済み／日報なし）を表示する帯。.app-main--wideの一番上に配置。
   ステータス色は日報一覧（admin/report_calendar.php）と同じCSS変数（--status-*-color）を使う */
.app-main--wide.app-main--status-flush {
  padding: 0;
}

.report-detail-body {
  padding: 30px 5%;
}

@media (max-width: 699px) {
  .report-detail-body {
    padding: 20px 16px;
  }
}

.report-status-bar {
  padding: 10px 16px;
  text-align: center;
  font-weight: bold;
  font-size: 1.0rem;
  border-radius: 12px 12px 0 0;
}

@media (max-width: 699px) {
  .report-status-bar {
    border-radius: 8px 8px 0 0;
  }
}

.report-status-bar--draft {
  background: #e3edf9;
  color: var(--status-draft-color);
}

.report-status-bar--submitted {
  background: #fdf1e3;
  color: var(--status-submitted-color);
}

.report-status-bar--confirmed {
  background: #e3f5ec;
  color: var(--status-confirmed-color);
}

.report-status-bar--none {
  background: #fdecea;
  color: var(--status-none-color);
}

.management-report-btn{
  margin: 20px auto 0;
  max-width: 300px;
}

/* ============================================================
   管理者：日報の確認
   admin/report_input.php
   body: .page-admin-report-input
   ============================================================ */

/* 「日報の確認」画面（admin/report_input.php）の「未確認」「未提出」切替ボタン */
.report-tab-switch {
  display: flex;
  gap: 8px;
  margin: 4px 0 16px;
}

/* 「日報の確認」一覧の1件分のカード。共通の.actor-confirm等をそのまま使い、高さだけ詰める */
.report-check-item {
  padding: 12px;
}

/* 右側の「日付＋状態」を、ボタンに見えない控えめな角丸のグレータブにまとめる（この一覧専用） */
.report-check-item__tab {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eee;
  color: #666;
  font-size: 0.8rem;
  white-space: nowrap;
}

.report-tab-switch__btn {
  flex: 1;
  box-sizing: border-box;
  padding: 12px 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  color: #444;
  text-align: center;
  font-weight: bold;
  text-decoration: none;
}

/* 選択中タブは実際に押して送信する.btn（濃い緑のベタ塗り）と見分けが付くよう「薄い緑背景＋濃い緑文字」にする（status-pill--activeと同系配色） */
.report-tab-switch__btn.is-active {
  background: #e3f5ec;
  border-color: #a3d2bd;
  color: #1f7a4d;
}

/* ============================================================
   管理者：日報一覧・出勤一覧・ひな形予定
   admin/report_calendar.php
   body: .page-admin-report-calendar
   ============================================================ */

/* 日報一覧・出勤一覧・ひな形予定の統合タブ（admin/report_calendar.php専用） */
.calendar-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 30px;
  border-bottom: 2px solid #e4e7e5;
}

.calendar-tabs__item {
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: bold;
  color: #767c78;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.calendar-tabs__item.is-active {
  color: var(--brand-color, #2e7d32);
  border-bottom-color: var(--brand-color, #2e7d32);
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 30px;
  height: 80px;
}

/* 前月／翌月ボタン（管理者・世話人で共通クラス）。.report-date-bar__nav-btnと揃えた枠線のみの見た目 */
.calendar-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #ccc;
  /*border: 1px solid #cfe0d5;*/
  color: #FFFFFF;
  font-size: 1.3rem;
  text-decoration: none;
}

@media (hover: hover) {
  .calendar-nav__btn:hover {
    background: #cecece;
  }
}

.calendar-nav__btn:active {
  background: #cecece;
}

.calendar-nav__label {
  font-size: 1.1rem;
  font-weight: bold;
  min-width: 140px;
  text-align: center;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 12px;
}

.status-legend__item {
  display: inline-flex;
  align-items: center;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.status-dot.report-status-draft {
  background: var(--status-draft-color);
}

.status-dot.report-status-submitted {
  background: var(--status-submitted-color);
}

.status-dot.report-status-confirmed {
  background: var(--status-confirmed-color);
}

/* admin/report_calendar.php「記録時間」タブ、「勤務時間」ON時の色分け（出勤中／退勤済みの2状態）。
   日報タブと同じ配色になるよう、既存の--status-*-colorをそのまま再利用する */
.attendance-status-working {
  color: var(--status-draft-color);
}

.attendance-status-done {
  color: var(--status-confirmed-color);
}

.status-dot.attendance-status-working {
  background: var(--status-draft-color);
}

.status-dot.attendance-status-done {
  background: var(--status-confirmed-color);
}

.report-status-draft {
  color: var(--status-draft-color);
}

.report-status-submitted {
  color: var(--status-submitted-color);
}

.report-status-confirmed {
  color: var(--status-confirmed-color);
}

/* PC：月間カレンダー（700px未満では隠し、代わりにスマホ用の縦並びを表示する） */
.calendar-grid {
  display: none;
}

/* 曜日7列の見出し帯。.calendar-grid本体とは別の入れ物にし、日〜土の間に薄い区切り線を付ける */
.calendar-grid__weekdays {
  display: none;
}

@media (min-width: 700px) {
  .calendar-grid__weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #f6f7f6;
    border: 1px solid #e8eae9;
    border-radius: 6px;
    padding: 8px 0;
    margin-bottom: 6px;
  }
}

.calendar-grid__weekday {
  text-align: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: #4a4a4a;
  border-right: 1px solid #e2e4e3;
}

.calendar-grid__weekday:last-child {
  border-right: none;
}

.calendar-day {
  min-height: 84px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f6f9ff;
  padding: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.calendar-day--empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.calendar-day:active {
  background: #f0f5f2;
}

/* 空白セル（.calendar-day--empty）はonclickが無いため、タップ時の背景を出さない */
.calendar-day--empty:active {
  background: transparent;
}

.calendar-day.is-today {
  border-width: 2px;
  border-color: #2f7d5a;
}

/* admin/report_calendar.php「ひな形予定」タブの日付選択（単発／一括）状態。既存の.calendar-dayの
   見た目はそのまま活かし、選択中だけ枠色・背景を変えて分かるようにする */
.calendar-day.is-selected {
  border-width: 2px;
  border-color: #2f7d5a;
  background: #e3f0e8;
}

.calendar-day__num {
  display: block;
  font-weight: bold;
  margin-bottom: 2px;
}

.calendar-day__user {
  display: block;
  overflow-wrap: break-word;
  white-space: normal;
}

@media (min-width: 700px) {
  .calendar-grid {
    display: grid;
    /* minmax(0, 1fr)：列内のテキスト（利用者名＋ひな形名＋「（初期）」等で長くなり得る）が
       列幅を押し広げて7列が親幅からはみ出さないよう、各列の自動最小幅を0にする（グリッド既定のauto
       のままだと、子要素がoverflow:hiddenでもグリッド列自体は中身のmin-contentで広がってしまうため） */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .calendar-day-list {
    display: none;
  }
}

/* PC用の月間グリッド版を持たない画面用。画面幅を問わず常に縦一覧のまま表示する */
.calendar-day-list.calendar-day-list--always {
  display: block;
}

/* スマホ：日付ごとの縦並び。<a>タグとして使う画面向けにリンクの既定色・下線を打ち消す */
.calendar-day-list__item {
  display: block;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.calendar-day-list__item:active {
  background: #f0f5f2;
}

/* admin/report_calendar.php「ひな形予定」タブの日付選択（単発／一括）状態。スマホ側の縦並び用 */
.calendar-day-list__item.is-selected {
  border-width: 2px;
  border-color: #2f7d5a;
  background: #e3f0e8;
}

.calendar-day-list__user {
  padding: 2px 0;
}

/* データが無い日：行は表示するが淡い表示にする（押すと新規作成できる） */
.calendar-day-list__item--empty {
  background: #e2e2e2;
  color: #888;
}

.calendar-day-list__item--empty:active {
  background: #e2e2e2;
}

/* 押せない日付行専用。.calendar-day-list__item--emptyと組み合わせ、カーソルだけ「押せない」見た目にする */
.calendar-day-list__item--static {
  cursor: default;
}

.calendar-day-list__item--static:active {
  background: #e2e2e2;
}

/* 「過去の日報」共通の下部ナビゲーション。「世話人ホーム」「日報へ戻る」を横並びで一番下に置く */
.care-history-bottom-nav {
  display: flex;
  justify-content: space-between;
  gap: 3%;
  margin-top: 32px;
  margin-bottom: 24px;
}

.care-history-bottom-nav__btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 5px;
  border: 1px solid #cfe0d5;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  width: 100%;
  justify-content: center;
}

/* 「世話人ホーム」：白〜薄いグレー系 */
.care-history-bottom-nav__btn--home {
  background: #fff;
  border-color: #ddd;
  color: #555;
}

@media (hover: hover) {
  .care-history-bottom-nav__btn--home:hover {
    background: #f2f2f2;
  }
}

.care-history-bottom-nav__btn--home:active {
  background: #f2f2f2;
}

/* 「日報へ戻る」：落ち着いた青緑系（三本線メニュー最下部の.menu-panel__action-btnと同系色） */
.care-history-bottom-nav__btn--back {
  background: #eaf1ef;
  border-color: #b9c7c3;
  color: #3f6a61;
}

@media (hover: hover) {
  .care-history-bottom-nav__btn--back:hover {
    background: #dde9e6;
  }
}

.care-history-bottom-nav__btn--back:active {
  background: #dde9e6;
}

.calendar-day-list__user--none {
  color: #999;
}

/* 初期ひな形を表示上の初期値として示す日（個別指定ではない）だけ、控えめなグレーにする。
   配置・文字揃え・「（初期）」表記は追加しない（色だけの区別） */
.calendar-day__user--initial,
.calendar-day-list__user--initial {
  color: #767c78;
}

/* 利用者選択カード。白背景＋楕円バッジ（.status-pill）で利用者名と状態を分けて見せる、3列グリッド */
.user-select-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  margin: 0 0 8px;
  background: var(--orange-light);
  border: 1px solid #cdcdcd;
  border-radius: 8px;
  color: var(--e-green);
  text-align: left;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
}

/* 押せるカードのホバー。(hover: hover)で囲み、スマホでのタップ後の色残りを防ぐ */
/*@media (hover: hover) {
  a.user-select-card:hover,
  button.user-select-card:not(:disabled):hover {
    background: #fff9eb;
    opacity: 1;
  }
}*/

/* 日報が未作成の利用者カード（「新規作成」）。「作成済み」カードと違う薄いグレー＋わずかな透過にする */
.user-select-card--unavailable {
  background: #eee;
  opacity: 0.85;
  cursor: pointer;
}

button.user-select-card.user-select-card--unavailable:not(:disabled):hover {
  background: #eee;
  opacity: 0.85;
}

.user-select-card__name {
  font-weight: bold;
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-select-card__date {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  color: #666;
  font-size: 0.85rem;
  white-space: nowrap;
}

.user-select-card .status-pill {
  justify-self: end;
  min-width: 76px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .user-select-card {
    grid-template-columns: 1fr auto;
  }
  .user-select-card__name {
    grid-column: 1 / -1;
  }
}

/* 管理者側カレンダー日付選択モーダルの「日報なし」バッジ（admin/report_calendar.php）。日報詳細の状態帯と同じ赤系 */
.status-pill--none {
  background: #999;
  color: #FFF;
}

/* admin/report_calendar.php専用の状態バッジ（入力中／提出済み／確認済み）。濃い背景＋白文字 */
.status-pill--admin-draft {
  background: var(--status-draft-color);
  color: #FFF;
}

.status-pill--admin-submitted {
  background: var(--status-submitted-color);
  color: #FFF;
}

.status-pill--admin-confirmed {
  background: var(--status-confirmed-color);
  color: #FFF;
}

/* admin/report_calendar.php「ひな形予定」タブ、カレンダー下部の「単発／一括」切替＋「ひな形を設定」ボタン。
   PCでは横並び（単発｜一括の右に設定ボタン）にし、幅が足りないスマホでは折り返す */
/* 「ひな形予定」タブ上部の利用者セレクト。専用カレンダー方式（1人選ぶとその人の月間分だけ表示）の
   切替用で、選択直後にページ遷移して表示を切り替える（現在の年月・タブは維持） */
/* 「ひな形予定」タブだけ、利用者セレクト（.template-plan-user-bar）と年月ナビ（.calendar-nav）を
   1行にまとめる行。スマホは既定のblockのまま縦並び（利用者セレクト→年月、DOM順のまま）。
   PCは3列グリッド（左:利用者セレクト、中央:年月、右:空の均等列）にし、年月が利用者セレクトの
   幅に影響されず常にカレンダー全体の中央に来るようにする */
.template-plan-nav-row {
  margin-bottom: 30px;
}

.template-plan-nav-row .template-plan-user-bar {
  margin-bottom: 8px;
}

.template-plan-nav-row .calendar-nav {
  margin: 0;
}

@media (min-width: 700px) {
  .template-plan-nav-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .template-plan-nav-row .template-plan-user-bar {
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .template-plan-nav-row .calendar-nav {
    grid-column: 2;
  }
}

.template-plan-user-bar {
  display: flex;
  justify-content: center;
}

.template-plan-user-bar select {
  width: auto;
  flex: 0 1 200px;
  max-width: 280px;
  margin: 0;
}

/* 利用者セレクトだけ、他のプルダウンと見分けやすいよう非常に薄い黄色を背景にする（文字色・サイズ・
   中央寄せ・スマホ幅は上のルールのまま変更しない） */
#templatePlanViewUserSelect {
  background: #fdf9e6;
}

/* スマホだけ、利用者セレクトの見た目の幅を年月ナビ（前月ボタン外側～翌月ボタン外側、目安244px）に
   近づける。PC（700px以上）は上のルールのまま変更しない */
@media (max-width: 699px) {
  .template-plan-user-bar select {
    flex-basis: 240px;
    max-width: 240px;
  }
}

.template-plan-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.template-plan-action-bar .template-plan-set-btn {
  width: auto;
  margin: 0;
}

/* お知らせタブ（admin/report_calendar.php?tab=notice）。カレンダー本体・単発/一括切替・登録モーダルは
   ひな形予定タブの構成（.template-plan-nav-row/.template-plan-action-bar等）をそのまま流用するため
   専用CSSを持たない。登録モーダル内の「登録済みのお知らせ」一覧（.list-blockを流用）だけ、
   内容の折り返し表示を追加する */
.notice-existing-row__content {
  white-space: pre-line;
  word-break: break-word;
}

/* ============================================================
   管理者：利用者個人ページ
   admin/user_detail.php
   body: .page-admin-user-detail
   ============================================================ */

/* 支援内容の設定フォーム（利用者個人ページ）：入力タイプに応じて出し分ける設定ブロック */
.care-type-fields {
  margin-top: 8px;
  padding: 12px;
  background: #f7f9f8;
  border-radius: 8px;
}

.care-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.care-option-row input[type="text"] {
  flex: 1;
  margin: 0;
}

.care-option-row .btn {
  flex-shrink: 0;
  width: auto;
  margin: 0;
  padding: 10px 14px;
}

/* 固定文＋入力の「入力欄を追加」チップ（admin/user_detail.php）。通常の.btnとは見た目を変え、ピル型にする */
.care-template-blank-insert-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.care-template-blank-insert-bar__label {
  font-size: 0.85rem;
  color: #666;
}

.care-template-blank-insert-chip {
  flex-shrink: 0;
  width: auto;
  margin: 0;
  padding: 6px 14px;
  background: #fff;
  color: #2f7d5a;
  border: 1px solid #2f7d5a;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1.4;
}

@media (hover: hover) {
  .care-template-blank-insert-chip:hover {
    background: #eaf4f0;
  }
}

.care-template-blank-insert-chip:active {
  background: #dcebe3;
}

/* 固定文＋入力の「入力欄の設定」一覧（admin/user_detail.php）。{input}の出現順に1行ずつ表示する */
.care-template-blank-config-list {
  margin-top: 12px;
}

.care-template-blank-config-row {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.care-template-blank-config-row__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.care-template-blank-config-row__number {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #666;
}

.care-template-blank-config-row__head select {
  flex: 1;
  margin: 0;
}

.care-template-blank-config-row__options {
  margin-top: 10px;
  margin-bottom: 0;
}

/* 「基本セット」への追加ボタン。OFF/ONの2分割ボタンに代わる、小さめのグレー系タブ型ボタン */
.care-basic-set-add-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid #cfe0d5;
  border-radius: 8px;
  background: #eef1ef;
  color: #444;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  vertical-align: middle;
}

/* アイコンの有無やラベルの文字数で.btnの高さがずれる箇所に付ける修飾クラス。最低高さを固定しアイコン＋文字を上下中央に揃える */
.btn--uniform-height {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  /* 折り返しで縦に伸びるとmin-heightだけでは高さが揃わなくなるため、常に1行に固定する */
  white-space: nowrap;
}

/*
 * 日報ひな形の切替バー（admin/user_detail.php、利用者切替ヘッダーの直下）。画面幅いっぱいのposition:stickyバー。
 * position:stickyは祖先にoverflow:hidden/auto/scrollやtransformがあると効かなくなるため注意。
 */
.template-set-switcher {
  position: -webkit-sticky;
  position: sticky;
  top: 65px;
  z-index: 15;
  width: 100%;
  background: #eef5f0;
  border-bottom: 1px solid #ddd;
}

/* 中身は本文（.app-main--wide、max-width:960px）と同じ最大幅に収め中央寄せする。画面幅が足りない場合だけ自然に折り返す */
.template-set-switcher__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
}

.template-set-switcher label {
  margin: 0;
  flex-shrink: 0;
}

.template-set-switcher select {
  width: auto;
  flex: 1 1 160px;
  min-width: 140px;
  margin: 0;
  background: #fff;
}

.template-set-switcher__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.template-set-switcher__actions .btn,
.template-set-switcher__actions form {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}

.template-set-switcher__actions .btn {
  padding: 8px 12px;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* 1行に収められる幅がある画面（700px以上）では折り返さない。プルダウンは残り幅いっぱいに広がり、操作ボタンは縮めない */
@media (min-width: 700px) {
  .template-set-switcher__inner {
    flex-wrap: nowrap;
  }
  .template-set-switcher select {
    flex: 1 1 auto;
  }
  .template-set-switcher__actions {
    flex-wrap: nowrap;
  }
}

/* 支援内容の追加・編集モーダル専用の2カラム化。左「支援内容」を広め、右「オプション設定」を狭め（7:3）にする */
.care-content-form-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 700px) {
  .care-content-form-columns {
    grid-template-columns: 7fr 3fr;
    align-items: start;
  }
}

/* 「支援内容の読み込み」モーダル（admin/user_detail.php）は候補を2カラムで並べたいため、個別にmax-widthを持たせる */
@media (min-width: 700px) {
  #modal-care-content-load-form {
    max-width: 800px;
  }
}

/* 読み込み候補一覧：PCは2カラム、スマホは1カラム。.list-blockの既定margin-bottomはgapと二重になるためこの一覧内だけ打ち消す */
#careLoadCandidateList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

#careLoadCandidateList .list-block {
  margin-bottom: 0;
  /* カード右下へ所有利用者名（.care-load-candidate__owner）を重ねて表示するための基準位置 */
  position: relative;
}

@media (min-width: 700px) {
  #careLoadCandidateList {
    grid-template-columns: 1fr 1fr;
  }
}

/* 「基本セット」絞り込み時、カード右下へ所有利用者名を重ねて表示する（position:absolute） */
#careLoadCandidateList .care-load-candidate__owner {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 6px;
  background: #e2e4e3;
  color: #888;
  font-size: 0.65rem;
  line-height: 1.3;
  border-radius: 4px;
  pointer-events: none;
}

/* 選択中の読み込み候補（クリックで選択／解除する。押した瞬間には登録しない） */
#careLoadCandidateList .list-block__main.is-selected {
  background: #eef5f0;
  color: #2f7d5a;
  font-weight: bold;
}

/* ============================================================
   管理者：職員管理
   admin/staff_manage.php
   body: .page-admin-staff-manage
   ============================================================ */

/* 職員管理画面（admin/staff_manage.php）のタブ＋内容ブロック。選択中タブと下の内容ブロックが1つの枠として繋がって見える構成にする */
.tab-panel {
  margin: 4px 0 20px;
}

.tab-panel__tabs {
  display: flex;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.tab-panel__tab {
  flex: 1;
  box-sizing: border-box;
  min-width: 0;
  padding: 9px 6px;
  margin-bottom: -1px;
  border: 1px solid #ddd;
  border-radius: 8px 8px 0 0;
  background: #f2f2f2;
  color: #555;
  text-align: center;
  font-weight: bold;
  font-size: 0.9rem;
  text-decoration: none;
}

.tab-panel__tab.is-active {
  background: #e3f5ec;
  border-color: #bcdfcc;
  color: #1f7a4d;
}

/* 「削除済みを表示」がOFFの間、削除済みタブ自体を隠す（assets/js/common.jsではなく
   admin/staff_manage.php内のonStaffShowDeletedToggle()がclassを付け外しする） */
.tab-panel__tab.is-hidden {
  display: none;
}

.tab-panel__body {
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 0 0 10px 10px;
  background: var(--gray-light);
  padding: 50px 10%;
}

/* このページ内のカード（.list-block）だけ、他画面より少し間隔を広げる */
.tab-panel__body .add-section {
  margin-bottom: 20px;
}

.tab-panel__body .staff-manage-row:last-child {
  margin-bottom: 0;
}

/* 職員・共有端末の1行分。白いカード（.list-block）の右側に無効／有効・削除の操作ボタンを並べる */
.staff-manage-row {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}

.staff-manage-row .list-block {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.staff-manage-row__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.staff-manage-row__actions .btn {
  width: auto;
  margin: 0;
  padding: 8px 10px;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* URL表示ボタンは他の操作ボタンより控えめな配色・小さめのサイズにする（行の背景.list-block--rowと被らない緑寄りグレー） */
.list-block__actions .btn--url {
  background: #b8e0f4;
  color: #2e5d79;
  padding: 6px 10px;
  font-size: 0.8rem;
}

@media (hover: hover) {
  .list-block__actions .btn--url:hover {
    opacity: 0.7;
  }
}

.list-block__actions .btn--url:active {
  /*background: #73b0cd;*/
  opacity: 0.7;
}

/* 職員・共有端末のURL専用モーダル（admin/staff_manage.php）内のQRコード・URL表示欄 */
.qr-code-box {
  display: flex;
  justify-content: center;
  margin: 4px 0 16px;
}

.qr-code-box svg {
  width: 200px;
  height: 200px;
  max-width: 100%;
}

.url-text-input {
  width: 100%;
  font-size: 0.8rem;
  margin-bottom: 8px;
  cursor: pointer;
}

/* URL表示モーダルのURL欄。クリック／タップで選択＋コピーし（copyUrlOnClick()）、「コピーしました」を欄のすぐ下に一時的に表示する */
.url-copy-wrap {
  position: relative;
}

.url-copy-feedback {
  display: block;
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: #2f7d5a;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.url-copy-feedback.is-visible {
  opacity: 1;
}

/* ============================================================
   管理者：施設設定
   admin/facility_setting.php
   body: .page-admin-facility-setting
   ============================================================ */

.page-admin-facility-setting .btn{
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
 .btn--secondary{
  max-width: 450px;
}

/* システム設定（admin/facility_setting.php）専用。見出し（または見出し＋カード）の単位をPC・スマホともに縦1列で並べる */
.facility-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.facility-setting-section{
  margin-bottom: 4%;
}

/* システム設定「ログイン情報」内の世話人／管理者それぞれを囲む枠。横並び自体は既存の.detail-columnsをそのまま使う */
.login-credentials-box {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px 10%;
}
.login-credentials-box label{
  font-weight: bold;
}
.login-credentials-box input{
  color: #555;
}
.login-credentials-box p{
  color: #666;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 10px 0;
}

/* 「支援記録　固定表示／折りたたみ」のような1行。PCでは横並び、狭い幅では自然に折り返す */
.settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 6px 0;
  border-top: 1px solid #e0e5e2;
}

.settings-row:first-of-type {
  border-top: none;
}

.settings-row__label {
  font-weight: bold;
}

.settings-row__options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.settings-row__options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: normal;
  white-space: nowrap;
}

.facility-setting-danger-zone{
  background: var(--pink-light);
  border: 1px solid #ffc5c5;
}
.facility-setting-danger-zone .subsection-title{
  color: #ba2929;
}

/* バックアップ管理モーダルの履歴一覧。1件＝1行（日時＋結果＋種別のピル、その下にファイル名／サイズ
   または失敗理由）。この画面専用のため、他のテーブル的な一覧とは共有しない */
.backup-history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backup-history-row {
  border-top: 1px solid #e0e5e2;
  padding: 8px 0;
}

.backup-history-row:first-child {
  border-top: none;
}

.backup-history-row__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.backup-history-row__date {
  font-weight: bold;
}

.backup-history-row__detail {
  margin-top: 4px;
  font-size: 0.85rem;
  word-break: break-all;
}

/* ============================================================
   世話人：様子・特記事項の検索
   care/report_note_search.php
   body: .page-care-report-note-search
   ============================================================ */

.page-care-report-note-search .report-note-search-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-care-report-note-search .report-note-search-form label {
  font-weight: bold;
  margin-top: 8px;
}

.page-care-report-note-search .report-note-search-form .btn {
  margin-top: 16px;
}

.page-care-report-note-search .report-note-search-count {
  font-weight: bold;
  margin-bottom: 12px;
}

.page-care-report-note-search .report-note-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-care-report-note-search .report-note-search-card {
  display: block;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
  background: #fff;
}

.page-care-report-note-search .report-note-search-card:active {
  background: #f2f7f4;
}

.page-care-report-note-search .report-note-search-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #56605a;
  margin-bottom: 6px;
}

.page-care-report-note-search .report-note-search-card__meta .icon {
  vertical-align: -2px;
  margin-right: 2px;
}

.page-care-report-note-search .report-note-search-card__body {
  margin: 0;
  white-space: pre-line;
  word-break: break-word;
}

.page-care-report-note-search .report-note-search-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.page-care-report-note-search .report-note-search-pager__label {
  font-size: 0.9rem;
  color: #56605a;
}
