:root {
  --ink: #181511;
  --muted: #7f7a72;
  --line: rgba(24, 21, 17, 0.1);
  --soft: #fffaf0;
  --gold: #ffd100;
  --gold-dark: #b37a00;
  --green: #10b981;
  --red: #ef4444;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body.app-shell {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 209, 0, 0.18), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(77, 141, 255, 0.12), transparent 32%),
    #fbfbf8;
}

a {
  color: inherit;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.app-logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(17, 12, 8, 0.1);
}

.app-brand strong,
.app-page-title strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
}

.app-brand span,
.app-page-title span {
  color: var(--muted);
  font-size: 13px;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.app-link,
.app-button,
.app-button-secondary,
.app-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.app-button {
  border-color: rgba(255, 209, 0, 0.54);
  background: var(--gold);
  box-shadow: 0 14px 32px rgba(255, 209, 0, 0.24);
}

.app-link:hover,
.app-button:hover,
.app-button-secondary:hover,
.app-icon-button:hover {
  transform: translateY(-1px);
}

.app-button:disabled,
.app-button-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.app-main {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.app-hero {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.app-kicker {
  margin: 0;
  color: #c2a04a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.app-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0;
}

.app-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 18px;
}

.app-grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.app-card {
  border: 1px solid rgba(224, 196, 90, 0.34);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 72px rgba(17, 24, 39, 0.06);
}

.app-card-pad {
  padding: 22px;
}

.app-card h2,
.app-card h3 {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.15;
}

.app-form {
  display: grid;
  gap: 14px;
}

.app-field {
  display: grid;
  gap: 8px;
}

.app-field span {
  color: #8f897f;
  font-size: 13px;
  font-weight: 800;
}

.app-input,
.app-textarea,
.app-select {
  width: 100%;
  border: 1px solid rgba(24, 21, 17, 0.12);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.app-input,
.app-select {
  min-height: 50px;
  padding: 0 16px;
}

.app-textarea {
  min-height: 160px;
  resize: vertical;
  padding: 14px 16px;
  line-height: 1.7;
}

.app-muted {
  color: var(--muted);
}

.app-status {
  min-height: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.app-status.is-error {
  color: var(--red);
}

.app-status.is-success {
  color: #047857;
}

.app-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  background: #f4f1eb;
  color: #57514a;
  font-size: 13px;
  font-weight: 800;
}

.app-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.app-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.app-preview-media {
  aspect-ratio: 1;
  background: linear-gradient(180deg, #fffdf7, #f8f4e8);
}

.app-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.app-preview-body {
  padding: 12px;
}

.app-preview-body strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.app-table th {
  color: #8f897f;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.app-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.app-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0 14px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.app-tab.is-active {
  border-color: rgba(255, 209, 0, 0.72);
  background: var(--gold);
  color: var(--ink);
}

.app-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.app-metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.app-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.app-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  line-height: 1;
}

.app-admin-list {
  display: grid;
  gap: 14px;
}

.app-admin-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.app-admin-row-head,
.app-admin-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.app-admin-row-head strong {
  font-size: 17px;
}

.app-admin-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.app-admin-fields.is-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #b91c1c;
}

.app-drop {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(224, 196, 90, 0.72);
  border-radius: 20px;
  background: #fffdf5;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.app-drop input {
  display: none;
}

@media (max-width: 820px) {
  .app-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .app-grid,
  .app-grid-three,
  .app-metrics,
  .app-admin-fields,
  .app-admin-fields.is-wide {
    grid-template-columns: 1fr;
  }

  .app-main {
    width: min(100% - 20px, 1280px);
    padding-top: 24px;
  }
}
