* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: linear-gradient(180deg, #f4eee2 0%, #fbf8f2 48%, #ffffff 100%);
  color: #2f2a25;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(84, 75, 64, 0.08);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: #0f766e;
}

.top-actions {
  display: flex;
  gap: 12px;
}

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

.sidebar {
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.7);
  border-right: 1px solid rgba(84, 75, 64, 0.08);
}

.nav-link {
  display: block;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #594f43;
}

.nav-link.active,
.nav-link:hover {
  background: #0f766e;
  color: #fff;
}

.main {
  padding: 28px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 28px;
}

.page-subtitle {
  margin: 0 0 24px;
  color: #7d7265;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(83, 71, 50, 0.08);
}

.panel {
  padding: 22px;
}

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

.grid-two {
  grid-template-columns: 1.2fr 1fr;
}

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

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar input {
  max-width: 260px;
}

.input,
.textarea,
.button,
.ghost-button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(84, 75, 64, 0.16);
  background: #fff;
}

.textarea {
  min-height: 160px;
  resize: vertical;
}

.button {
  cursor: pointer;
  background: #0f766e;
  color: #fff;
  border: none;
}

.ghost-button {
  cursor: pointer;
  background: transparent;
}

.button.small,
.ghost-button.small {
  width: auto;
  padding: 10px 14px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(84, 75, 64, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  color: #7a6e61;
  font-weight: 600;
}

.cover-thumb {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: #efe8db;
}

.cell-desc {
  margin-top: 6px;
  color: #8a7d70;
  font-size: 13px;
  line-height: 1.5;
}

.muted {
  color: #8a7d70;
}

.status {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  display: none;
}

.status.error {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.status.show {
  display: block;
}

.preview-box {
  margin-top: 12px;
}

.preview-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 16px;
  background: #efe8db;
}

.field-tip {
  margin-top: 8px;
  color: #8a7d70;
  font-size: 13px;
}

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

.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #f5efe4;
  min-height: 110px;
}

.gallery-item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.gallery-remove {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(17, 17, 17, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.hero-item {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(28, 159, 143, 0.92));
  color: #fff;
}

.hero-item h3 {
  margin: 0 0 10px;
}

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

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

  .sidebar {
    display: flex;
    gap: 12px;
    overflow: auto;
  }

  .nav-link {
    margin-bottom: 0;
    white-space: nowrap;
  }

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