:root {
  --bg: #0b2b1e;
  --bg-2: #0f3626;
  --card: #123c2b;
  --line: #1e5a41;
  --text: #dff3e6;
  --muted: #8fb3a2;
  --accent: #8fe3b0;
  --accent-2: #4bbf85;
  --danger: #ff8d7a;
  --warn: #f2c97d;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, #14442f 0%, var(--bg) 60%);
  color: var(--text);
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

a { color: var(--accent); }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 43, 30, .8);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .3px; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 80px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 15px; color: var(--accent); }
.card.danger-zone { border-color: #5a2b27; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.row-form label.grow { flex: 1 1 220px; }

input, textarea {
  background: #0c2f21; color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; font: inherit; min-width: 150px; width: 100%;
}
.row-form label.grow input { min-width: 200px; }
input:focus, textarea:focus { outline: 2px solid rgba(143, 227, 176, .35); border-color: var(--accent-2); }
textarea { width: 100%; resize: vertical; }

.btn {
  display: inline-block; border: 1px solid var(--line); background: #16442f; color: var(--text);
  border-radius: 9px; padding: 8px 14px; font: inherit; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent-2); }
.btn.primary { background: var(--accent-2); border-color: var(--accent-2); color: #06231a; font-weight: 700; }
.btn.danger { border-color: #7a3a32; color: var(--danger); background: #3a1a16; }
.btn.ghost { background: transparent; }
.btn.tiny { padding: 3px 9px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 6px 16px; font: inherit; cursor: pointer;
}
.tab.active { background: rgba(75, 191, 133, .18); border-color: var(--accent-2); color: var(--accent); }

.filters { display: flex; gap: 8px; margin-bottom: 12px; }
.chip {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 5px 14px; font: inherit; cursor: pointer; font-size: 13px;
}
.chip.active { background: rgba(75, 191, 133, .18); border-color: var(--accent-2); color: var(--accent); }

.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.item .meta { flex: 1 1 260px; min-width: 0; }
.item .title { font-weight: 700; }
.item .sub { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.item .acts { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted);
}
.badge.draft { color: var(--warn); border-color: #6a5326; background: rgba(242, 201, 125, .1); }
.badge.published { color: var(--accent); border-color: var(--accent-2); background: rgba(75, 191, 133, .14); }
.badge.rejected { color: var(--danger); border-color: #7a3a32; background: rgba(255, 141, 122, .1); }

.hint { color: var(--muted); font-size: 12.5px; }
.msg { color: var(--warn); font-size: 13px; min-height: 18px; margin: 8px 0 0; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--accent); }

.addr { margin: 0 0 6px; font-size: 13px; word-break: break-all; }
code { background: #0c2f21; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

.drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center;
  transition: border-color .15s, background .15s;
}
.drop.over { border-color: var(--accent-2); background: rgba(75, 191, 133, .08); }
.drop p { margin: 4px 0; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

.progress { height: 6px; background: #0c2f21; border-radius: 999px; margin-top: 12px; overflow: hidden; }
.progress .bar { height: 100%; width: 0; background: var(--accent-2); transition: width .2s; }

.files { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(30, 90, 65, .5); padding: 6px 2px; font-size: 13px;
}
.file-row .p { flex: 1 1 auto; word-break: break-all; font-family: ui-monospace, Consolas, monospace; }
.file-row .s { color: var(--muted); font-size: 12px; white-space: nowrap; }

.empty { color: var(--muted); text-align: center; padding: 18px; font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #16442f; border: 1px solid var(--accent-2); color: var(--text);
  padding: 10px 18px; border-radius: 10px; z-index: 50; max-width: 90vw;
}
.toast.error { border-color: #7a3a32; color: var(--danger); }

@media (max-width: 560px) {
  .item { align-items: flex-start; }
  .row-form label, .row-form label.grow, input { min-width: 0; }
}