/* ============================================================
   振込管理システム｜ONEENERGY株式会社
   カラー: 青緑 / ティール / 白
============================================================ */
:root {
  --navy-900: #08383d;
  --navy-800: #0c4b52;
  --navy-700: #126a73;
  --navy-600: #17808a;
  --blue-600: #149ca3;
  --blue-500: #1fb4b2;
  --blue-400: #54c8be;
  --blue-100: #d8f4f0;
  --blue-50: #edf9f7;
  --bg: #f3faf9;
  --white: #ffffff;
  --text: #1a2436;
  --text-sub: #4f6d72;
  --line: #cde5e2;
  --danger: #d43d3d;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(8, 56, 61, .08);
  --shadow-lg: 0 10px 34px rgba(8, 56, 61, .16);
  --font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ============ ヘッダー ============ */
.app-header {
  background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-700) 55%, #20a29a 100%);
  color: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.app-header__brand { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
.app-header__logo-chip {
  background: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
}
.app-header__logo-chip img { height: 26px; width: auto; }
.app-header__titles { display: flex; flex-direction: column; line-height: 1.3; }
.app-header__company { font-size: 12px; letter-spacing: .06em; opacity: .85; }
.app-header__system { font-size: 19px; font-weight: 700; letter-spacing: .12em; }

.app-nav { display: flex; gap: 4px; }
.app-nav__btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  border: none;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 10px 10px 0 0;
  transition: background .15s, color .15s;
}
.app-nav__btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.app-nav__btn.is-active {
  background: var(--bg);
  color: var(--navy-800);
  font-weight: 700;
}

/* ============ 設定バナー ============ */
.config-banner {
  max-width: 1080px;
  margin: 16px auto -6px;
  padding: 12px 18px;
  background: #fff7e6;
  border: 1px solid #f0d9a8;
  border-radius: 10px;
  color: #7a5b13;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.config-banner code { background: #f3e8cd; padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }

/* ============ レイアウト ============ */
.app-main { max-width: 1080px; margin: 0 auto; padding: 26px 20px 70px; }
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--blue-50);
}
.panel__title {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel__title::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--blue-500), var(--navy-700));
}
.panel__badge {
  background: var(--blue-600);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
}
.panel__head .btn { margin-left: auto; }

/* ============ フォーム ============ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 26px;
}
.field--full { grid-column: 1 / -1; }
.field__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 7px;
}
.req {
  background: #fdecec;
  color: var(--danger);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}
.opt { color: var(--text-sub); font-size: 11.5px; font-weight: 400; }
.field__hint { font-size: 12px; color: var(--text-sub); margin-top: 5px; }

.input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 16px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 46px;
}
.input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(31, 180, 178, .16);
}
.input--select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6b84' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.input--textarea { resize: vertical; min-height: 84px; line-height: 1.7; }
.input--amount { text-align: right; font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.input.is-error { border-color: var(--danger); }

.field__with-suffix, .field__with-prefix { display: flex; align-items: center; gap: 8px; }
.field__with-suffix .input, .field__with-prefix .input { flex: 1; }
.field__suffix, .field__prefix { color: var(--text-sub); font-size: 15px; font-weight: 500; white-space: nowrap; }
.field__prefix { font-size: 17px; font-weight: 700; color: var(--navy-700); }

.form-actions {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.form-actions__main { display: flex; gap: 12px; flex-wrap: wrap; }

.pdf-bundle-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-sub);
  text-align: right;
}

/* ============ ボタン ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  min-height: 46px;
  transition: transform .06s, box-shadow .15s, background .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(120deg, var(--blue-600), var(--navy-700));
  color: #fff;
  box-shadow: 0 4px 14px rgba(29, 95, 214, .32);
}
.btn--primary:hover { box-shadow: 0 6px 18px rgba(29, 95, 214, .42); }
.btn--secondary {
  background: var(--blue-50);
  color: var(--navy-700);
  border: 1.5px solid var(--blue-100);
}
.btn--secondary:hover { background: var(--blue-100); }
.btn--ghost {
  background: transparent;
  color: var(--text-sub);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { background: #f2f5fa; color: var(--navy-700); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #bb3030; }
.btn--sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }

/* ============ 各種設定 ============ */
.settings-note {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--navy-700);
  margin-bottom: 24px;
}
.settings-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 22px;
  background: #fff;
}
.settings-block__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--blue-50);
}
.settings-block__title::before {
  content: "";
  width: 4px;
  height: 17px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-500), var(--navy-700));
}
.settings-status { font-size: 12.5px; color: var(--text-sub); }
@media (max-width: 860px) {
  .settings-block { padding: 16px 14px; }
}

/* ============ 検索・絞り込み ============ */
.filters {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.filters__row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters__item { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.filters__item--grow { flex: 1; min-width: 180px; }
.filters__item--btn { justify-content: flex-end; }
.filters__label { font-size: 11.5px; font-weight: 700; color: var(--navy-700); }
.input--sm { min-height: 40px; padding: 8px 12px; font-size: 14px; }

.result-count { font-size: 12.5px; color: var(--text-sub); margin-bottom: 10px; }

/* ============ 履歴テーブル（PC） ============ */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); }
.history-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.history-table th {
  background: var(--navy-800);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .05em;
  text-align: left;
  padding: 11px 14px;
  white-space: nowrap;
}
.history-table td {
  padding: 11px 14px;
  border-top: 1px solid var(--blue-50);
  vertical-align: middle;
  white-space: nowrap;
}
.history-table tbody tr:hover { background: #f7faff; }
.history-table tbody tr.is-overdue-row { background: #fff5f5; }
.history-table tbody tr.is-overdue-row:hover { background: #ffeeee; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.cell-name { font-weight: 700; color: var(--navy-800); }
.cell-person--none { color: #b0bccd; }
.person-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  padding: 2px 11px;
  white-space: nowrap;
}
.cell-amount { font-weight: 700; text-align: right; letter-spacing: .01em; }
.cell-actions { display: flex; gap: 5px; justify-content: center; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-sub);
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .13s;
}
.icon-btn:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.icon-btn--danger:hover { border-color: var(--danger); color: var(--danger); background: #fdecec; }

/* ============ ステータスバッジ ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--draft    { background: #eef1f5; color: #5f6b7d; }
.badge--sent     { background: #e3edfc; color: #149ca3; }
.badge--waiting  { background: #fdf0e0; color: #c26a0a; }
.badge--paid     { background: #e2f5e9; color: #1d8a4b; }
.badge--overdue  { background: #fde5e5; color: #c93030; }
.badge--cancel   { background: #e2e4e9; color: #3f4756; }

.overdue-alert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #c93030;
  background: #fde5e5;
  border: 1px solid #f5b8b8;
  padding: 2px 9px;
  border-radius: 999px;
  margin-left: 6px;
}

.status-select {
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12.5px;
  padding: 5px 26px 5px 9px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235a6b84' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text);
  cursor: pointer;
}
.status-select:focus { outline: none; border-color: var(--blue-500); }

/* ============ 履歴カード（スマホ） ============ */
.card-list { display: none; flex-direction: column; gap: 12px; }
.h-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 15px 16px;
  box-shadow: 0 1px 4px rgba(11, 31, 63, .05);
}
.h-card.is-overdue-row { border-color: #f0b9b9; background: #fffafa; }
.h-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.h-card__name { font-size: 16.5px; font-weight: 700; color: var(--navy-800); }
.h-card__amount { font-size: 19px; font-weight: 900; color: var(--navy-800); letter-spacing: .01em; }
.h-card__rows { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 10px; font-size: 13px; }
.h-card__row { display: flex; gap: 8px; }
.h-card__row dt { color: var(--text-sub); min-width: 66px; }
.h-card__row dd { font-weight: 500; }
.h-card__status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.h-card__actions { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 10px; }
.h-card__actions .icon-btn { flex: 1; justify-content: center; padding: 9px 6px; font-size: 12px; }

/* ============ 空・ローディング ============ */
.empty-state { text-align: center; color: var(--text-sub); padding: 46px 0; font-size: 14px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-sub); padding: 40px 0; font-size: 14px; }
.spinner {
  width: 20px; height: 20px;
  border: 3px solid var(--blue-100);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}
.spinner--lg { width: 34px; height: 34px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ モーダル ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 63, .45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal--sm { max-width: 420px; }
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--navy-800);
  color: #fff;
}
.modal__title { font-size: 16px; font-weight: 700; }
.modal__close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.8);
  font-size: 26px;
  line-height: 1;
  padding: 0 4px;
}
.modal__close:hover { color: #fff; }
.modal__body { padding: 20px; overflow-y: auto; }
.modal__foot {
  padding: 14px 20px;
  border-top: 1px solid var(--blue-50);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.modal__caution { color: var(--danger); font-size: 12.5px; margin-top: 6px; }

.detail-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.detail-table th {
  text-align: left;
  color: var(--text-sub);
  font-weight: 600;
  padding: 9px 12px 9px 0;
  width: 110px;
  vertical-align: top;
  white-space: nowrap;
}
.detail-table td { padding: 9px 0; border-bottom: 1px solid var(--blue-50); }
.detail-table tr:last-child td { border-bottom: none; }
.detail-memo { white-space: pre-wrap; }

/* ============ PDF生成オーバーレイ・トースト ============ */
.pdf-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center;
}
.pdf-overlay__box {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 30px 44px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: var(--navy-800); font-weight: 700;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-800);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  max-width: calc(100vw - 40px);
  text-align: center;
  animation: toast-in .25s ease;
}
.toast--error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============================================================
   PDFテンプレート（A4縦 794×1123px 固定・端末サイズの影響なし）
============================================================ */
.pdf-stage {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 794px;
  overflow: hidden;
  pointer-events: none;
}
.pdf-page {
  width: 794px;
  height: 1123px;
  background: #ffffff;
  position: relative;
  font-family: var(--font);
  color: #1a2436;
  display: flex;
  flex-direction: column;
}
.pdf-accent {
  height: 14px;
  background: linear-gradient(90deg, #0b1f3f 0%, #126a73 35%, #149ca3 75%, #7fb0f2 100%);
}
.pdf-body {
  flex: 1;
  padding: 40px 62px 30px;
  display: flex;
  flex-direction: column;
}
.pdf-header { text-align: center; margin-bottom: 26px; }
.pdf-title {
  font-size: 34px;
  font-weight: 900;
  color: #0b1f3f;
  letter-spacing: .34em;
  text-indent: .34em;
}
.pdf-title-rule { display: flex; justify-content: center; margin-top: 12px; }
.pdf-title-rule span {
  width: 260px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #149ca3 30%, #149ca3 70%, transparent);
  display: block;
}
.pdf-customer {
  font-size: 21px;
  font-weight: 700;
  color: #0b1f3f;
  border-bottom: 2px solid #10294f;
  display: table;
  padding: 0 6px 4px 2px;
  margin-bottom: 18px;
}
.pdf-customer-sama { margin-left: 6px; font-size: 18px; }
.pdf-greeting { font-size: 14px; line-height: 1.9; color: #2a3547; margin-bottom: 24px; }

.pdf-cards { display: flex; gap: 16px; margin-bottom: 24px; }
.pdf-card {
  border-radius: 12px;
  /* 上下対称のパディング：コンテンツ全体をカードの真ん中に */
  padding: 16px 24px;
}
.pdf-card--amount {
  flex: 1.35;
  min-width: 0; /* 金額が長くてもカード比率を固定し、金額側の自動縮小を働かせる */
  background: linear-gradient(125deg, #08383d 0%, #126a73 55%, #1aa39d 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 16px rgba(11,31,63,.22);
  /* 見出し＋金額のブロック全体をカードの上下左右中央に配置 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.pdf-card--due {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border: 2px solid #c7d9f3;
  text-align: center;
  /* 見出し＋期限のブロック全体をカードの上下左右中央に配置 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.pdf-card__label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .28em;
  text-indent: .28em;
  color: #a8c4ec;
  margin-bottom: 6px;
}
.pdf-card__label--navy { color: #149ca3; }
.pdf-amount-row {
  /* 金額と（税込）を必ず同一行に保つflexコンテナ（折り返し禁止） */
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-self: stretch; /* カード幅いっぱいに保ち、自動縮小の幅判定を正しく保つ */
  min-width: 0;
  transform: translateY(-12px); /* 見出しはそのまま、金額＋（税込）だけを視覚的に上へ */
}
.pdf-card__amount {
  font-size: 44px;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.15;
  white-space: nowrap;
}
.pdf-card__tax {
  font-size: 12px;
  font-weight: 400;
  color: #cfdef5;
  margin-left: 7px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pdf-due-row {
  /* 日付と「まで」を必ず同一行に保つ（折り返し禁止） */
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-self: stretch; /* カード幅いっぱいに保ち、自動縮小の幅判定を正しく保つ */
  min-width: 0;
  transform: translateY(-12px); /* 見出しはそのまま、日付＋「まで」だけを視覚的に上へ */
}
.pdf-card__due { font-size: 21px; font-weight: 900; color: #0b1f3f; line-height: 1.3; white-space: nowrap; }
.pdf-card__due-made {
  font-size: 13px;
  font-weight: 700;
  color: #126a73;
  margin-left: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pdf-bank {
  background: #eef4fc;
  border: 1px solid #d9e6f8;
  border-radius: 12px;
  padding: 20px 26px;
  margin-bottom: 22px;
}
.pdf-bank__title {
  font-size: 15px;
  font-weight: 900;
  color: #0b1f3f;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.pdf-bank__title::before {
  content: "";
  width: 4px; height: 17px; border-radius: 2px;
  background: #149ca3;
}
.pdf-bank__table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.pdf-bank__table th {
  text-align: left;
  color: #4a5c78;
  font-weight: 700;
  width: 118px;
  padding: 7px 8px 7px 2px;
  border-bottom: 1px solid #d9e6f8;
  vertical-align: middle;
}
.pdf-bank__table td {
  padding: 7px 0;
  border-bottom: 1px solid #d9e6f8;
  font-weight: 700;
  color: #10294f;
  letter-spacing: .02em;
  vertical-align: middle;
}
.pdf-bank__table tr:last-child th, .pdf-bank__table tr:last-child td { border-bottom: none; }

.pdf-notes { margin-bottom: 10px; }
.pdf-notes__title {
  font-size: 13px;
  font-weight: 900;
  color: #126a73;
  margin-bottom: 6px;
}
.pdf-notes ul { list-style: none; }
.pdf-notes li {
  font-size: 12.5px;
  color: #3c4a60;
  line-height: 1.8;
  padding-left: 15px;
  position: relative;
}
.pdf-notes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #149ca3;
}

.pdf-footer { margin-top: auto; }
.pdf-footer__rule {
  height: 2px;
  background: linear-gradient(90deg, #10294f, #149ca3 60%, #dbe7f9);
  border-radius: 1px;
  margin-bottom: 16px;
}
.pdf-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.pdf-footer__logo { height: 44px; width: auto; }
.pdf-footer__info { text-align: right; font-size: 11.5px; color: #4a5c78; line-height: 1.7; }
.pdf-footer__company { font-size: 14px; font-weight: 900; color: #0b1f3f; margin-bottom: 2px; }
.pdf-footer__person {
  /* チップ・バッジ風装飾なしのシンプルなテキスト表示 */
  font-size: 12px;
  font-weight: 500;
  color: #126a73;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

/* ============ 領収書テンプレート ============ */
.receipt-page {
  width: 794px;
  height: 1123px;
  background: #ffffff;
  position: relative;
  font-family: var(--font);
  color: #1a2436;
  display: flex;
  flex-direction: column;
}
.receipt-accent {
  height: 14px;
  background: linear-gradient(90deg, #0b1f3f 0%, #126a73 35%, #149ca3 75%, #7fb0f2 100%);
}
.receipt-body {
  flex: 1;
  padding: 48px 66px 34px;
  display: flex;
  flex-direction: column;
}
.receipt-header { position: relative; text-align: center; margin-bottom: 56px; }
.receipt-title {
  font-size: 38px;
  font-weight: 900;
  color: #0b1f3f;
  letter-spacing: .38em;
  text-indent: .38em;
}
.receipt-date {
  position: absolute;
  right: 0;
  top: 54px;
  font-size: 13px;
  color: #4f6d72;
}
.receipt-customer {
  font-size: 24px;
  font-weight: 700;
  color: #0b1f3f;
  border-bottom: 2px solid #10294f;
  padding: 0 6px 8px 2px;
  margin-bottom: 34px;
}
.receipt-sama { margin-left: 6px; font-size: 19px; }
.receipt-amount-box {
  background: linear-gradient(125deg, #08383d 0%, #126a73 55%, #1aa39d 100%);
  border-radius: 14px;
  padding: 22px 30px 24px;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 16px rgba(11,31,63,.20);
  margin-bottom: 34px;
}
.receipt-amount-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .28em;
  text-indent: .28em;
  color: #a8c4ec;
  margin-bottom: 10px;
}
.receipt-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.receipt-amount {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.15;
}
.receipt-tax {
  font-size: 13px;
  font-weight: 400;
  color: #cfdef5;
  margin-left: 8px;
  white-space: nowrap;
}
.receipt-confirm {
  text-align: center;
  font-size: 16px;
  color: #2a3547;
  margin-bottom: 34px;
}
.receipt-details {
  border-top: 1px solid #d8e1ee;
  border-bottom: 1px solid #d8e1ee;
  padding: 8px 0;
}
.receipt-detail-row {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 11px 6px;
  font-size: 14px;
  color: #2a3547;
  border-bottom: 1px solid #eef4fc;
}
.receipt-detail-row:last-child { border-bottom: none; }
.receipt-detail-label {
  width: 100px;
  flex: 0 0 100px;
  color: #4a5c78;
  font-weight: 700;
}
.receipt-footer { margin-top: auto; }
.receipt-footer__rule {
  height: 2px;
  background: linear-gradient(90deg, #10294f, #149ca3 60%, #dbe7f9);
  border-radius: 1px;
  margin-bottom: 18px;
}
.receipt-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.receipt-footer__logo { height: 44px; width: auto; }
.receipt-footer__info { text-align: right; font-size: 11.5px; color: #4a5c78; line-height: 1.7; }
.receipt-footer__company { font-size: 14px; font-weight: 900; color: #0b1f3f; margin-bottom: 2px; }

/* ============================================================
   レスポンシブ
============================================================ */
@media (max-width: 860px) {
  .app-header__inner { padding: 12px 14px 0; }
  .app-nav { width: 100%; }
  .app-nav__btn { flex: 1; justify-content: center; padding: 12px 8px; font-size: 13px; }
  .app-main { padding: 18px 12px 60px; }
  .panel { padding: 20px 16px; border-radius: 12px; }
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions__main { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .filters__row { flex-direction: column; align-items: stretch; }
  .filters__item { min-width: 0; }

  /* テーブル→カード */
  .table-wrap { display: none; }
  .card-list { display: flex; }
}
@media (min-width: 861px) {
  .card-list { display: none !important; }
}


/* ============================================================
 * 領収書（青バージョン）
 * ============================================================ */
.receipt-page {
  width: 794px;
  height: 1123px;
  background: #ffffff;
  color: #202833;
  font-family: var(--font);
  position: relative;
}
.receipt-sheet {
  width: 100%;
  min-height: 100%;
  padding: 58px 42px 54px;
  box-sizing: border-box;
}
.receipt-banner {
  width: 100%;
  height: 82px;
  background: linear-gradient(125deg, #08383d 0%, #126a73 55%, #1aa39d 100%);
  color: #fff;
  text-align: center;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: .55em;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.receipt-banner > span {
  display: block;
  transform: translateY(-16px);
}
.receipt-meta {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 18px;
  margin: 28px 22px 18px 0;
  color: #262f37;
}
.receipt-meta__label {
  color: #54c8be;
  font-size: 18px;
}
.receipt-meta__value {
  font-size: 18px;
  min-width: 98px;
  text-align: right;
  letter-spacing: .04em;
}
.receipt-recipient-wrap {
  width: 390px;
  margin-left: 72px;
}
.receipt-recipient {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.receipt-honorific { white-space: nowrap; }
.receipt-recipient-line {
  width: 100%;
  height: 4px;
  background: linear-gradient(125deg, #08383d 0%, #126a73 55%, #1aa39d 100%);
}
.receipt-money-box {
  width: 468px;
  margin: 46px auto 16px;
  background: #e2f6f2;
  border-top: 4px solid #149ca3;
  border-bottom: 4px solid #149ca3;
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  min-height: 102px;
}
.receipt-money-box__label {
  padding-left: 30px;
  font-size: 22px;
  font-weight: 700;
  color: #126a73;
}
.receipt-money-box__value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 0 28px 0 0;
  transform: translateY(-12px);
}
.receipt-money-value {
  font-size: 50px;
  font-weight: 700;
  color: #111820;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
}
.receipt-tax {
  font-size: 13px;
  font-weight: 500;
  color: #4f6d72;
  white-space: nowrap;
}
.receipt-line-item {
  width: 468px;
  margin: 0 auto;
  border-bottom: 3px solid #149ca3;
  padding: 10px 16px 8px 24px;
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  color: #2a333c;
}
.receipt-line-item__label {
  color: #54c8be;
  font-size: 18px;
}
#receipt-subject, #receipt-date { font-size: 18px; }
.receipt-confirm {
  text-align: center;
  margin: 44px 0 28px;
  font-size: 18px;
  color: #2f343a;
}
.receipt-lower {
  display: grid;
  grid-template-columns: 260px 64px 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 24px;
}
.receipt-breakdown-box {
  margin-top: 42px;
}
.receipt-breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  border-bottom: 3px solid #149ca3;
  color: #2a333c;
  font-size: 16px;
}
.receipt-breakdown-row--head {
  font-size: 18px;
}
.receipt-breakdown-row span:first-child {
  color: #54c8be;
}
.receipt-stamp-box {
  width: 64px;
  height: 92px;
  border: 1px solid #b5b5b5;
  color: #5c5c5c;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  margin-top: 48px;
  background: #fff;
}
.receipt-company-box {
  margin-top: 0;
}
.receipt-company-name {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #1b2026;
  line-height: 1.35;
  transform: translateY(-8px);
}
.receipt-company-line {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #2d3238;
}
@media print {
  .receipt-page { page-break-before: always; }
}


/* 領収書 会社情報ロゴ */
.receipt-company-logo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin: 0 0 -10px;
  object-fit: contain;
}

.receipt-company-box {
  margin-top: 6px;
}

.receipt-company-name {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #1b2026;
}

.receipt-company-line {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.6;
  color: #2d3238;
}


#receipt-company-tel {
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
