:root {
  --bg: #eef2ef;
  --paper: #fffdf9;
  --ink: #1a2a27;
  --muted: #5c6b67;
  --line: #d5ddd8;
  --accent: #0f6b5c;
  --accent-soft: #d8efe9;
  --warn-bg: #f7ead7;
  --danger: #a33;
  --radius: 12px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 400px at 0% 0%, #dceee8, transparent 55%),
    var(--bg);
  min-height: 100vh;
}

a {
  color: var(--accent);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.danger {
  background: var(--danger);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #f3f1ec;
  color: #6b675f;
  cursor: not-allowed;
  opacity: 0.92;
}

.row-editing td {
  background: #fff8e8;
}

.ops {
  white-space: nowrap;
}

.ops .btn {
  margin-right: 4px;
}

.hint {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
}

table.wide {
  min-width: 920px;
}

.draft-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.money-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 110px;
}
.money-cell .money-val {
  min-width: 4.5em;
  letter-spacing: 0.04em;
}
.money-cell .money-val.is-masked {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.18em;
}
.eye-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
}
.eye-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.eye-btn[aria-pressed="true"] {
  color: var(--accent);
  background: #eef7f4;
  border-color: #b7d8cf;
}

.fill-approve-block {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.fill-approve-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.fill-detail-panel {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.fill-detail-section {
  margin-bottom: 14px;
}
.fill-detail-section:last-child {
  margin-bottom: 0;
}
.fill-detail-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.fill-detail-section table {
  font-size: 13px;
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}

.draft-table .row-indent td:first-child {
  color: var(--muted);
  padding-left: 20px;
}

.draft-table .row-deep td:first-child {
  color: #8a857c;
  font-size: 0.9em;
}

.progress-list {
  margin: 8px 0 0;
  padding-left: 1.2em;
  line-height: 1.7;
}

.progress-list li.done .p-label {
  color: #2f6b3a;
  font-weight: 600;
}

.progress-list .p-detail {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.progress-card h2 .hint {
  margin-left: 8px;
}


.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

th {
  background: #f1eee7;
}

.msg {
  margin-top: 8px;
  color: var(--accent);
  font-size: 0.9rem;
}

.msg.err {
  color: var(--danger);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.78rem;
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.side {
  background: #163a34;
  color: #e8f5f1;
  padding: 20px 14px;
}

.side h1 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.side .who {
  font-size: 0.82rem;
  opacity: 0.85;
  margin-bottom: 18px;
}

.side a {
  display: block;
  color: #dff5ef;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.side a.active,
.side a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav-group {
  margin: 14px 10px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(223, 245, 239, 0.55);
  font-weight: 600;
}

.nav-badge {
  display: inline-block;
  margin-left: 6px;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e07070;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fbfaf7;
}

.stat-item.alert {
  border-color: #e0b4b4;
  background: #fff5f5;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-item.alert .stat-num {
  color: var(--danger);
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.fee-fold {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fbfaf7;
}

.fee-fold summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.main {
  padding: 22px;
}

.login-wrap {
  max-width: 400px;
  margin: 10vh auto;
}

.banner {
  background: var(--warn-bg);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}

pre {
  white-space: pre-wrap;
  font-size: 12px;
  background: #f7f5f0;
  padding: 10px;
  border-radius: 8px;
  overflow: auto;
}

code {
  background: #eee;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
}
