/* 共通設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  padding-top: 60px;
  background: #fff;
}

p.break{
  overflow-wrap: break-word;
}

/* ヘッダー */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #ccc;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px;
  z-index: 999; /* ← これが大事！ */
}

.logo { height: 40px; }

.mypage-icon {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.mypage-icon img {
  width: 100%; height: 100%; object-fit: cover;
}

/* スライドメニュー */
.slide-menu {
  position: fixed;
  top: 0; right: -260px;
  width: 260px; height: 100%;
  background: #fff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2);
  z-index: 2000; /* ← 必ずヘッダーより前面 */
  transition: right 0.3s ease;
  padding-top: 0;
  overflow-y: auto;
}

.slide-menu.open { right: 0; }

.slide-profile {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.slide-mypage-icon {
  width: 60px; height: 60px; border-radius: 50%;
  overflow: hidden;
  display: block;
  margin-left: auto; /* ← 右寄せ */
}

.slide-mypage-icon img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.slide-username {
  font-size: 14px; color: #333; margin-top: 8px;
}

.slide-menu {
  position: fixed;
  top: 0; right: -260px;
  width: 260px; height: 100%;
  background: #fff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2);
  z-index: 2000;
  transition: right 0.3s ease;
  padding-top: 0;
  overflow-y: auto;
}

.slide-menu.open { right: 0; }

.slide-menu nav {
  padding: 24px 16px 16px;
  position: relative;
}

.slide-menu ul { list-style: none; margin: 0; padding: 0; }

.slide-menu li { margin-bottom: 16px; }

.slide-menu a {
  text-decoration: none; color: #333; font-size: 16px;
}

/* フォルダー選択セクション */
.access-select-section {
  padding: 20px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0;
  position: relative;
}

.access-select-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.access-select-dropdown {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.access-select-dropdown:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.access-select-btn {
  width: 100%;
  padding: 10px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.access-select-btn:hover {
  background: #1d4ed8;
}

.access-select-btn:active {
  transform: scale(0.98);
}

/* オーバーレイ */
.overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 1500; /* ← ヘッダーより上、メニューより下 */
}

.overlay.show { display: block; }

/* メイン */
main {
  padding: 16px;
  margin-top: 20px; /* ← 追加で少し空ける */
}

/* フッター */
.site-footer {
  margin-top: 40px;
  background: linear-gradient(to top, red 30%, #f88 70%);
  color: #fff;
  font-size: 13px;
}
.footer-menu {
  background-color: #ccc;
  display: grid;
  grid-template-columns: repeat(2, auto); /* 2列に固定 */
  justify-content: center;
  gap: 12px 24px; /* 行間・列間 */
  padding: 16px 8px;
}
.footer-menu a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
}
.footer-copy {
  background-color: red;
  text-align: center;
  padding: 8px;
  color: #fff;
  font-size: 12px;
}
.footer-copy .brand {
  color: #fff200;
  font-weight: bold;
}


/* calendar.css */

.calendar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

.calendar-header .month-nav {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  padding: 4px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.calendar-header .month-nav:hover {
  background: #f0f0f0;
}

.calendar-header .current-month {
  font-weight: bold;
  font-size: 1.4em;
}


#currentMonthLabel {
  font-size: 24px;   /* 好きな大きさに */
  font-weight: bold; /* 太字にしたいなら */
}

.calendar-header button {
  font-size: 20px;
  padding: 4px 10px;
}

.calendar {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f0f0f0;
  text-align: center;
}

.weekday {
  padding: 10px 0;
  font-weight: bold;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.day {
  border: 1px solid #ddd;
  min-height: 60px;
  position: relative;
  padding: 4px;
  cursor: pointer;
}

.day.sunday { color: red; }
.day.saturday { color: blue; }
.day.today { background: #e0f7fa; }
.day.worked { background: #e8f5e9; }

.day .date {
  font-size: 12px;
}

.day .hours {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 12px;
}

.day.sunday {
  color: red;
  background: #ffeaea; /* 薄い赤背景 */
}

.day.saturday {
  color: blue;
  background: #eaf3ff; /* 薄い青背景 */
}

/* ============================
   2/touhoku_report.php 専用デザイン
   ============================ */

body.page-touhoku-report .wrapper {
  overflow-x: auto;
  border: 1px solid #ccc;
  max-width: 100%;
  white-space: nowrap;
}

body.page-touhoku-report table.touhoku-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 100%;
}

body.page-touhoku-report table.touhoku-table th,
body.page-touhoku-report table.touhoku-table td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  text-align: center;
}

body.page-touhoku-report table.touhoku-table th {
  background: #f5f5f5;
  position: sticky;
  top: 0;
  z-index: 2;
}

body.page-touhoku-report table.touhoku-table th.name,
body.page-touhoku-report table.touhoku-table td.name {
  background: #fafafa;
  font-weight: bold;
  position: sticky;
  left: 0;
  z-index: 3;
}

body.page-touhoku-report table.touhoku-table th.sat,
body.page-touhoku-report table.touhoku-table td.sat {
  background: #e6f2ff;
}

body.page-touhoku-report table.touhoku-table th.sun,
body.page-touhoku-report table.touhoku-table td.sun {
  background: #ffe6e6;
}

body.page-touhoku-report #popup {
  display: none;
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
  background: #fff;
  border: 1px solid #ccc;
  padding: 20px;
  z-index: 1000;
}

body.page-touhoku-report #popup_yakan_row {
  display: none;
}

body.page-touhoku-report .no-data-cell {
  padding: 24px;
  text-align: center;
  color: #666;
}

/* ============================
   2/member_report.php 専用デザイン
   → カレンダー部分は 2/index.php(page-member-index) と同じCSSを再利用
   ============================ */

body.page-member-report .calendar-container {
  /* member_report 側では直接は使っていないが、包んだ場合でも同じ見た目になるように */
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0;
  background: #ffffff;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

body.page-member-report .calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 0;
  background: #333333;
  color: #ffffff;
  border-bottom: none;
}

body.page-member-report .calendar-header > * {
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-member-report .calendar-header > *:last-child {
  margin-right: 0;
}

body.page-member-report .calendar-header span {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-align: center;
}

body.page-member-report .calendar-header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 15px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.2s ease;
  border: none;
  min-height: 32px;
  min-width: 90px;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
}

body.page-member-report .calendar-header button:hover {
  background: rgba(255, 255, 255, 0.28);
  text-decoration: none;
}

body.page-member-report .calendar {
  background: #ffffff;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
}

body.page-member-report .weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
  margin-bottom: 0;
  background: #f8f9fa;
  border-bottom: 2px solid #eeeeee;
}

body.page-member-report .weekday {
  text-align: center;
  padding: 10px 0;
  font-weight: bold;
  font-size: 12px;
  color: #333333;
}

body.page-member-report .weekday:nth-child(1) {
  color: #dc2626;
}

body.page-member-report .weekday:nth-child(7) {
  color: #2563eb;
}

body.page-member-report .days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
  background: #ffffff;
}

body.page-member-report .day {
  min-height: 110px;
  padding: 6px;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #eeeeee;
  transition: background-color 0.15s ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  vertical-align: top;
  font-size: 11px;
}

body.page-member-report .day:nth-child(7n) {
  border-right: 1px solid #eeeeee;
}

body.page-member-report .day:nth-last-child(-n+7) {
  border-bottom: 1px solid #eeeeee;
}

body.page-member-report .day:hover {
  background: #f9fafb;
}

body.page-member-report .day.sunday .date {
  color: #dc2626;
}

body.page-member-report .day.saturday .date {
  color: #2563eb;
}

body.page-member-report .day.today {
  background: #ffffff;
}

body.page-member-report .day.today .date {
  font-weight: 700;
}

body.page-member-report .day.worked {
  background: #ffffff;
  cursor: pointer;
}

body.page-member-report .day.worked:hover {
  background: #f9fafb;
}

body.page-member-report .day .date {
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 6px;
  line-height: 1.2;
}

body.page-member-report .day .work {
  font-size: 11px;
  padding: 4px 8px;
  margin: 4px auto;
  border-radius: 6px;
  font-weight: 400;
  line-height: 1.4;
  display: block;
  width: fit-content;
  text-align: center;
  max-width: 90%;
  color: #000000;
}

body.page-member-report .day .work:empty {
  display: none;
}

body.page-member-report .day.has-work .work-shift {
  background: #e8f5e9; /* 通常：緑系（2/index.php と同じ） */
  color: #1b5e20;
  border-radius: 4px;
  border-left: 3px solid #2e7d32;
}

body.page-member-report .day.has-work .work-training {
  background: #e3f2fd; /* 講習：青系（2/index.php と同じ） */
  color: #1e3a8a;
  border-radius: 4px;
  border-left: 3px solid #1d4ed8;
}

body.page-member-report .day.has-work .work-night {
  background: #f3e5f5; /* 夜勤：紫系（2/index.php と同じ） */
  color: #4b0082;
  border-radius: 4px;
  border-left: 3px solid #7e22ce;
}

body.page-member-report #memberReport_yakan_row {
  display: none;
}

/* モーダル内のフォームをタブ風に見せる */
body.page-member-report .modal-content {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

body.page-member-report .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

body.page-member-report .modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

body.page-member-report .modal-header .close-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #6b7280;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

body.page-member-report .modal-header .close-btn:hover {
  background-color: #f3f4f6;
  color: #111827;
}

body.page-member-report .modal-body {
  padding: 16px 20px 8px;
}

body.page-member-report .form-group {
  margin-bottom: 16px;
}

body.page-member-report .form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 6px;
}

body.page-member-report .form-label .label-icon {
  font-size: 16px;
}

body.page-member-report .form-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  color: #111827;
  background-color: #f9fafb;
}

body.page-member-report .form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
  background-color: #ffffff;
}

body.page-member-report .modal-footer {
  padding: 12px 20px 18px;
  border-top: 1px solid #e5e7eb;
}

body.page-member-report .btn-save {
  width: 100%;
  border-radius: 999px;
  font-weight: 600;
  padding: 12px 0;
  font-size: 15px;
}

/* ============================
   2/member_invoice.php 専用デザイン
   ============================ */

body.page-member-invoice,
body.page-new-cost {
  background: #f5f7fa;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* index.php のカレンダー幅（max-width:1200px）に合わせる外枠 */
body.page-member-invoice .invoice-container,
body.page-new-cost      .invoice-container {
  max-width: 1200px;
  /* フッターとの空白を少し詰める */
  margin: 0 auto 20px;
  padding: 0 20px;
}

@media (max-width: 640px) {
  body.page-member-invoice .invoice-container,
  body.page-new-cost      .invoice-container {
    padding: 0 12px;
  }
}

body.page-member-invoice .month-nav,
body.page-cost-list    .month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 8px;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.page-member-invoice .month-nav a,
body.page-cost-list    .month-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background: #f9fafb;
  color: #374151;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
  min-width: 96px;
}

body.page-member-invoice .month-nav a:hover,
body.page-cost-list    .month-nav a:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

body.page-member-invoice .month-nav span,
body.page-cost-list    .month-nav span {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  color: #1f2937;
}

body.page-member-invoice .salary-table {
  width: 100%;
  margin: 24px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
}

body.page-member-invoice .salary-table thead tr th {
  background: #2a7ae4;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 16px;
  text-align: left;
  border: none;
}

/* 発注リストのヘッダー角をカードとそろえる */
body.page-member-invoice .salary-table thead tr th:first-child {
  border-top-left-radius: 12px;
}
body.page-member-invoice .salary-table thead tr th:last-child {
  border-top-right-radius: 12px;
}

body.page-member-invoice .salary-table tbody td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
  color: #1f2937;
  font-size: 14px;
}

body.page-member-invoice .salary-table tbody tr:last-child td {
  border-bottom: none;
}

body.page-member-invoice .salary-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

body.page-member-invoice .salary-table tbody tr:hover {
  background: #f3f4f6;
}

body.page-member-invoice .salary-table tfoot td {
  font-weight: 600;
  /* 小計・合計行の背景色を稼働明細と統一 */
  background: #f4f6f9;
  padding: 14px 16px;
  border-top: 2px solid #e5e7eb;
  color: #1f2937;
  font-size: 15px;
}

body.page-member-invoice .salary-table tfoot td:first-child {
  color: #6b7280;
}

/* 発注リストテーブルの下側の角をカードとそろえる */
body.page-member-invoice .salary-table tfoot tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
body.page-member-invoice .salary-table tfoot tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

body.page-member-invoice .table-wrapper {
  width: 100%;
  margin: 32px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

body.page-member-invoice .table-title {
  background: #2a7ae4;
  color: #fff;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

body.page-member-invoice .styled-table,
body.page-cost-list    .styled-table {
  width: 100%;
  border-collapse: collapse;
}

body.page-member-invoice .styled-table thead th,
body.page-cost-list    .styled-table thead th {
  background: #2a7ae4;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 16px;
  text-align: left;
  border: none;
}

/* 稼働明細テーブルのヘッダー角をカードとそろえる */
body.page-member-invoice .styled-table thead th:first-child,
body.page-cost-list    .styled-table thead th:first-child {
  border-top-left-radius: 12px;
}
body.page-member-invoice .styled-table thead th:last-child,
body.page-cost-list    .styled-table thead th:last-child {
  border-top-right-radius: 12px;
}

body.page-member-invoice .styled-table tbody td,
body.page-cost-list    .styled-table tbody td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
  color: #1f2937;
  font-size: 14px;
}

body.page-member-invoice .styled-table tbody tr:last-child td,
body.page-cost-list    .styled-table tbody tr:last-child td {
  border-bottom: none;
}

/* 稼働明細テーブルの下側の角をカードとそろえる */
body.page-member-invoice .styled-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
body.page-member-invoice .styled-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

body.page-member-invoice .styled-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

body.page-member-invoice .styled-table tbody tr:hover {
  background: #f3f4f6;
}

body.page-member-invoice .styled-table tbody tr td:first-child {
  font-weight: 500;
  color: #374151;
}

body.page-member-invoice .styled-table tfoot td,
body.page-cost-list    .styled-table tfoot td {
  font-weight: 600;
  background: #f9fafb;
  padding: 14px 16px;
  border-top: 2px solid #e5e7eb;
  color: #1f2937;
  font-size: 15px;
}

body.page-member-invoice .styled-table tfoot td:first-child,
body.page-cost-list    .styled-table tfoot td:first-child {
  color: #6b7280;
}

/* 経費一覧など styled-table の下側の角をカードとそろえる */
body.page-member-invoice .styled-table tfoot tr:last-child td:first-child,
body.page-cost-list    .styled-table tfoot tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
body.page-member-invoice .styled-table tfoot tr:last-child td:last-child,
body.page-cost-list    .styled-table tfoot tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

body.page-member-invoice .salary-table td:last-child,
body.page-member-invoice .styled-table td:nth-child(3) {
  font-weight: 500;
  color: #1f2937;
}

body.page-member-invoice .photo-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  background: #eff6ff;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 1px solid #dbeafe;
  margin-right: 8px;
  text-decoration: none;
}

body.page-member-invoice .photo-icon-link:hover {
  background: #dbeafe;
  transform: scale(1.05);
}

body.page-member-invoice .photo-icon-link img {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  body.page-member-invoice .month-nav,
  body.page-member-invoice .salary-table,
  body.page-member-invoice .table-wrapper,
  body.page-cost-list    .month-nav,
  body.page-cost-list    .styled-table {
    width: 95%;
    margin: 16px auto;
  }
  body.page-member-invoice .month-nav {
    padding: 10px 12px;
  }
  body.page-member-invoice .month-nav a {
    padding: 6px 12px;
    font-size: 13px;
  }
  body.page-member-invoice .salary-table th,
  body.page-member-invoice .salary-table td,
  body.page-member-invoice .styled-table th,
  body.page-member-invoice .styled-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
  body.page-member-invoice .table-title {
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* ============================
   2/bank_edit.php 専用デザイン
   ============================ */

body.page-bank-edit {
  background: #f5f7fa;
}

body.page-bank-edit .form-card {
  max-width: 600px;
  margin: 20px auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px 25px;
}

body.page-bank-edit .form-card h2 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #2a7ae4;
  border-left: 4px solid #2a7ae4;
  padding-left: 10px;
}

/* member_invoice / cost_list のカードと見出しを bank_edit と近いデザインにする */
body.page-member-invoice .invoice-card,
body.page-cost-list .invoice-card,
body.page-new-cost .invoice-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px 25px;
  margin: 24px 0;
  overflow: hidden;
}

body.page-member-invoice .invoice-section-title,
body.page-cost-list .invoice-section-title,
body.page-new-cost .invoice-section-title {
  font-size: 18px;
  margin: 0 0 15px;
  color: #2a7ae4;
  border-left: 4px solid #2a7ae4;
  padding-left: 10px;
}

/* 発注リストカード：タイトルとPDFボタンを1行に（タイトル左・ボタン右） */
body.page-member-invoice .invoice-order-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 15px;
}
body.page-member-invoice .invoice-order-list-header .invoice-section-title {
  margin: 0;
}
body.page-member-invoice .invoice-order-list-header .invoice-pdf-download-wrap {
  margin: 0;
}

@media (max-width: 600px) {
  body.page-member-invoice .invoice-order-list-header {
    gap: 8px;
  }
  body.page-member-invoice .invoice-order-list-header .invoice-section-title {
    font-size: 16px;
  }
  body.page-member-invoice .invoice-pdf-download {
    font-size: 14px;
    padding: 10px 20px;
  }
}

/* ============================
   2/invoice_pdf.php 用 請求書レイアウト（テンプレ画像準拠）
   ============================ */
body.page-invoice-pdf {
  background: #e8ecf4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.invoice-pdf-page.invoice-pdf-template {
  width: 900px;
  max-width: 100%;
  margin: 24px auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 28px 36px 36px;
  box-sizing: border-box;
}

.invoice-pdf-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
}

.invoice-pdf-top-left {
  flex: 1;
  min-width: 0;
}

.invoice-pdf-main-title {
  font-size: 26px;
  font-weight: 700;
  color: #1e5a9e;
  margin: 0;
  letter-spacing: 0.08em;
}

/* タイトル直下の請求先 */
.invoice-pdf-top-left .invoice-pdf-to {
  margin-top: 12px;
}

/* 請求先の下・ご請求金額の上に表示する挨拶文 */
.invoice-pdf-top-left .invoice-pdf-greeting {
  margin-top: 10px;
  margin-bottom: 0;
}

.invoice-pdf-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 13px;
  color: #374151;
  min-width: 280px;
}

.invoice-pdf-top-right > p { margin: 2px 0; text-align: right; }

/* 右上に置いた差出人ブロック */
.invoice-pdf-top-right .invoice-pdf-from {
  margin-top: 12px;
  width: 100%;
  max-width: 280px;
  text-align: left;
}

.invoice-pdf-body {
  margin-bottom: 20px;
}

.invoice-pdf-to {
  font-size: 14px;
  line-height: 1.6;
}

.invoice-pdf-to-name {
  font-weight: 600;
  margin: 0 0 6px;
}

.invoice-pdf-to-postal,
.invoice-pdf-to-addr,
.invoice-pdf-to-tel {
  margin: 2px 0;
  color: #374151;
}

.invoice-pdf-greeting {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.invoice-pdf-from {
  width: 320px;
  flex-shrink: 0;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
}

.invoice-pdf-from-label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 6px;
}

.invoice-pdf-from-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.invoice-pdf-from-table th,
.invoice-pdf-from-table td {
  padding: 3px 6px;
  text-align: left;
  vertical-align: top;
  border: none;
}

.invoice-pdf-from-table th {
  width: 28%;
  font-weight: 600;
  color: #374151;
}

.invoice-pdf-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.invoice-pdf-amount-block {
  display: flex;
  align-items: center;
  background: #1e5a9e;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
}

.invoice-pdf-amount-label { margin-right: 12px; }

.invoice-pdf-amount-value { font-size: 18px; }

.invoice-pdf-due {
  font-size: 14px;
  color: #374151;
}

.invoice-pdf-bank {
  margin-bottom: 16px;
  font-size: 13px;
}

.invoice-pdf-bank-table {
  width: 100%;
  max-width: 480px;
  border-collapse: collapse;
  margin: 6px 0;
}

.invoice-pdf-bank-table th,
.invoice-pdf-bank-table td {
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.invoice-pdf-bank-table th {
  width: 100px;
  background: #f3f4f6;
  font-weight: 600;
}

.invoice-pdf-remarks {
  font-size: 12px;
  color: #6b7280;
  margin: 6px 0 0;
}

.invoice-pdf-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}

.invoice-pdf-detail-table th,
.invoice-pdf-detail-table td {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
}

.invoice-pdf-detail-table thead th {
  background: #1e5a9e;
  color: #fff;
  font-weight: 600;
}

.invoice-pdf-detail-table .col-no { width: 44px; text-align: center; }

.invoice-pdf-detail-table .col-qty,
.invoice-pdf-detail-table .col-unit { width: 56px; text-align: center; }

.invoice-pdf-detail-table .col-price,
.invoice-pdf-detail-table .col-amount { width: 100px; text-align: right; }

.invoice-pdf-detail-table tfoot td {
  background: #f9fafb;
  font-weight: 500;
}

.invoice-pdf-detail-table tfoot .invoice-pdf-total-row td {
  background: #1e5a9e;
  color: #fff;
  font-weight: 700;
}

.invoice-pdf-detail-table .text-right { text-align: right; }

.invoice-pdf-notes {
  background: #e8ecf4;
  border-top: 2px solid #1e5a9e;
  padding: 10px 12px;
  border-radius: 0 0 6px 6px;
  font-size: 13px;
  color: #1e3a5f;
}

.invoice-pdf-notes-label { font-weight: 600; margin-bottom: 6px; }

.invoice-pdf-notes-body { min-height: 40px; }

@media (max-width: 768px) {
  .invoice-pdf-page.invoice-pdf-template {
    width: 100%;
    margin: 0;
    padding: 16px 12px 24px;
  }
  .invoice-pdf-top-right { min-width: 0; align-items: flex-start; }
  .invoice-pdf-top-right .invoice-pdf-from { max-width: 100%; }
  .invoice-pdf-from { width: 100%; max-width: 100%; }
  .invoice-pdf-amount-row { flex-direction: column; align-items: flex-start; }
}

/* 発注リスト内・経費内PDF/経費追加ボタン（請求書のご請求金額ブロック風） */
body.page-member-invoice .invoice-pdf-download-wrap,
body.page-cost-list    .invoice-pdf-download-wrap,
body.page-new-cost     .invoice-pdf-download-wrap {
  margin: 0 0 24px;
}
body.page-member-invoice .invoice-pdf-download,
body.page-cost-list    .invoice-pdf-download,
body.page-new-cost     .invoice-pdf-download {
  display: inline-block;
  background: #1e5a9e;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(30, 90, 158, 0.3);
  transition: background 0.2s, box-shadow 0.2s;
}
body.page-member-invoice .invoice-pdf-download:hover,
body.page-cost-list    .invoice-pdf-download:hover,
body.page-new-cost     .invoice-pdf-download:hover {
  background: #164a82;
  box-shadow: 0 3px 8px rgba(30, 90, 158, 0.4);
}

/* 経費カード内の「経費を追加する」ボタン配置と余白 */
body.page-member-invoice .invoice-cost-add-wrap,
body.page-cost-list .invoice-cost-add-wrap {
  margin-top: 16px;
  text-align: left;
}

body.page-member-invoice .invoice-cost-empty-text,
body.page-cost-list   .invoice-cost-empty-text {
  margin: 6px 0 10px;
}

body.page-bank-edit .form-group {
  margin-bottom: 15px;
}

body.page-bank-edit .form-group label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
}

body.page-bank-edit .form-group input,
body.page-bank-edit .form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

body.page-bank-edit .form-group input:focus,
body.page-bank-edit .form-group select:focus {
  border-color: #2a7ae4;
  outline: none;
  box-shadow: 0 0 5px rgba(42, 122, 228, 0.3);
}

body.page-bank-edit button {
  display: inline-block;
  background: #2a7ae4;
  color: #ffffff;
  font-size: 15px;
  font-weight: bold;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  min-width: 120px;
}

body.page-bank-edit button:hover {
  background: #1d5cb8;
}

body.page-bank-edit .styled-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

body.page-bank-edit .styled-table th,
body.page-bank-edit .styled-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

body.page-bank-edit .styled-table th {
  width: 35%;
  background: #f9fafb;
  font-weight: 500;
  color: #6b7280;
}

body.page-bank-edit .styled-table td {
  color: #1f2937;
  font-weight: 500;
}

body.page-bank-edit .styled-table tbody tr:last-child th,
body.page-bank-edit .styled-table tbody tr:last-child td {
  border-bottom: none;
}

body.page-bank-edit .styled-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

body.page-bank-edit .styled-table tbody tr:hover {
  background: #f3f4f6;
}

body.page-bank-edit .no-bank-message {
  text-align: center;
  margin: 20px;
}

/* member_invoice の振込先情報テーブルを bank_edit と同じデザインにする */
body.page-member-invoice .bank-info-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

body.page-member-invoice .bank-info-table th,
body.page-member-invoice .bank-info-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

body.page-member-invoice .bank-info-table th {
  width: 35%;
  background: #f9fafb;
  font-weight: 500;
  color: #6b7280;
}

body.page-member-invoice .bank-info-table td {
  color: #1f2937;
  font-weight: 500;
}

body.page-member-invoice .bank-info-table tbody tr:last-child th,
body.page-member-invoice .bank-info-table tbody tr:last-child td {
  border-bottom: none;
}

body.page-member-invoice .bank-info-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

body.page-member-invoice .bank-info-table tbody tr:hover {
  background: #f3f4f6;
}

/* ============================
   2/address_edit.php 専用デザイン
   ============================ */

body.page-address-edit {
  background: #f5f7fa;
}

body.page-address-edit .form-card {
  max-width: 800px;
  margin: 20px auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  padding: 24px;
}

body.page-address-edit .form-card h2 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #2563eb;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

body.page-address-edit .form-group {
  margin-bottom: 20px;
}

body.page-address-edit .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

body.page-address-edit .form-group input,
body.page-address-edit .form-group select,
body.page-address-edit .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.page-address-edit .form-group input:focus,
body.page-address-edit .form-group select:focus,
body.page-address-edit .form-group textarea:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body.page-address-edit .form-group textarea {
  min-height: 80px;
  resize: vertical;
}

body.page-address-edit .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  body.page-address-edit .form-row {
    grid-template-columns: 1fr;
  }
}

body.page-address-edit button {
  display: inline-block;
  background: #2563eb;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  min-width: 120px;
}

body.page-address-edit button:hover {
  background: #1d4ed8;
}

body.page-address-edit button:active {
  transform: scale(0.98);
}

body.page-address-edit .success-message {
  background: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #6ee7b7;
}

body.page-address-edit .section-divider {
  margin: 32px 0;
  border-top: 1px solid #e5e7eb;
}

body.page-address-edit .label-required {
  color: #ef4444;
}

body.page-address-edit .section-title-inline {
  margin-top: 0;
}

body.page-address-edit .section-note {
  color: #6b7280;
  font-size: 12px;
}

body.page-address-edit .form-actions {
  text-align: center;
  margin-top: 32px;
}

/* ============================
   2/new_cost.php 専用デザイン
   ============================ */

body.page-new-cost .cost-form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

body.page-new-cost .form-section {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.page-new-cost .form-section h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #333333;
  border-bottom: 2px solid #4a90e2;
  padding-bottom: 8px;
}

body.page-new-cost .cost-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

body.page-new-cost .cost-header-title {
  margin: 0;
}

body.page-new-cost .photo-upload-area {
  border: 2px dashed #cccccc;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  margin-bottom: 20px;
  background: #f9f9f9;
  cursor: pointer;
  transition: all 0.3s ease;
}

body.page-new-cost .photo-upload-area:hover {
  border-color: #4a90e2;
  background: #f0f7ff;
}

body.page-new-cost .photo-upload-area.dragover {
  border-color: #4a90e2;
  background: #e8f4ff;
}

body.page-new-cost .photo-preview {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

body.page-new-cost .photo-preview-item {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #dddddd;
}

body.page-new-cost .photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.page-new-cost .photo-preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 0, 0, 0.8);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-new-cost .form-group {
  margin-bottom: 20px;
}

body.page-new-cost .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333333;
}

body.page-new-cost .form-group input,
body.page-new-cost .form-group select,
body.page-new-cost .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
}

body.page-new-cost .form-group input:focus,
body.page-new-cost .form-group select:focus,
body.page-new-cost .form-group textarea:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

body.page-new-cost .form-group input[readonly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

body.page-new-cost .ai-extract-btn {
  background: #4a90e2;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}

body.page-new-cost .ai-extract-btn:hover {
  background: #357abd;
}

body.page-new-cost .ai-extract-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
}

body.page-new-cost .ai-loading {
  display: inline-block;
  margin-left: 10px;
}

body.page-new-cost .submit-btn {
  background: #28a745;
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s ease;
}

body.page-new-cost .submit-btn:hover {
  background: #218838;
}

body.page-new-cost .msg {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

body.page-new-cost .msg.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

body.page-new-cost .msg.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

body.page-new-cost .hidden {
  display: none;
}

body.page-new-cost .photo-input-wrapper {
  margin-bottom: 20px;
}

body.page-new-cost .photo-input-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333333;
}

body.page-new-cost .receipt-selection-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
}

body.page-new-cost .receipt-selection-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* 2/member_invoice.php 追加クラス */
body.page-member-invoice .month-nav-current,
body.page-cost-list    .month-nav-current {
  font-weight: bold;
  font-size: 16px;
  margin: 0 10px;
}

body.page-member-invoice .month-nav-current-link {
  color: #2a7ae4;
  text-decoration: none;
}

body.page-member-invoice .table-wrapper-work,
body.page-member-invoice .table-wrapper-cost {
  width: 100%;
  margin-top: 30px;
}

body.page-member-invoice .col-no {
  width: 40px;
}

body.page-member-invoice .col-amount {
  text-align: right;
}

body.page-member-invoice .col-amount-label {
  text-align: right;
}

body.page-member-invoice .row-subtotal {
  font-weight: bold;
  /* 小計行の背景色（明るいグレーで統一） */
  background: #f4f6f9;
}

body.page-member-invoice .row-bonus {
  /* ボーナス行も同じトーンに統一 */
  background: #f4f6f9;
}

body.page-member-invoice .row-total {
  font-weight: bold;
  /* 合計行も同じトーンに統一 */
  background: #f4f6f9;
}

body.page-member-invoice .cost-header-row th {
  width: auto;
  background: #2a7ae4 !important;
  color: #fff !important;
}

body.page-member-invoice .cost-col-date {
  width: 15%;
}

body.page-member-invoice .cost-col-type {
  width: 20%;
}

body.page-member-invoice .cost-col-amount {
  width: 15%;
}

body.page-member-invoice .cost-col-shop {
  width: 30%;
}

body.page-member-invoice .cost-col-photo {
  width: 20%;
}

body.page-member-invoice .no-photo-placeholder {
  color: #9ca3af;
}

body.page-member-invoice .bank-register-promo {
  text-align: center;
  margin: 30px 0;
}

body.page-member-invoice .bank-register-link {
  display: inline-block;
  background: #2a7ae4;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

body.page-new-cost .receipt-selection-content {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

body.page-new-cost .receipt-selection-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333333;
}

body.page-new-cost .receipt-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.page-new-cost .receipt-item {
  border: 2px solid #dddddd;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

body.page-new-cost .receipt-item:hover {
  border-color: #4a90e2;
  background: #f0f7ff;
}

/* 選択状態のレシート（はっきり分かるように色を変更） */
body.page-new-cost .receipt-item.selected {
  border-color: #2563eb;
  background: #e0edff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* 既に登録済みと判定されたレシート（選択不可のスタイル） */
body.page-new-cost .receipt-item.duplicate {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #6b7280;
  cursor: not-allowed;
}

body.page-new-cost .receipt-item-title {
  font-weight: 600;
  margin-bottom: 4px;
}

body.page-new-cost .receipt-item-meta {
  font-size: 13px;
  color: #666666;
}

body.page-new-cost .receipt-selection-actions {
  margin-top: 20px;
  text-align: right;
}

body.page-new-cost .label-required {
  color: red;
}

/* ============================
   2/cost_list.php 専用デザイン（レイアウトのみ）
   ============================ */

body.page-cost-list .cost-list-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* 経費一覧テーブルをスマホでも切れないようにする */
body.page-cost-list .table-wrapper-cost-list {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.page-cost-list .photo-link {
  color: #4a90e2;
  text-decoration: none;
  cursor: pointer;
  margin-right: 8px;
  font-size: 12px;
  padding: 6px 8px;
  background: #f0f0f0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

body.page-cost-list .photo-link:hover {
  background: #e0e0e0;
}

body.page-cost-list .photo-link img {
  width: 16px;
  height: 16px;
}

body.page-cost-list .delete-btn {
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

body.page-cost-list .delete-btn img {
  width: 20px;
  height: 20px;
  filter: brightness(0) saturate(100%) invert(27%) sepia(95%) saturate(7471%) hue-rotate(346deg) brightness(91%) contrast(87%);
}

body.page-cost-list .delete-btn:hover {
  background: rgba(220, 53, 69, 0.1);
}

body.page-cost-list .delete-btn:hover img {
  filter: brightness(0) saturate(100%) invert(15%) sepia(95%) saturate(7471%) hue-rotate(346deg) brightness(78%) contrast(87%);
}

body.page-cost-list .delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body.page-cost-list .photo-modal,
body.page-member-invoice .photo-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

body.page-cost-list .photo-modal-content,
body.page-member-invoice .photo-modal-content {
  margin: auto;
  display: block;
  width: 70%;
  max-width: 600px;
  margin-top: 50px;
  animation: zoom 0.3s;
}

@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

body.page-cost-list .photo-modal-close,
body.page-member-invoice .photo-modal-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

body.page-cost-list .photo-modal-close:hover {
  color: #bbbbbb;
}

body.page-cost-list .add-cost-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #28a745;
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  margin-bottom: 20px;
  transition: background 0.3s ease;
}

body.page-cost-list .add-cost-btn:hover {
  background: #218838;
}

body.page-cost-list .no-data {
  text-align: center;
  padding: 40px;
  color: #999999;
}

body.page-cost-list .page-title {
  margin-bottom: 24px;
}

body.page-cost-list .flash-success {
  padding: 12px;
  background: #d4edda;
  color: #155724;
  border-radius: 4px;
  margin-bottom: 20px;
}

body.page-cost-list .label-approved {
  color: #999999;
  font-size: 12px;
}

body.page-cost-list .summary-row {
  background: #f0f0f0;
  font-weight: 600;
}

/* ============================
   2/daily_column_list.php 専用デザイン
   ============================ */

body.page-daily-column-list .column-list-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

body.page-daily-column-list .column-list-page h1 {
  font-size: 20px;
  margin: 0 0 8px 0;
  color: #1e293b;
}

body.page-daily-column-list .column-list-page .back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
}

body.page-daily-column-list .column-list-page .back-link:hover {
  text-decoration: underline;
}

body.page-daily-column-list .column-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
  display: block;
}

body.page-daily-column-list .column-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.page-daily-column-list .column-card .col-date {
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

body.page-daily-column-list .column-card .col-weather {
  font-size: 1.2em;
  margin-right: 8px;
}

body.page-daily-column-list .column-card ul {
  margin: 0;
  padding-left: 1.2em;
  line-height: 1.8;
  color: #334155;
  font-size: 14px;
}

body.page-daily-column-list .column-list-page .no-columns {
  color: #64748b;
  padding: 24px 0;
}

/* ============================
   2/daily_column_detail.php 専用デザイン
   ============================ */

body.page-daily-column-detail .column-detail-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

body.page-daily-column-detail .column-detail-page .back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
}

body.page-daily-column-detail .column-detail-page .back-link:hover {
  text-decoration: underline;
}

body.page-daily-column-detail .column-detail-page h1 {
  font-size: 20px;
  margin: 0 0 16px 0;
  color: #1e293b;
}

body.page-daily-column-detail .column-detail-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;
}

body.page-daily-column-detail .column-detail-card .col-date {
  font-weight: 600;
  color: #475569;
  margin-bottom: 12px;
  font-size: 16px;
}

body.page-daily-column-detail .column-detail-card .col-weather {
  font-size: 1.3em;
  margin-right: 8px;
}

body.page-daily-column-detail .column-detail-card ul {
  margin: 0;
  padding-left: 1.2em;
  line-height: 1.9;
  color: #334155;
  font-size: 14px;
}

/* ============================
   2/index.php 専用カレンダー・コラムデザイン
   ============================ */

body.page-member-index .calendar-container {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0;
  background: #ffffff;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

body.page-member-index .calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 0;
  background: #333333;
  color: #ffffff;
  border-bottom: none;
}

body.page-member-index .calendar-header > * {
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-member-index .calendar-header > *:last-child {
  margin-right: 0;
}

body.page-member-index .calendar-header span {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-align: center;
}

body.page-member-index .month-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 15px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.2s ease;
  border: none;
  min-height: 32px;
  min-width: 90px;
  text-align: center;
  box-sizing: border-box;
}

body.page-member-index .month-nav:hover {
  background: rgba(255, 255, 255, 0.28);
  text-decoration: none;
}

body.page-member-index .calendar {
  background: #ffffff;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
}

body.page-member-index .weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
  margin-bottom: 0;
  background: #f8f9fa;
  border-bottom: 2px solid #eeeeee;
}

body.page-member-index .weekday {
  text-align: center;
  padding: 10px 0;
  font-weight: bold;
  font-size: 12px;
  color: #333333;
}

body.page-member-index .weekday:nth-child(1) {
  color: #dc2626;
}

body.page-member-index .weekday:nth-child(7) {
  color: #2563eb;
}

body.page-member-index .days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
  background: #ffffff;
}

body.page-member-index .day {
  min-height: 110px;
  padding: 6px;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #eeeeee;
  transition: background-color 0.15s ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  vertical-align: top;
  font-size: 11px;
}

body.page-member-index .day:nth-child(7n) {
  border-right: 1px solid #d1d5db;
}

body.page-member-index .day:nth-last-child(-n+7) {
  border-bottom: 1px solid #d1d5db;
}

body.page-member-index .day:hover {
  background: #f9fafb;
}

body.page-member-index .day.sunday .date {
  color: #dc2626;
}

body.page-member-index .day.saturday .date {
  color: #2563eb;
}

body.page-member-index .day.has-work {
  cursor: pointer;
  background: #ffffff;
}

body.page-member-index .day.has-work:hover {
  background: #f9fafb;
}

body.page-member-index .day .date {
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 6px;
  line-height: 1.2;
}

body.page-member-index .day .work {
  font-size: 11px;
  padding: 4px 8px;
  margin: 4px auto;
  border-radius: 4px;
  font-weight: 400;
  line-height: 1.4;
  display: block;
  width: fit-content;
  text-align: center;
  max-width: 90%;
}

body.page-member-index .calendar-table td .work-shift {
  /* 通常：緑系 */
  background: #e8f5e9;
  color: #1b5e20;
  border-radius: 4px;
  border-left: 3px solid #2e7d32;
}

body.page-member-index .calendar-table td .work-training {
  /* 講習：青系 */
  background: #e3f2fd;
  color: #1e3a8a;
  border-radius: 4px;
  border-left: 3px solid #1d4ed8;
}

body.page-member-index .calendar-table td .work-night {
  /* 夜勤：紫系 */
  background: #f3e5f5;
  color: #4b0082;
  border-radius: 4px;
  border-left: 3px solid #7e22ce;
}

body.page-member-index #detailModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.2s ease;
  align-items: center;
  justify-content: center;
}

body.page-member-index #detailModal[style*="display: block"],
body.page-member-index #detailModal[style*="display:block"] {
  display: flex !important;
}

body.page-member-index .modal-content {
  background: #ffffff;
  border-radius: 4px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
  animation: slideUp 0.2s ease;
  position: relative;
}

body.page-member-index #closeModal {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  font-weight: 400;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

body.page-member-index #closeModal:hover {
  color: #1e293b;
  background: #f1f5f9;
}

body.page-member-index #modalTitle {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
  padding-right: 40px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
}

body.page-member-index #detailContent {
  color: #475569;
  line-height: 1.8;
  font-size: 14px;
}

body.page-member-index #detailContent strong {
  color: #1e293b;
  display: inline-block;
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 14px;
  padding: 4px 0;
  font-weight: 600;
  border-bottom: 1px solid #cbd5e1;
  width: 100%;
}

body.page-member-index #detailContent strong:first-child {
  margin-top: 0;
}

body.page-member-index #detailContent br + br {
  display: none;
}

body.page-member-index #detailContent .detail-section {
  margin-bottom: 20px;
}

body.page-member-index #detailContent .detail-section-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #1e293b;
}

body.page-member-index #detailContent .detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.page-member-index #detailContent .detail-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
}

body.page-member-index #detailContent .detail-tag-shift {
  background: #e8f5e9;
  color: #1b5e20;
}

body.page-member-index #detailContent .detail-tag-training {
  background: #e3f2fd;
  color: #1e3a8a;
}

body.page-member-index #detailContent .detail-tag-night {
  background: #f3e5f5;
  color: #4b0082;
}

body.page-member-index .daily-column-wrapper {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 20px var(--content-padding-inline);
}

body.page-member-index .daily-column-list-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

body.page-member-index .daily-column-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

body.page-member-index .daily-column-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: #334155;
}

body.page-member-index .daily-column-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

body.page-member-index .daily-column-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

body.page-member-index .daily-column-date {
  min-width: 90px;
}

body.page-member-index .daily-column-icon {
  font-size: 1.2em;
}

body.page-member-index .daily-column-preview {
  flex: 1;
}

body.page-member-index .daily-column-more {
  padding: 10px 0 0 0;
  border-bottom: none;
}

body.page-member-index .daily-column-more-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 768px) {
  body.page-member-index .calendar-container {
    border-radius: 0;
  }
  body.page-member-index .calendar-header {
    padding: 16px 12px;
    flex-direction: row;
  }
  body.page-member-index .calendar-header > * {
    margin-right: 8px;
    margin-bottom: 0;
  }
  body.page-member-index .calendar-header > *:last-child {
    margin-right: 0;
  }
  body.page-member-index .day {
    flex: 0 0 14.28%;
    width: 14.28%;
    max-width: 14.28%;
    min-height: 80px;
    padding: 6px 4px;
  }
  body.page-member-index .calendar-header span {
    font-size: 13px;
    padding: 0 8px;
  }
  body.page-member-index .month-nav {
    padding: 6px 10px;
    font-size: 11px;
    min-width: 70px;
  }
  body.page-member-index .calendar {
    padding: 0;
  }
  body.page-member-index .day .date {
    font-size: 16px;
  }
  body.page-member-index .day .work {
    font-size: 9px;
    padding: 0;
    margin-top: 2px;
  }
  body.page-member-index .weekday {
    font-size: 11px;
    padding: 10px 0;
  }
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: #fff;
  margin: 100px auto;
  padding: 24px;
  width: 90%;
  max-width: 450px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
}

#closeModal {
  float: none;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

#closeModal:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

  .salary-table {
    width: 100%;
    border-collapse: collapse;
    font-family: sans-serif;
  }
  .salary-table th,
  .salary-table td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
  }
  .salary-table th {
    background-color: #f0f0f0;
  }
  .salary-table tfoot td {
    font-weight: bold;
    background-color: #f9f9f9;
  }
.month-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
  margin: 1em 0;
}

.month-nav a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
}

/* ===== 2/member_invoice.php 用に month-nav をカレンダーと同じレイアウトに上書き ===== */
body.page-member-invoice .month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 8px;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.page-member-invoice .month-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  background: #f9fafb;
  color: #374151;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
  min-width: 96px;
}

body.page-member-invoice .month-nav a:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

body.page-member-invoice .month-nav span {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  color: #1f2937;
}

.month-nav span {
  font-weight: bold;
  white-space: nowrap;
}

/* ============================
   SECOMお知らせ管理ページ用
   ============================ */
.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px;
}

.page-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 24px;
  color: #333333;
}

.msg {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid transparent;
  line-height: 1.6;
}

:root {
  --content-max-width: 1200px;
  --content-padding-inline: 20px;
}

.content-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 20px var(--content-padding-inline);
}

@media (max-width: 640px) {
  .content-container {
    padding: 16px;
  }
}

.msg-success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.msg-danger {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 20px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

/* 共通カードスタイルを既存ページに適用 */
.card,
body.page-member-index .daily-column-list-box,
body.page-new-cost .form-section,
body.page-secom-material .add-container,
body.page-secom-kiki-detail .edit-container,
body.page-secom-kiki-detail .gallery-container,
body.page-secom-kiki-detail .my-gallery-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 20px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  border: 1px solid #e5e7eb;
}

.card-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #333333;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.form-row label {
  font-size: 13px;
  color: #555555;
  display: block;
  margin-bottom: 4px;
}

.form-control {
  padding: 10px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-danger {
  background: #dc3545;
  color: #ffffff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-outline {
  background: #ffffff;
  color: #333333;
  border: 1px solid #d1d5db;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 0;
  cursor: pointer;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.news-date {
  font-size: 13px;
  color: #555555;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-public {
  background: #d4edda;
  color: #155724;
}

.badge-private {
  background: #e2e3e5;
  color: #383d41;
}

.news-text {
  font-size: 14px;
  white-space: pre-wrap;
  color: #333333;
  line-height: 1.7;
}

/* 一覧用（1行表示） */
.news-line-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}

.news-date-inline {
  flex: 0 0 auto;
  font-size: 13px;
  color: #555555;
}

.news-text-inline {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  color: #333333;
}

/* お知らせアイコン（画像・PDF） */
.news-icon-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.news-icon-indicator svg {
  width: 16px;
  height: 16px;
}

/* お知らせ詳細の日付行 */
.news-header-inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin-bottom: 12px;
}

/* お知らせ詳細のPDFリンク行 */
.news-pdf-links {
  margin-top: 12px;
  margin-bottom: 4px;
  font-size: 13px;
}

/* 一覧・詳細で使う汎用テキスト */
.text-muted {
  color: #666666;
}

.text-muted-padded {
  color: #666666;
  padding: 16px 0;
}

.link-back {
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
}

/* お知らせページ用：戻るリンクの余白 */
.back-link-wrap {
  margin-top: 8px;
}

/* お知らせ一覧のページネーション余白 */
.month-nav--news {
  margin-top: 24px;
}

.news-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* モーダル（お知らせ編集） */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}

.modal-content-news {
  background: #ffffff;
  width: 90%;
  max-width: 600px;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 22px;
  cursor: pointer;
  color: #666666;
}

.modal-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #333333;
}

/* お知らせ詳細ページ（画像サムネイル） */
.news-images {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-image-thumb {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.news-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 4000;
  justify-content: center;
  align-items: center;
}

.news-image-modal-inner {
  max-width: 90%;
  max-height: 85%;
}

.news-image-modal-inner img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 10px;
}

.news-image-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 26px;
  color: #ffffff;
  cursor: pointer;
}

/* お知らせ詳細ページ（PDFビューア用モーダル） */
.news-pdf-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 4000;
  justify-content: center;
  align-items: center;
}

.news-pdf-modal-inner {
  width: 90%;
  max-width: 900px;
  height: 80%;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.news-pdf-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.news-pdf-modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 24px;
  color: #333333;
  cursor: pointer;
  z-index: 1;
}

.pdf-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  margin-right: 8px;
}

.pdf-icon-link svg {
  width: 28px;
  height: 28px;
  display: block;
}

/* ============================
   1/index.php 専用デザイン
   ============================ */

/* 全体コンテナの幅調整 */
main {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 50px;
  box-sizing: border-box;
}

/* 切り替えボタンエリア */
.view-control-bar {
  display: flex;
  justify-content: flex-end;
  margin: 15px 0 10px;
  gap: 8px;
}
.view-control-bar .toggle-btn {
  padding: 8px 16px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.view-control-bar .toggle-btn.active {
  background: #333;
  color: #fff;
  border-color: #333;
  font-weight: bold;
}

/* メインコンテナ */
.view-container {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.view-header {
  background: #333;
  color: #fff;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.view-header a.nav-btn {
  color: #fff;
  text-decoration: none;
  padding: 6px 15px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 13px;
}
.month-display {
  font-weight: bold;
  font-size: 18px;
}

/* カレンダーテーブル */
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.calendar-table th {
  background: #f8f9fa;
  font-size: 12px;
  padding: 10px 0;
  border-bottom: 2px solid #eee;
}
.calendar-table td {
  border: 1px solid #eee;
  height: 110px;
  vertical-align: top;
  padding: 6px;
  font-size: 11px;
  word-wrap: break-word;
}
.day-num {
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}
.sun {
  color: #e53935;
}
.sat {
  color: #1e88e5;
}
.today {
  background-color: #fffde7;
}

.sched-item {
  background: #f1f8e9;
  color: #333;
  padding: 4px;
  margin-bottom: 4px;
  border-radius: 4px;
  border-left: 3px solid #4caf50;
  line-height: 1.3;
  cursor: pointer;
  overflow: hidden;
}
.property-name-link {
  display: block;
  color: #1b5e20;
  text-decoration: none;
  font-size: 10px;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* リスト表示スタイル */
.list-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.list-table th {
  background: #f8f9fa;
  padding: 12px 8px;
  text-align: left;
  font-size: 12px;
  border-bottom: 2px solid #eee;
  color: #666;
}
.list-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  vertical-align: middle;
  word-break: break-all;
}

/* 縞々表示 */
.list-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}
.list-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

/* 土日色付け */
.list-table tbody tr.row-sun {
  background-color: #fff2f2 !important;
}
.list-table tbody tr.row-sat {
  background-color: #f0f7ff !important;
}

/* ホバー強調 */
.list-table tbody tr:hover {
  background-color: #f0f0f0 !important;
}

/* 物件名の折り返し設定 */
.list-property-name {
  font-weight: bold;
  color: #333;
  min-width: 120px;
  max-width: 200px;
  line-height: 1.4 !important;
}

/* コメントカラム */
.list-comment {
  font-size: 11px;
  color: #666;
  max-width: 150px;
}

.tag-day {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 4px;
}
.tag-sun {
  background: #e53935;
  color: #fff;
}
.tag-sat {
  background: #1e88e5;
  color: #fff;
}

.btn-list-detail {
  padding: 4px 12px;
  background: #333;
  color: #fff !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 11px;
}

/* モーダルスタイル */
#sched-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: #fff;
  width: 90%;
  max-width: 450px;
  padding: 25px;
  border-radius: 12px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}
.modal-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  color: #333;
  word-break: break-all;
  line-height: 1.4;
}
.modal-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.modal-label {
  font-weight: bold;
  color: #777;
  font-size: 12px;
}
.modal-value {
  font-size: 14px;
  color: #333;
  word-break: break-all;
}
.modal-comment-box {
  background: #f9f9f9;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #eee;
  min-height: 60px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  word-break: break-all;
  white-space: pre-wrap;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
.btn-detail {
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
}

/* 検索窓と履歴 */
.search-container {
  margin: 20px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.search-input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}
.search-button {
  padding: 10px 25px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.history-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.history-tag {
  display: inline-block;
  padding: 6px 12px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 12px;
  color: #555;
  text-decoration: none;
  transition: background-color 0.2s;
  cursor: pointer;
}
.history-tag:hover {
  background-color: #e0e0e0;
  color: #333;
}

.ajax-results {
  margin-top: 20px;
}
.result-item {
  padding: 12px;
  background: #fff;
  margin-bottom: 8px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #eee;
}

.icon-small {
  width: 14px;
  height: 14px;
  fill: currentColor;
  vertical-align: middle;
}

/* スマホ・モバイル向けの調整 */
@media (max-width: 600px) {
  main {
    width: 100%;
    padding: 0 4px;
    padding-bottom: 40px;
  }
  .calendar-table td {
    height: 80px;
    padding: 2px;
  }
  .calendar-table th {
    font-size: 10px;
    padding: 5px 0;
  }
  .property-name-link {
    font-size: 9px;
  }
  .day-num {
    font-size: 11px;
    margin-bottom: 2px;
  }
  .sched-item {
    padding: 2px 4px;
    margin-bottom: 2px;
    border-left-width: 2px;
  }
  .view-header {
    padding: 8px;
  }
  .month-display {
    font-size: 15px;
  }
  .nav-btn {
    padding: 4px 10px;
    font-size: 11px;
  }
  .search-container {
    padding: 15px;
  }
}

/* 1/index.php インラインスタイル置き換え用 */
.modal-invoice-amount {
  font-weight: bold;
  color: #2e7d32;
}

.modal-expenses-amount {
  color: #d84315;
}

.modal-label-comment {
  margin-bottom: 5px;
}

.card-news {
  margin-bottom: 16px;
}

.card-news-title {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: bold;
}

.news-item-inline {
  padding: 4px 0;
  border-bottom: none;
  cursor: pointer;
}

.news-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.news-icon-svg {
  width: 14px;
  height: 14px;
}

.news-footer {
  margin-top: 8px;
  text-align: right;
}

.news-footer-link {
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
}

.list-date-cell {
  white-space: nowrap;
}

.list-money-strong {
  font-weight: bold;
  white-space: nowrap;
}

.list-nowrap {
  white-space: nowrap;
}

.list-total-label {
  text-align: right;
  font-weight: bold;
}

.list-empty {
  text-align: center;
  padding: 40px;
  color: #999;
}

.search-title {
  margin-bottom: 15px;
  color: #333;
}

.history-wrapper {
  margin-bottom: 20px;
}

.history-title {
  font-size: 12px;
  color: #888;
  margin-bottom: 5px;
}

.search-message {
  margin: 4px 0;
  font-size: 13px;
}

.search-message-muted {
  color: #888;
}

.search-message-loading {
  color: #666;
}

.search-message-error {
  color: red;
}

.search-result-code {
  font-weight: bold;
  margin-right: 10px;
}

/* ============================
   1/bank_edit.php 専用デザイン
   ============================ */

body.page-bank-edit {
  background: #f5f7fa;
}

body.page-bank-edit .form-card {
  max-width: 600px;
  margin: 20px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px 25px;
}

body.page-bank-edit .form-card h2 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #2a7ae4;
  border-left: 4px solid #2a7ae4;
  padding-left: 10px;
}

body.page-bank-edit .form-group {
  margin-bottom: 15px;
}

body.page-bank-edit .form-group label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
}

body.page-bank-edit .form-group input,
body.page-bank-edit .form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

body.page-bank-edit .form-group input:focus,
body.page-bank-edit .form-group select:focus {
  border-color: #2a7ae4;
  outline: none;
  box-shadow: 0 0 5px rgba(42, 122, 228, 0.3);
}

body.page-bank-edit .bank-edit-button {
  display: inline-block;
  background: #2a7ae4;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

body.page-bank-edit .bank-edit-button:hover {
  background: #1d5cb8;
}

body.page-bank-edit .styled-table {
  width: 100%;
  border-collapse: collapse;
}

body.page-bank-edit .styled-table th,
body.page-bank-edit .styled-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

body.page-bank-edit .styled-table th {
  width: 30%;
  background: #f9fafc;
}

body.page-bank-edit .no-bank-message {
  text-align: center;
  margin: 20px;
}

/* ============================
   1/address_edit.php 専用デザイン
   ============================ */

body.page-address-edit {
  background: #f5f7fa;
}

body.page-address-edit .form-card {
  max-width: 800px;
  margin: 20px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  padding: 24px;
}

body.page-address-edit .form-card h2 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #2563eb;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

body.page-address-edit .form-group {
  margin-bottom: 20px;
}

body.page-address-edit .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

body.page-address-edit .form-group input,
body.page-address-edit .form-group select,
body.page-address-edit .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.page-address-edit .form-group input:focus,
body.page-address-edit .form-group select:focus,
body.page-address-edit .form-group textarea:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body.page-address-edit .form-group textarea {
  min-height: 80px;
  resize: vertical;
}

body.page-address-edit .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  body.page-address-edit .form-row {
    grid-template-columns: 1fr;
  }
}

body.page-address-edit .form-submit-actions button,
body.page-address-edit button {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  min-width: 120px;
}

body.page-address-edit .form-submit-actions button:hover,
body.page-address-edit button:hover {
  background: #1d4ed8;
}

body.page-address-edit .form-submit-actions button:active,
body.page-address-edit button:active {
  transform: scale(0.98);
}

body.page-address-edit .success-message {
  background: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #6ee7b7;
}

body.page-address-edit .section-divider {
  margin: 32px 0;
  border-top: 1px solid #e5e7eb;
}

body.page-address-edit .label-required {
  color: #ef4444;
}

body.page-address-edit .section-title-inline {
  margin-top: 0;
}

body.page-address-edit .section-note {
  color: #6b7280;
  font-size: 12px;
}

body.page-address-edit .form-submit-actions {
  text-align: center;
  margin-top: 32px;
}

/* ============================
   1/member_invoice.php 専用デザイン
   ============================ */

body.page-member-invoice .salary-table {
  width: 100%;
  margin: 24px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-collapse: collapse;
}

body.page-member-invoice .salary-table thead tr th {
  /* 稼働明細（styled-table）のヘッダーと同じ青で統一 */
  background: #2a7ae4;
  color: #fff;
  font-weight: 600;
}

body.page-member-invoice .salary-table th,
body.page-member-invoice .salary-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

body.page-member-invoice .salary-table tr:nth-child(even) td {
  background: #f9fafb;
}

body.page-member-invoice .salary-table tfoot td {
  font-weight: 600;
  background: #f4f6f9;
}

body.page-member-invoice .table-wrapper {
  width: 100%;
  margin: 32px 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.page-member-invoice .table-title {
  background: #2563eb;
  color: #fff;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
}

body.page-member-invoice .styled-table {
  width: 100%;
  border-collapse: collapse;
}

body.page-member-invoice .styled-table th,
body.page-member-invoice .styled-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

body.page-member-invoice .styled-table th {
  background: #2563eb; /* 発注リストと同じ青に統一 */
  color: #fff;
  font-weight: 600;
}

body.page-member-invoice .invoice-bank-register {
  text-align: center;
  margin: 30px 0;
}

body.page-member-invoice .invoice-bank-register-link {
  display: inline-block;
  background: #2a7ae4;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

/* ============================
   1/pdf_viewer.php 専用デザイン
   ============================ */

body.page-pdf-viewer {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #f5f5f7;
}

body.page-pdf-viewer .pdf-viewer-root {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.page-pdf-viewer .pdf-toolbar {
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

body.page-pdf-viewer .pdf-toolbar button {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 12px;
}

body.page-pdf-viewer .pdf-toolbar button:hover {
  background: #e5e7eb;
}

body.page-pdf-viewer .pdf-zoom-label {
  margin-left: 4px;
  color: #555;
}

body.page-pdf-viewer .pdf-pages {
  flex: 1;
  overflow: auto;
  padding: 12px;
}

body.page-pdf-viewer .pdf-page-canvas {
  display: block;
  margin: 0 auto 12px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

body.page-pdf-viewer .pdf-loading {
  text-align: center;
  padding: 20px;
  color: #555;
  font-size: 14px;
}

/* ============================
   1/secom_material.php 専用デザイン
   ============================ */

body.page-secom-material main {
  width: 95%;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 20px;
  padding-bottom: 50px;
  box-sizing: border-box;
}

body.page-secom-material .page-title {
  font-size: 20px;
  color: #333;
  margin-bottom: 20px;
  border-left: 4px solid #333;
  padding-left: 10px;
}

body.page-secom-material .msg-success {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: bold;
}

body.page-secom-material .msg-error {
  background: #ffebee;
  color: #c62828;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: bold;
}

body.page-secom-material .add-container {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.page-secom-material .add-container h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 16px;
  color: #444;
}

body.page-secom-material .form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

body.page-secom-material .form-group {
  display: flex;
  flex-direction: column;
}

body.page-secom-material .material-field-name {
  flex: 3;
  min-width: 150px;
}

body.page-secom-material .material-field-price {
  flex: 2;
  min-width: 100px;
}

body.page-secom-material .material-field-unit {
  flex: 1;
  min-width: 80px;
}

body.page-secom-material .material-field-submit {
  flex: 1;
  min-width: 100px;
}

body.page-secom-material .form-group label {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

body.page-secom-material .form-group input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}

body.page-secom-material .form-group input:focus {
  border-color: #333;
  outline: none;
}

body.page-secom-material .btn-submit {
  padding: 11px 24px;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: background 0.2s;
}

body.page-secom-material .btn-submit:hover {
  background: #1b5e20;
}

body.page-secom-material .list-container {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

body.page-secom-material .list-header {
  background: #333;
  color: #fff;
  padding: 12px 15px;
  font-size: 15px;
  font-weight: bold;
}

body.page-secom-material .list-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.page-secom-material .list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

body.page-secom-material .list-table th {
  background: #f8f9fa;
  padding: 12px 10px;
  text-align: left;
  font-size: 13px;
  border-bottom: 2px solid #eee;
  color: #666;
  white-space: nowrap;
}

body.page-secom-material .list-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

body.page-secom-material .list-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

body.page-secom-material .list-table tbody tr:hover {
  background-color: #f0f0f0;
}

body.page-secom-material .th-num {
  width: 60px;
  text-align: center;
}

body.page-secom-material .th-price {
  width: 120px;
}

body.page-secom-material .th-unit {
  width: 100px;
}

body.page-secom-material .th-actions {
  width: 90px;
  text-align: center;
}

body.page-secom-material .edit-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  box-sizing: border-box;
  background: #fff;
}

body.page-secom-material .edit-input:focus {
  border-color: #1e88e5;
  outline: none;
}

body.page-secom-material .btn-update {
  padding: 8px 16px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  transition: background 0.2s;
}

body.page-secom-material .btn-update:hover {
  background: #555;
}

body.page-secom-material .num-cell {
  font-weight: bold;
  color: #555;
  text-align: center;
}

body.page-secom-material .material-actions-cell {
  text-align: center;
}

body.page-secom-material .material-empty-row {
  text-align: center;
  padding: 40px;
  color: #999;
}

@media (max-width: 600px) {
  body.page-secom-material .form-grid {
    flex-direction: column;
    align-items: stretch;
  }
  body.page-secom-material .form-group {
    width: 100% !important;
  }
  body.page-secom-material .btn-submit {
    width: 100%;
    margin-top: 10px;
  }
  body.page-secom-material .list-table td {
    padding: 6px;
  }
  body.page-secom-material .edit-input {
    font-size: 12px;
    padding: 6px;
  }
}

/* ============================
   1/secom_schedule_detail.php 専用デザイン
   ============================ */

body.page-secom-schedule-detail main {
  width: 95%;
  max-width: 800px;
  margin: 20px auto;
  padding-bottom: 60px;
}

body.page-secom-schedule-detail .detail-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  overflow: hidden;
  margin-bottom: 20px;
}

body.page-secom-schedule-detail .detail-header {
  background: #333;
  color: #fff;
  padding: 15px 20px;
}

body.page-secom-schedule-detail .detail-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

body.page-secom-schedule-detail .tags-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

body.page-secom-schedule-detail .tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: bold;
}

body.page-secom-schedule-detail .tag-type {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

body.page-secom-schedule-detail .status-active {
  background: #e53935;
  color: #fff;
}

body.page-secom-schedule-detail .status-done {
  background: #4caf50;
  color: #fff;
}

body.page-secom-schedule-detail .section-title {
  background: #f5f5f5;
  color: #555;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: bold;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

body.page-secom-schedule-detail .section-title:first-child {
  border-top: none;
}

body.page-secom-schedule-detail .detail-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

body.page-secom-schedule-detail .detail-item {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 20px;
  align-items: center;
  flex-wrap: wrap;
}

body.page-secom-schedule-detail .detail-item:last-child {
  border-bottom: none;
}

body.page-secom-schedule-detail .item-label {
  width: 110px;
  font-weight: bold;
  color: #666;
  font-size: 13px;
  flex-shrink: 0;
}

body.page-secom-schedule-detail .item-value {
  flex-grow: 1;
  font-size: 14px;
  color: #333;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body.page-secom-schedule-detail .price-text {
  font-weight: bold;
  font-size: 16px;
  color: #2e7d32;
}

body.page-secom-schedule-detail .expense-text {
  color: #d84315;
  font-weight: bold;
}

body.page-secom-schedule-detail .input-time {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  width: 100px;
}

body.page-secom-schedule-detail .time-sep {
  margin: 0 5px;
  color: #666;
}

body.page-secom-schedule-detail .input-comment {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  margin-top: 5px;
}

body.page-secom-schedule-detail .action-area {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

body.page-secom-schedule-detail .btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: opacity 0.2s;
  min-width: 120px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

body.page-secom-schedule-detail .btn:hover {
  opacity: 0.8;
}

body.page-secom-schedule-detail .btn-back {
  background: #fff;
  border: 1px solid #ccc;
  color: #555;
}

body.page-secom-schedule-detail .btn-save {
  background: #333;
  color: #fff;
  border: 1px solid #333;
}

body.page-secom-schedule-detail .btn-add-exp {
  padding: 4px 10px;
  background: #efefef;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  color: #333;
}

body.page-secom-schedule-detail .btn-add-exp:hover {
  background: #e0e0e0;
}

body.page-secom-schedule-detail #expense-menu-container {
  display: none;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  padding: 15px 20px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.page-secom-schedule-detail .exp-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

body.page-secom-schedule-detail .exp-tab {
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #ddd;
}

body.page-secom-schedule-detail .exp-tab.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

body.page-secom-schedule-detail .exp-panel {
  display: none;
}

body.page-secom-schedule-detail .exp-panel.active {
  display: block;
}

body.page-secom-schedule-detail .exp-form-row {
  margin-bottom: 10px;
}

body.page-secom-schedule-detail .exp-input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

body.page-secom-schedule-detail .btn-exp-submit {
  width: 100%;
  padding: 10px;
  background: #d84315;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

body.page-secom-schedule-detail .file-upload-wrapper {
  border: 2px dashed #ccc;
  padding: 20px;
  text-align: center;
  background: #fff;
  border-radius: 6px;
}

body.page-secom-schedule-detail .expense-photo-note {
  margin-bottom: 10px;
  font-size: 12px;
  color: #666;
}

body.page-secom-schedule-detail #receipt-preview {
  margin-top: 10px;
  display: none;
}

body.page-secom-schedule-detail #receipt-img-preview {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
}

body.page-secom-schedule-detail .ocr-actions {
  margin-top: 10px;
  text-align: center;
}

body.page-secom-schedule-detail #ocr-loading {
  display: none;
  font-size: 13px;
  color: #1976d2;
}

body.page-secom-schedule-detail #ocr-results-container {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #ddd;
  display: none;
}

body.page-secom-schedule-detail .ocr-results-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: bold;
  color: #333;
}

body.page-secom-schedule-detail .ocr-results-footer {
  margin-top: 15px;
}

body.page-secom-schedule-detail .btn-cancel-ocr {
  background: #999;
  margin-top: 5px;
}

body.page-secom-schedule-detail #manual-input-form {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #ddd;
}

body.page-secom-schedule-detail .exp-manual-label {
  font-size: 11px;
  color: #666;
  display: block;
  margin-bottom: 3px;
}

body.page-secom-schedule-detail .mat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 15px;
}

body.page-secom-schedule-detail .mat-table th {
  text-align: left;
  padding: 8px;
  background: #eee;
  color: #555;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

body.page-secom-schedule-detail .mat-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

body.page-secom-schedule-detail .mat-name {
  font-weight: bold;
  display: block;
  margin-bottom: 2px;
}

body.page-secom-schedule-detail .mat-price {
  font-size: 11px;
  color: #777;
}

body.page-secom-schedule-detail .mat-input-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

body.page-secom-schedule-detail .mat-qty-input {
  width: 70px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  text-align: right;
}

body.page-secom-schedule-detail .mat-unit {
  font-size: 12px;
  color: #333;
}

body.page-secom-schedule-detail .exp-hist-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 12px;
}

body.page-secom-schedule-detail .exp-hist-table th {
  background: #f5f5f5;
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid #ddd;
  color: #666;
  font-weight: normal;
}

body.page-secom-schedule-detail .exp-hist-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

body.page-secom-schedule-detail .exp-hist-date {
  font-size: 11px;
  color: #888;
}

body.page-secom-schedule-detail .exp-hist-name {
  font-weight: bold;
  color: #333;
}

body.page-secom-schedule-detail .exp-hist-price {
  color: #d84315;
  font-weight: bold;
  white-space: nowrap;
}

body.page-secom-schedule-detail .exp-hist-img-link {
  display: inline-block;
  margin-left: 5px;
  color: #1e88e5;
  text-decoration: underline;
  font-size: 11px;
  cursor: pointer;
}

body.page-secom-schedule-detail .btn-exp-del {
  background: #d32f2f;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  font-weight: bold;
  min-width: 50px;
}

body.page-secom-schedule-detail .btn-exp-del:hover {
  background: #b71c1c;
}

body.page-secom-schedule-detail .btn-exp-toggle {
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 10px;
  cursor: pointer;
  font-weight: bold;
  min-width: 40px;
  white-space: nowrap;
}

body.page-secom-schedule-detail .btn-exp-toggle:hover {
  background: #f57c00;
}

body.page-secom-schedule-detail .ocr-item-box {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

body.page-secom-schedule-detail .ocr-item-box:last-child {
  margin-bottom: 0;
}

body.page-secom-schedule-detail #image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

body.page-secom-schedule-detail .modal-img-container {
  position: relative;
  max-width: 95%;
  max-height: 90%;
  animation: zoomIn 0.2s ease-out;
}

body.page-secom-schedule-detail #modal-img-display {
  max-width: 100%;
  max-height: 85vh;
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

body.page-secom-schedule-detail .close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  font-weight: bold;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

body.page-secom-schedule-detail .btn-ai {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  color: #1976d2;
  border-radius: 4px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.page-secom-schedule-detail .btn-ai:hover {
  background: #bbdefb;
}

body.page-secom-schedule-detail .ai-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #1976d2;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

body.page-secom-schedule-detail .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

body.page-secom-schedule-detail .gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #f9f9f9;
}

body.page-secom-schedule-detail .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
}

body.page-secom-schedule-detail .gallery-item img:hover {
  transform: scale(1.05);
}

body.page-secom-schedule-detail .btn-gal-del {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-secom-schedule-detail .btn-gal-del:hover {
  background: rgba(255, 0, 0, 0.8);
}

body.page-secom-schedule-detail .manual-private-memo-row {
  margin-top: 10px;
}

body.page-secom-schedule-detail .manual-private-memo-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

body.page-secom-schedule-detail .manual-private-memo-checkbox {
  margin-right: 5px;
}

body.page-secom-schedule-detail .manual-private-memo-text {
  font-size: 12px;
  color: #666;
}

body.page-secom-schedule-detail .material-list-scroll {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #eee;
  margin-bottom: 10px;
}

body.page-secom-schedule-detail .material-qty-header {
  width: 120px;
}

body.page-secom-schedule-detail .kiki-info-header {
  background: #ffffff;
  color: #000000;
  padding: 6px 10px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 4px 4px 0 0;
  border: 1px solid #cccccc;
  margin-bottom: 4px;
}

body.page-secom-schedule-detail .kiki-info-header .info-text span {
  margin-right: 10px;
}

body.page-secom-schedule-detail .kiki-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  white-space: nowrap;
  border: 1px solid #c0c0c0;
}

body.page-secom-schedule-detail .kiki-table th {
  background: #000080;
  color: #fff;
  padding: 6px 4px;
  border: 1px solid #000080;
  text-align: center;
  font-weight: normal;
  vertical-align: middle;
}

body.page-secom-schedule-detail .kiki-table td {
  border: 1px solid #c0c0c0;
  padding: 5px 4px;
  text-align: center;
  color: #333;
  vertical-align: middle;
  background: #ffffff;
}

body.page-secom-schedule-detail .kiki-table tbody tr:nth-child(even) td {
  background: #e4f7e4;
}

body.page-secom-schedule-detail .kiki-link {
  color: #0000ee;
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
}

body.page-secom-schedule-detail .kiki-equipment-name-cell {
  text-align: left;
  min-width: 150px;
}

body.page-secom-schedule-detail .kiki-install-cell {
  font-weight: bold;
  color: #000;
}

body.page-secom-schedule-detail .kiki-removal-cell {
  font-weight: bold;
  color: #d32f2f;
}

body.page-secom-schedule-detail .detail-item-full {
  display: block;
}

body.page-secom-schedule-detail .item-label-comment {
  margin-bottom: 6px;
}

body.page-secom-schedule-detail .exp-hist-wrapper {
  padding: 0 10px 10px 10px;
}

body.page-secom-schedule-detail .exp-hist-col-flag {
  width: 5%;
}

body.page-secom-schedule-detail .exp-hist-col-date {
  width: 20%;
}

body.page-secom-schedule-detail .exp-hist-col-amount {
  width: 25%;
  text-align: right;
}

body.page-secom-schedule-detail .exp-hist-col-actions {
  width: 10%;
  text-align: center;
}

body.page-secom-schedule-detail .exp-hist-row-private {
  background-color: #fff9e6;
}

body.page-secom-schedule-detail .exp-hist-flag-cell {
  text-align: center;
  vertical-align: middle;
}

body.page-secom-schedule-detail .exp-hist-inline-form {
  margin: 0;
}

body.page-secom-schedule-detail .exp-hist-flag-placeholder {
  font-size: 11px;
  color: #ccc;
}

body.page-secom-schedule-detail .exp-hist-member {
  font-size: 10px;
  color: #999;
}

body.page-secom-schedule-detail .exp-hist-private-badge {
  color: #ff9800;
  font-weight: bold;
}

body.page-secom-schedule-detail .exp-hist-amount-cell {
  text-align: right;
}

body.page-secom-schedule-detail .exp-hist-actions-cell {
  text-align: center;
}

body.page-secom-schedule-detail .material-private-memo-row,
body.page-secom-schedule-detail .custom-private-memo-row {
  margin-top: 10px;
}

body.page-secom-schedule-detail .material-private-memo-label,
body.page-secom-schedule-detail .custom-private-memo-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

body.page-secom-schedule-detail .material-private-memo-checkbox,
body.page-secom-schedule-detail .custom-private-memo-checkbox {
  margin-right: 5px;
}

body.page-secom-schedule-detail .material-private-memo-text,
body.page-secom-schedule-detail .custom-private-memo-text {
  font-size: 12px;
  color: #666;
}

body.page-secom-schedule-detail .personnel-hist-wrapper {
  padding: 0 10px 10px 10px;
}

body.page-secom-schedule-detail .personnel-col-date {
  width: 25%;
}

body.page-secom-schedule-detail .personnel-col-value {
  width: 20%;
  text-align: right;
}

body.page-secom-schedule-detail .personnel-time {
  font-size: 10px;
  color: #666;
}

body.page-secom-schedule-detail .personnel-value-cell {
  text-align: right;
}

body.page-secom-schedule-detail .personnel-value-text {
  color: #333;
  font-weight: normal;
}

body.page-secom-schedule-detail .gallery-wrapper {
  padding: 15px 20px;
}

body.page-secom-schedule-detail .gallery-upload-box {
  margin-bottom: 15px;
  background: #fafafa;
  padding: 15px;
  border: 1px dashed #ccc;
  border-radius: 6px;
  text-align: center;
}

body.page-secom-schedule-detail .gallery-upload-text {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

body.page-secom-schedule-detail .gallery-upload-input {
  margin-bottom: 10px;
  max-width: 100%;
  font-size: 12px;
}

body.page-secom-schedule-detail .gallery-upload-button {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
}

body.page-secom-schedule-detail .gallery-empty-text {
  font-size: 12px;
  color: #999;
  text-align: center;
  padding: 10px 0;
}

body.page-secom-schedule-detail .kiki-wrapper {
  padding: 10px;
}

body.page-secom-schedule-detail .kiki-table-scroll {
  overflow-x: auto;
  margin-bottom: 12px;
}

body.page-secom-schedule-detail .ocr-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

body.page-secom-schedule-detail .ocr-item-title {
  font-size: 12px;
  color: #333;
}

body.page-secom-schedule-detail .ocr-item-remove {
  background: #d32f2f;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 10px;
  cursor: pointer;
}

body.page-secom-schedule-detail .ocr-item-memo-row {
  margin-top: 8px;
}

body.page-secom-schedule-detail .ocr-item-memo-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

body.page-secom-schedule-detail .ocr-item-memo {
  margin-right: 5px;
}

body.page-secom-schedule-detail .ocr-item-memo-text {
  font-size: 11px;
  color: #666;
}

/* 1/secom_kiki_detail.php 専用デザイン */
body.page-secom-kiki-detail main {
  width: 95%;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 20px;
  padding-bottom: 50px;
  box-sizing: border-box;
}

body.page-secom-kiki-detail .page-title {
  font-size: 20px;
  color: #333;
  margin-bottom: 20px;
  border-left: 4px solid #333;
  padding-left: 10px;
}

body.page-secom-kiki-detail .msg-success {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: bold;
}

body.page-secom-kiki-detail .msg-error {
  background: #ffebee;
  color: #c62828;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: bold;
}

body.page-secom-kiki-detail .edit-container {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

body.page-secom-kiki-detail .edit-container h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 18px;
  color: #444;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

body.page-secom-kiki-detail .form-group {
  margin-bottom: 20px;
}

body.page-secom-kiki-detail .form-group label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #555;
}

body.page-secom-kiki-detail .form-group input[type="text"],
body.page-secom-kiki-detail .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
  font-family: inherit;
}

body.page-secom-kiki-detail .form-group input[type="text"]:focus,
body.page-secom-kiki-detail .form-group textarea:focus {
  border-color: #333;
  outline: none;
}

body.page-secom-kiki-detail .form-group textarea {
  min-height: 100px;
  resize: vertical;
}

body.page-secom-kiki-detail .form-group .readonly-field {
  background-color: #f5f5f5;
  color: #666;
  cursor: not-allowed;
}

body.page-secom-kiki-detail .form-group .field-note {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}

body.page-secom-kiki-detail .btn-group {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

body.page-secom-kiki-detail .btn-submit {
  padding: 12px 30px;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: background 0.2s;
}

body.page-secom-kiki-detail .btn-submit:hover {
  background: #1b5e20;
}

body.page-secom-kiki-detail .btn-cancel {
  padding: 12px 30px;
  background: #757575;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

body.page-secom-kiki-detail .btn-cancel:hover {
  background: #616161;
}

body.page-secom-kiki-detail .label-display {
  margin-bottom: 20px;
}

body.page-secom-kiki-detail .label-display dt {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
  color: #555;
}

body.page-secom-kiki-detail .label-display dd {
  margin: 0;
  margin-bottom: 10px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #eee;
  font-size: 14px;
}

body.page-secom-kiki-detail .gallery-container {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 25px 30px 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

body.page-secom-kiki-detail .gallery-container h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 16px;
  color: #444;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

body.page-secom-kiki-detail .gallery-upload-note {
  font-size: 12px;
  color: #777;
  margin-bottom: 10px;
}

body.page-secom-kiki-detail .gallery-upload-input {
  margin-bottom: 10px;
}

body.page-secom-kiki-detail .gallery-strip {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding-bottom: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.page-secom-kiki-detail .gallery-strip .gallery-item {
  flex: 0 0 auto;
  width: 150px;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #eee;
}

body.page-secom-kiki-detail .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

body.page-secom-kiki-detail .gallery-item {
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}

body.page-secom-kiki-detail .gallery-thumb {
  width: 100%;
  padding-top: 75%;
  position: relative;
  background: #ddd;
}

body.page-secom-kiki-detail .gallery-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.page-secom-kiki-detail .gallery-body {
  padding: 8px 10px 10px;
  font-size: 12px;
  color: #555;
}

body.page-secom-kiki-detail .gallery-tag-text {
  margin-bottom: 8px;
  word-break: break-all;
  color: #333;
}

body.page-secom-kiki-detail .gallery-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.page-secom-kiki-detail .gallery-actions form {
  display: flex;
  gap: 6px;
}

body.page-secom-kiki-detail .gallery-actions input[type="text"] {
  flex: 1;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 12px;
}

body.page-secom-kiki-detail .btn-tag {
  background: #4caf50;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

body.page-secom-kiki-detail .btn-tag:hover {
  background: #388e3c;
}

body.page-secom-kiki-detail .btn-delete {
  background: #f44336;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

body.page-secom-kiki-detail .btn-delete:hover {
  background: #d32f2f;
}

body.page-secom-kiki-detail .overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

body.page-secom-kiki-detail .overlay img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}

body.page-secom-kiki-detail .my-gallery-section {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

body.page-secom-kiki-detail .my-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

body.page-secom-kiki-detail .my-gallery-item {
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #eee;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.page-secom-kiki-detail .my-gallery-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

body.page-secom-kiki-detail .my-gallery-item .gallery-body {
  padding: 8px;
}

@media (max-width: 600px) {
  body.page-secom-kiki-detail .edit-container {
    padding: 20px;
  }

  body.page-secom-kiki-detail .gallery-item {
    min-width: 100px;
    max-width: 100px;
  }

  body.page-secom-kiki-detail .my-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* secom_kiki_detail.php 上部ギャラリー専用 */
body.page-secom-kiki-detail .gallery-container-top {
  margin-bottom: 20px;
}

body.page-secom-kiki-detail .gallery-body-top {
  padding: 6px 8px 8px;
}

body.page-secom-kiki-detail .gallery-tag-text-top {
  font-size: 11px;
  color: #666;
}

body.page-secom-kiki-detail .gallery-tag-form {
  display: flex;
  gap: 5px;
  width: 100%;
}

/* 1/secom_name_normalize_test.php 専用デザイン */
body.page-secom-name-normalize-test {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 24px;
}

body.page-secom-name-normalize-test h1 {
  font-size: 20px;
  margin-bottom: 16px;
}

body.page-secom-name-normalize-test .section {
  margin-bottom: 24px;
}

body.page-secom-name-normalize-test label {
  display: block;
  font-weight: bold;
  margin-bottom: 4px;
}

body.page-secom-name-normalize-test textarea {
  width: 100%;
  max-width: 800px;
  font-family: "Meiryo", system-ui, sans-serif;
}

body.page-secom-name-normalize-test .result-box {
  padding: 8px 12px;
  border-radius: 4px;
  background: #f5f5f5;
  white-space: pre-wrap;
  word-break: break-all;
}

body.page-secom-name-normalize-test .label-inline {
  font-weight: bold;
  margin-right: 8px;
}

body.page-secom-name-normalize-test button {
  padding: 6px 16px;
  font-size: 14px;
}

body.page-secom-name-normalize-test .note {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

body.page-secom-name-normalize-test .grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 4px 12px;
  align-items: flex-start;
  max-width: 900px;
}

body.page-secom-name-normalize-test .grid-label {
  font-weight: bold;
}

body.page-secom-name-normalize-test .normalize-submit-row {
  margin-top: 12px;
}

/* 1/callback.php ログイン成功画面 */
body.page-callback-login-success {
  text-align: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-top: 100px;
}

body.page-callback-login-success h1 {
  font-size: 20px;
  margin-bottom: 16px;
}

body.page-callback-login-success .callback-profile-image {
  border-radius: 50%;
  width: 100px;
}

/* LINE login button */
.line-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #06c755 0%, #00b900 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(6, 199, 85, 0.35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.line-login-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 26px rgba(6, 199, 85, 0.45);
  text-decoration: none;
}

.line-login-btn i {
  font-size: 22px;
  line-height: 1;
}