/* src/styles.css */
:root {
  color-scheme: light;
  --bg: #f4efe6;
  --panel: #fffdf8;
  --line: #dfd3c1;
  --text: #1d1a16;
  --muted: #726657;
  --brand: #b64926;
  --brand-deep: #8e3418;
  --soft: #efe3d2;
  --shadow: 0 18px 40px rgba(92, 63, 26, 0.12);
  font-family:
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(
      circle at top,
      rgba(255, 255, 255, 0.7),
      transparent 30%),
    linear-gradient(
      180deg,
      #f7f1e6 0%,
      #efe5d4 100%);
  color: var(--text);
}
button,
input,
textarea,
select {
  font: inherit;
}
#app {
  min-height: 100vh;
}
.screen {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.login-grid {
  display: grid;
  gap: 16px;
}
.login-error {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fbe9e1;
  border: 1px solid rgba(169, 66, 29, 0.28);
  color: #a9421d;
  font-size: 14px;
  line-height: 1.5;
}
.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(145, 122, 88, 0.16);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero-card {
  padding: 24px;
  margin-bottom: 16px;
}
.panel {
  padding: 18px;
}
.nested-panel {
  padding: 16px;
  border-radius: 18px;
  box-shadow: none;
}
.stack {
  display: grid;
  gap: 14px;
}
.compact-stack {
  gap: 10px;
}
.mini-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.page-path {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(145, 122, 88, 0.18);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}
.page-path-link {
  color: var(--brand-deep);
  text-decoration: none;
  font-weight: 700;
}
.page-path-link:hover {
  text-decoration: underline;
}
.page-path-current {
  color: var(--text);
  font-weight: 700;
}
.page-path-separator {
  color: var(--muted);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.15;
}
h2 {
  font-size: 20px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.stage-note {
  color: var(--brand-deep);
  font-style: italic;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.field {
  display: grid;
  gap: 8px;
}
.field-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.field-row span {
  margin: 0;
}
.dynamic-list {
  display: grid;
  gap: 10px;
}
.dynamic-list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.combo-field {
  position: relative;
}
.combo-field input {
  padding-right: 52px;
}
.combo-trigger {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(182, 73, 38, 0.08);
  color: var(--brand-deep);
  cursor: pointer;
}
.combo-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(145, 122, 88, 0.2);
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}
.combo-option {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  background: #f8f1e6;
  color: var(--text);
  cursor: pointer;
}
.combo-option:hover {
  background: #efe3d2;
}
.action-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.wrap-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.field span {
  font-size: 14px;
  font-weight: 600;
}
.field-tip {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.field input,
.field textarea,
.select-field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
}
.field textarea {
  resize: vertical;
}
.primary-button,
.ghost-button,
.nav-button {
  border: none;
  border-radius: 16px;
  min-height: 52px;
  padding: 0 16px;
  cursor: pointer;
}
.primary-button {
  background:
    linear-gradient(
      135deg,
      var(--brand) 0%,
      var(--brand-deep) 100%);
  color: #fff8f2;
  font-weight: 700;
}
.ghost-button {
  background: var(--soft);
  color: var(--text);
}
.nav-button {
  background: #fff7ef;
  color: var(--text);
  border: 1px solid var(--line);
  text-align: left;
  font-weight: 600;
}
.nav-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.inline-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.summary-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff8f1;
}
.summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.summary-value {
  font-size: 14px;
  line-height: 1.5;
}
.summary-value.is-empty {
  color: var(--muted);
  font-weight: 600;
}
.state-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f4ead8;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
}
.state-pill.is-warning {
  background: #f8e2d7;
  color: #a9421d;
}
.project-card {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 10px;
}
.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f7e0d4;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
}
.empty-state {
  text-align: center;
}
.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.mini-meta.is-success {
  color: #2d692d;
}
.mini-meta.is-error {
  color: #a9421d;
}
.inspection-card,
.subitem-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.inspection-card {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.inspection-card.is-finished {
  background: #eef8ee;
  border-color: rgba(91, 155, 91, 0.34);
}
.inspection-card.is-finished .muted {
  color: #4a674a;
}
.inspection-card.is-finished .status-pill {
  background: #ddefdd;
  color: #2d692d;
}
.subitem-row {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.subitem-row.is-pending {
  background: var(--panel);
}
.subitem-row.is-finished {
  background: #eef8ee;
  border-color: rgba(91, 155, 91, 0.34);
}
.subitem-row.is-finished .muted,
.subitem-row.is-finished .subitem-meta {
  color: #4a674a;
}
.subitem-row.is-finished .status-pill {
  background: #ddefdd;
  color: #2d692d;
}
.subitem-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.subitem-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.photo-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.single-action-stack {
  gap: 10px;
}
.upload-chip {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff8f1;
  color: var(--brand-deep);
  font-weight: 700;
  cursor: pointer;
}
.upload-chip.is-disabled,
.ghost-button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.upload-chip.is-selected,
.ghost-button.is-selected {
  background: #f3ddc6;
  border-color: #c97b4e;
  color: var(--brand-deep);
}
.upload-chip input {
  display: none;
}
.button-link,
.preview-link {
  text-decoration: none;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}
.preview-button {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.photo-card {
  position: relative;
  display: grid;
  gap: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff8f1;
}
.photo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: #eadfce;
}
.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}
.compact-photo-card img {
  aspect-ratio: 4 / 3;
  max-height: 110px;
}
.reorderable-photo-card {
  touch-action: none;
  user-select: none;
}
.reorderable-photo-card.is-dragging {
  opacity: 0.72;
  transform: scale(0.98);
  box-shadow: 0 12px 26px rgba(92, 63, 26, 0.18);
}
.photo-delete-button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(29, 26, 22, 0.72);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.small-button {
  min-height: 40px;
  border-radius: 12px;
}
.photo-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 12, 8, 0.8);
}
.image-preview-dialog {
  width: min(100%, 720px);
  max-height: 100%;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}
.image-preview-dialog img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 18px;
  background: #eadfce;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.check-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff8f1;
}
.check-chip input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.generated-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff8f1;
}
.generated-preview-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.generated-preview-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
.save-feedback {
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}
.save-feedback.is-visible {
  display: block;
}
.save-feedback.is-success {
  background: #eef8ee;
  border: 1px solid rgba(91, 155, 91, 0.34);
  color: #2d692d;
}
.save-feedback.is-error {
  background: #fbe9e1;
  border: 1px solid rgba(169, 66, 29, 0.28);
  color: #a9421d;
}
.readiness-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff8f1;
}
.readiness-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}
.readiness-list {
  display: grid;
  gap: 10px;
}
.readiness-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(145, 122, 88, 0.14);
}
.readiness-row .button-link {
  min-width: 92px;
}
.record-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.record-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}
.record-table th,
.record-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(145, 122, 88, 0.16);
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
.record-table th {
  position: sticky;
  top: 0;
  background: #f8efe2;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 700;
  z-index: 1;
}
.record-table tbody tr:nth-child(2n) {
  background: #fffaf3;
}
.preview-paragraph {
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  text-align: justify;
}
.generated-docx-preview {
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #efe8dc;
}
.generated-docx-preview .docx-wrapper {
  background: transparent;
  padding: 0;
}
.generated-docx-preview .docx {
  margin: 0 auto;
}
.generated-docx-preview .docx-preview-page-wrapper {
  background: transparent !important;
  padding: 14px 0 0 !important;
  flex: 0 0 auto;
}
.generated-docx-preview section.docx-preview-page {
  box-shadow: 0 10px 28px rgba(74, 55, 27, 0.16) !important;
}
@media (max-width: 420px) {
  .screen {
    padding: 14px 12px 28px;
  }
  .panel,
  .hero-card {
    border-radius: 18px;
    padding: 14px;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .topbar h1 {
    font-size: 24px;
  }
  .page-path {
    font-size: 14px;
  }
  .summary-grid,
  .photo-grid,
  .photo-inputs,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  .readiness-row {
    grid-template-columns: 1fr;
  }
  .readiness-row .button-link {
    width: 100%;
  }
  .dynamic-list-row {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }
  .inline-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .subitem-head,
  .subitem-meta,
  .project-card-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .photo-actions {
    grid-template-columns: 1fr;
  }
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compact-photo-card img {
    max-height: 84px;
  }
  .generated-docx-preview {
    padding: 4px;
  }
  .generated-docx-preview .docx-preview-page-wrapper {
    padding-top: 8px !important;
  }
}
/*# sourceMappingURL=app.css.map */
