@import url("https://fonts.googleapis.com/css2?family=ZCOOL+XiaoWei&family=Nunito:wght@400;600;700&display=swap");

:root {
  --bg-1: #fdf8f4;
  --bg-2: #ffece2;
  --surface: rgba(255, 255, 255, 0.8);
  --line: rgba(140, 95, 82, 0.22);
  --text: #2e2730;
  --muted: #6f6470;
  --brand: #d85d49;
  --danger: #b8372c;
  --shadow: 0 16px 34px rgba(136, 81, 55, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 700px at 12% -8%, rgba(216, 93, 73, 0.15), transparent 58%),
    linear-gradient(170deg, var(--bg-1), var(--bg-2));
}

.admin-shell {
  width: min(1200px, calc(100% - 28px));
  margin: 22px auto 36px;
  display: grid;
  gap: 14px;
}

.admin-header,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.admin-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.84rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "ZCOOL XiaoWei", "Songti SC", serif;
  letter-spacing: 0.02em;
}

h1 {
  margin-top: 8px;
}

.admin-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.link-btn,
button {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover,
.link-btn:hover {
  background: #bb4f3c;
}

.card {
  padding: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.grid {
  display: grid;
  gap: 10px;
}

.grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 5px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 10px;
  color: var(--text);
  font-size: 0.95rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

thead th {
  text-align: left;
  font-size: 0.84rem;
  color: var(--muted);
  background: #fff5ef;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

tbody td {
  padding: 8px;
  border-bottom: 1px solid #f2e6e0;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody input,
tbody select {
  min-height: 36px;
}

.row-remove-btn {
  background: #fff;
  color: var(--danger);
  border: 1px solid #f0b6ae;
  min-height: 36px;
  padding: 0 12px;
}

.row-remove-btn:hover {
  background: #feecea;
}

.actions-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.danger:hover {
  background: #9e2f26;
}

.hint {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.notice {
  margin: 10px 2px 0;
  min-height: 1.4em;
  font-weight: 700;
  color: #9a322a;
}

@media (max-width: 980px) {
  .grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .admin-header {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .grid-5 {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    width: min(1200px, calc(100% - 16px));
    margin-top: 12px;
  }
}
