:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f8f8f6;
  --ink: #111827;
  --muted: #68727f;
  --line: #e2e4e7;
  --accent: #08785f;
  --accent-strong: #06624f;
  --warning: #f8b400;
  --success: #8bc34a;
  --info: #a7c7e7;
  --neutral: #dadada;
  --danger: #b42318;
  --shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI Variable Text", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1480px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: none;
}

.eyebrow {
  display: none;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy {
  margin: 6px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.page-tabs {
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 6px 6px;
  background: #fff;
}

.page-tab {
  position: relative;
  padding: 14px 0 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.page-tab:hover {
  transform: none;
  box-shadow: none;
}

.page-tab.is-active {
  background: transparent;
  color: var(--accent);
}

.page-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.summary-card,
.board-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}

.summary-card {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 84px;
  padding: 14px 20px;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.summary-card:last-child {
  border-right: none;
}

.summary-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.summary-value {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.summary-detail {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.summary-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.summary-breakdown span {
  color: var(--muted);
  font-weight: 600;
}

.map-card {
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.map-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.map-head h2 {
  margin: 0 0 5px;
  font-size: 1.02rem;
}

.map-head p,
.map-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 260px;
}

.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.map-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.16);
}

.location-map {
  height: 310px;
  background:
    linear-gradient(135deg, rgba(8, 120, 95, 0.08), rgba(248, 180, 0, 0.08)),
    #eef2ee;
}

.map-status {
  padding: 9px 20px 12px;
  border-top: 1px solid var(--line);
}

.map-pin {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.28);
}

.map-pin::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
}

.map-pin-success,
.map-dot-success {
  background: #18a058;
}

.map-pin-warning,
.map-dot-warning {
  background: #f2b705;
}

.map-pin-danger,
.map-dot-danger {
  background: #d43f3a;
}

.map-popup {
  min-width: 210px;
}

.map-popup strong {
  display: block;
  margin-bottom: 6px;
}

.map-popup-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-popup-list li {
  padding: 6px 0;
  border-top: 1px solid #edf0ed;
}

.map-popup-list span {
  display: block;
  color: #111827;
  font-weight: 700;
}

.map-popup-list small {
  display: block;
  margin-top: 2px;
  color: #68727f;
}

.board-card {
  overflow: hidden;
}

.page-watermark {
  margin: 10px 0 0;
  padding: 6px 2px 0;
  color: rgba(17, 24, 39, 0.34);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
}

.page-watermark strong {
  color: rgba(17, 24, 39, 0.58);
  font-weight: 800;
  text-transform: none;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 20px 12px;
}

.board-head h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.board-head p {
  margin: 0;
  color: var(--muted);
  max-width: 820px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  padding: 0 20px 14px;
  background: #fff;
}

.filter-bar label {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.filter-bar .search-filter {
  flex: 1 1 260px;
  min-width: 220px;
}

.filter-bar span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.filter-bar select,
.filter-bar input {
  height: 34px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
}

.filter-bar input {
  width: 100%;
  padding: 0 11px;
}

.filter-bar input::placeholder {
  color: #9aa3af;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(13, 110, 110, 0.45);
  outline: 2px solid rgba(13, 110, 110, 0.12);
  outline-offset: 0;
}

.filter-bar select:disabled {
  color: #9ca3af;
  background: #f6f7f8;
}

.filter-reset-button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 700;
}

.filter-reset-button:hover {
  background: #f2f5f4;
}

.entry-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
}

.entry-form-modal {
  padding: 0;
}

.entry-form label {
  display: grid;
  gap: 8px;
}

.entry-form span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.entry-form input,
.entry-form textarea,
.entry-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}

.entry-form textarea {
  resize: vertical;
}

.entry-form .field-wide {
  grid-column: span 2;
}

.entry-actions {
  display: flex;
  align-items: end;
}

.add-row-bar {
  display: flex;
  justify-content: center;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(246, 244, 238, 0.4), #ffffff);
}

.add-row-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.add-row-button:hover {
  transform: none;
  background: rgba(8, 120, 95, 0.06);
  box-shadow: none;
}

.table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line);
  scrollbar-gutter: stable;
}

.progress-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.progress-table th,
.progress-table td {
  border: 1px solid var(--line);
  padding: 5px 4px;
  text-align: center;
  vertical-align: middle;
  font-size: 0.7rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.progress-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f5f1;
  font-size: 0.68rem;
  line-height: 1.12;
}

.progress-table thead .sub-label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
}

.header-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-height: 24px;
  padding: 2px 2px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1.1;
}

.header-filter:hover {
  border-color: var(--line);
  background: #fff;
}

.header-filter em {
  color: inherit;
  font-style: normal;
  font-size: 0.75rem;
  line-height: 1;
}

.header-filter.is-active {
  border-color: rgba(8, 120, 95, 0.22);
  background: rgba(8, 120, 95, 0.08);
  color: var(--accent-strong);
}

.header-filter.is-unchecked {
  border-color: #d1d5db;
  background: #fff;
  color: #4b5563;
}

.progress-table td.address-cell,
.progress-table td.spbu-name-cell,
.progress-table td.remarks-cell {
  text-align: left;
  line-height: 1.28;
}

.progress-table td.spbu-name-cell {
  font-weight: 700;
  color: #1f2937;
}

.progress-table td.remarks-cell {
  padding: 5px 6px;
}

.progress-table .empty-row {
  padding: 22px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  background: #fafbf9;
}

.address-cell-wrap {
  display: grid;
  gap: 6px;
  align-items: start;
}

.address-line {
  white-space: pre-line;
}

.maps-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(13, 110, 110, 0.12);
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
}

.maps-link:hover {
  background: rgba(13, 110, 110, 0.18);
  text-decoration: none;
}

.progress-table td.progress-cell {
  min-width: 104px;
}

.progress-table tbody tr:nth-child(even) {
  background: #fbfbf8;
}

.progress-table tbody tr.status-not-interested {
  background: rgba(180, 35, 24, 0.15) !important;
  opacity: 0.85;
}

.checkpoint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkpoint-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.checkpoint-trigger:hover {
  transform: none;
  box-shadow: none;
}

.checkpoint-trigger.has-files {
  background: transparent;
}

.checkpoint-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1.5px solid #a5adb7;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
  opacity: 1;
  position: relative;
}

.checkpoint-toggle::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 4px;
  height: 7px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  border-radius: 1px;
  transform: rotate(45deg) scale(0.75);
  transform-origin: center;
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}

.checkpoint-toggle.is-checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: none;
}

.checkpoint-toggle.is-checked::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

.evidence-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.evidence-trigger:hover {
  transform: translateY(-1px);
  background: var(--surface-2);
}

.evidence-trigger.has-files {
  background: rgba(13, 110, 110, 0.14);
  border-color: rgba(13, 110, 110, 0.35);
}

.remarks-badge {
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 7px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  line-height: 1.3;
  color: var(--ink);
  transition: background 160ms ease, border-color 160ms ease;
}

.remarks-badge:hover {
  text-decoration: none;
  border-color: rgba(13, 110, 110, 0.28);
}

.remarks-warning {
  background: #fff1c2;
  border-color: #efd27b;
  color: #5f4300;
}

.remarks-success {
  background: #dff1c7;
  border-color: #b7dc89;
  color: #254d12;
}

.remarks-info {
  background: #dceeff;
  border-color: #afd3f5;
  color: #12445f;
}

.remarks-neutral {
  background: #f3f4f1;
  border-color: #d9ded5;
  color: #384235;
}

.progress-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 6px;
  align-items: center;
}

.progress-pill {
  display: grid;
  gap: 5px;
}

.progress-pill strong {
  font-size: 0.76rem;
}

.progress-track {
  overflow: hidden;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(13, 110, 110, 0.12);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.row-menu-button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 1px;
}

.row-menu-button:hover {
  background: #f0f2f4;
  color: var(--accent-strong);
}

.primary-button,
.ghost-button,
.danger-button,
.link-button,
.icon-button {
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.primary-button,
.ghost-button,
.danger-button {
  padding: 10px 14px;
  font-weight: 700;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.ghost-button {
  background: #f2f5f4;
  color: var(--accent-strong);
}

.danger-button {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: #f2f5f4;
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.icon-button {
  width: 40px;
  height: 40px;
  background: rgba(13, 110, 110, 0.08);
  color: var(--accent-strong);
  font-size: 1.5rem;
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.link-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.evidence-dialog {
  width: min(680px, calc(100vw - 24px));
  border: none;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18);
}

.evidence-dialog::backdrop {
  background: rgba(20, 26, 35, 0.4);
  backdrop-filter: blur(4px);
}

.dialog-panel {
  margin: 0;
  padding: 18px;
  background: var(--surface);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dialog-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.dialog-head h3,
.dialog-panel h4 {
  margin: 0;
}

.dialog-meta,
.upload-hint,
.evidence-meta {
  color: var(--muted);
}

.upload-box {
  margin: 16px 0 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.upload-label {
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 700;
}

.upload-status {
  min-height: 22px;
  margin: 12px 0 0;
  padding: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: normal;
  word-wrap: break-word;
  border-radius: 8px;
}

.upload-status.is-error {
  color: var(--danger);
  background-color: rgba(180, 35, 24, 0.08);
  border-left: 3px solid var(--danger);
  padding: 12px;
}

.upload-status.is-success {
  color: #238636;
  background-color: rgba(139, 195, 74, 0.08);
  border-left: 3px solid #238636;
  padding: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 18px;
}

.dialog-actions-between {
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 0;
}

.remarks-history-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.remark-history-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.remark-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.remark-history-date {
  font-size: 0.92rem;
}

.remark-history-tone {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(13, 110, 110, 0.08);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.remark-history-text {
  margin: 0;
  line-height: 1.6;
}

.remarks-form-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.remarks-form-grid label {
  display: grid;
  gap: 8px;
}

.remarks-form-grid span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.evidence-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.evidence-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.evidence-name {
  display: block;
  margin-bottom: 4px;
}

.evidence-actions {
  display: flex;
  gap: 10px;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 18px;
  }

  .hero {
    flex-direction: column;
    padding: 22px;
  }

  .board-head {
    padding: 18px 18px 14px;
  }

  .map-head {
    flex-direction: column;
    padding: 14px 18px;
  }

  .map-legend {
    justify-content: flex-start;
    min-width: 0;
  }

  .location-map {
    height: 260px;
  }

  .page-tabs {
    overflow: auto;
    padding-bottom: 4px;
  }

  .entry-form {
    grid-template-columns: 1fr;
    padding: 0 18px 18px;
  }

  .entry-form-modal {
    padding: 0;
  }

  .entry-form .field-wide {
    grid-column: span 1;
  }

  .dialog-panel {
    padding: 18px;
  }

  .evidence-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .dialog-actions-between {
    flex-direction: column;
    align-items: stretch;
  }
}
