:root {
  color-scheme: light;
  --bg: #f5f7f5;
  --panel: #ffffff;
  --panel-soft: #eef4ef;
  --ink: #10251f;
  --muted: #65756f;
  --line: #d7dfd9;
  --accent: #174f3d;
  --accent-2: #c6a044;
  --danger: #b42318;
  --ok: #147a4d;
  --shadow: 0 18px 60px rgba(16, 37, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 14px;
  cursor: pointer;
  transition: 0.16s ease;
}

button:hover {
  border-color: var(--accent);
}

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

button.danger {
  color: var(--danger);
  border-color: #efc0ba;
}

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

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

input[type="checkbox"] {
  width: auto;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(400px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0 0 20px;
  font-size: 24px;
}

.stack {
  display: grid;
  gap: 14px;
}

.topbar {
  height: 74px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  background: #103c2f;
  color: #fff;
  border-bottom: 4px solid var(--accent-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-2);
  color: #092219;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
}

.brand p,
.userbar p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.layout {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: 350px 1fr;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #edf2ee;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.summary div {
  padding: 18px 12px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.summary strong {
  display: block;
  color: var(--accent);
  font-size: 22px;
}

.filters {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.request-list {
  max-height: calc(100vh - 292px);
  overflow: auto;
}

.request-item {
  display: grid;
  gap: 8px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.request-item.active {
  background: #fff;
  border-left: 4px solid var(--accent);
}

.request-item h3 {
  margin: 0;
  font-size: 15px;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
  padding: 26px 28px 40px;
}

.toolbar,
.section-head,
.row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar {
  margin-bottom: 20px;
}

.toolbar h2 {
  margin: 0;
  font-size: 28px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel-body {
  padding: 18px;
}

.section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.section h3 {
  margin: 0;
  font-size: 18px;
}

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

.span-2 {
  grid-column: 1 / -1;
}

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

.table th,
.table td {
  padding: 11px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.table th {
  color: var(--muted);
  font-size: 12px;
}

.thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.comment {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-left: 3px solid var(--accent);
  background: var(--panel-soft);
  border-radius: 4px;
}

.reply-ref {
  color: var(--muted);
  font-size: 12px;
}

.notice {
  padding: 14px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 380px;
  padding: 13px 16px;
  border-radius: 6px;
  background: #143d31;
  color: #fff;
  box-shadow: var(--shadow);
}

.toast.error {
  background: var(--danger);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 28, 23, 0.54);
}

.modal {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

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

.modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .topbar,
  .layout,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    height: auto;
    padding: 16px;
  }

  .request-list {
    max-height: 320px;
  }

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