/* ==============================================================
   共通デザイン設定（Bootstrap5.3 ベース）
   ============================================================== */

/* --------------------------------------------------------------
   1. レイアウト基礎設定
   -------------------------------------------------------------- */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* body を flex にする場合のモーダル競合対策：z-index 崩れ防止 */
body {
  display: flex;
  flex-direction: column;
  font-family: 'Noto Sans JP', sans-serif;
  min-height: 100vh;
  position: relative; /* stacking contextを統一 */
}

/* 背景色が薄い場合 */
body.bg-light {
  background-color: #f8f9fa !important;
}

/* --------------------------------------------------------------
   2. フッター（モーダル競合を完全除去）
   -------------------------------------------------------------- */
footer {
  flex-shrink: 0;
  border-top: 1px solid #dee2e6;
  text-align: center;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  box-sizing: border-box;

  /* モーダル衝突防止：独自z-indexを持たない */
  position: static !important;
  z-index: auto !important;
}

/* --------------------------------------------------------------
   3. メイン領域
   -------------------------------------------------------------- */
container {
  font-size: 0.92rem;
}

/* --------------------------------------------------------------
   4. フォーム基本仕様
   -------------------------------------------------------------- */
form {
  max-width: 800px;
  margin: auto;
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* --------------------------------------------------------------
   5. セクション
   -------------------------------------------------------------- */
.section-title {
  background-color: whitesmoke;
  padding: 0.75rem 0.75rem;
  font-weight: 400;
  font-size: 1rem;
  border-bottom: 1px solid gainsboro;
}
.section-title-bt {
  border-top: 1px solid gainsboro;
}
.section-body {
  padding: 1rem 1.5rem;
}

/* アクションボタン */
.form-action-btn {
  padding: 0.7rem 1.5rem !important;
  font-size: 1rem;
  width: auto;
}
.form-action-wrapper {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* --------------------------------------------------------------
   6. スマホ向け
   -------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .section-title {
    padding: 0.4rem 0.4rem;
  }
  .section-body {
    padding: 0.75rem 1rem;
  }

  .form-action-btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
    width: 45%;
    min-width: 120px;
  }

  .form-action-wrapper {
    justify-content: center;
    display: flex;
    gap: 0.5rem;
  }
}

/* ==============================================================
   7. IME（日本語入力モード制御）
   ============================================================== */
.ime-on  { ime-mode: active; }
.ime-off { ime-mode: inactive; }
.ime-kana {
  ime-mode: active;
/*
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "MS PGothic",
    sans-serif;
*/
}

/* ==============================================================
   8. テーブル調整
   ============================================================== */
.table th,
.table td {
  vertical-align: middle;
}
.table th {
  white-space: nowrap;
}

/* ==============================================================
   9. 時刻表示（レスポンシブ）
   ============================================================== */
.time-full {
  font-size: 1rem;
}
.time-short {
  font-size: 0.95rem;
}

/* ==============================================================
   10. ダッシュボード四角メニュー
   ============================================================== */
.square-btn {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.square-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.square-btn i {
  font-size: 28px;
  margin-bottom: 8px;
}

/* =====================================================
   ▼ 検索窓
   ===================================================== */
/* 検索窓の placeholder（プレースホルダー）文字サイズを小さくする */
.search-input::placeholder {
    font-size: 0.85rem;   /* ← ここを調整。0.75rem なども可 */
    color: #777;          /* 薄めカラー（必要なら） */
}

/* =====================================================
   ▼ 検索条件カード（角丸なし・二重線なし）
   ===================================================== */

.search-card,
.search-card .card-header,
.search-card .collapse,
.search-card .card-body,
.search-card .card-footer {
  border-radius: 0 !important;
}

/* カード本体 */
.search-card {
  border: 1px solid #ddd !important;
  background: #fff;
  box-shadow: none !important;
  margin-bottom: 1.5rem;
}

/* ▼ ヘッダー（上部だけ角丸にしたい場合は下をONに） */
/*
.search-card .card-header {
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
}
*/

/* ▼ ヘッダー装飾 */
.search-card .card-header {
  background: #eee !important;
  color: #444;
  border: none !important;
  font-size: 1rem;
  padding: 12px 16px;
  cursor: pointer;
}

/* ▼ collapse内の角丸も無効化 */
#filterArea,
#filterArea .card-body {
  border-radius: 0 !important;
}

/* ▼ collapse 開いたときに上線を追加 */
#filterArea.show .card-body {
  border-top: 1px solid #ddd;
  padding-top: 16px;
}

.search-form-wrapper {
  width: 100%;
  /* カード内いっぱい */
  max-width: none;
  /* 制限を解除 */
  margin-left: 0;
  margin-right: 0;
}

/* ▼ 検索条件を縦並びにする */
.filter-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  /* 左：ラベル固定幅 / 右：入力欄 */
  align-items: center;
  column-gap: 12px;
  margin-bottom: 14px;
}

.filter-item label {
  margin: 0;
  text-align: left;
  font-weight: 400;
}

/* ▼ テーブルとの干渉防止 */
.table-responsive {
  margin-top: 0 !important;
}

table.table {
  border-top: 1px solid #ddd !important;
}
