/* ===== demo-container override ===== */
/* 帳票は固定幅レイアウトのため、横スクロールで小画面に対応 */
.demo-container {
  overflow-x: auto;
  padding: 24px;
  justify-content: flex-start;
}

/* ===== 見積書ラッパー ===== */
.report-wrap {
  width: 100%;
  min-width: 480px;
  max-width: 720px;
  margin: 0 auto;
}

/* ===== 帳票カード（紙の見た目） ===== */
.report-paper {
  background: #fff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
  max-width: 680px;
  margin: 0 auto;
  padding: 40px;
}

/* ===== ヘッダー（「御見積書」 + 番号・日付） ===== */
.report-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.report-heading {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #1a2332;
}

/* dt/dd をグリッドで横並びに */
.report-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  font-size: 13px;
}

.report-meta dt {
  font-weight: 600;
  color: #7a8a9a;
  white-space: nowrap;
  margin: 0;
}

.report-meta dd {
  margin: 0;
  color: #1a2332;
}

/* ===== 宛先・発行元（2カラム） ===== */
.report-parties {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.report-to,
.report-from {
  flex: 1;
  min-width: 180px;
}

.report-label {
  font-size: 11px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.report-company {
  font-size: 16px;
  font-weight: 700;
  color: #1a2332;
  margin: 0 0 4px;
}

.report-addr {
  font-size: 13px;
  color: #5a6a7a;
  margin: 0 0 2px;
}

/* ===== 明細テーブル ===== */
.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 4px;
  font-size: 14px;
}

.report-table .col-name   { width: 36%; }
.report-table .col-qty    { width: 12%; }
.report-table .col-price  { width: 20%; }
.report-table .col-amount { width: 20%; }
.report-table .col-action { width: 12%; }

.report-table th {
  background: #2B7FE8;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}

.report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #1a2332;
}

/* 数量・単価・金額列は右寄せ、操作列は中央寄せ */
.report-table .col-qty,
.report-table .col-price,
.report-table .col-amount {
  text-align: right;
}

.report-table .col-action {
  text-align: center;
}

.report-table tbody tr:last-child td {
  border-bottom: none;
}

/* 明細0行時の表示 */
.report-empty-row td {
  text-align: center;
  color: #9aa5b4;
  padding: 24px 12px;
}

/* 行削除ボタン */
.report-row-delete-btn {
  background: none;
  border: none;
  color: #9aa5b4;
  font-size: 16px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  font-family: sans-serif;
  transition: color 0.15s;
}

.report-row-delete-btn:hover {
  color: #ef4444;
}

/* ===== 合計エリア（tfoot・常に最下部固定） ===== */
.report-table tfoot .report-total-row td {
  padding: 10px 12px;
  border-bottom: none;
  border-top: 1px solid #e2e8f0;
  color: #5a6a7a;
}

.report-table tfoot .report-total-row td[colspan] {
  text-align: right;
  padding-right: 16px;
}

/* 合計（税込）行を強調 */
.report-table tfoot .report-total-row.is-grand td {
  font-size: 16px;
  font-weight: 700;
  color: #1a2332;
  border-top: 2px solid #1a2332;
  padding-top: 12px;
}

/* ===== 金額固定値の注記 ===== */
.report-note {
  font-size: 12px;
  line-height: 1.6;
  color: #5a6a7a;
  margin: 12px 0 0;
}

.report-note a {
  color: #2B7FE8;
}

/* ===== 操作ボタン ===== */
.demo-controls {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-add-btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #2B7FE8;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s;
}

.report-add-btn:hover {
  background: #1A6ED4;
}

.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s;
}

.reset-btn:hover {
  background: #F4F6F9;
  border-color: #9AA5B4;
}
