:root {
  --ink: #1b2a4a;
  --ink-soft: #3d4f73;
  --muted: #6b7280;
  --paper: #f4efe6;
  --card: #fffdf8;
  --line: #e4d9c5;
  --accent: #b45309;
  --accent-soft: #f3e0c8;
  --good: #0f766e;
  --good-soft: #d1faf4;
  --warn: #b45309;
  --danger: #9f1239;
  --shadow: 0 10px 30px rgba(27, 42, 74, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, #f8e7c8 0%, transparent 50%),
    var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.wrap {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: #f3e6c5;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand small { display: block; color: var(--muted); font-size: 12px; }
.brand b { font-size: 16px; }

.userchip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 13px;
}
.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 6px 12px;
}

.hero, .card, .login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 14px;
}
.login-card {
  width: min(420px, 100%);
  padding: 32px 24px 24px;
}
.seal {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--ink);
  color: #f3e6c5;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}
.login-card h1 {
  margin: 16px 0 6px;
  font-family: "Source Han Serif SC", "Songti SC", "STSong", serif;
  font-size: 28px;
}
.login-card p { margin: 0 0 20px; color: var(--muted); }
.field { margin-bottom: 12px; }
.field label, .label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 16px;
  color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid #f0c48a;
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.btn.wide { width: 100%; }
.btn.accent { background: var(--accent); }
.btn.soft {
  background: var(--accent-soft);
  color: var(--accent);
}
.btn.danger {
  background: #fff1f2;
  color: var(--danger);
}
.btn[disabled] { opacity: .55; cursor: wait; }

.links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 13px;
}
.err {
  color: var(--danger);
  font-size: 13px;
  min-height: 1.2em;
  margin: 8px 0;
}

.hero {
  padding: 22px;
  margin-bottom: 16px;
}
.hero h2 {
  margin: 0 0 6px;
  font-family: "Source Han Serif SC", "Songti SC", serif;
}
.muted { color: var(--muted); font-size: 13px; }
.grid {
  display: grid;
  gap: 12px;
}
.list {
  display: grid;
  gap: 10px;
}
.item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 8px;
}
.item h3 { margin: 0; font-size: 18px; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.warn { background: #fff1f2; color: var(--danger); }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.grow { flex: 1; min-width: 180px; }

.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--muted); font-weight: 600; font-size: 12px; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink-soft);
}
.tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.progress {
  height: 8px;
  background: #efe6d6;
  border-radius: 99px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--good);
  width: 0;
}
.hidden { display: none !important; }
.empty {
  color: var(--muted);
  padding: 24px 8px;
  text-align: center;
}

.fileline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.fileline:last-child { border-bottom: 0; }

@media (max-width: 720px) {
  .wrap { width: min(100% - 20px, 980px); }
  .hero, .item, .login-card { padding: 16px; }
  th:nth-child(n+4), td:nth-child(n+4) { display: none; }
}
