:root {
  --bg: #f3f7f6;
  --panel: #ffffff;
  --ink: #1f2b2a;
  --muted: #5a6b68;
  --line: #d9e4e2;
  --accent: #c83b2c;
  --accent-2: #2b7a78;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 0 0, #e9f3f0, var(--bg) 38%),
    linear-gradient(180deg, #eef5f4 0, #f5f9f8 100%);
  color: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.layout {
  max-width: 1280px;
  margin: 16px auto;
  padding: 0 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(320px, 420px) 1fr;
  grid-template-areas:
    "auth docs"
    "super docs"
    "upload docs"
    "audit docs";
}

.auth-panel { grid-area: auth; }
.super-panel { grid-area: super; }
.upload-panel { grid-area: upload; }
.docs-panel { grid-area: docs; }
.audit-panel { grid-area: audit; }

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(11, 29, 28, 0.08);
  padding: 14px;
}

h1, h2 {
  margin: 0;
  font-size: 20px;
}

.sub {
  color: var(--muted);
  margin: 8px 0 12px;
}

label {
  display: block;
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--muted);
}

input,
select,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

input {
  background: #fbfdfd;
}

select {
  background: #fbfdfd;
}

button {
  cursor: pointer;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), #e65d4b);
  border: none;
  margin-top: 10px;
}

button:hover {
  filter: brightness(1.03);
}

button.secondary {
  background: linear-gradient(90deg, #5f7470, #6f8581);
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toolbar button {
  width: auto;
  margin: 0;
  background: linear-gradient(90deg, var(--accent-2), #34998f);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.search-row button {
  width: auto;
}

.pager {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pager button {
  width: auto;
  margin: 0;
}

.results {
  max-height: 220px;
  overflow: auto;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.result-item:last-child {
  border-bottom: 0;
}

.result-item button {
  width: auto;
  margin: 0;
  padding: 6px 8px;
  font-size: 12px;
}

.remember {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.remember input {
  width: auto;
  margin: 0;
}

.msg {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

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

.hidden {
  display: none;
}

.is-locked {
  opacity: 0.6;
  pointer-events: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  font-size: 12px;
  vertical-align: top;
}

th {
  color: var(--muted);
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.row-actions button,
.row-actions a {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12px;
  text-decoration: none;
  color: #fff;
  border: 0;
  background: linear-gradient(90deg, var(--accent), #e65d4b);
}

.row-actions .muted {
  background: #647673;
}

.row-actions .danger {
  background: linear-gradient(90deg, #9a1c17, #bf3027);
}

.row-actions .download {
  background: linear-gradient(90deg, #365ea8, #4a78cf);
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "auth"
      "super"
      "upload"
      "docs"
      "audit";
  }
}
