body { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }

textarea { resize: vertical; }

.spinner {
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 行動予定表：モバイル用カード */
.sched-card { border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.75rem; background: #fff; }

/* ===== 申請書ドキュメント（画面プレビュー兼印刷レイアウト） ===== */
.doc-wrap {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  color: #111;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 13px;
  line-height: 1.5;
}
.doc-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.doc-header .doc-spacer { width: 160px; }
.doc-title { flex: 1; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 0.15em; padding-top: 4px; }
.doc-meta { width: 200px; border-collapse: collapse; font-size: 11px; }
.doc-meta th, .doc-meta td { border: 1px solid #333; padding: 3px 6px; font-weight: 400; }
.doc-meta th { background: #f3f4f6; width: 60px; text-align: left; white-space: nowrap; }
.doc-lead { font-size: 12.5px; margin: 6px 0 8px; }

.doc-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; table-layout: fixed; }
.doc-table th, .doc-table td { border: 1px solid #333; padding: 5px 7px; font-size: 12px; vertical-align: middle; word-break: break-word; }
.doc-table th { background: #f3f4f6; font-weight: 700; text-align: left; white-space: nowrap; }
.doc-table td { text-align: left; }

.doc-table-main th.w-label { width: 15%; }
.doc-table-main th.w-sublabel { width: 12%; }

.doc-period th { width: 13%; }
.doc-period td { width: 25%; }

.doc-schedule th, .doc-schedule td { text-align: center; }
.doc-schedule thead th { width: 15%; }
.doc-schedule thead th:nth-child(2) { width: 35%; }
.doc-schedule thead th:nth-child(4) { width: 35%; }
.doc-schedule tbody td { height: 22px; text-align: left; }
.doc-schedule tbody td.cell-cost { text-align: right; }
.doc-schedule tfoot td { font-weight: 700; }
.doc-schedule tfoot td.text-right { text-align: right; background: #f3f4f6; }

.doc-detail th { width: 15%; vertical-align: top; }
.doc-detail th .sub { display: block; font-size: 10px; font-weight: 400; color: #555; margin-top: 2px; white-space: normal; }
.doc-detail td { min-height: 60px; white-space: pre-wrap; }

.doc-office th { background: #f3f4f6; font-weight: 700; }
.doc-office .office-box { height: 70px; vertical-align: top; }

.doc-approval th { width: 33.33%; text-align: center; background: #f3f4f6; }
.doc-approval .approval-box { height: 60px; text-align: center; vertical-align: middle; font-size: 11px; color: #333; }

.stamp-mark { display: inline-block; border: 1px solid #999; border-radius: 50%; width: 18px; height: 18px; line-height: 16px; text-align: center; font-size: 10px; margin-left: 4px; color: #888; }

.status-badge-pending { background: #fef9c3; color: #854d0e; }
.status-badge-approved { background: #dcfce7; color: #166534; }
.status-badge-rejected { background: #fee2e2; color: #991b1b; }

@media print {
  .no-print { display: none !important; }
  body { background: white !important; }
  .doc-wrap { box-shadow: none !important; max-width: 190mm; font-size: 11px; }
  @page { size: A4; margin: 12mm; }
}
