:root {
  color-scheme: light;
  --blue: #1677c8;
  --cyan: #4dbbd8;
  --line: #d8e0e6;
  --text: #18222b;
  --muted: #667684;
  --bg: #f5f7f9;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.mobile-shell {
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
}

.panel {
  display: none;
  padding: 24px 18px 96px;
}

.panel.active {
  display: block;
}

h1 {
  margin: 52px 0 42px;
  text-align: center;
  font-size: 34px;
  font-weight: 700;
}

h2 {
  margin: 0;
  font-size: 20px;
}

h3 {
  margin: 28px -18px 14px;
  padding: 12px 18px;
  background: linear-gradient(90deg, #547c93, #2e4f60);
  color: #fff;
  font-size: 18px;
}

label {
  display: block;
  margin: 14px 0;
  font-size: 16px;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  background: #fff;
}

.invalid {
  border-color: #d93025;
  box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.12);
}

textarea {
  resize: vertical;
}

button,
.admin-head a,
.topbar a {
  min-height: 44px;
  border: 0;
  border-radius: 24px;
  padding: 0 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.link-button {
  width: auto;
  color: #fff;
  background: #546575;
}

.login-tip {
  margin: -22px 0 28px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.public-project-badge {
  margin: -28px 0 30px;
  padding: 9px 12px;
  border: 1px solid #b8d8eb;
  border-radius: 7px;
  background: #eef8fd;
  color: #175f8e;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.qr-panel .public-project-badge {
  margin: 0 0 16px;
}

.site-compliance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 28px;
  padding: 18px 16px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.site-compliance a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.site-compliance a:hover {
  color: var(--blue);
}

.site-compliance img {
  width: 18px;
  height: 20px;
  flex: 0 0 auto;
}

.primary {
  width: 100%;
  margin-top: 22px;
  color: #fff;
  background: var(--blue);
}

.secondary {
  width: 100%;
  margin-top: 16px;
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--blue);
}

.add {
  width: 100%;
  color: #063;
  background: #14e884;
}

.member,
.plot {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.upload-grid label,
.upload-line {
  padding: 10px;
  border: 1px dashed #9eb8c9;
  border-radius: 8px;
  background: #f8fbfd;
}

.attachment-summary,
.pending-summary,
.small-note {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.attachment-summary a {
  color: var(--blue);
  font-weight: 700;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}

.checks label {
  margin: 6px 0;
  font-size: 14px;
}

.checks input {
  width: auto;
  margin-right: 6px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 8px;
  margin: -24px -18px 18px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.top-action {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 19px;
  color: #fff;
  background: var(--cyan);
  font-size: 14px;
  white-space: nowrap;
}

.icon {
  min-height: 40px;
  padding: 0;
  border-radius: 20px;
  background: transparent;
  font-size: 42px;
  line-height: 1;
}

.actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 28px -18px -96px;
  padding: 14px 18px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
}

.actions button {
  margin: 0;
}

.msg {
  min-height: 22px;
  color: var(--muted);
}

.msg.error-msg,
.msg.success-msg {
  min-height: auto;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  line-height: 1.45;
  font-weight: 700;
}

.msg.error-msg {
  border: 1px solid #d93025;
  background: #fff1f0;
  color: #a42319;
}

.msg.success-msg {
  border: 1px solid #8ec7a5;
  background: #f0fff5;
  color: #1f6b3b;
}

.save-toast {
  position: fixed;
  left: 50%;
  top: 14px;
  z-index: 20;
  width: min(520px, calc(100vw - 28px));
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(24, 34, 43, 0.22);
  font-weight: 800;
  line-height: 1.45;
  transform: translate(-50%, -130%);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.save-toast.success,
.save-toast.error {
  transform: translate(-50%, 0);
  opacity: 1;
}

.save-toast.success {
  border: 1px solid #6fbd8b;
  background: #eafff1;
  color: #176237;
}

.save-toast.error {
  border: 1px solid #d93025;
  background: #fff1f0;
  color: #a42319;
}

.admin-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

.login-shell,
.qr-shell {
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
}

.login-card,
.qr-panel {
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.login-card h1 {
  margin: 18px 0 30px;
}

.admin-head,
.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.admin-head h1 {
  margin: 0;
  text-align: left;
  font-size: 28px;
}

.admin-head a {
  display: inline-flex;
  align-items: center;
  color: #fff;
  background: var(--blue);
}

.admin-head-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.admin-head-actions a,
.admin-head-actions button {
  white-space: nowrap;
}

.project-switcher {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, auto) auto auto;
  gap: 10px;
  align-items: end;
  margin: 16px 0 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.project-switcher label {
  margin: 0;
}

.project-switcher label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.project-switcher select {
  margin: 0;
}

.project-switcher > a,
.project-switcher > .project-region {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  border-radius: 7px;
  text-decoration: none;
}

.project-switcher > a {
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}

.project-region {
  border: 1px solid var(--line);
  color: var(--text);
  background: #f8fbfd;
}

.project-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.project-form-grid label {
  margin: 0;
}

.project-form-grid .wide {
  grid-column: 1 / -1;
}

.status-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.version-badge {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 10px;
}

.stat-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stat-card b {
  display: block;
  font-size: 24px;
}

.stat-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.search-row {
  margin: 22px 0;
}

.search-row input {
  margin: 0;
}

.search-row button {
  width: 120px;
  margin: 0;
}

.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.filter-note {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: -8px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.filter-note a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.batch-action-bar {
  display: grid;
  grid-template-columns: auto auto 150px minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.batch-action-bar select,
.batch-action-bar input {
  margin: 0;
}

.batch-action-bar .msg {
  grid-column: 1 / -1;
  margin: 0;
}

.template-chip-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.template-chip-row span {
  color: var(--muted);
  font-size: 13px;
}

.template-chip-row button {
  width: auto;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 10px;
  color: var(--blue);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.batch-preview-panel {
  margin: -4px 0 16px;
}

.batch-preview-head,
.batch-preview-actions,
.batch-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.batch-preview-head h2 {
  margin: 0 0 4px;
}

.batch-preview-head p,
.batch-preview-panel p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.5;
}

.batch-preview-summary {
  justify-content: flex-start;
  margin: 10px 0;
}

.batch-preview-summary span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 15px;
  background: #edf5fb;
  color: #17679c;
  font-size: 13px;
  font-weight: 700;
}

.batch-preview-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.batch-preview-table {
  min-width: 900px;
  border: 0;
}

.batch-preview-table th,
.batch-preview-table td {
  vertical-align: top;
}

.batch-preview-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.target-pill {
  background: #e8f7ef;
  color: #1f7a46;
}

.batch-preview-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.batch-history-panel {
  margin: -4px 0 16px;
}

.batch-history-head,
.batch-history-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.batch-history-head h2 {
  margin: 0 0 4px;
}

.batch-history-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.batch-history-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.batch-history-item b,
.batch-history-item small {
  display: block;
}

.batch-history-item small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.activity-filters {
  display: grid;
  grid-template-columns: 180px 200px 1fr 120px;
  gap: 12px;
  align-items: end;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.activity-filters label {
  margin: 0;
}

.rename-form {
  display: grid;
  min-width: 260px;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.rename-form input {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  background: #eaf1f6;
}

td a {
  color: var(--blue);
  font-weight: 700;
  margin-right: 10px;
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 14px;
  background: #edf5fb;
  color: #17679c;
  font-weight: 700;
}

.priority-1 {
  background: #fdeeee;
  color: #b3261e;
}

.priority-2 {
  background: #fff4df;
  color: #8a4f00;
}

.priority-3 {
  background: #edf5fb;
  color: #17679c;
}

.issue-cell {
  min-width: 180px;
  white-space: normal;
}

.issue-count {
  display: block;
  color: #b3261e;
}

.issue-cell small {
  display: block;
  max-width: 260px;
  color: var(--muted);
  line-height: 1.45;
}

.ok-mark {
  color: #1f7a46;
  font-weight: 700;
}

.detail-panel {
  margin-top: 20px;
}

.detail-section {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-section h2 {
  margin-bottom: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-grid div {
  padding: 10px;
  border-radius: 6px;
  background: #f5f8fa;
}

.detail-grid b {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.detail-grid span {
  display: block;
  margin-top: 4px;
  word-break: break-all;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.attachment-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  color: var(--text);
  background: #f8fbfd;
  text-decoration: none;
}

.attachment-card img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #eef3f6;
}

.attachment-card span,
.attachment-card small {
  display: block;
  padding: 8px 10px;
}

.attachment-file {
  padding: 12px;
}

.muted {
  color: var(--muted);
}

.import-conflict-note {
  padding: 10px 12px;
  border-left: 4px solid #d97706;
  color: #7c3512;
  background: #fff4e8;
}

.import-conflict-table {
  margin-bottom: 16px;
  overflow-x: auto;
}

.inline-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 16px;
  border-radius: 20px;
  color: #fff;
  background: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.button-action {
  width: auto;
  margin: 0;
  border: 0;
}

.secondary-action {
  color: var(--blue);
  border: 1px solid var(--blue);
  background: #fff;
}

.backup-action {
  background: #1f7a46;
}

.file-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin: 0;
  padding: 0 16px;
  border: 1px dashed #8aa5b6;
  border-radius: 20px;
  color: var(--text);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.file-action input {
  display: none;
}

.small-action {
  width: auto;
  margin-top: 0;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.row-actions a,
.row-actions button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--blue);
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.row-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.plain-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.qr-code-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.qr-code-wrap img {
  width: min(100%, 360px);
  height: auto;
  image-rendering: pixelated;
}

.warning-note {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid #f2c94c;
  border-radius: 8px;
  background: #fff8df;
  color: #7a4f00;
  line-height: 1.5;
}

.lan-options {
  display: grid;
  gap: 8px;
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.lan-options b,
.lan-options span {
  display: block;
}

.lan-options span {
  color: var(--muted);
  font-size: 14px;
}

.lan-options button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--blue);
  border-radius: 20px;
  background: #fff;
  color: var(--blue);
  text-align: left;
  font-size: 14px;
  word-break: break-all;
}

.check-list {
  margin: 0;
  padding-left: 20px;
}

.check-list li {
  margin: 8px 0;
  line-height: 1.5;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.review-save {
  max-width: 220px;
}

.admin-edit-section {
  border-left: 4px solid var(--blue);
}

.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-edit-grid label {
  margin: 0;
}

.admin-edit-grid .wide {
  grid-column: span 2;
}

.edit-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.edit-block-head .plain-title {
  margin: 0;
}

.edit-table-wrap {
  overflow-x: auto;
  margin: 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.edit-table {
  min-width: 980px;
  border: 0;
}

.plot-edit-table {
  min-width: 1580px;
}

.edit-table th,
.edit-table td {
  padding: 8px;
  vertical-align: middle;
}

.edit-table input,
.edit-table select {
  min-width: 110px;
  margin: 0;
  padding: 8px 9px;
  border-radius: 6px;
  font-size: 14px;
}

.edit-table .id-input {
  min-width: 190px;
}

.edit-table .code-input {
  min-width: 130px;
}

.edit-table .small-field,
.edit-table .area-input {
  min-width: 92px;
}

.edit-table input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
}

.inline-danger {
  width: auto;
  min-height: 32px;
  border: 1px solid #d93025;
  border-radius: 16px;
  padding: 0 10px;
  color: #b3261e;
  background: #fff;
  font-size: 13px;
}

.plain-title {
  margin: 22px 0 10px;
  padding: 0;
  color: var(--text);
  background: transparent;
  font-size: 18px;
}

.hidden {
  display: none;
}

.batch-list {
  overflow-x: auto;
}

.workstation-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid #1f7a46;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.workstation-note b {
  color: var(--text);
}

.quality-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.quality-tabs button {
  width: auto;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  color: var(--text);
}

.quality-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.quality-reason {
  min-width: 240px;
  max-width: 420px;
  white-space: normal;
  line-height: 1.5;
}

.status-pill.mapped {
  background: #e8f5ee;
  color: #17623a;
}

.status-pill.unmapped {
  background: #f2f4f7;
  color: var(--muted);
}

.plot-map-wrap {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, 280px);
  gap: 14px;
  align-items: stretch;
}

.plot-map {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.plot-map-bg {
  fill: #f8fafc;
  stroke: none;
}

.plot-boundary {
  fill: rgba(31, 122, 70, 0.14);
  stroke: #1f7a46;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.boundary-1 {
  fill: rgba(37, 99, 235, 0.12);
  stroke: #2563eb;
}

.boundary-2 {
  fill: rgba(217, 119, 6, 0.12);
  stroke: #b45309;
}

.boundary-3 {
  fill: rgba(190, 24, 93, 0.1);
  stroke: #be185d;
}

.boundary-4 {
  fill: rgba(79, 70, 229, 0.1);
  stroke: #4f46e5;
}

.plot-map-meta {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  line-height: 1.5;
}

.plot-map-meta b {
  color: var(--text);
}

.plot-map-meta small {
  overflow-wrap: anywhere;
}

.correction-search-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px) 120px 100px;
}

.precheck-search-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px) 150px 100px 90px;
}

.issue-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.issue-chip-list span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}

.issue-chip-list b {
  color: #b3261e;
}

.task-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.task-type-card {
  width: 100%;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.task-type-card b,
.task-type-card span {
  display: block;
}

.task-type-card span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.task-type-card.active {
  border-color: var(--blue);
  background: #edf6ff;
}

.template-editor-list {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.template-editor-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.template-editor-row label {
  margin: 0;
}

.template-editor-actions {
  display: flex;
  gap: 8px;
}

.template-editor-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  color: var(--text);
}

.progress-cell {
  display: grid;
  min-width: 130px;
  gap: 5px;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 5px;
  background: #e2edf3;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1f7a46;
}

.progress-cell b {
  color: #1f7a46;
  font-size: 13px;
}

.report-text {
  min-height: 180px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 44px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
}

.pagination-actions {
  display: flex;
  gap: 6px;
}

.pagination-actions button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 18px;
}

.pagination-actions button:disabled {
  cursor: default;
  opacity: 0.42;
}

.empty-table-state {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .row2,
  .actions,
  .checks,
  .review-grid,
  .admin-edit-grid {
    grid-template-columns: 1fr;
  }

  .admin-edit-grid .wide {
    grid-column: auto;
  }

  .admin-shell {
    padding: 14px;
  }

  .admin-head,
  .admin-head-actions,
  .search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-head-actions {
    flex: none;
  }

  .project-switcher,
  .project-form-grid {
    grid-template-columns: 1fr;
  }

  .project-form-grid .wide {
    grid-column: auto;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .activity-filters {
    grid-template-columns: 1fr;
  }

  .batch-action-bar {
    grid-template-columns: 1fr;
  }

  .rename-form {
    grid-template-columns: 1fr;
  }

  .correction-search-row {
    grid-template-columns: 1fr;
  }

  .precheck-search-row {
    grid-template-columns: 1fr;
  }

  .template-editor-row {
    grid-template-columns: 1fr;
  }

  .template-editor-actions {
    flex-wrap: wrap;
  }

  .plot-map-wrap {
    grid-template-columns: 1fr;
  }

  .plot-map {
    min-height: 220px;
  }

  .pagination-bar {
    justify-content: space-between;
  }
}
