@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;800&display=swap');

/* ============================================================
   サービスレポートシステム 体験版
   実システムはBootstrapを読み込みますが、体験版は自社サイトの
   CSP（script-src 'self' / style-src 'self'）に合わせて
   外部CDNとインラインstyleを使わずに同等の見た目を再現しています。
   ============================================================ */

:root {
  --navy: #0b6b66;
  --blue: #118c83;
  --green: #20a987;
  --ink: #172033;
  --muted: #6c757d;
  --line: #dee2e6;
  --bg: #f4f6f8;
  --primary: #0d6efd;
  --danger: #dc3545;
  --success: #198754;
  --warning: #ffc107;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans JP', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); }

.is-hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- 体験版バー ---------- */
.demo-bar {
  position: sticky; top: 0; z-index: 1200;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 9px 20px;
  background: #1d3145; color: #fff;
  font-size: 12.5px; line-height: 1.5;
}
.demo-bar-tag {
  flex: 0 0 auto;
  padding: 3px 10px; border-radius: 50px;
  background: #f1d493; color: #1d3145;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.demo-bar-text { flex: 1 1 260px; color: rgba(255,255,255,.86); margin: 0; }
.demo-bar-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; }
.demo-bar-actions a, .demo-bar-actions button {
  padding: 5px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 5px;
  background: transparent; color: #fff;
  font: inherit; font-size: 12px; font-weight: 700; text-decoration: none;
  cursor: pointer;
}
.demo-bar-actions a:hover, .demo-bar-actions button:hover { background: rgba(255,255,255,.14); }

/* ---------- 汎用コンポーネント（Bootstrap相当） ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container-wide { width: 100%; max-width: 1500px; margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border: 1px solid transparent; border-radius: 6px;
  background: #fff; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 500; line-height: 1.5;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 3px 9px; font-size: 12.5px; border-radius: 5px; }
.btn-lg { padding: 11px 26px; font-size: 16px; border-radius: 7px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover:not([disabled]) { background: #0b5ed7; border-color: #0a58ca; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover:not([disabled]) { background: #157347; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover:not([disabled]) { background: #bb2d3b; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #332701; }
.btn-warning:hover:not([disabled]) { background: #ffca2c; }
.btn-secondary { background: #6c757d; border-color: #6c757d; color: #fff; }
.btn-secondary:hover:not([disabled]) { background: #5c636a; }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover:not([disabled]) { background: var(--primary); color: #fff; }
.btn-outline-secondary { border-color: #adb5bd; color: #495057; }
.btn-outline-secondary:hover:not([disabled]) { background: #e9ecef; }
.btn-outline-danger { border-color: var(--danger); color: var(--danger); }
.btn-outline-danger:hover:not([disabled]) { background: var(--danger); color: #fff; }

.form-label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 500; }
.form-label.fw-bold { font-weight: 700; }
.form-control, .form-select {
  display: block; width: 100%; min-height: 38px;
  padding: 6px 10px; border: 1px solid #ced4da; border-radius: 6px;
  background: #fff; color: var(--ink);
  font: inherit; font-size: 14px; line-height: 1.5;
}
.form-select {
  appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 49%, #495057 50%), linear-gradient(-45deg, transparent 49%, #495057 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.form-control:focus, .form-select:focus {
  outline: none; border-color: #86b7fe; box-shadow: 0 0 0 3px rgba(13,110,253,.18);
}
.form-control[readonly], .form-control.bg-light { background: #eef1f4; }
textarea.form-control { min-height: 96px; resize: vertical; }
.form-text { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.form-check { display: flex; align-items: center; gap: 6px; }
.form-check-inline { display: inline-flex; margin-right: 16px; }
.form-check input { width: 16px; height: 16px; margin: 0; }
.form-check label { font-size: 14px; }

.alert { padding: 11px 14px; border: 1px solid transparent; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-info { background: #cff4fc; border-color: #b6effb; color: #055160; }
.alert-success { background: #d1e7dd; border-color: #badbcc; color: #0f5132; }
.alert-warning { background: #fff3cd; border-color: #ffecb5; color: #664d03; }
.alert-danger { background: #f8d7da; border-color: #f5c2c7; color: #842029; }
.alert-secondary { background: #e2e3e5; border-color: #d3d6d8; color: #41464b; }

.badge {
  display: inline-block; padding: 4px 9px; border-radius: 5px;
  font-size: 12px; font-weight: 700; line-height: 1.2; color: #fff;
}
.bg-secondary { background: #6c757d; }
.bg-primary { background: var(--primary); }
.bg-warning { background: var(--warning); color: #332701; }
.bg-success { background: var(--success); }

.card { border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-body { padding: 16px; }
.card-body.p-0 { padding: 0; }

table { width: 100%; border-collapse: collapse; }
.table { background: #fff; font-size: 14px; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { background: #212529; color: #fff; font-weight: 600; text-align: center; white-space: nowrap; }
.table-bordered th, .table-bordered td { border: 1px solid var(--line); }
.table-hover tbody tr:hover { background: #f4f7fb; }
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.page-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin: 26px 0 18px;
}
.page-head h2 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-head-user { color: var(--muted); font-size: 13px; }
.page-head-user strong { color: var(--ink); }

/* ---------- ログイン ---------- */
#screen-login { min-height: calc(100vh - 42px); }
.login-shell {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 440px);
  align-items: center; gap: 44px;
  width: min(1180px, calc(100% - 44px)); margin: 0 auto; padding: 40px 0;
  min-height: calc(100vh - 42px);
}
.login-bg {
  background:
    radial-gradient(circle at 22% 22%, rgba(32,169,135,.55), transparent 34%),
    linear-gradient(125deg, var(--navy), var(--blue) 58%, #052f34);
  position: relative;
}
.login-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.72) 46%, transparent 92%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.72) 46%, transparent 92%);
}
.hero-copy { position: relative; z-index: 1; max-width: 620px; color: #fff; }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.brand-icon {
  width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, #00a796, #116f68);
  box-shadow: 0 12px 30px rgba(0,167,150,.32); font-weight: 800;
}
.hero-copy h1 { margin: 20px 0 10px; font-size: clamp(1.9rem, 3.4vw, 3.3rem); line-height: 1.12; font-weight: 800; }
.hero-copy p { max-width: 560px; color: rgba(255,255,255,.78); font-size: 15px; line-height: 1.9; }
.status-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  color: rgba(255,255,255,.86); background: rgba(255,255,255,.08); font-size: 13px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #19c37d; box-shadow: 0 0 0 5px rgba(25,195,125,.14); }
.report-visual {
  width: min(560px, 100%); margin-top: 24px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 8px;
  background: rgba(255,255,255,.11); box-shadow: 0 28px 70px rgba(0,0,0,.26); overflow: hidden;
}
.visual-header {
  display: flex; justify-content: space-between; align-items: center; padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,.14); color: #fff; font-weight: 700; font-size: 14px;
}
.visual-body { display: grid; grid-template-columns: 1fr .8fr; gap: 14px; padding: 16px; }
.visual-card { min-height: 112px; padding: 14px; border-radius: 8px; background: rgba(255,255,255,.94); }
.visual-card h2 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: #073c3b; }
.check-line {
  display: grid; grid-template-columns: 1fr 30px; gap: 10px; align-items: center;
  padding: 7px 0; border-top: 1px solid #e1ecea; color: #315451; font-size: 12.5px;
}
.judge { display: grid; place-items: center; height: 26px; border-radius: 6px; color: #075c4e; background: #d9f4ec; font-weight: 700; }
.device-panel { display: grid; gap: 10px; align-content: start; }
.metric { padding: 10px; border-radius: 8px; background: #eef7f5; color: #234b47; font-size: 12.5px; }
.metric strong { display: block; margin-top: 3px; font-size: 14px; }
.login-card {
  position: relative; z-index: 1; width: 100%; padding: 26px;
  border: 1px solid rgba(255,255,255,.72); border-top: 4px solid #00a796; border-radius: 8px;
  background: rgba(255,255,255,.97); box-shadow: 0 28px 80px rgba(0,0,0,.28);
}
.login-card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 800; line-height: 1.35; }
.login-card .sub { margin-bottom: 20px; color: #667085; font-size: 14px; }
.btn-login {
  width: 100%; min-height: 48px; border: none; border-radius: 7px; color: #fff;
  background: linear-gradient(135deg, #00a796, #087068); font-weight: 700; font-size: 16px;
  box-shadow: 0 12px 24px rgba(0,140,131,.24); cursor: pointer;
}
.login-accounts { margin: 0 0 18px; padding: 12px 14px; border: 1px dashed #b7cfcc; border-radius: 7px; background: #f2f9f8; }
.login-accounts p { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: #0b6b66; }
.login-account-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.login-account-buttons .btn { flex: 1 1 130px; }
.login-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; color: #7b8798; font-size: 12px; }

/* ---------- 一覧 ---------- */
.status-dashboard { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.status-card {
  display: block; padding: 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); text-align: center; text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); cursor: pointer; font: inherit;
}
.status-card:hover { border-color: #86b7fe; color: var(--primary); }
.status-card.active { border: 2px solid var(--primary); padding: 11px; }
.status-card strong { display: block; font-size: 25px; line-height: 1.2; font-weight: 700; }
.status-card span { font-size: 13px; color: var(--muted); }

.report-list-table { min-width: 980px; }
.filter-row th { padding: 8px; background: #f1f3f5; border-bottom: 1px solid var(--line); }
.filter-row .form-control, .filter-row .form-select { font-size: 13px; min-height: 34px; }
.filter-dates { display: grid; gap: 5px; }
.filter-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.filter-actions .btn-primary { grid-column: 1 / -1; }
.list-actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }

.admin-menu { position: relative; display: inline-block; }
.admin-menu > summary { list-style: none; cursor: pointer; }
.admin-menu > summary::-webkit-details-marker { display: none; }
.admin-menu > summary::after { content: "▾"; margin-left: .35em; }
.admin-menu[open] > summary::after { content: "▴"; }
.admin-menu-list {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 1050;
  min-width: 212px; padding: 6px 0;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
}
.admin-menu-list button {
  display: block; width: 100%; padding: 8px 16px; border: 0; background: none;
  color: var(--ink); font: inherit; font-size: 14px; text-align: left; white-space: nowrap; cursor: pointer;
}
.admin-menu-list button:hover { background: #f1f3f5; }
.admin-menu-divider { height: 1px; margin: 6px 0; background: var(--line); }

.pagination-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0 40px; }
.pagination-summary { color: var(--muted); font-size: 14px; }
.pagination { display: flex; flex-wrap: wrap; gap: 3px; list-style: none; margin: 0; padding: 0; }
.pagination button, .pagination span {
  display: block; min-width: 34px; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 5px; background: #fff;
  color: var(--primary); font: inherit; font-size: 13px; cursor: pointer;
}
.pagination .active button { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .disabled span { color: #adb5bd; background: #f8f9fa; cursor: default; }

/* ---------- フォーム ---------- */
.sheet { background: #fff; border: 1px solid #ccd1d6; border-radius: 6px; padding: 20px; }
.section-title { margin: 30px 0 12px; padding-bottom: 6px; border-bottom: 2px solid #18222f; font-size: 18px; font-weight: 700; }
.section-title:first-of-type { margin-top: 18px; }
.master-box { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px; background: #f8f9fa; border: 1px solid #d9dde1; border-radius: 6px; }
.compact-table { min-width: 940px; table-layout: fixed; font-size: 14px; }
.compact-table th { background: #f0f2f4; text-align: center; vertical-align: middle; white-space: nowrap; font-weight: 600; }
.compact-table td { vertical-align: middle; padding: 5px; }
.compact-table .form-control, .compact-table .form-select { min-height: 34px; font-size: 13.5px; }
.row-actions { width: 66px; text-align: center; }
.dynamic-table-controls { display: flex; justify-content: flex-end; margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.mb-3 { margin-bottom: 14px; }
.mb-4 { margin-bottom: 20px; }
.mt-3 { margin-top: 14px; }

.signature-pad { display: block; width: 100%; height: 150px; border: 1px solid #adb5bd; border-radius: 4px; background: #fff; touch-action: none; cursor: crosshair; }
.signature-pad.internal-confirm-pad { height: 110px; }
.signature-pad.fullscreen-active { flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; border-radius: 0; }
.signature-placeholder { width: 100%; height: 150px; border: 1px dashed #ced4da; border-radius: 4px; background: #f8f9fa; }
.signature-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.signature-hint { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.saved-signature { display: block; max-width: 100%; height: 70px; margin-top: 8px; object-fit: contain; border: 1px solid #ddd; background: #fff; }
.signature-fullscreen { position: fixed; inset: 0; z-index: 2000; background: #fff; }
.signature-fullscreen__rotator { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.signature-fullscreen__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; }
.signature-fullscreen__title { font-weight: 700; font-size: 16px; }
.signature-fullscreen__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.signature-fullscreen__canvas { flex: 1 1 auto; min-height: 0; display: flex; border: 1px solid #adb5bd; }
body.signature-fullscreen-open { overflow: hidden; }

.photo-slot { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.photo-preview { display: none; width: 100%; margin-bottom: 8px; border-radius: 4px; overflow: hidden; background: #f1f3f5; }
.photo-preview.has-image { display: block; }
.photo-preview img { display: block; width: 100%; height: 150px; object-fit: contain; background: #fff; }
.photo-preview-caption { padding: 5px 8px; color: var(--muted); font-size: 12px; }
.photo-grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.photo-slot .form-control { margin-bottom: 8px; }
.photo-slot .form-control:last-child { margin-bottom: 0; }

.part-name-control { display: flex; gap: 4px; align-items: center; }
.part-name-control .form-control { flex: 1 1 auto; }
.part-master-search { flex: 0 0 auto; white-space: nowrap; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1500; display: flex; align-items: flex-start; justify-content: center;
  padding: 7vh 16px 24px; background: rgba(15,23,42,.38);
}
.modal-panel {
  width: min(760px, 100%); max-height: 86vh; overflow: hidden;
  background: #fff; border: 1px solid #cfd6dd; border-radius: 7px;
  box-shadow: 0 18px 50px rgba(15,23,42,.22);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f8f9fa; }
.modal-header h4 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-body { padding: 12px 14px 14px; }
.modal-close { border: 0; background: none; font-size: 22px; line-height: 1; color: #6c757d; cursor: pointer; padding: 0 4px; }
.part-master-results { max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.part-master-results th { position: sticky; top: 0; z-index: 1; background: #f0f2f4; color: var(--ink); }
.part-master-results .table th, .part-master-results .table td { padding: 7px 9px; font-size: 13.5px; }
.part-master-empty { padding: 18px; color: var(--muted); text-align: center; }

.form-submit-area { margin: 26px 0 6px; text-align: center; }
.form-submit-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---------- 保存完了 ---------- */
.saved-box { max-width: 680px; margin: 60px auto; padding: 34px 26px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.saved-box h2 { margin: 0 0 18px; color: var(--success); font-size: 23px; }
.saved-box p { margin: 6px 0; }
.saved-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

/* ---------- 詳細・帳票 ---------- */
#screen-detail { background: #555; min-height: calc(100vh - 42px); padding-bottom: 24px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 14px 12px; }
.toolbar button {
  padding: 8px 14px; border: 1px solid #bbb; border-radius: 4px;
  background: #fff; color: #111; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.toolbar .print { background: #1267d6; border-color: #1267d6; color: #fff; }
.toolbar .approve { background: #198754; border-color: #198754; color: #fff; }
.status-notice { width: min(210mm, 100%); margin: 0 auto 10px; padding: 9px 14px; background: #fff; text-align: center; font-size: 13px; }
.audit-panel { width: min(210mm, 100%); margin: 0 auto 10px; padding: 11px 14px; background: #fff; font-size: 13px; }
.audit-panel ul { margin: 7px 0 0; padding-left: 20px; max-height: 8.5em; overflow-y: auto; }
.audit-panel li { margin: 3px 0; line-height: 1.5; }
.audit-detail { display: inline-block; white-space: pre-wrap; vertical-align: top; }

.page {
  width: 210mm; min-height: 297mm; margin: 0 auto 15px; padding: 10mm 14mm 8mm;
  background: #fff; color: #000; box-shadow: 0 2px 12px #222;
  font-family: 'Yu Gothic', 'Hiragino Kaku Gothic ProN', Meiryo, 'Noto Sans JP', sans-serif;
}
.page-scale { width: 100%; transform-origin: top left; }
.page .header { display: grid; grid-template-columns: 32mm 1fr 48mm; align-items: center; height: 17mm; }
.page h1 { margin: 0; text-align: center; font-size: 22pt; letter-spacing: .03em; }
.copy-label { text-align: right; font-size: 8pt; }
.page table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.page th, .page td { border: .32mm solid #000; padding: .6mm 1mm; vertical-align: middle; overflow-wrap: anywhere; }
.page th { font-weight: 600; text-align: center; background: none; color: #000; }
.top-grid { display: grid; grid-template-columns: 1fr 52mm; gap: 9mm; margin-top: 2mm; }
.facility-table { font-size: 7.4pt; }
.facility-table th { width: 20%; }
.facility-table tr { height: 6.2mm; }
.dates-table { font-size: 7.4pt; }
.dates-table th { width: 42%; }
.dates-table tr { height: 6.2mm; }
.system-table { margin-top: 2mm; font-size: 7.3pt; }
.system-table tr { height: 5.8mm; }
.system-table th { width: 19%; }
.box-title { height: 5.3mm; padding: .8mm 1.3mm; border: .32mm solid #000; border-bottom: 0; font-size: 7.5pt; font-weight: 600; }
.text-box { min-height: 16mm; border: .32mm solid #000; padding: 1.2mm; font-size: 7.2pt; white-space: pre-wrap; }
.work-box { min-height: 22mm; }
.result-row { display: grid; grid-template-columns: 1fr 1fr; border: .32mm solid #000; border-top: 0; font-size: 7.4pt; }
.result-row div { padding: 1mm 2mm; }
.result-row div:first-child { border-right: .32mm solid #000; }
.page .section { margin-top: 2mm; }
.data-table { font-size: 6.6pt; }
.data-table th { height: 5mm; }
.data-table td { height: 4.9mm; }
.measurement th:nth-child(1) { width: 18%; }
.measurement th:nth-child(2) { width: 14%; }
.measurement th:nth-child(3), .measurement th:nth-child(4), .measurement th:nth-child(7) { width: 10%; }
.measurement th:nth-child(5) { width: 7%; }
.measurement th:nth-child(6) { width: 14%; }
.measurement th:nth-child(8) { width: 17%; }
.parts th:nth-child(1) { width: 28%; }
.parts th:nth-child(2) { width: 14%; }
.parts th:nth-child(3) { width: 6%; }
.parts th:nth-child(4), .parts th:nth-child(5) { width: 11%; }
.parts th:nth-child(6), .parts th:nth-child(7) { width: 15%; }
.bottom-area { display: grid; grid-template-columns: 1fr 45mm; gap: 7mm; margin-top: 2mm; }
.cost-lines { font-size: 6.7pt; }
.cost-lines td, .cost-lines th { height: 5mm; }
.cost-lines-second { margin-top: 2mm; }
.cost-summary { font-size: 6.7pt; }
.cost-summary th { width: 43%; }
.cost-summary tr { height: 5.4mm; }
.remarks { display: grid; grid-template-columns: 14mm 1fr; min-height: 16mm; border: .32mm solid #000; margin-top: 2mm; font-size: 7pt; }
.remarks-label { display: flex; align-items: center; justify-content: center; border-right: .32mm solid #000; font-weight: 600; }
.remarks-value { padding: 1mm; white-space: pre-wrap; }
.sign-row { display: grid; grid-template-columns: 1fr 52mm; gap: 7mm; margin-top: 3mm; }
.notice { min-height: 15mm; border: .32mm solid #000; padding: 1.2mm; font-size: 6.4pt; line-height: 1.5; white-space: pre-wrap; }
.signature-box { border: .32mm solid #000; height: 15mm; position: relative; }
.signature-label { height: 5mm; padding: .7mm 1mm; border-bottom: .32mm solid #000; font-size: 7pt; font-weight: 600; }
.signature-box img { position: absolute; left: 2mm; right: 2mm; bottom: 1mm; max-width: 46mm; max-height: 8mm; object-fit: contain; }
.page .footer { display: grid; grid-template-columns: 1fr 68mm; gap: 7mm; align-items: end; margin-top: 2mm; }
.company { border-top: .32mm solid #000; padding-top: 7mm; font-size: 5.9pt; line-height: 1.5; white-space: pre-wrap; }
.approval { font-size: 6pt; }
.approval th, .approval td { height: 6mm; }
.approval .vertical { width: 12mm; font-size: 6.6pt; line-height: 1.25; white-space: nowrap; }
.approval-signature { height: 13mm; padding: .3mm .7mm; text-align: center; vertical-align: middle; overflow: hidden; }
.approval-signature img { display: block; width: auto; max-width: 31mm; max-height: 9.5mm; margin: 0 auto; object-fit: contain; }
.approval-date { height: 13mm; text-align: center; vertical-align: middle; font-size: 7.2pt; font-weight: 600; white-space: nowrap; }
.approval-check { font-size: 5.2pt; line-height: 1.35; padding: .8mm 1mm; white-space: nowrap; }
.continuation-page { padding-top: 14mm; }
.continuation-header { margin-bottom: 7mm; padding-bottom: 3mm; border-bottom: .5mm solid #000; }
.continuation-header h2 { margin: 0; text-align: center; font-size: 16pt; }
.continuation-meta { display: flex; justify-content: space-between; margin-top: 3mm; font-size: 8pt; }
.continuation-text { min-height: 200mm; border: .32mm solid #000; padding: 4mm; font-size: 9pt; line-height: 1.8; white-space: pre-wrap; }
.continuation-count { margin-top: 4mm; text-align: right; font-size: 7pt; }
.continuation-note { margin: 1mm 0 0; text-align: right; font-size: 6pt; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7mm; }
.photo-card { border: .32mm solid #000; min-height: 92mm; padding: 3mm; margin: 0; display: flex; flex-direction: column; gap: 2mm; }
.photo-card img { width: 100%; height: 72mm; object-fit: contain; border: .2mm solid #ccc; background: #fff; }
.photo-caption { min-height: 10mm; font-size: 8pt; line-height: 1.45; white-space: pre-wrap; }

/* ---------- マスター画面 ---------- */
.master-intro { margin: 0 0 16px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 13.5px; }
.master-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; padding: 14px; background: #f8f9fa; border: 1px solid var(--line); border-radius: 7px; margin-bottom: 16px; }
.master-form .master-form-actions { display: flex; gap: 8px; }

/* ---------- トースト ---------- */
.toast-area { position: fixed; right: 16px; bottom: 16px; z-index: 2500; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  padding: 11px 14px; border-radius: 7px; background: #212529; color: #fff;
  font-size: 13.5px; line-height: 1.6; box-shadow: 0 10px 24px rgba(0,0,0,.24);
}
.toast.is-error { background: #a52834; }
.toast.is-success { background: #14663f; }

/* ---------- レスポンシブ ---------- */
@media screen and (max-width: 991px) {
  .login-shell { grid-template-columns: 1fr; gap: 20px; width: min(100% - 28px, 560px); padding: 28px 0; }
  .hero-copy h1 { font-size: 26px; margin: 14px 0 6px; }
  .hero-copy p, .status-row, .report-visual { display: none; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 767px) {
  body { font-size: 14px; }
  .status-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .master-box, .grid-2, .photo-grid-form { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .sheet { padding: 12px; }
  .page { width: 100%; min-height: 0; padding: 14px; box-shadow: none; }
  .page-scale { transform: none; }
  .top-grid, .bottom-area, .sign-row, .page .footer { grid-template-columns: 1fr; gap: 10px; }
  .photo-grid { grid-template-columns: 1fr; }
  .continuation-text { min-height: 0; }
  .demo-bar { padding: 8px 14px; }
}

/* ---------- 印刷 ---------- */
@page { size: A4 portrait; margin: 0; }
@media print {
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .demo-bar, .toolbar, .status-notice, .audit-panel, .toast-area, .modal-backdrop { display: none !important; }
  #screen-detail { background: #fff; padding: 0; }
  .page { width: 210mm; height: 297mm; min-height: 297mm; margin: 0; padding: 8mm 14mm 6mm; box-shadow: none; overflow: hidden; }
  .page-scale { width: 108.7%; transform: scale(.92); }
  .continuation-page { break-before: page; page-break-before: always; padding: 12mm 14mm 10mm; }
  .continuation-page .page-scale { width: 100%; transform: none; }
}

/* ---------- この体験版について ----------
   画面本体は JS が #app に描くため、JS を実行しない読み手（検索・AIのクローラー）には
   中身が見えない。概要と開発例へのリンクを #app の外に静的に置いている。 */
.demo-about { background: #fff; border-top: 1px solid var(--line); }
.demo-about-inner { max-width: 1180px; margin: 0 auto; padding: 28px 16px 56px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.demo-about h2 { margin: 0 0 10px; color: var(--ink); font-size: 15px; }
.demo-about p { margin: 0 0 10px; max-width: 760px; }
.demo-about-label { color: var(--ink); font-weight: 700; margin-bottom: 4px; }
.demo-about ul { margin: 0 0 12px; padding-left: 1.4em; }
.demo-about a { color: var(--navy); }
.demo-about-by { margin-top: 16px; font-size: 12px; }
@media print { .demo-about { display: none !important; } }
