:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #111827;
  --accent-2: #2563eb;
  --danger: #b91c1c;
  --ok: #166534;
  --warn: #9a3412;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
.hidden { display: none !important; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 16px 8px;
  max-width: 1240px;
  margin: 0 auto;
}
.top-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.eyebrow { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
h1 { margin: 0; font-size: 32px; }
.sub { margin-top: 6px; color: var(--muted); }
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 16px 40px;
}
.grid { display: grid; gap: 16px; }
.two-col { grid-template-columns: 1fr 1fr; }
.three-col { grid-template-columns: repeat(3, 1fr); }
.four-col { grid-template-columns: repeat(4, 1fr); }
.narrow-gap { gap: 12px; }
.card, .mini-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(17,24,39,0.06);
}
.mini-card { padding: 16px; box-shadow: none; background: #fbfbfc; }
.auth-card { max-width: 620px; margin: 24px auto 0; }
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.card-header.compact { margin-bottom: 10px; }
.list-header { align-items: center; }
h2, h3 { margin: 0 0 4px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0; color: var(--muted); line-height: 1.5; }
.stack { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
label span {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
}
input, textarea, select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  background: #fff;
}
textarea { resize: vertical; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}
.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn.ghost { background: #f9fafb; }
.btn.small { padding: 10px 12px; font-size: 14px; }
.message { min-height: 22px; font-size: 14px; color: var(--muted); }
.message.error { color: var(--danger); }
.message.ok { color: var(--ok); }
.message.warn { color: var(--warn); }
.user-chip {
  background: #111827;
  color: #fff;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 14px;
}
.search { max-width: 240px; }
.report-item, .project-item, .user-item, .invite-item, .material-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}
.report-meta, .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.badge, .chip {
  background: #f3f4f6;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: #374151;
}
.badge.ok, .chip.ok { background:#ecfdf5; color:#166534; }
.badge.warn, .chip.warn { background:#fff7ed; color:#9a3412; }
.badge.dark, .chip.dark { background:#111827; color:#fff; }
.report-title, .project-title { font-size: 18px; font-weight: 700; margin: 0; }
.empty {
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.prewrap { white-space: pre-wrap; }
.action-row { display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
.link-btn {
  border:none;
  background:transparent;
  color: var(--accent-2);
  padding:0;
  cursor:pointer;
  font-weight:600;
}
.notice {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  display:flex;
  justify-content: space-between;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}
.tabs { display:flex; gap:10px; flex-wrap:wrap; }
.tab {
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
}
.tab.active { background:#111827; color:#fff; border-color:#111827; }
.panel { display:none; }
.panel.active { display:block; }
.quick-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.quick-card {
  border:1px solid var(--line);
  background:#f9fafb;
  border-radius:18px;
  padding:18px;
  text-align:left;
  cursor:pointer;
}
.quick-card strong { display:block; margin-bottom:8px; font-size:18px; }
.quick-card span { color:var(--muted); }
.summary-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:10px; }
.summary-box {
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background:#f9fafb;
}
.summary-label { font-size:12px; color:var(--muted); margin-bottom:6px; }
.summary-value { font-size:18px; font-weight:800; }
.separator { border:none; border-top:1px solid var(--line); margin:14px 0; }
.material-line {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  padding:10px 12px;
}
.material-line strong { display:block; }
.material-line small { color: var(--muted); }
.warning-text { color: var(--warn); font-weight: 700; }
.ok-text { color: var(--ok); font-weight: 700; }
@media (max-width: 960px) {
  .two-col, .three-col, .four-col, .quick-grid, .summary-grid { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
}


.mini-note {
  align-self: end;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fafafa;
}

.fuel-entry-row { border:1px dashed var(--border); border-radius:16px; padding:12px; background:#fff; }
.action-row.compact { margin-top:8px; }

.section-title.small{font-size:13px;color:#666;margin:6px 0;}
.project-docs-inline{margin-top:12px;padding-top:10px;border-top:1px dashed #ddd;}
.doc-inline-item{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding:8px 0;border-bottom:1px solid #eee;}
.empty.compact{font-size:13px;color:#777;padding:6px 0;}

.project-docs-inline-block{margin-top:14px;padding-top:12px;border-top:1px dashed #d9dce3;}
.inline-section-title{font-size:14px;font-weight:700;margin-bottom:8px;color:#1f2a37;}
.doc-inline-item{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:10px 12px;border:1px solid #e7e9ee;border-radius:14px;background:#fff;}
.doc-inline-item .meta-row{margin-top:6px;}
.empty.compact{padding:10px 12px;border:1px dashed #d9dce3;border-radius:12px;color:#667085;background:#fafbfc;}

.report-list-header { align-items: flex-start; }
.report-list-controls { align-items: flex-end; }
.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.segment-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.segment-btn.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.report-list-summary {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}
.report-list-summary-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #1f2a37;
}
.report-list-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.report-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #f9fafb;
}
.report-group.open {
  background: #f8fafc;
}
.report-group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.report-group-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 0;
}
.report-group-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.report-group-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.report-group-inline-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.report-group-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.report-group-count {
  white-space: nowrap;
}
.report-group-chevron {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.report-group-body {
  margin-top: 12px;
}
@media (max-width: 960px) {
  .report-list-controls { align-items: stretch; }
  .search { max-width: 100%; }
  .report-group-header { align-items: flex-start; flex-direction: column; }
}


.pdf-register-summary { background: #fffdf7; }
.pdf-register-guide strong { display:block; margin-bottom:10px; }
.pdf-register-note { margin: 0; }
.pdf-register-note.warn { border-color: #fdba74; background: #fff7ed; color: #9a3412; }

.project-card-clean {
  padding: 16px;
}
.project-card-top {
  align-items: flex-start;
  gap: 14px;
}
.project-card-title-wrap {
  flex: 1 1 420px;
  min-width: 0;
}
.project-heading-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.project-topline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.project-meta-compact {
  margin-top: 10px;
}
.project-actions-top {
  margin-top: 0;
  justify-content: flex-end;
}
.project-summary-grid.primary {
  margin-top: 14px;
}
.project-summary-grid .summary-box.emphasis {
  background: #fffdf7;
}
.project-mini-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.project-mini-metric {
  border: 1px dashed #d9dce3;
  border-radius: 14px;
  background: #fcfcfd;
  padding: 10px 12px;
}
.project-mini-metric span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.project-mini-metric strong {
  font-size: 16px;
}
.project-detail-fold {
  margin-top: 14px;
  border-top: 1px dashed #d9dce3;
  padding-top: 12px;
}
.project-detail-fold > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: #1f2a37;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.project-detail-fold > summary::-webkit-details-marker {
  display: none;
}
.project-detail-fold > summary::before {
  content: '＋';
  display: inline-block;
  width: 18px;
  text-align: center;
}
.project-detail-fold[open] > summary::before {
  content: '－';
}
.project-detail-body {
  margin-top: 12px;
}
.project-summary-grid.secondary {
  margin-top: 0;
}
.project-note-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e7e9ee;
  border-radius: 14px;
  background: #fff;
}
@media (max-width: 960px) {
  .project-actions-top {
    justify-content: flex-start;
  }
  .project-mini-metrics {
    grid-template-columns: 1fr;
  }
}


.schedule-head-controls { align-items: center; }
.schedule-summary { margin-bottom: 14px; }
.schedule-calendar { display: flex; flex-direction: column; gap: 8px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calendar-weekdays div { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.calendar-cell { min-height: 152px; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 10px; display:flex; flex-direction:column; gap:8px; }
.calendar-cell.muted { background:#f9fafb; }
.calendar-date-row { display:flex; justify-content:space-between; align-items:center; font-size:12px; color:var(--muted); }
.calendar-item-stack, .calendar-phase-stack { display:flex; flex-direction:column; gap:6px; }
.calendar-item { border:1px solid #dbe4f0; background:#f8fbff; border-radius:12px; padding:8px; text-align:left; cursor:pointer; display:flex; flex-direction:column; gap:4px; }
.calendar-item.confirmed { background:#ecfdf5; border-color:#bbf7d0; }
.calendar-item-title { font-size:12px; font-weight:700; color:#1f2937; }
.calendar-item-sub { font-size:11px; color:var(--muted); }
.calendar-phase-pill { background:#fff7ed; color:#9a3412; border-radius:999px; padding:4px 8px; font-size:11px; font-weight:700; }
.calendar-more { font-size:11px; color: var(--muted); }
.member-check-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:10px; margin-top:8px; }
.schedule-member-label { display:block; font-size:14px; color:#374151; margin-bottom:4px; }
.member-check { border:1px solid var(--line); border-radius:14px; padding:10px 12px; background:#fff; display:flex; gap:8px; align-items:center; cursor:pointer; }
.member-check.selected { border-color:#111827; background:#f8fafc; }
.member-check input { width:auto; margin:0; }
.phase-board { display:flex; flex-direction:column; gap:14px; }
.phase-days { display:grid; grid-template-columns: repeat(31, minmax(0, 1fr)); gap:4px; font-size:11px; color:var(--muted); text-align:center; margin-bottom:6px; }
.phase-row { border:1px solid var(--line); border-radius:16px; padding:12px; background:#fff; }
.phase-row-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:10px; }
.phase-row-sub { font-size:12px; color:var(--muted); margin-top:4px; }
.phase-track { display:grid; grid-template-columns: repeat(31, minmax(0, 1fr)); gap:4px; background:linear-gradient(to right, #f9fafb 0, #f9fafb 100%); }
.phase-bar { min-height:48px; border-radius:14px; padding:8px 10px; display:flex; flex-direction:column; justify-content:center; color:#111827; background:#e5e7eb; overflow:hidden; }
.phase-bar span { font-size:12px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.phase-bar small { font-size:10px; color:#374151; }
.phase-bar.status-planned { background:#dbeafe; }
.phase-bar.status-active { background:#fef3c7; }
.phase-bar.status-done { background:#dcfce7; }
.phase-bar.status-delay { background:#fee2e2; }
@media (max-width: 960px) {
  .member-check-grid { grid-template-columns: 1fr; }
  .calendar-weekdays, .calendar-grid { grid-template-columns: 1fr; }
  .calendar-cell { min-height: auto; }
  .phase-days, .phase-track { grid-template-columns: repeat(31, minmax(18px, 1fr)); overflow-x:auto; }
  .phase-row-head { flex-direction: column; }
}


.schedule-type-hidden { display:none !important; }
.schedule-type-hint { margin-top:-4px; }
.phase-project-block { border:1px solid var(--line); border-radius:18px; background:#fff; overflow:hidden; }
.phase-project-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 16px; background:#f8fafc; border-bottom:1px solid var(--line); }
.phase-project-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.phase-mini-chip { border-radius:999px; background:#eef2ff; color:#374151; padding:4px 10px; font-size:11px; font-weight:700; }
.phase-project-body { padding:14px 16px; display:flex; flex-direction:column; gap:12px; }
.phase-row.compact { padding:10px 12px; }
.phase-row.compact .phase-row-head { margin-bottom:8px; }
.phase-row.compact .note { margin-top:8px; }
.phase-toggle-btn[aria-expanded="true"] { background:#111827; color:#fff; border-color:#111827; }
.phase-select-btn { width:100%; border:0; background:transparent; padding:0; text-align:left; display:flex; flex-direction:column; gap:8px; cursor:pointer; }
.phase-row.selectable { padding:10px 12px; transition:box-shadow .15s ease, border-color .15s ease, background .15s ease; }
.phase-row.selectable.is-selected { border-color:#93c5fd; background:#f8fbff; box-shadow:0 0 0 1px rgba(59,130,246,.12); }
.phase-row-head.compact-only { margin-bottom:6px; align-items:center; }
.phase-detail-card { border:1px solid var(--line); border-radius:16px; background:#f8fafc; padding:14px; display:flex; flex-direction:column; gap:12px; }
.phase-detail-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.phase-detail-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.phase-detail-grid > div { border:1px solid var(--line); border-radius:12px; background:#fff; padding:10px 12px; display:flex; flex-direction:column; gap:4px; }
.phase-detail-grid span { font-size:11px; color:var(--muted); }
.phase-detail-empty { border:1px dashed var(--line); border-radius:14px; padding:12px; color:var(--muted); background:#fff; }
@media (max-width: 768px) {
  .phase-project-head { flex-direction:column; align-items:flex-start; }
  .phase-detail-head { flex-direction:column; }
  .phase-detail-grid { grid-template-columns:1fr; }
}


.calendar-item.type-rest { background:#fff7ed; border-color:#fed7aa; }
.calendar-item.type-delay { background:#fef2f2; border-color:#fecaca; }
.calendar-item.type-support { background:#eef2ff; border-color:#c7d2fe; }

.project-list-head {
  align-items: flex-start;
}

.project-status-summary-grid {
  margin-bottom: 4px;
}

.project-status-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.project-status-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
}

.project-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-status-title {
  margin: 0;
  font-size: 18px;
}

.project-status-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.project-status-side {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.project-status-body {
  padding: 0 14px 14px;
}

.project-status-inline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}


/* v5.10.17 report year/month folding + vehicle fuel summary */
.report-group.year-group {
  border-width: 2px;
}
.report-group.nested {
  margin: 8px 0 0;
  background: rgba(255, 255, 255, 0.72);
}
.report-group.nested .report-group-title {
  font-size: 1rem;
}
.fuel-vehicle-summary {
  margin-top: 6px;
}
.fuel-vehicle-summary .badge {
  margin-top: 4px;
}

/* v5.10.18-5.10.19 estimate import preview / save */
.estimate-import-card { border: 1px solid rgba(49, 130, 206, .18); }
.estimate-import-status { padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.estimate-import-status span { display:block; font-weight: 500; font-size: 12px; margin-top: 3px; }
.estimate-import-status.ok { background:#ecfdf3; color:#05603a; border:1px solid #abefc6; }
.estimate-import-status.warn { background:#fff7ed; color:#b54708; border:1px solid #fed7aa; }
.estimate-summary-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.summary-value.small-text { font-size: 15px; line-height: 1.35; word-break: break-word; }
.estimate-checkpoints { border:1px solid var(--line); background:#fafafa; border-radius:14px; padding:12px; }
.estimate-checkpoints ul, .message ul { margin: 8px 0 0; padding-left: 20px; }
.estimate-detail-fold { border:1px solid var(--line); border-radius:14px; background:#fff; padding:10px 12px; }
.estimate-detail-fold summary { cursor:pointer; font-weight:700; }
.table-scroll { overflow-x:auto; margin-top:10px; }
.estimate-table { width:100%; border-collapse: collapse; font-size:13px; min-width:560px; }
.estimate-table th, .estimate-table td { border-bottom:1px solid var(--line); padding:8px 6px; text-align:left; vertical-align:top; }
.estimate-table th { color:var(--muted); font-weight:700; background:#fafafa; }
.action-row.align-end { align-items:flex-end; justify-content:flex-start; height:100%; }
code { background:#f2f4f7; padding:1px 5px; border-radius:6px; }

/* v5.10.19 estimate plan project save */
.estimate-import-actions { border:1px solid rgba(21, 112, 239, .18); background:#eff8ff; border-radius:14px; padding:12px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.estimate-plan-brief { margin-top:10px; border:1px solid rgba(21,112,239,.18); background:#eff8ff; border-radius:12px; padding:10px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; font-size:13px; }
.estimate-plan-brief strong { color:#175cd3; margin-right:2px; }
.estimate-plan-brief span { background:#fff; border:1px solid rgba(21,112,239,.16); border-radius:999px; padding:4px 8px; }

/* v5.10.20 見積予定 vs 日報実績 */
.estimate-compare-card {
  margin-top: 10px;
  border: 1px solid rgba(21,112,239,.18);
  background: #f8fbff;
  border-radius: 14px;
  padding: 12px;
}
.estimate-compare-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.estimate-compare-head strong { color: #175cd3; }
.estimate-compare-grid {
  display: grid;
  grid-template-columns: minmax(86px, 1.2fr) repeat(3, minmax(78px, 1fr));
  gap: 6px;
  align-items: stretch;
}
.estimate-compare-header {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.estimate-compare-row { display: contents; }
.estimate-compare-row > span,
.estimate-compare-row > strong,
.estimate-compare-header > span {
  background: #fff;
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 9px;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.35;
}
.estimate-compare-label { font-weight: 700; color: #344054; }
@media (max-width: 720px) {
  .estimate-compare-grid { grid-template-columns: 1fr; }
  .estimate-compare-header { display: none; }
  .estimate-compare-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #fff;
    border: 1px solid rgba(16,24,40,.08);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 8px;
  }
  .estimate-compare-row > span,
  .estimate-compare-row > strong {
    border: 0;
    background: transparent;
    padding: 2px 0;
  }
  .estimate-compare-label {
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(16,24,40,.08) !important;
    padding-bottom: 5px !important;
  }
}

/* v5.10.21 見積予定 vs 実績 見やすさ修正版 */
.estimate-top-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin: 8px 0 10px;
}
.estimate-top-card {
  background: #fff;
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.estimate-top-card span,
.estimate-profit-grid span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.estimate-top-card strong { font-size: 17px; color: #101828; }
.estimate-top-card small,
.estimate-profit-grid small { color: #667085; font-size: 11px; line-height: 1.35; }
.estimate-profit-note {
  border: 1px dashed rgba(16,24,40,.16);
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.estimate-compare-subtitle {
  margin: 10px 0 6px;
  color: #344054;
  font-weight: 800;
  font-size: 13px;
}
.estimate-profit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
  margin: 6px 0 10px;
}
.estimate-profit-grid > div {
  background: #fff;
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.estimate-profit-grid strong { font-size: 16px; color: #101828; }
@media (max-width: 720px) {
  .estimate-top-grid,
  .estimate-profit-grid { grid-template-columns: 1fr 1fr; }
  .estimate-top-card strong,
  .estimate-profit-grid strong { font-size: 15px; }
}

/* v5.10.23 estimate alert display */
.estimate-alert-box {
  margin: 10px 0 12px;
  border: 1px solid rgba(217, 45, 32, .18);
  background: #fff8f6;
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.estimate-alert-box.ok {
  border-color: rgba(22, 163, 74, .18);
  background: #f6fef9;
}
.estimate-alert-title {
  font-weight: 800;
  color: #344054;
  font-size: 13px;
}
.estimate-alert-item {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
}
.estimate-alert-item strong { font-size: 13px; }
.estimate-alert-item span { color: #667085; font-size: 12px; line-height: 1.4; }
.estimate-alert-item.danger { border-color: rgba(217, 45, 32, .24); background: #fff7f7; }
.estimate-alert-item.danger strong { color: #b42318; }
.estimate-alert-item.warn { border-color: rgba(245, 158, 11, .28); background: #fffbeb; }
.estimate-alert-item.warn strong { color: #b45309; }
.estimate-alert-item.ok { border-color: rgba(22, 163, 74, .24); background: #f0fdf4; }
.estimate-alert-item.ok strong { color: #067647; }

/* v5.10.27 attendance calendar */
.attendance-table { display:flex; flex-direction:column; gap:8px; }
.attendance-row { display:grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap:10px; align-items:center; border:1px solid var(--line); border-radius:14px; padding:10px 12px; background:#fff; font-size:14px; }
.attendance-row-strong { grid-template-columns: 1.35fr repeat(6, minmax(0, .9fr)); }
.attendance-row-warn { border-color:rgba(245, 158, 11, .32); background:#fffbeb; }
.attendance-inline-note { display:block; margin-top:3px; color:#b45309; font-size:11px; font-weight:700; }
.attendance-head { background:#111827; color:#fff; font-weight:700; }
.attendance-item { cursor:default; }
@media (max-width: 960px) {
  .attendance-row { grid-template-columns: 1fr; }
}

.inventory-movement-item .mini-note { margin-top: 8px; }


/* v5.10.35 version display / cache refresh */
.app-version-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.version-refresh-btn {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.version-refresh-btn:disabled { opacity: .65; cursor: wait; }
@media (max-width: 720px) {
  .topbar { align-items: stretch; }
  .top-actions { justify-content: flex-start; }
  .app-version-chip,
  .version-refresh-btn { font-size: 11px; padding: 6px 9px; }
}

/* v5.10.37 attendance daily list and participant labor limit */
.participant-labor-card { align-items:stretch; flex-direction:column; gap:8px; }
.participant-check-row { display:flex; align-items:center; gap:8px; font-weight:700; }
.participant-labor-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.participant-labor-row span { color:var(--muted); font-size:13px; }
.participant-labor-row select { min-width:110px; padding:8px 10px; border-radius:12px; font-size:14px; }
.participant-labor-row select:disabled { opacity:.55; background:#f8fafc; }
@media (max-width:720px) { .participant-labor-row select { min-width:120px; } }

.attendance-daily-list { display:flex; flex-direction:column; gap:10px; }
.attendance-day-card { border:1px solid var(--line); border-radius:16px; background:#fff; overflow:hidden; }
.attendance-day-head { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 12px; background:#f8fafc; border-bottom:1px solid var(--line); }
.attendance-day-lines { display:flex; flex-direction:column; }
.attendance-day-line { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 12px; border-top:1px solid #eef2f7; }
.attendance-day-line:first-child { border-top:0; }
.attendance-day-line div:first-child { display:flex; flex-direction:column; gap:2px; }
.attendance-day-line span { color:var(--muted); font-size:12px; }
@media (max-width:720px) { .attendance-day-head, .attendance-day-line { align-items:flex-start; flex-direction:column; } }

/* v5.10.37 attendance summary bundle */
.attendance-check-list { display:flex; flex-direction:column; gap:10px; }
.attendance-check-card { border:1px solid var(--line); border-radius:16px; background:#fff; padding:10px 12px; display:grid; gap:8px; }
.attendance-check-card.warn { border-color:rgba(245,158,11,.32); background:#fffbeb; }
.attendance-check-head { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.attendance-check-line { display:grid; grid-template-columns: 110px 1fr; gap:8px; align-items:start; font-size:13px; }
.attendance-check-line strong { color:#111827; }
.attendance-check-line span { color:var(--muted); line-height:1.5; }
@media (max-width:960px) { .attendance-row-strong { grid-template-columns:1fr; } }
@media (max-width:720px) { .attendance-check-head, .attendance-check-line { display:flex; flex-direction:column; align-items:flex-start; } }

/* v5.10.38 attendance jump navigation */
html { scroll-behavior: smooth; }
.attendance-jump-nav {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin:10px 0 6px;
}
.attendance-jump-nav .btn,
.attendance-back-top .btn {
  text-decoration:none;
}
.attendance-back-top {
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
}
#attendanceStaffSummarySection,
#attendanceMissingSection,
#attendanceDailySection,
#attendanceTop {
  scroll-margin-top: 18px;
}
@media (max-width:720px) {
  .attendance-jump-nav {
    display:grid;
    grid-template-columns: 1fr;
  }
  .attendance-jump-nav .btn {
    justify-content:center;
  }
  .attendance-back-top {
    justify-content:stretch;
  }
  .attendance-back-top .btn {
    width:100%;
    justify-content:center;
  }
}

/* v5.10.39 attendance export controls */
.attendance-export-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* v5.10.40 attendance staff summary labels */
.attendance-row-labeled .attendance-cell-label { display:block; color:var(--muted); font-size:11px; font-weight:800; line-height:1.2; margin-bottom:3px; }
.attendance-row-labeled .attendance-metric strong,
.attendance-row-labeled .attendance-staff-name strong { font-size:14px; color:#111827; }
.attendance-row-labeled .attendance-metric { min-width:0; }
.attendance-row-labeled .attendance-staff-name { min-width:0; }
.attendance-table-labeled .attendance-head { display:none; }
@media (min-width:961px) {
  .attendance-table-labeled .attendance-head { display:grid; }
  .attendance-table-labeled .attendance-head + .attendance-row-labeled { margin-top:0; }
}


/* v5.10.41 attendance monthly confirmation */
.attendance-confirm-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f9fafb;
}
.attendance-confirm-card.confirmed { border-color: #86efac; background: #f0fdf4; }
.attendance-confirm-card.changed { border-color: #fbbf24; background: #fffbeb; }
.attendance-confirm-card.unconfirmed { border-color: #cbd5e1; }
.warn-text { color: #92400e; font-weight: 700; }
@media (max-width: 760px) {
  .attendance-confirm-card { flex-direction: column; align-items: flex-start; }
  .attendance-confirm-card .btn { width: 100%; }
}


/* v5.10.43 inventory navigation, filters and pagination */
.inventory-history-controls { display:grid; grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) minmax(170px,1fr) auto; gap:8px; align-items:end; margin-bottom:10px; }
.inventory-page-size { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.inventory-page-size span { font-size:12px; color:var(--muted); font-weight:700; }
.inventory-page-size select { min-width:78px; }
.inventory-history-count-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.inventory-location-jump-nav { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.inventory-group { scroll-margin-top:18px; overflow:hidden; }
.inventory-group-toggle { width:100%; border:0; background:transparent; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:4px 2px 12px; text-align:left; cursor:pointer; color:inherit; }
.inventory-group-toggle span:first-child { display:flex; flex-direction:column; gap:3px; }
.inventory-group-toggle small { color:var(--muted); font-weight:700; }
.inventory-group-toggle-icon { width:30px; height:30px; border-radius:999px; background:#eef2f7; display:grid; place-items:center; font-size:20px; font-weight:800; }
.inventory-attention { border-color:#f59e0b; background:#fffbeb; }
.attention-badge { background:#fef3c7 !important; color:#92400e !important; border-color:#f59e0b !important; }
#inventoryAttentionToggle.active { background:#f59e0b; color:#fff; border-color:#f59e0b; }
@media (max-width:900px) { .inventory-history-controls { grid-template-columns:1fr 1fr; } }
@media (max-width:620px) { .inventory-history-controls { grid-template-columns:1fr; } .inventory-history-count-row { align-items:stretch; flex-direction:column; } .inventory-history-count-row .row .btn { flex:1; justify-content:center; } .inventory-location-jump-nav .btn { flex:1 1 46%; justify-content:center; } }

/* v5.12.12 privacy-safe diagnostics */
.diagnostics-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.58);
}
.diagnostics-modal {
  width: min(720px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.28);
}
.diagnostics-header { align-items: flex-start; }
.diagnostics-privacy { margin-bottom: 12px; border-color: #86efac; background: #f0fdf4; }
.diagnostics-output {
  min-height: 220px;
  max-height: 50vh;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid #86efac;
  border-radius: 16px;
  background: #f0fdf4;
  color: #111827;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.diagnostics-actions { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width:620px) {
  .diagnostics-modal { padding: 16px; }
  .diagnostics-actions { grid-template-columns: 1fr; }
  .diagnostics-actions .btn { width: 100%; }
}
