:root {
  --ink: #17221f;
  --muted: #68756f;
  --line: #dce3df;
  --paper: #f5f7f5;
  --panel: #fff;
  --green: #12352b;
  --green2: #1d5b48;
  --mint: #dff1e8;
  --amber: #b16a16;
  --amber-bg: #fff1d8;
  --red: #b33a32;
  --red-bg: #fde8e5;
  --blue: #315c8c;
  --shadow: 0 12px 34px rgba(18, 53, 43, 0.08);
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.eyebrow {
  margin: 0 0 5px;
  color: #819088;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 8vw;
  padding: 8vh 9vw;
  background:
    radial-gradient(circle at 18% 20%, #eff8f3, transparent 34%),
    linear-gradient(135deg, #f8faf8, #e7eee9);
}
.login-brand {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.login-brand h1 {
  font-family: Georgia, "Microsoft YaHei", serif;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  margin: 8px 0 20px;
}
.login-brand p:last-child {
  max-width: 600px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}
.brand-mark {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font: 700 24px Georgia;
  box-shadow: 0 14px 28px rgba(18, 53, 43, 0.2);
  flex: none;
}
.brand-mark.small {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 15px;
}
.login-card {
  background: rgba(255, 255, 255, 0.92);
  padding: 34px;
  border: 1px solid rgba(18, 53, 43, 0.1);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}
.login-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  margin-bottom: 4px;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3fa276;
  box-shadow: 0 0 0 5px #e5f5ed;
}
.login-card label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
}
.login-card input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.login-card input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #4a8a70;
  box-shadow: 0 0 0 3px rgba(74, 138, 112, 0.12);
}
.password-wrap {
  display: flex;
  position: relative;
}
.password-wrap input {
  padding-right: 66px;
}
.eye-button {
  position: absolute;
  right: 7px;
  top: 6px;
  border: 0;
  background: #edf3ef;
  color: var(--green);
  height: 32px;
  border-radius: 8px;
  padding: 0 10px;
}
.check-line {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  gap: 8px !important;
  color: var(--muted);
  font-weight: 500 !important;
}
.check-line input {
  width: 16px;
  height: 16px;
}
.primary,
.secondary {
  border-radius: 10px;
  min-height: 40px;
  padding: 0 16px;
  font-weight: 700;
  border: 1px solid transparent;
}
.primary {
  background: var(--green);
  color: #fff;
}
.primary:hover {
  background: var(--green2);
}
.secondary {
  background: #fff;
  border-color: #cdd7d2;
  color: var(--green);
}
.wide {
  width: 100%;
  height: 46px;
}
.login-note {
  margin: 0;
  text-align: center;
  color: #8a9690;
  font-size: 12px;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px 1fr;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: #102d25;
  color: #e8f0ec;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  z-index: 4;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 25px;
}
.sidebar-brand strong {
  display: block;
}
.sidebar-brand span {
  font-size: 11px;
  color: #8fb1a3;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #a9c0b7;
  text-align: left;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 650;
}
.nav-item span {
  width: 20px;
  text-align: center;
  font-size: 18px;
}
.nav-item:hover,
.nav-item.active {
  background: #1c4a3c;
  color: #fff;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 17px 8px 0;
}
.user-badge strong,
.user-badge span {
  display: block;
}
.user-badge span {
  font-size: 12px;
  color: #91ada2;
  margin-top: 3px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--green2);
  font-weight: 700;
  padding: 7px 0;
}
.sidebar .text-button {
  color: #9fc2b4;
}
.main {
  grid-column: 2;
  padding: 30px 34px 60px;
  min-width: 0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.topbar h2 {
  margin: 0;
  font-family: Georgia, "Microsoft YaHei", serif;
  font-size: 30px;
}
.top-actions {
  display: flex;
  gap: 10px;
}
.view {
  display: none;
}
.active-view {
  display: block;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  min-height: 118px;
}
.summary-card .label {
  color: var(--muted);
  font-size: 13px;
}
.summary-card strong {
  display: block;
  font: 600 32px Georgia;
  margin: 10px 0 5px;
}
.summary-card small {
  color: #89948f;
}
.summary-card.alert {
  background: linear-gradient(145deg, #fff, #fff4e3);
  border-color: #f0d3a5;
}
.panel-grid,
.report-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(18, 53, 43, 0.025);
  min-width: 0;
}
.span-2 {
  grid-column: span 1;
}
.report-grid {
  grid-template-columns: 2fr 1fr;
}
.report-grid .span-2 {
  grid-column: span 1;
}
.report-grid .span-3 {
  grid-column: 1/-1;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.panel-head h3 {
  margin: 0;
  font-size: 18px;
}
.table-wrap {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 760px;
}
.data-table th {
  text-align: left;
  color: #718078;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 10px;
  border-bottom: 1px solid #eef1ef;
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: #f8faf8;
}
.click-row {
  cursor: pointer;
}
.primary-cell strong,
.primary-cell span {
  display: block;
}
.primary-cell span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.risk-high,
.severity-fail {
  background: var(--red-bg);
  color: var(--red);
}
.risk-medium,
.severity-warning {
  background: var(--amber-bg);
  color: var(--amber);
}
.risk-low,
.severity-pass {
  background: var(--mint);
  color: #287454;
}
.review-pending {
  background: #eef1ef;
  color: #5e6a65;
}
.review-approved {
  background: var(--mint);
  color: #287454;
}
.review-needs_followup {
  background: var(--amber-bg);
  color: var(--amber);
}
.review-rejected {
  background: var(--red-bg);
  color: var(--red);
}
.issue-count {
  font-weight: 800;
  color: var(--red);
}
.empty {
  padding: 34px;
  text-align: center;
  color: #849089;
  background: #fafbfa;
  border-radius: 10px;
}
.material-list {
  display: grid;
  gap: 12px;
}
.material-item {
  padding: 12px 0;
  border-bottom: 1px solid #edf0ee;
}
.material-item:last-child {
  border: 0;
}
.material-item strong,
.material-item span {
  display: block;
}
.material-item .range {
  font: 600 17px Georgia;
  margin-top: 7px;
}
.material-item small {
  color: var(--muted);
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: 9px;
  margin-bottom: 14px;
}
.callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e8f3ed;
  border: 1px solid #cfdfd7;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.callout p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.button-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.report-bar {
  display: grid;
  grid-template-columns: 90px 1fr 100px 70px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ee;
  font-size: 13px;
}
.bar-track {
  height: 9px;
  border-radius: 9px;
  background: #edf1ee;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2e755c, #7bb49e);
  border-radius: 9px;
}
.issue-list {
  display: grid;
  gap: 10px;
}
.issue-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #edf0ee;
}
.issue-item span:first-child {
  font-size: 13px;
}
.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
}
.import-card {
  display: grid;
  gap: 14px;
}
.file-drop {
  border: 1.5px dashed #b8c8c0;
  border-radius: 14px;
  padding: 20px;
  display: grid;
  gap: 7px;
  background: #fafcfb;
  cursor: pointer;
}
.file-drop:hover {
  border-color: #558d75;
  background: #f2f8f5;
}
.file-drop input {
  display: none;
}
.file-drop span {
  color: var(--muted);
  font-size: 13px;
}
.required-file {
  border-color: #78a892;
}
.guide-card ol {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 18px;
}
.guide-card li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
}
.guide-card li > span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e7f1ec;
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.guide-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.progress-note {
  padding: 12px;
  border-radius: 10px;
  background: #eef6f2;
  color: #265e4b;
}
.detail-dialog {
  width: min(1520px, 96vw);
  height: min(920px, 94vh);
  border: 0;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(13, 34, 28, 0.28);
}
.detail-dialog::backdrop {
  background: rgba(13, 30, 25, 0.52);
  backdrop-filter: blur(2px);
}
.dialog-head {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  margin: 0;
  font-family: Georgia, "Microsoft YaHei", serif;
}
.icon-button {
  border: 0;
  background: #edf1ef;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 24px;
}
.dialog-body {
  padding: 22px 26px 34px;
  height: calc(100% - 83px);
  overflow-y: auto;
  overflow-x: hidden;
}
.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.fact {
  background: #f7f9f7;
  border: 1px solid #e7ece9;
  border-radius: 10px;
  padding: 12px;
}
.fact span,
.fact strong {
  display: block;
}
.fact span {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-section {
  margin-top: 22px;
}
.detail-section h3 {
  font-size: 16px;
  margin: 0 0 12px;
}
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.file-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.file-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.file-card.selected {
  border-color: #4f8b72;
  box-shadow: 0 0 0 2px rgba(79, 139, 114, 0.14);
}
.file-open {
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  text-align: left;
}
.file-preview {
  height: 112px;
  background: #eef2ef;
  display: grid;
  place-items: center;
  color: #64736c;
  font-weight: 700;
  overflow: hidden;
}
.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-meta {
  padding: 10px;
}
.file-meta strong {
  font-size: 12px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta span {
  font-size: 11px;
  color: var(--muted);
}
.file-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px 9px;
}
.file-tools a {
  color: var(--green2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.file-role-select {
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}
.evidence-workbench {
  display: grid;
  grid-template-columns: minmax(440px, 0.92fr) minmax(520px, 1.08fr);
  gap: 18px;
  align-items: start;
}
.evidence-column,
.verification-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}
.evidence-column {
  position: sticky;
  top: 86px;
  max-height: calc(94vh - 110px);
  overflow: auto;
}
.workbench-head,
.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.workbench-head h3,
.item-head h3 {
  margin: 0;
  font-size: 16px;
}
.evidence-viewer {
  height: min(52vh, 510px);
  margin-bottom: 12px;
  border: 1px solid #d7dfdb;
  border-radius: 12px;
  overflow: hidden;
  background: #e9eeeb;
}
.evidence-viewer img,
.evidence-viewer iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}
.evidence-empty {
  height: 100%;
  display: grid;
  place-items: center;
}
.source-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.source-note summary,
.history-details summary {
  cursor: pointer;
  color: var(--green2);
  font-weight: 700;
}
.source-note p {
  line-height: 1.6;
}
.item-stack {
  display: grid;
  gap: 12px;
}
.item-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fbfcfb;
}
.item-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.item-kicker em {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--mint);
  color: #287454;
  font-style: normal;
}
.item-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.item-facts > div {
  padding: 9px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e8edea;
}
.item-facts span,
.item-facts strong {
  display: block;
}
.item-facts span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}
.item-facts strong {
  font-size: 12px;
}
.item-edit-form {
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #bdd4c8;
  background: #f1f7f4;
}
.edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.edit-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.edit-grid input,
.edit-grid select,
.edit-grid textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #ccd9d2;
  border-radius: 8px;
  padding: 8px 9px;
  background: #fff;
  color: var(--ink);
}
.edit-grid textarea {
  min-height: 72px;
  resize: vertical;
}
.edit-grid .wide-field {
  grid-column: 1 / -1;
}
.edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.edit-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}
.history-details {
  margin-top: 12px;
}
.history-details .table-wrap {
  margin-top: 8px;
}
.history-table {
  min-width: 680px;
}
.current-history {
  background: #eef7f2;
}
.price-delta strong,
.price-delta small {
  display: block;
  white-space: nowrap;
}
.price-delta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.delta-up {
  color: var(--red);
}
.delta-down {
  color: #287454;
}
.delta-neutral {
  color: var(--muted);
}
.delta-warn {
  color: var(--amber);
  white-space: nowrap;
}
.check-list {
  display: grid;
  gap: 8px;
}
.check-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.check-card h4 {
  margin: 0 0 5px;
  font-size: 13px;
}
.check-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.check-actions {
  display: flex;
  gap: 6px;
}
.mini {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11px;
}
.review-box {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px;
  background: #f1f6f3;
  border-radius: 12px;
}
.review-box textarea {
  flex: 1;
  min-width: 240px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
  min-height: 42px;
}
.toast {
  position: fixed;
  right: 24px;
  top: 20px;
  background: #173c30;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  z-index: 30;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: 0.2s;
  box-shadow: var(--shadow);
  max-width: 420px;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast.error {
  background: #923931;
}
.skeleton-block:empty {
  min-height: 118px;
  background: linear-gradient(90deg, #eef2ef, #f8faf8, #eef2ef);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 14px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@media (max-width: 1050px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  .import-layout {
    grid-template-columns: 1fr;
  }
  .detail-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .evidence-workbench {
    grid-template-columns: 1fr;
  }
  .evidence-column {
    position: static;
    max-height: none;
  }
  .edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
  .login-brand {
    display: block;
  }
  .brand-mark {
    margin-bottom: 24px;
  }
  .login-brand h1 {
    font-size: 42px;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 12px;
    display: block;
  }
  .sidebar-brand {
    padding: 0 4px 12px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .nav-item {
    white-space: nowrap;
  }
  .sidebar-foot {
    display: none;
  }
  .main {
    padding: 20px 14px;
  }
  .topbar {
    align-items: flex-start;
  }
  .top-actions {
    flex-direction: column;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .detail-summary {
    grid-template-columns: 1fr 1fr;
  }
  .detail-dialog {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  .dialog-body {
    padding: 18px 14px;
  }
  .file-grid.compact,
  .edit-grid {
    grid-template-columns: 1fr;
  }
  .item-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .evidence-viewer {
    height: 48vh;
  }
  .edit-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .edit-actions span {
    margin-right: 0;
  }
  .report-bar {
    grid-template-columns: 70px 1fr 75px;
  }
  .report-bar span:last-child {
    display: none;
  }
}
@media (max-width: 460px) {
  .summary-grid,
  .detail-summary {
    grid-template-columns: 1fr;
  }
  .topbar h2 {
    font-size: 25px;
  }
}
